mlsanityData to 14 Oct 2026

Pre-Training Representations of Binary Code Using Contrastive Learning

arXiv 2210.05102 ↗First posted 11 Oct 2022cs.SE cs.LGcited by 6

Not on the map. Why?

Abstract (arXiv)

Binary code analysis and comprehension is critical to applications in reverse engineering and computer security tasks where source code is not available. Unfortunately, unlike source code, binary code lacks semantics and is more difficult for human engineers to understand and analyze. In this paper, we present ContraBin, a contrastive learning technique that integrates source code and comment information along with binaries to create an embedding capable of aiding binary analysis and comprehension tasks. Specifically, we present three components in ContraBin: (1) a primary contrastive learning method for initial pre-training, (2) a simplex interpolation method to integrate source code, comments, and binary code, and (3) an intermediate representation learning algorithm to train a binary code embedding. We further analyze the impact of human-written and synthetic comments on binary code comprehension tasks, revealing a significant performance disparity. While synthetic comments provide substantial benefits, human-written comments are found to introduce noise, even resulting in performance drops compared to using no comments. These findings reshape the narrative around the role of comment types in binary code analysis. We evaluate the effectiveness of ContraBin through four indicative downstream tasks related to binary code: algorithmic functionality classification, function name recovery, code summarization, and reverse engineering. The results show that ContraBin considerably improves performance on all four tasks, measured by accuracy, mean of average precision, and BLEU scores as appropriate. ContraBin is the first language representation model to incorporate source code, binary code, and comments into contrastive code representation learning and is intended to contribute to the field of binary code analysis. The dataset used in this study is available for further research.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 33 of its 60 references that are in the map. First posted on arXiv 11 Oct 2022.

Builds on

33 of 60 references.

References · 33

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
  6. 2020Exploring Simple Siamese Representation Learningcited by 2,866
  7. 2020Knowledge Distillation: A Surveycited by 1,603
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  9. 2018Generalized Cross Entropy Loss for Training Deep Neural Networks with Noisy Labelscited by 997
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  11. 2020What Makes for Good Views for Contrastive Learning?cited by 846
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
21 more
  1. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  2. 2019On the Efficacy of Knowledge Distillationcited by 381
  3. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  4. 2020What Should Not Be Contrastive in Contrastive Learningcited by 226
  5. 2013A Survey on Multi-view Learningcited by 152
  6. 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 92
  7. 2022Imbalance Trouble: Revisiting Neural-Collapse Geometrycited by 80
  8. 2020Contrastive Code Representation Learningcited by 76
  9. 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
  10. 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
  11. 2021On the Evaluation of Neural Code Summarizationcited by 48
  12. 2019DIRE: A Neural Approach to Decompiled Identifier Namingcited by 36
  13. 2021CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computingcited by 28
  14. 2018Neural Machine Translation Inspired Binary Code Similarity Comparison beyond Function Pairscited by 25
  15. 2021Augmenting Decompiler Output with Learned Variable Names and Typescited by 23
  16. 2019A Survey of Binary Code Similaritycited by 19
  17. 2019Learning Execution through Neural Code Fusioncited by 13
  18. 2020Bin2vec: Learning Representations of Binary Executable Programs for Security Taskscited by 8
  19. 2021deGraphCS: Embedding Variable-based Flow Graph for Neural Code Searchcited by 3
  20. 2014Representation Learning for cold-start recommendationcited by 1
  21. 2022K-ASTRO: Structure-Aware Adaptation of LLMs for Code Vulnerability Detectioncited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 2; 2024: 1; 2025: 1; 2026: 2.

6 papers.