mlsanityData to 7 Oct 2026

Generating Adversarial Computer Programs using Optimized Obfuscations

arXiv 2103.11882 ↗First posted 18 Mar 2021cs.LG cs.PL cs.SEcited by 20

Not on the map. Why?

Abstract (arXiv)

Machine learning (ML) models that learn and predict properties of computer programs are increasingly being adopted and deployed. These models have demonstrated success in applications such as auto-completing code, summarizing large programs, and detecting bugs and malware in programs. In this work, we investigate principled ways to adversarially perturb a computer program to fool such learned models, and thus determine their adversarial robustness. We use program obfuscations, which have conventionally been used to avoid attempts at reverse engineering programs, as adversarial perturbations. These perturbations modify programs in ways that do not alter their functionality but can be crafted to deceive an ML model when making a decision. We provide a general formulation for an adversarial program that allows applying multiple obfuscation transformations to a program in any language. We develop first-order optimization algorithms to efficiently determine two key aspects -- which parts of the program to transform, and what transformations to use. We show that it is important to optimize both these aspects to generate the best adversarially perturbed program. Due to the discrete nature of this problem, we also propose using randomized smoothing to improve the attack loss landscape to ease optimization. We evaluate our work on Python and Java programs on the problem of program summarization. We show that our best attack proposal achieves a 52% improvement over a state-of-the-art attack generation approach for programs trained on a seq2seq model. We further show that our formulation is better at training models that are robust to adversarial attacks.

Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). Builds on 18 of its 38 references that are in the map. First posted on arXiv 18 Mar 2021.

Builds on

18 of 38 references.

References · 18

  1. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  2. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  3. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
  4. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  5. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  6. 2019Topology Attack and Defense for Graph Neural Networks: An Optimization Perspectivecited by 196
  7. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  8. 2016DeepCoder: Learning to Write Programscited by 145
  9. 2013Mini-batch Stochastic Approximation Methods for Nonconvex Stochastic Composite Optimizationcited by 142
  10. 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
  11. 2018DeepBugs: A Learning Approach to Name-based Bug Detectioncited by 65
  12. 2019Adversarial Examples for Models of Codecited by 61
6 more
  1. 2020Semantic Robustness of Models of Source Codecited by 43
  2. 2020Adversarial Robustness for Codecited by 36
  3. 2018Evaluating and Understanding the Robustness of Adversarial Logit Pairingcited by 34
  4. 2019Misleading Authorship Attribution of Source Code using Adversarial Learningcited by 33
  5. 2019COSET: A Benchmark for Evaluating Neural Program Embeddingscited by 10
  6. 2020Evaluation of Generalizability of Neural Program Analyzers under Semantic-Preserving Transformationscited by 9

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 5; 2023: 8; 2024: 2; 2025: 3; 2026: 2.

20 papers.

Sort:

By area:

  1. 2023A Pilot Study of Query-Free Adversarial Attack against Stable Diffusioncited by 75
  2. 2023LILO: Learning Interpretable Libraries by Compressing and Documenting Codecited by 46
  3. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  4. 2022Reverse Engineering of Imperceptible Adversarial Image Perturbationscited by 17
  5. 2022A Word is Worth A Thousand Dollars: Adversarial Attack on Tweets Fools Stock Predictionscited by 15
  6. 2022RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformationcited by 13
  7. 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?cited by 13
  8. 2023Turbulence: Systematically and Automatically Testing Instruction-Tuned Large Language Models for Codecited by 9
  9. 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
  10. 2024CodeFort: Robust Training for Code Generation Modelscited by 4
  11. 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
  12. 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Searchcited by 3
8 more
  1. 2022Semantic-Preserving Adversarial Code Comprehensioncited by 2
  2. 2022CLAWSAT: Towards Both Robust and Accurate Code Modelscited by 2
  3. 2023Transfer Attacks and Defenses for Large Language Models on Coding Taskscited by 2
  4. 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detectioncited by 2
  5. 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
  6. 2025Auto-SPT: Automating Semantic Preserving Transformations for Codecited by 0
  7. 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0
  8. 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformationscited by 0