Pluvio: Assembly Clone Search for Out-of-domain Architectures and Libraries through Transfer Learning and Conditional Variational Information Bottleneck

Zhiwei Fu, Steven H. H. Ding, Furkan Alaca, Benjamin C. M. Fung, Philippe CharlandarXiv 2023 · DOI

Identifying similar code across different compiled binaries—known as assembly clone search—is a cornerstone of modern security research. It allows analysts to track the propagation of known vulnerabilities across diverse firmware images and devices. However, a significant hurdle remains: most machine learning models are "in-domain" experts, performing well only on the architectures (e.g., x86, ARM) and libraries they encountered during training. When faced with "out-of-domain" (OOD) scenarios, such as proprietary libraries or unseen architectures like MIPS and PowerPC, their accuracy typically plummets.

Presented at a major security venue in 2023, Pluvio is a novel framework designed specifically to bridge this gap. By utilizing transfer learning and a unique "strategic forgetting" mechanism, Pluvio achieves over a 35% improvement in accuracy for OOD scenarios compared to previous state-of-the-art methods.

The core difficulty in cross-platform clone search lies in distinguishing functional logic from architectural noise. Compilers introduce specific patterns for register naming, stack handling, and instruction sets that vary wildly between platforms. Standard models often mistake this noise for the actual logic of the code, leading to false negatives when searching across different architectures.

Training vs. Testing scenarios for in-domain and out-of-domain (OOD) assembly clone search.

As illustrated in the figure above, the research defines three distinct OOD challenges: unseen architectures, unseen libraries, and a combined "stress test" featuring both. While traditional models excel at matching zlib:crc32 between amd64 and armv7 (in-domain), they struggle when the same function appears in a PowerPC binary or when a completely new library like OpenSSL is introduced.

The Pluvio Framework

Pluvio employs a three-pronged approach to ensure robust generalization:

  1. Transfer Learning via MPNet: Rather than training from scratch, Pluvio leverages MPNet, a large-scale language model pre-trained on massive text corpora. This provides the model with a foundational understanding of logical structures and semantic relationships before it is fine-tuned on assembly data.
  2. Reinforcement Learning (RL) for Subsequence Removal: Assembly functions can be extremely long, often exceeding the token limits of standard NLP models. Instead of simple truncation, which might discard critical logic, Pluvio uses an RL agent to act as a "smart editor." The agent learns to identify and remove redundant or noisy tokens, preserving the most semantically important parts of the function.
  3. Conditional Variational Information Bottleneck (CVIB): This is Pluvio's primary innovation. During training, the model is provided with labels for the architecture and optimization settings. The CVIB forces the model to compress or "forget" this architecture-specific information (the "nuisance" data) while maximizing the retention of the underlying code functionality. This ensures that at test time, the model focuses solely on the algorithm rather than the platform-specific implementation details.

Evaluation and Key Results

The authors evaluated Pluvio against a diverse dataset. The training set included common architectures like ARM and x86 with libraries such as BusyBox and SQLite3. The OOD testing involved architectures never seen during training (PowerPC, MIPS) and libraries like ImageMagick and Curl.

Pluvio significantly outperformed existing models like Order Matters, PalmTree, and Asm2Vec across all categories. In the most challenging "Combined OOD" test (unseen architectures and unseen libraries), Pluvio achieved 82.5% accuracy and 88.7% AUC. In contrast, existing state-of-the-art models often dropped to near-random performance (50-60% AUC) when faced with MIPS or PowerPC code.

Conclusion

Pluvio demonstrates that "strategic forgetting" is a powerful tool for generalization. By treating architecture as nuisance information to be filtered out, the model can focus on the universal language of logic. While future work may address specialized obfuscation techniques and the computational overhead of RL-based pre-processing, Pluvio represents a major step forward in making assembly clone search a truly cross-platform capability.

Summary updated

BibTeX
@misc{fu2023pluvio,
  author = {Zhiwei Fu and Steven H. H. Ding and Furkan Alaca and Benjamin C. M. Fung and Philippe Charland},
  title = {{Pluvio: Assembly Clone Search for Out-of-domain Architectures and Libraries through Transfer Learning and Conditional Variational Information Bottleneck}},
  year = {2023},
  eprint = {2307.10631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.10631},
}
Figure