SinoTechIntel Academic Portal
Open AccessDOI: 10.1631/FITEE_2400088Original Research

Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs

Fei Zuo¹,Xiaopeng Li¹,Patrick Young¹,Lannan Luo¹,Qiang Zeng¹,Zhexin Zhang¹

University of South Carolina; Temple University

Read Executive PreviewQuick FAQ
Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs
Graphical Abstract / Figure
Published In
Network and Distributed Systems Security (NDSS) Symposium 2019
Published:December 14, 2025Edition:Vol. 32, Issue 12 • pp. 507-519Citation:Fei Zuo et al. (2025), Network and Distributed Systems Security (NDSS) Symposium 2019
Impact FactorTop Tier Core A*
Sponsored Research Partner
Keywords & Index Terms:binary code analysisneural machine translationcross-architecture comparisonbasic block similaritycode containmentvulnerability discoverycode plagiarism detectiondeep learning

Key Takeaways & Executive Findings

  • • Proposes a novel cross-lingual deep learning approach inspired by Neural Machine Translation to compare binary basic blocks across different ISAs. • Solves the cross-architecture code containment problem for the first time, going beyond function-level equivalence. • Implements INNEREYE and demonstrates superior accuracy, efficiency, and scalability over existing basic-block comparison methods. • Shows the effective transfer of NLP techniques to large-scale binary code analysis, enabling fine-grained vulnerability discovery and plagiarism detection.
Sponsored Research Highlight

Abstract

Binary code analysis allows analyzing binary code without having access to the corresponding source code. A binary, after disassembly, is expressed in an assembly language. This inspires us to approach binary analysis by leveraging ideas and techniques from Natural Language Processing (NLP), a fruitful area focused on processing text of various natural languages. We notice that binary code analysis and NLP share many analogical topics, such as semantics extraction, classification, and code/text comparison. This work thus borrows ideas from NLP to address two important code similarity comparison problems. (I) Given a pair of basic blocks of different instruction set architectures (ISAs), determining whether their semantics is similar; and (II) given a piece of code of interest, determining if it is contained in another piece of code of a different ISA. The solutions to these two problems have many applications, such as cross-architecture vulnerability discovery and code plagiarism detection. Despite the evident importance of Problem I, existing solutions are either inefficient or imprecise. Inspired by Neural Machine Translation (NMT), which is a new approach that tackles text across natural languages very well, we regard instructions as words and basic blocks as sentences, and propose a novel cross-(assembly)-lingual deep learning approach to solving Problem I, attaining high efficiency and precision. Many solutions have been proposed to determine whether two pieces of code, e.g., functions, are equivalent (called the equivalence problem), which is different from Problem II (called the containment problem). Resolving the cross-architecture code containment problem is a new and more challenging endeavor. Employing our technique for cross-architecture basic-block comparison, we propose the first solution to Problem II. We implement a prototype system INNEREYE and perform a comprehensive evaluation. A comparison between our approach and existing approaches to Problem I shows that our system outperforms them in terms of accuracy, efficiency and scalability. The case studies applying the system demonstrate that our solution to Problem II is effective. Moreover, this research showcases how to apply ideas and techniques from NLP to large-scale binary code analysis.

1. Introduction

Binary code analysis allows one to analyze binary code without access to the corresponding source code. It is widely used for vulnerability discovery, code clone detection, user-side crash analysis, etc. Today, binary code analysis has become more important than ever. Gartner forecasts that 8.4 billion IoT devices will be in use worldwide in 2017, up 31 percent from 2016, and will reach 20.4 billion by 2020 [22]. Due to code reuse and sharing, a single vulnerability at source code level may spread across hundreds or more devices that have diverse hardware architectures and software platforms [52]. However, it is difficult, often unlikely, to obtain the source code from the many IoT device companies. Thus, binary code analysis becomes the only feasible approach.

Given a code component that is known to contain some vulnerability and a large number of programs that are compiled for different ISAs, by finding programs that contain similar code components, more instances of the vulnerability can be found. Thus, cross-architecture binary code analysis draws great interests [52], [18], [19], [65].

Our insight. A binary, after disassembly, is represented in some assembly language. This inspires us to approach binary code analysis by learning from Natural Language Processing (NLP), a fruitful area focused on processing natural language corpora effectively and efficiently. Interestingly, the two seemingly remote areas—binary code analysis and NLP—actually share plenty of analogical topics, such as semantics extraction from code/text, summarization of paragraphs/functions, classification of code/articles, and code/text similarity comparison. We thus propose to adapt the ideas, methods, and techniques used in NLP to resolving binary code analysis problems. As a showcase, we use this idea to perform cross-architecture binary code similarity comparison.

Previous work [52], [18], [19], [65] essentially resolves the code equivalence problem at the function level: given a pair of functions, it is to determine whether they are equivalent. We consider a different problem: given a code component, which can be part of a function (e.g., the code in a web server that parses the URL) or a set of functions (e.g., an implementation of a crypto algorithm), to determine whether it is contained in a program. Thus, it is a code containment problem. The problem has been emphasized by previous work [27], [37], [45], [66], [60], [61], [38], but the proposed solutions can only work for code of the same ISA. Resolving the cross-architecture code containment problem is a new and important endeavor. A solution to this problem is critical for tasks such as fine-grained code plagiarism detection, thorough vulnerability search, and virus detection. For example, a code plagiarist may steal part of a function or a bunch of functions, and insert the stolen code into other code; that is, the stolen code is not necessarily a function. Code plagiarism detection based on searching for equivalent functions is too limited to handle such cases.

