mlsanityData to 7 Oct 2026

Adversarial Robustness of Deep Code Comment Generation

arXiv 2108.00213 ↗First posted 31 Jul 2021cs.SEcited by 22

Not on the map. Why?

Abstract (arXiv)

Deep neural networks (DNNs) have shown remarkable performance in a variety of domains such as computer vision, speech recognition, or natural language processing. Recently they also have been applied to various software engineering tasks, typically involving processing source code. DNNs are well-known to be vulnerable to adversarial examples, i.e., fabricated inputs that could lead to various misbehaviors of the DNN model while being perceived as benign by humans. In this paper, we focus on the code comment generation task in software engineering and study the robustness issue of the DNNs when they are applied to this task. We propose ACCENT, an identifier substitution approach to craft adversarial code snippets, which are syntactically correct and semantically close to the original code snippet, but may mislead the DNNs to produce completely irrelevant code comments. In order to improve the robustness, ACCENT also incorporates a novel training method, which can be applied to existing code comment generation models. We conduct comprehensive experiments to evaluate our approach by attacking the mainstream encoder-decoder architectures on two large-scale publicly available datasets. The results show that ACCENT efficiently produces stable attacks with functionality-preserving adversarial examples, and the generated examples have better transferability compared with baselines. We also confirm, via experiments, the effectiveness in improving model robustness with our training method.

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

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 4; 2023: 6; 2024: 7; 2025: 3; 2026: 2.

22 papers.

Sort:

By area:

  1. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
  2. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 48
  3. 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 31
  4. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  5. 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
  6. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  7. 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
  8. 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
  9. 2024PPM: Automated Generation of Diverse Programming Problems for Benchmarking Code Generation Modelscited by 7
  10. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  11. 2024CodeFort: Robust Training for Code Generation Modelscited by 4
  12. 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
10 more
  1. 2025Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judgecited by 4
  2. 2022Automatic Comment Generation via Multi-Pass Deliberationcited by 3
  3. 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentationcited by 3
  4. 2024CodeCipher: Learning to Obfuscate Source Code Against LLMscited by 3
  5. 2025Across Programming Language Silos: A Study on Cross-Lingual Retrieval-augmented Code Generationcited by 3
  6. 2023Good-looking but Lacking Faithfulness: Understanding Local Explanation Methods through Trend-based Testingcited by 2
  7. 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detectioncited by 2
  8. 2024Studying Vulnerable Code Entities in Rcited by 0
  9. 2026A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repaircited by 0
  10. 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Qualitycited by 0