← Lab /Software

Instruction alignment training improves binary code retrieval accuracy

Incorporating instruction alignment as an auxiliary objective yields higher retrieval accuracy for binary code similarity models

Software arXiv 12 Aug 2026 Method Prototype evidence

Published as “Instruction Alignment for Binary Code Representation Learning”

Why it matters

The approach can be adopted to boost binary similarity search tools used in vulnerability hunting and malware analysis without requiring additional manual labeling.

Summary

Instruction alignment training substantially improves binary code similarity models, raising function-level Recall@1 from 0.401 to 0.640 and instruction-level Recall@1 by up to 88% compared with baselines; the evidence comes from multiple retrieval and alignment experiments across compiler and optimization settings.

What they found 5

  1. Finetuned jTrans model outperforms the pre-trained version on instruction alignment metrics.

    “Finetuned 0.684 0.681 0.574 0.573”

  2. Instruction-alignment training raises average function-level Recall@1 from 0.4011 to 0.6396.

    “Average 0.4011 0.4282 0.6396 0.6590”

  3. Under hard-negative sampling, the MAS score of InsnAlignjtrans achieves higher AUC (0.720) than the baseline (0.644).

    “InsnAlignjtrans Top-5 0.720 0.584 0.778 0.144”

  4. Synergy scoring (combining MAS with cosine similarity) improves average Recall@1 for InsnAlignjtrans from 0.4282 to 0.5475.

    “Average 0.4763 0.5475 0.6470 0.6733”

  5. With hard-negative training, InsnAlignclap outperforms CLAP (λ=0) on the GCC-11 ↔ GCC-11 pair (Recall@1 0.6937 → 0.7075).

    “GCC-11 GCC-11 0.6791 0.6939 0.6937 0.7075”

Caveats 1

  • Average improvement1 +18.7% +27.9% +1.16% +2.17% - the CLAP-based model only gains a 2.17% increase from synergy scoring, far smaller than the gains for jTrans.

What’s new here 4

  • Introduces an auxiliary instruction-alignment loss that directly supervises instruction-level correspondences using compiler debug info.
  • Provides a quantitative instruction-alignment retrieval benchmark to evaluate fine-grained semantic capture.
  • Shows that instruction-level signals can be combined with function-level embeddings (synergy scoring) for further gains.
  • Demonstrates robustness to noisy debug labels and to hard-negative mining.