SimSCOOD: Systematic Analysis of Out-of-Distribution Generalization in Fine-tuned Source Code Models
Not on the map. Why?
Abstract (arXiv)
Large code datasets have become increasingly accessible for pre-training source code models. However, for the fine-tuning phase, obtaining representative training data that fully covers the code distribution for specific downstream tasks remains challenging due to the task-specific nature and limited labeling resources. Moreover, fine-tuning pretrained models can result in forgetting previously acquired pre-training knowledge. These lead to out-of-distribution (OOD) generalization issues with unexpected model inference behaviors that have not been systematically studied yet. In this paper, we contribute the first systematic approach that simulates various OOD scenarios along different dimensions of source code data properties and study the fine-tuned model behaviors in such scenarios. We investigate the behaviors of models under different fine-tuning methodologies, including full fine-tuning and Low-Rank Adaptation (LoRA) fine-tuning methods. Our comprehensive analysis, conducted on four state-of-the-art pretrained models and applied to two code generation tasks, exposes multiple failure modes attributed to OOD generalization issues. Additionally, our analysis uncovers that LoRA fine-tuning consistently exhibits significantly better OOD generalization performance than full fine-tuning across various scenarios.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 43 of its 65 references that are in the map. First posted on arXiv 10 Oct 2022.
Builds on
43 of 65 references.
References · 43
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2018Continual Lifelong Learning with Neural Networks: A Reviewcited by 1,330
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
31 more
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 739
- 2013An Empirical Investigation of Catastrophic Forgetting in Gradient-Based Neural Networkscited by 722
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2021Towards Out-Of-Distribution Generalization: A Surveycited by 436
- 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 294
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2020IntelliCode Compose: Code Generation Using Transformercited by 227
- 2022Exploring Length Generalization in Large Language Modelscited by 206
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2021A Fine-Grained Analysis on Distribution Shiftcited by 171
- 2020Recall and Learn: Fine-tuning Deep Pretrained Language Models with Less Forgettingcited by 170
- 2020Unsupervised Domain Clusters in Pretrained Language Modelscited by 160
- 2022Fine-tuned Language Models are Continual Learnerscited by 156
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 145
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
- 2021Types of Out-of-Distribution Texts and How to Detect Themcited by 80
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
- 2021Visual Representation Learning Does Not Generalize Strongly Within the Same Domaincited by 61
- 2021Discourse Probing of Pretrained Language Modelscited by 38
- 2022Probing Pretrained Models of Source Codecited by 26
- 2022Compositional Generalization and Decomposition in Neural Program Synthesiscited by 6
- 2019SampleFix: Learning to Generate Functionally Diverse Fixescited by 1
- 2021Energy-bounded Learning for Robust Models of Codecited by 1
Built on by
Citing papers per year: 2023: 1; 2024: 1; 2025: 1; 2026: 2.
5 papers.
- 2025vCache: Verified Semantic Prompt Cachingcited by 17
- 2024HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Datacited by 16
- 2023Source Code Data Augmentation for Deep Learning: A Surveycited by 3
- 2026Scaling Laws for Hypernetwork-Based Knowledge Injection in Large Language Modelscited by 2
- 2026MVR-cache: Optimizing Semantic Caching via Multi-Vector Retrieval and Learned Prompt Segmentationcited by 0
- 2026Scaling Laws for Hypernetwork-Based Knowledge Injection in Large Language Models21 Jul 2026
- 2026MVR-cache: Optimizing Semantic Caching via Multi-Vector Retrieval and Learned Prompt Segmentation24 May 2026
- 2025vCache: Verified Semantic Prompt Caching6 Feb 2025
- 2024HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Data10 Sep 2024
- 2023Source Code Data Augmentation for Deep Learning: A Survey31 May 2023