Software Engineering
Machine Learning Method Detects Reused Assembly Code Across Different Processors
A new system called Pluvio uses transfer learning and advanced neural techniques to identify cloned assembly code, even when compiled for unfamiliar processor architectures.
Code reuse is fundamental to modern software development—it accelerates product delivery and reduces redundant effort. Yet uncontrolled reuse creates serious problems: security vulnerabilities can propagate through systems, and intellectual property theft becomes harder to detect. Finding cloned or reused assembly code in compiled executables is an important defensive measure, especially for identifying vulnerable binaries that have already shipped.
The challenge with existing approaches#
Machine learning has emerged as a promising tool for finding assembly code clones, since it can match code variants that result from different compilers and optimization settings. However, current methods suffer from a critical limitation: they can only reliably detect clones in the processor architectures and compilation toolchains they were trained on. When faced with unseen architectures or unfamiliar libraries, their performance drops sharply.
How Pluvio works#
Researchers propose Pluvio, a system that tackles this generalization problem by incorporating three key innovations:
- Transfer learning from language models — The system taps into knowledge from large pre-trained natural language models. This provides broader, human-curated understanding of assembly code patterns, helping the model work with unfamiliar architectures.
- Token reduction via reinforcement learning — A reinforcement learning agent removes unnecessary and redundant tokens from assembly sequences, addressing limits on the length of input the system can process.
- Variational Information Bottleneck learning — This technique minimizes the model's reliance on architecture-specific and optimization-specific signals, pushing it to learn more generalizable patterns instead.
Testing on unseen architectures#
The researchers tested their approach by simulating scenarios where the system encounters processor architectures it has never seen during training. Experimental results demonstrate that Pluvio outperforms existing state-of-the-art methods in these challenging conditions, suggesting it can reliably identify cloned code even across unfamiliar compilation environments.