mlsanityData to 7 Oct 2026

On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformations

arXiv 2008.01566 ↗First posted 31 Jul 2020cs.SE cs.LG cs.PLcited by 41

Not on the map. Why?

Abstract (arXiv)

With the prevalence of publicly available source code repositories to train deep neural network models, neural program models can do well in source code analysis tasks such as predicting method names in given programs that cannot be easily done by traditional program analysis techniques. Although such neural program models have been tested on various existing datasets, the extent to which they generalize to unforeseen source code is largely unknown. Since it is very challenging to test neural program models on all unforeseen programs, in this paper, we propose to evaluate the generalizability of neural program models with respect to semantic-preserving transformations: a generalizable neural program model should perform equally well on programs that are of the same semantics but of different lexical appearances and syntactical structures. We compare the results of various neural program models for the method name prediction task on programs before and after automated semantic-preserving transformations. We use three Java datasets of different sizes and three state-of-the-art neural network models for code, namely code2vec, code2seq, and GGNN, to build nine such neural program models for evaluation. Our results show that even with small semantically preserving changes to the programs, these neural program models often fail to generalize their performance. Our results also suggest that neural program models based on data and control dependencies in programs generalize better than neural program models based only on abstract syntax trees. On the positive side, we observe that as the size of the training dataset grows and diversifies the generalizability of correct predictions produced by the neural program models can be improved too. Our results on the generalizability of neural program models provide insights to measure their limitations and provide a stepping stone for their improvement.

Key facts. Cited by 41 papers in the map (data through 7 Oct 2026). First posted on arXiv 31 Jul 2020.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 7; 2022: 6; 2023: 9; 2024: 6; 2025: 10; 2026: 3.

41 papers.

Sort:

By area:

  1. 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
  2. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  3. 2023CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Modelscited by 28
  4. 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 20
  5. 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 17
  6. 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inferencecited by 14
  7. 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 13
  8. 2022An Exploratory Study on Code Attention in BERTcited by 12
  9. 2023Toward a Theory of Causation for Interpreting Neural Code Modelscited by 12
  10. 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
  11. 2023Exploiting Code Symmetries for Learning Program Semanticscited by 9
  12. 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
29 more
  1. 2024Are Latent Vulnerabilities Hidden Gems for Software Vulnerability Prediction? An Empirical Studycited by 9
  2. 2022Fix Bugs with Transformer through a Neural-Symbolic Edit Grammarcited by 8
  3. 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
  4. 2022Syntax-Guided Program Reduction for Understanding Neural Code Intelligence Modelscited by 7
  5. 2024Towards Reliable Evaluation of Neural Program Repair with Natural Robustness Testingcited by 5
  6. 2021Code2Snapshot: Using Code Snapshots for Learning Representations of Source Codecited by 4
  7. 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
  8. 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
  9. 2025Assessing the Impact of Code Changes on the Fault Localizability of Large Language Modelscited by 4
  10. 2025Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judgecited by 4
  11. 2021Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rulescited by 3
  12. 2024Uncertainty Awareness of Large Language Models Under Code Distribution Shifts: A Benchmark Studycited by 3
  13. 2023Study of Distractors in Neural Models of Codecited by 2
  14. 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
  15. 2026Evaluating LLM-Based Test Generation Under Software Evolutioncited by 2
  16. 2021WheaCha: A Method for Explaining the Predictions of Models of Codecited by 1
  17. 2021Is a Single Model Enough? MuCoS: A Multi-Model Ensemble Learning for Semantic Code Searchcited by 1
  18. 2021Energy-bounded Learning for Robust Models of Codecited by 1
  19. 2023Redundancy and Concept Analysis for Code-trained Language Modelscited by 1
  20. 2024Trojans in Large Language Models of Code: A Critical Review through a Trigger-Based Taxonomycited by 1
  21. 2022Extracting Label-specific Key Input Features for Neural Code Intelligence Modelscited by 0
  22. 2023A Study of Variable-Role-based Feature Enrichment in Neural Models of Codecited by 0
  23. 2024CatCode: A Comprehensive Evaluation Framework for LLMs On the Mixture of Code and Textcited by 0
  24. 2025A Match Made in Heaven? AI-driven Matching of Vulnerabilities and Security Unit Testscited by 0
  25. 2025An Initial Exploration of Fine-tuning Small Language Models for Smart Contract Reentrancy Vulnerability Detectioncited by 0
  26. 2025Auto-SPT: Automating Semantic Preserving Transformations for Codecited by 0
  27. 2025How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?cited by 0
  28. 2026Operational Robustness of LLMs on Code Generationcited by 0
  29. 2026Invariant Pretraining for Robust Code Representationscited by 0