Semantic Robustness of Models of Source Code
Not on the map. Why?
Abstract (arXiv)
Deep neural networks are vulnerable to adversarial examples - small input perturbations that result in incorrect predictions. We study this problem for models of source code, where we want the network to be robust to source-code modifications that preserve code functionality. (1) We define a powerful adversary that can employ sequences of parametric, semantics-preserving program transformations; (2) we show how to perform adversarial training to learn models robust to such adversaries; (3) we conduct an evaluation on different languages and architectures, demonstrating significant quantitative gains in robustness.
Key facts. Cited by 45 papers in the map (data through 14 Oct 2026). First posted on arXiv 7 Feb 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 8; 2022: 5; 2023: 13; 2024: 6; 2025: 6; 2026: 7.
45 papers.
Sort:
By area:
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
- 2023Stealthy Backdoor Attack for Code Modelscited by 49
- 2023Transformers Meet Directed Graphscited by 40
- 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
- 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 29
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 28
- 2021Counterfactual Explanations for Models of Codecited by 25
- 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Modelscited by 23
- 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 22
- 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
33 more
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
- 2022RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformationcited by 15
- 2024Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicatescited by 14
- 2021Certifiably Robust Interpretation via Renyi Differential Privacycited by 10
- 2023Advising OpenMP Parallelization via a Graph-Based Approach with Transformerscited by 10
- 2023Exploiting Code Symmetries for Learning Program Semanticscited by 10
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
- 2024PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Modelscited by 8
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?cited by 7
- 2022Malicious Source Code Detection Using Transformercited by 4
- 2024CodeFort: Robust Training for Code Generation Modelscited by 4
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Searchcited by 3
- 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentationcited by 3
- 2023Towards Understanding What Code Language Models Learnedcited by 3
- 2022Semantic-Preserving Adversarial Code Comprehensioncited by 2
- 2022CLAWSAT: Towards Both Robust and Accurate Code Modelscited by 2
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Taskscited by 2
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detectioncited by 2
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
- 2025Assessing Code Understanding in LLMscited by 2
- 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformationscited by 2
- 2021Energy-bounded Learning for Robust Models of Codecited by 1
- 2025Rethinking LLM-Based RTL Code Optimization Via Timing Logic Metamorphosiscited by 1
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Codecited by 1
- 2026On the Robustness of LLMs' Internal Representation of Code Correctnesscited by 1
- 2024CatCode: A Comprehensive Evaluation Framework for LLMs On the Mixture of Code and Textcited by 0
- 2026Operational Robustness of LLMs on Code Generationcited by 0
- 2026TEMPLATEFUZZ: Fine-Grained Chat Template Fuzzing for Jailbreaking and Red Teaming LLMscited by 0
- 2026Ethics Testing: Proactive Identification of Generative AI System Harmscited by 0
- 2026Invariant Pretraining for Robust Code Representationscited by 0
- 2026Natural Code Transformation Confuses Agents in Vulnerability Analysiscited by 0
- 2026Natural Code Transformation Confuses Agents in Vulnerability Analysis9 Oct 2026
- 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformations18 Aug 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026On the Robustness of LLMs' Internal Representation of Code Correctness8 Aug 2026
- 2026Ethics Testing: Proactive Identification of Generative AI System Harms23 Apr 2026
- 2026TEMPLATEFUZZ: Fine-Grained Chat Template Fuzzing for Jailbreaking and Red Teaming LLMs14 Apr 2026
- 2026Operational Robustness of LLMs on Code Generation21 Feb 2026
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025Rethinking LLM-Based RTL Code Optimization Via Timing Logic Metamorphosis22 Jul 2025
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?15 May 2025
- 2025Assessing Code Understanding in LLMs31 Mar 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
33 more
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants18 Mar 2025
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detection27 Jul 2024
- 2024CodeFort: Robust Training for Code Generation Models11 Apr 2024
- 2024CatCode: A Comprehensive Evaluation Framework for LLMs On the Mixture of Code and Text4 Mar 2024
- 2024Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicates8 Feb 2024
- 2024PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Models28 Jan 2024
- 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Models1 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Tasks22 Nov 2023
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Code13 Nov 2023
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023Exploiting Code Symmetries for Learning Program Semantics7 Aug 2023
- 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detection28 Jun 2023
- 2023Towards Understanding What Code Language Models Learned20 Jun 2023
- 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentation8 Jun 2023
- 2023Large Language Models of Code Fail at Completing Code with Potential Bugs6 Jun 2023
- 2023Advising OpenMP Parallelization via a Graph-Based Approach with Transformers16 May 2023
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Search10 May 2023
- 2023Transformers Meet Directed Graphs31 Jan 2023
- 2023Stealthy Backdoor Attack for Code Models6 Jan 2023
- 2022CLAWSAT: Towards Both Robust and Accurate Code Models21 Nov 2022
- 2022Malicious Source Code Detection Using Transformer16 Sep 2022
- 2022Semantic-Preserving Adversarial Code Comprehension12 Sep 2022
- 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Models31 May 2022
- 2022RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformation12 Feb 2022
- 2021Energy-bounded Learning for Robust Models of Code20 Dec 2021
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understanding4 Dec 2021
- 2021Counterfactual Explanations for Models of Code10 Nov 2021
- 2021Certifiably Robust Interpretation via Renyi Differential Privacy4 Jul 2021
- 2021Memorization and Generalization in Neural Code Intelligence Models16 Jun 2021
- 2021Understanding Neural Code Intelligence Through Program Simplification7 Jun 2021
- 2021Self-Supervised Bug Detection and Repair26 May 2021
- 2021Generating Adversarial Computer Programs using Optimized Obfuscations18 Mar 2021
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
- 2023Transformers Meet Directed Graphscited by 40
- 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
- 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 29
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 28
- 2021Counterfactual Explanations for Models of Codecited by 25
- 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Modelscited by 23
- 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 22
- 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
12 most cited of 41 All 41 (JSON)
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026On the Robustness of LLMs' Internal Representation of Code Correctness8 Aug 2026
- 2026Ethics Testing: Proactive Identification of Generative AI System Harms23 Apr 2026
- 2026Operational Robustness of LLMs on Code Generation21 Feb 2026
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025Rethinking LLM-Based RTL Code Optimization Via Timing Logic Metamorphosis22 Jul 2025
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?15 May 2025
- 2025Assessing Code Understanding in LLMs31 Mar 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants18 Mar 2025
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detection27 Jul 2024
- 2024CodeFort: Robust Training for Code Generation Models11 Apr 2024
12 newest of 41 All 41 (JSON)