Cited by 92Adversarial Robustness in Machine LearningSoftware Engineering ResearchSoftware Testing and Debugging Techniques

Semantic Robustness of Models of Source Code

Open access
Henkel, Jordan, Ramakrishnan, Goutham, Wang, Zi, Albarghouthi, Aws, Jha, Somesh, Reps, Thomas·2022·2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)

Abstract

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 neural network to be robust to source-code modifications that preserve code functionality. To facilitate training robust models, we define a powerful and generic adversary that can employ sequences of parametric, semantics-preserving program transformations. We then explore how, with such an adversary, one can train models that are robust to adversarial program transformations. We conduct a thorough evaluation of our approach and find several surprising facts: we find robust training to beat dataset augmentation in every evaluation we performed; we find that a state-of-the-art architecture (code2seq) for models of code is harder to make robust than a simpler baseline; additionally, we find code2seq to have surprising weaknesses not present in our simpler baseline model; finally, we find that robust models perform better against unseen data from different sources (as one might hope)-however, we also find that robust models are not clearly better in the cross-language transfer task. To the best of our knowledge, we are the first to study the interplay between robustness of models of code and the domain-adaptation and cross-language- transfer tasks.

Integrity signals

Registry

Crossref · 10.1109/saner53432.2022.00070

Cites

5 of 5 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Existing techniques for optimizing LLM behavior on code snippets are mainly driven by machine learning approaches and lack explanations of LLM preference or predictable results before actual generation.

    “These optimization techniques are mainly driven by machine learning approaches, lacking explanations on preference of LLM or predictable results before the actual generation.”

    From What Makes In-Context Examples Effective for Code Generation? (2026) · cites this paper as Henkel et al. [27]

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Henkel, J., Ramakrishnan, G., Wang, Z., Albarghouthi, A., Jha, S., & Reps, T.
Affiliations
  • University of Wisconsin–Madison (US)
  • Samsung Semiconductor (United States) (US)
Venue
2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)
Publisher
IEEE
Published
2022-03
Pages
526-537
OpenAlex
W3004658838
Cited by
92
References
5
Citations by year
2026: 12 · 2025: 15 · 2024: 23 · 2023: 18 · 2022: 10 · 2021: 10 · 2020: 4
FWCI
9.12
Type
conference paper
Language
en
Open access
Locations
  • IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • NSF (FMitF-1836978)
  • ARO (W911NF-17-1-0405)
  • ONR (N00014-17-1-2889,N00014-19-1-2318)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
Keywords
adversarial robustness, adversarial examples, domain adaptation, cross-language transfer, robust training, data augmentation, neural network vulnerabilities

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review