mlsanityData to 7 Oct 2026

MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentation

arXiv 2210.03003 ↗First posted 6 Oct 2022cs.SE cs.AIcited by 4

Not on the map. Why?

Abstract (arXiv)

Inspired by the great success of Deep Neural Networks (DNNs) in natural language processing (NLP), DNNs have been increasingly applied in source code analysis and attracted significant attention from the software engineering community. Due to its data-driven nature, a DNN model requires massive and high-quality labeled training data to achieve expert-level performance. Collecting such data is often not hard, but the labeling process is notoriously laborious. The task of DNN-based code analysis even worsens the situation because source code labeling also demands sophisticated expertise. Data augmentation has been a popular approach to supplement training data in domains such as computer vision and NLP. However, existing data augmentation approaches in code analysis adopt simple methods, such as data transformation and adversarial example generation, thus bringing limited performance superiority. In this paper, we propose a data augmentation approach MIXCODE that aims to effectively supplement valid training data, inspired by the recent advance named Mixup in computer vision. Specifically, we first utilize multiple code refactoring methods to generate transformed code that holds consistent labels with the original data. Then, we adapt the Mixup technique to mix the original code with the transformed code to augment the training data. We evaluate MIXCODE on two programming languages (Java and Python), two code tasks (problem classification and bug detection), four benchmark datasets (JAVA250, Python800, CodRep1, and Refactory), and seven model architectures (including two pre-trained models CodeBERT and GraphCodeBERT). Experimental results demonstrate that MIXCODE outperforms the baseline data augmentation approach by up to 6.24% in accuracy and 26.06% in robustness.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 50 of its 79 references that are in the map. First posted on arXiv 6 Oct 2022.

Builds on

50 of 79 references.

References · 50

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
  3. 2017Graph Attention Networkscited by 8,854
  4. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  5. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,155
  6. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,875
  7. 2020WILDS: A Benchmark of in-the-Wild Distribution Shiftscited by 1,366
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2019AugMix: A Simple Data Processing Method to Improve Robustness and Uncertaintycited by 897
  10. 2021Measuring Coding Challenge Competence With APPScited by 879
  11. 2015Gated Graph Sequence Neural Networkscited by 792
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
38 more
  1. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  2. 2021A Survey of Data Augmentation Approaches for NLPcited by 408
  3. 2018Deep Face Recognition: A Surveycited by 275
  4. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  5. 2020Puzzle Mix: Exploiting Saliency and Local Statistics for Optimal Mixupcited by 260
  6. 2018code2vec: Learning Distributed Representations of Codecited by 249
  7. 2017Learning to Represent Programs with Graphscited by 219
  8. 2020Data Augmentation for Graph Neural Networkscited by 200
  9. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
  10. 2020How Does Mixup Help With Robustness and Generalization?cited by 193
  11. 2020MixText: Linguistically-Informed Interpolation of Hidden Space for Semi-Supervised Text Classificationcited by 186
  12. 2020SaliencyMix: A Saliency Guided Data Augmentation Strategy for Better Regularizationcited by 149
  13. 2017Generalization in Deep Learningcited by 146
  14. 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
  15. 2021PixMix: Dreamlike Pictures Comprehensively Improve Safety Measurescited by 131
  16. 2021Co-Mixup: Saliency Guided Joint Mixup with Supermodular Diversitycited by 127
  17. 2019Augmenting Data with Mixup for Sentence Classification: An Empirical Studycited by 125
  18. 2020Graph-based, Self-Supervised Program Repair from Diagnostic Feedbackcited by 93
  19. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  20. 2020ResizeMix: Mixing Data with Preserved Object Information and True Labelscited by 68
  21. 2019Adversarial Examples for Models of Codecited by 61
  22. 2021Self-Supervised Bug Detection and Repaircited by 59
  23. 2020Deep Learning for Source Code Modeling and Generation: Models, Applications and Challengescited by 55
  24. 2020SeqMix: Augmenting Active Sequence Labeling via Sequence Mixupcited by 52
  25. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
  26. 2021SSMix: Saliency-Based Span Mixup for Text Classificationcited by 39
  27. 2020Adversarial Robustness for Codecited by 36
  28. 2020Exploring Software Naturalness through Neural Language Modelscited by 32
  29. 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
  30. 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
  31. 2020InferCode: Self-Supervised Learning of Code Representations by Predicting Subtreescited by 23
  32. 2020Code Smells and Refactoring: A Tertiary Systematic Review of Challenges and Observationscited by 18
  33. 2021A Search-Based Testing Framework for Deep Neural Networks of Source Code Embeddingcited by 12
  34. 2021GraphCode2Vec: Generic Code Embedding via Lexical and Program Dependence Analysescited by 11
  35. 2016sk_p: a neural program corrector for MOOCscited by 10
  36. 2018Neural Guided Constraint Logic Programming for Program Synthesiscited by 6
  37. 2018The CodRep Machine Learning on Source Code Competitioncited by 4
  38. 2021CoCoFuzzing: Testing Neural Code Models with Coverage-Guided Fuzzingcited by 4

Built on by

Cited by year

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

4 papers.