mlsanityData to 14 Oct 2026

Enhancing Robustness of AI Offensive Code Generators via Data Augmentation

arXiv 2306.05079 ↗First posted 8 Jun 2023cs.LG cs.CL cs.CRcited by 3

Not on the map. Why?

Abstract (arXiv)

Since manually writing software exploits for offensive security is time-consuming and requires expert knowledge, AI-base code generators are an attractive solution to enhance security analysts' productivity by automatically crafting exploits for security testing. However, the variability in the natural language and technical skills used to describe offensive code poses unique challenges to their robustness and applicability. In this work, we present a method to add perturbations to the code descriptions to create new inputs in natural language (NL) from well-intentioned developers that diverge from the original ones due to the use of new words or because they miss part of them. The goal is to analyze how and to what extent perturbations affect the performance of AI code generators in the context of offensive code. First, we show that perturbed descriptions preserve the semantics of the original, non-perturbed ones. Then, we use the method to assess the robustness of three state-of-the-art code generators against the newly perturbed inputs, showing that the performance of these AI-based solutions is highly affected by perturbations in the NL descriptions. To enhance their robustness, we use the method to perform data augmentation, i.e., to increase the variability and diversity of the NL descriptions in the training data, proving its effectiveness against both perturbed and non-perturbed code descriptions.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 56 of its 108 references that are in the map. First posted on arXiv 8 Jun 2023.

Builds on

56 of 108 references.

References · 56

  1. 2017Attention Is All You Needcited by 60,361
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  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. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  6. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  7. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  9. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 807
  10. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
  11. 2020Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillationcited by 593
  12. 2018Generating Natural Language Adversarial Examplescited by 424
38 more
  1. 2021A Survey of Data Augmentation Approaches for NLPcited by 409
  2. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
  3. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  4. 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 306
  5. 2016Counter-fitting Word Vectors to Linguistic Constraintscited by 140
  6. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
  7. 2018Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examplescited by 94
  8. 2020Reevaluating Adversarial Examples in Natural Languagecited by 85
  9. 2021Towards Improving Adversarial Training of NLP Modelscited by 79
  10. 2022Natural Attack for Pre-trained Models of Codecited by 75
  11. 2018SwitchOut: an Efficient Data Augmentation Algorithm for Neural Machine Translationcited by 72
  12. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
  13. 2021Bad Characters: Imperceptible NLP Attackscited by 71
  14. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  15. 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
  16. 2019Adversarial Examples for Models of Codecited by 63
  17. 2019On Evaluation of Adversarial Perturbations for Sequence-to-Sequence Modelscited by 56
  18. 2021Searching for an Effective Defender: Benchmarking Defense against Adversarial Word Substitutioncited by 56
  19. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
  20. 2019On Learning Meaningful Code Changes via Neural Machine Translationcited by 50
  21. 2019Soft Contextual Data Augmentation for Neural Machine Translationcited by 49
  22. 2020Semantic Robustness of Models of Source Codecited by 45
  23. 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
  24. 2021Multilingual training for Software Engineeringcited by 43
  25. 2023On Robustness of Prompt-based Semantic Parsing with Large Pre-trained Language Model: An Empirical Study on Codexcited by 41
  26. 2021The Threat of Offensive AI to Organizationscited by 38
  27. 2017How Robust Are Character-Based Word Embeddings in Tagging and MT Against Wrod Scramlbing or Randdm Nouse?cited by 23
  28. 2021Translation Quality Assessment: A Brief Survey on Manual and Automatic Methodscited by 23
  29. 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
  30. 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
  31. 2018XNMT: The eXtensible Neural Machine Translation Toolkitcited by 14
  32. 2021On Robustness of Neural Semantic Parserscited by 14
  33. 2021EVIL: Exploiting Software via Natural Languagecited by 12
  34. 2022Who Evaluates the Evaluators? On Automatic Metrics for Assessing AI-based Offensive Code Generatorscited by 11
  35. 2021BERT is Robust! A Case Against Synonym-Based Adversarial Examples in Text Classificationcited by 9
  36. 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
  37. 2022DualSC: Automatic Generation and Summarization of Shellcode via Transformer and Dual Learningcited by 8
  38. 2023Keeping Pace with Ever-Increasing Data: Towards Continual Learning of Code Intelligence Modelscited by 8

50 most cited of 56 All 56 (JSON)

Built on by

Cited by year

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

3 papers.