SinoTechIntel Interactive Document Reader
Page 1–5 of Preview
100%
Download Full PDF

Loading authentic research manuscript (Pages 1–5)...

Sponsored Research Partner
Cite This Research Paper
Fei Zuo, Xiaopeng Li, Patrick Young, Lannan Luo, Qiang Zeng, Zhexin Zhang (2025). Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairs. Network and Distributed Systems Security (NDSS) Symposium 2019. https://doi.org/10.1631/FITEE_2400088
SinoTechIntel Academic & Legal Disclaimer

Research & Educational Purpose Only:The translations, structured abstracts, analytical annotations, and data reports provided by SinoTechIntel are intended exclusively for academic research, internal corporate R&D, and educational benchmarking. They do not constitute formal engineering, chemical safety, legal, or professional advice.

Copyright & Intellectual Property Notice: Original copyright of the underlying source articles and experimental data remains with the respective authors, institutions, and original publishing journals. SinoTechIntel claims intellectual property only over its proprietary translations, analytical syntheses, and AEO structured enhancements in accordance with international fair use and academic citation principles.

Frequently Asked Questions

What is cross-architecture binary code similarity comparison?

It is the process of comparing binary code compiled for different instruction set architectures (ISAs) to determine whether their semantics are similar, without relying on source code. This enables applications such as cross-architecture vulnerability discovery and code plagiarism detection.

What are the two research problems addressed in this paper?

Problem I determines whether a pair of basic blocks from different ISAs are semantically similar. Problem II determines whether a given piece of code is contained in another piece of code of a different ISA, known as the code containment problem.

How does INNEREYE work?

INNEREYE borrows from Neural Machine Translation (NMT) by treating assembly instructions as words and basic blocks as sentences. It uses a cross-lingual deep learning approach to compare binary code semantics across different architectures with high efficiency and precision.

What makes this research different from previous work?

Previous work mainly solved the function-level code equivalence problem for the same or different architectures. This paper is the first to solve the cross-architecture code containment problem, which is more fine-grained and challenging than equivalence checking.

What are the key results of the evaluation?

The evaluation shows that INNEREYE outperforms existing approaches in terms of accuracy, efficiency, and scalability for basic-block similarity comparison. Case studies also confirm that the proposed solution to the cross-architecture code containment problem is effective.

Recommended Scientific Literature & Research Partners

Related Technical Papers & Translations

Research Paper
Design and optimization of a high-efficiency distillation process for cellulosic fuel ethanol integrated with thermal coupling and molecular sieve adsorption

Design and optimization of a high-efficiency distillation process for cellulosic fuel ethanol integrated with thermal coupling and molecular sieve adsorption

To address the challenges of high energy consumption and prominent costs in the traditional three-columns distillation process for cellulosic fuel ethanol, a distillation—molecular sieve coupling separation process is proposed. This process integrates a three-column (crude distillation column, first distillation column, second distillation column) system with a 3A molecular sieve adsorption deep dehydration unit. A thermal coupling network is constructed via differential pressure design (steam from medium/high-pressure columns as mutual heat sources, reboiler liquid waste heat for feed preheating), and molecular sieve adsorption conditions are optimized. The study first performs a thermodynamic consistency test on the ethanol—water system, determines optimal non-random two-liquid (NRTL) model binary interaction parameters via experimental data regression for Aspen Plus simulation. Aiming at minimum total annual cost (TAC), Aspen Plus is used to optimize process parameters (theoretical tray number, feed location, reflux ratio, side-draw position, etc.). Economic analysis shows this process reduces CO2 emission costs by 27.56%, TAC by 15.58% (to 5.123 × 106 USD·a-1), and increases ethanol purity to >99.6%, providing an effective solution for green, efficient separation.

Read Abstract & PDF
Research Paper
A cohesion loss model for determining residual strength of deep bedded sandstone

A cohesion loss model for determining residual strength of deep bedded sandstone

Rock residual strength, as an important input parameter, plays an indispensable role in proposing the reasonable and scientific scheme about stope design, underground tunnel excavation and stability evaluation of deep chambers. Therefore, previous residual strength models of rocks established were reviewed. And corresponding related problems were stated. Subsequently, starting from the effects of bedding and whole life-cycle evolution process, series of triaxial mechanical tests of deep bedded s

Read Abstract & PDF
Research Paper
Federated model with contrastive learning and adaptive control variates for human activity recognition

Federated model with contrastive learning and adaptive control variates for human activity recognition

Recent attention to privacy issues demands a communication-safe method for training human activity recognition (HAR) models on client activity data. Federated learning (FL) has become a compelling technique to facilitate model training between the server and clients while preserving data privacy. However, classical FL methods often assume independent and identically distributed (IID) data among clients. This assumption does not hold true in practical scenarios. Human activity in real-world scena

Read Abstract & PDF