mlsanityData to 7 Oct 2026

CodeArt: Better Code Models by Attention Regularization When Symbols Are Lacking

arXiv 2402.11842 ↗First posted 19 Feb 2024cs.SE cs.AI cs.CLcited by 7

Not on the map. Why?

Abstract (arXiv)

Transformer based code models have impressive performance in many software engineering tasks. However, their effectiveness degrades when symbols are missing or not informative. The reason is that the model may not learn to pay attention to the right correlations/contexts without the help of symbols. We propose a new method to pre-train general code models when symbols are lacking. We observe that in such cases, programs degenerate to something written in a very primitive language. We hence propose to use program analysis to extract contexts a priori (instead of relying on symbols and masked language modeling as in vanilla models). We then leverage a novel attention masking method to only allow the model attending to these contexts, e.g., bi-directional program dependence transitive closures and token co-occurrences. In the meantime, the inherent self-attention mechanism is utilized to learn which of the allowed attentions are more important compared to others. To realize the idea, we enhance the vanilla tokenization and model architecture of a BERT model, construct and utilize attention masks, and introduce a new pre-training algorithm. We pre-train this BERT-like model from scratch, using a dataset of 26 million stripped binary functions with explicit program dependence information extracted by our tool. We apply the model in three downstream tasks: binary similarity, type inference, and malware family classification. Our pre-trained model can improve the SOTAs in these tasks from 53% to 64%, 49% to 60%, and 74% to 94%, respectively. It also substantially outperforms other general pre-training techniques of code understanding models.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 49 of its 90 references that are in the map. First posted on arXiv 19 Feb 2024.

Builds on

49 of 90 references.

References · 49

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2023GPT-4 Technical Reportcited by 18,132
  5. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  6. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2018Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learningcited by 1,099
  10. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
  11. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
37 more
  1. 2020On the Bottleneck of Graph Neural Networks and its Practical Implicationscited by 624
  2. 2019Measuring and Relieving the Over-smoothing Problem for Graph Neural Networks from the Topological Viewcited by 544
  3. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  4. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  5. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  6. 2017Learning to Represent Programs with Graphscited by 219
  7. 2019Graph Matching Networks for Learning the Similarity of Graph Structured Objectscited by 202
  8. 2022Representing Long-Range Context for Graph Neural Networks with Global Attentioncited by 193
  9. 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
  10. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
  11. 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
  12. 2022jTrans: Jump-Aware Transformer for Binary Code Similaritycited by 44
  13. 2020Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networkscited by 35
  14. 2020Trex: Learning Execution Semantics from Micro-Traces for Binary Similaritycited by 34
  15. 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
  16. 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
  17. 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
  18. 2021How could Neural Networks understand Programs?cited by 26
  19. 2023A study on Prompt Design, Advantages and Limitations of ChatGPT for Deep Learning Program Repaircited by 26
  20. 2020InferCode: Self-Supervised Learning of Code Representations by Predicting Subtreescited by 23
  21. 2021Augmenting Decompiler Output with Learned Variable Names and Typescited by 23
  22. 2023Domain Knowledge Matters: Improving Prompts with Fix Templates for Repairing Python Type Errorscited by 22
  23. 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyondcited by 20
  24. 2022Dataflow Analysis-Inspired Deep Learning for Efficient Vulnerability Detectioncited by 18
  25. 2023CCT5: A Code-Change-Oriented Pre-Trained Modelcited by 17
  26. 2020TreeCaps: Tree-Based Capsule Networks for Source Code Processingcited by 16
  27. 2022GALOIS: Boosting Deep Reinforcement Learning via Generalizable Logic Synthesiscited by 16
  28. 2021GraphCode2Vec: Generic Code Embedding via Lexical and Program Dependence Analysescited by 11
  29. 2023kTrans: Knowledge-Aware Transformer for Binary Code Embeddingcited by 10
  30. 2022Two Sides of the Same Coin: Exploiting the Impact of Identifiers in Neural Code Comprehensioncited by 9
  31. 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representationcited by 7
  32. 2023PEM: Representing Binary Program Semantics for Similarity Analysis via a Probabilistic Execution Modelcited by 5
  33. 2023Model-Agnostic Syntactical Information for Pre-Trained Programming Language Modelscited by 4
  34. 2021A Comprehensive Study on Learning-Based PE Malware Family Classification Methodscited by 3
  35. 2023A study on the impact of pre-trained model on Just-In-Time defect predictioncited by 3
  36. 2021Identifying Authorship Style in Malicious Binaries: Techniques, Challenges & Datasetscited by 2
  37. 2020GRAPHSPY: Fused Program Semantic-Level Embedding via Graph Neural Networks for Dead Store Detectioncited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 3; 2026: 2.

7 papers.