mlsanityData to 7 Oct 2026

Unveiling Project-Specific Bias in Neural Code Models

arXiv 2201.07381 ↗First posted 19 Jan 2022cs.AI cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Deep learning has introduced significant improvements in many software analysis tasks. Although the Large Language Models (LLMs) based neural code models demonstrate commendable performance when trained and tested within the intra-project independent and identically distributed (IID) setting, they often struggle to generalize effectively to real-world inter-project out-of-distribution (OOD) data. In this work, we show that this phenomenon is caused by the heavy reliance on project-specific shortcuts for prediction instead of ground-truth evidence. We propose a Cond-Idf measurement to interpret this behavior, which quantifies the relatedness of a token with a label and its project-specificness. The strong correlation between model behavior and the proposed measurement indicates that without proper regularization, models tend to leverage spurious statistical cues for prediction. Equipped with these observations, we propose a novel bias mitigation mechanism that regularizes the model's learning behavior by leveraging latent logic relations among samples. Experimental results on two representative program analysis tasks indicate that our mitigation framework can improve both inter-project OOD generalization and adversarial robustness, while not sacrificing accuracy on intra-project IID data.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 43 of its 73 references that are in the map. First posted on arXiv 19 Jan 2022.

Builds on

43 of 73 references.

References · 43

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  7. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  8. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  9. 2017Axiomatic Attribution for Deep Networkscited by 3,350
  10. 2015Domain-Adversarial Training of Neural Networkscited by 3,023
  11. 2020Shortcut Learning in Deep Neural Networkscited by 1,928
  12. 2019Invariant Risk Minimizationcited by 1,832
31 more
  1. 2016Enriching Word Vectors with Subword Informationcited by 1,578
  2. 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,430
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  4. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  5. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  6. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  7. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
  8. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  9. 2017Methods for Interpreting and Understanding Deep Neural Networkscited by 342
  10. 2017Don't Just Assume; Look and Answer: Overcoming Priors for Visual Question Answeringcited by 337
  11. 2019Don't Take the Easy Way Out: Ensemble Based Methods for Avoiding Known Dataset Biasescited by 279
  12. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  13. 2018Learning Not to Learn: Training Deep Neural Networks with Biased Datacited by 255
  14. 2019Probing Neural Network Comprehension of Natural Language Argumentscited by 212
  15. 2017Learning Explanatory Rules from Noisy Datacited by 210
  16. 2019Towards Debiasing Fact Verification Modelscited by 143
  17. 2019End-to-End Bias Mitigation by Modelling Biases in Corporacited by 127
  18. 2019Learning Robust Representations by Projecting Superficial Statistics Outcited by 123
  19. 2019Unlearn Dataset Bias in Natural Language Inference by Fitting the Residualcited by 119
  20. 2021Towards Improving Adversarial Training of NLP Modelscited by 79
  21. 2021Towards Interpreting and Mitigating Shortcut Learning Behavior of NLU Modelscited by 78
  22. 2019Adversarial Examples for Models of Codecited by 61
  23. 2018Adversarially Regularising Neural NLI Models to Integrate Logical Background Knowledgecited by 45
  24. 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
  25. 2018Explicit Bias Discovery in Visual Question Answering Modelscited by 42
  26. 2020Adversarial Robustness for Codecited by 36
  27. 2020Towards Robustifying NLI Models Against Lexical Dataset Biasescited by 34
  28. 2019Few-Shot Representation Learning for Out-Of-Vocabulary Wordscited by 30
  29. 2020Typilus: Neural Type Hintscited by 29
  30. 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
  31. 2020Avoiding the Hypothesis-Only Bias in Natural Language Inference via Ensemble Adversarial Trainingcited by 5

Built on by

Cited by year

Citing papers per year: 2022: 1.

1 paper.