# Instruction Alignment for Binary Code Representation Learning

arXiv: https://arxiv.org/abs/2608.11766 · HTML: https://mlsanity.com/paper/2608.11766/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 23 of its 78 references that are in the map.
- First posted on arXiv 12 Aug 2026.

## Builds on (most cited first, 23 of 23)

- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [Representation Learning with Contrastive Predictive Coding](https://mlsanity.com/paper/1807.03748/) (2018)
- [FaceNet: A Unified Embedding for Face Recognition and Clustering](https://mlsanity.com/paper/1503.03832/) (2015)
- [GradNorm: Gradient Normalization for Adaptive Loss Balancing in Deep Multitask Networks](https://mlsanity.com/paper/1711.02257/) (2017)
- [Distributed Representations of Sentences and Documents](https://mlsanity.com/paper/1405.4053/) (2014)
- [Contrastive Learning with Hard Negative Samples](https://mlsanity.com/paper/2010.04592/) (2020)
- [Neural Code Comprehension: A Learnable Representation of Code Semantics](https://mlsanity.com/paper/1806.07336/) (2018)
- [PalmTree: Learning an Assembly Language Model for Instruction Embedding](https://mlsanity.com/paper/2103.03809/) (2021)
- [jTrans: Jump-Aware Transformer for Binary Code Similarity](https://mlsanity.com/paper/2205.12713/) (2022)
- [SAFE: Self-Attentive Function Embeddings for Binary Similarity](https://mlsanity.com/paper/1811.05296/) (2018)
- [Refining Decompiled C Code with Large Language Models](https://mlsanity.com/paper/2310.06530/) (2023)
- [A Survey of Binary Code Similarity](https://mlsanity.com/paper/1909.11424/) (2019)
- [CLAP: Learning Transferable Binary Code Representations with Natural Language Supervision](https://mlsanity.com/paper/2402.16928/) (2024)
- [Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning](https://mlsanity.com/paper/2311.13721/) (2023)
- [Unleashing the Power of Compiler Intermediate Representation to Enhance Neural Program Embeddings](https://mlsanity.com/paper/2204.09191/) (2022)
- [BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching](https://mlsanity.com/paper/2401.11161/) (2024)
- [Notes on the H-measure of classifier performance](https://mlsanity.com/paper/2106.11888/) (2021)
- [PEM: Representing Binary Program Semantics for Similarity Analysis via a Probabilistic Execution Model](https://mlsanity.com/paper/2308.15449/) (2023)
- [Cross-Inlining Binary Function Similarity Detection](https://mlsanity.com/paper/2401.05739/) (2024)
- [1-to-1 or 1-to-n? Investigating the effect of function inlining on binary similarity analysis](https://mlsanity.com/paper/2112.12928/) (2021)
- [CEBin: A Cost-Effective Framework for Large-Scale Binary Code Similarity Detection](https://mlsanity.com/paper/2402.18818/) (2024)
- [KEENHash: Hashing Programs into Function-Aware Embeddings for Large-Scale Binary Code Similarity Analysis](https://mlsanity.com/paper/2506.11612/) (2025)
- [Preserving Privacy in Software Composition Analysis: A Study of Technical Solutions and Enhancements](https://mlsanity.com/paper/2412.00898/) (2024)

## Abstract (arXiv)

Binary code representation learning is a fundamental problem in software security and reverse engineering. Existing methods mainly learn function-level embeddings that capture coarse-grained semantic relationships between binary functions, but they largely ignore fine-grained instruction-level correspondences. This limitation misses valuable supervision signals available from compiler debug information, which can support the learning of more accurate and interpretable binary code representations. We propose to leverage instruction alignment knowledge to further improve binary code representation learning. Our preliminary study reveals that models finetuned for function-level binary code similarity exhibit substantially better instruction alignment than their pre-trained model, suggesting a strong correlation between instruction alignment and function-level embedding quality. Motivated by this observation, we design a training approach that explicitly incorporates instruction alignment as an auxiliary training objective. Our experiments show that instruction alignment training improves retrieval accuracy and provides more discriminative signal for the model's similarity judgments.
