SimSCOOD: Systematic Analysis of Out-of-Distribution Generalization in Fine-tuned Source Code Models

Hossein Hajipour, Ning Yu, Cristian-Alexandru Staicu, Mario Fritz
10/10/2022
cs.SEcs.AIcs.CL
lora-peft-merging

Official code: hajipour/SimSCOOD (0 stars, last commit 2023-10-24).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

hajipour/SimSCOODOfficial100%
00Oct 24, 20233 years ago

Similar Papers

Cite this paper

@article{hajipour2022simscood,
  title  = {SimSCOOD: Systematic Analysis of Out-of-Distribution Generalization in Fine-tuned Source Code Models},
  author = {Hossein Hajipour and Ning Yu and Cristian-Alexandru Staicu and Mario Fritz},
  year   = {2022},
  eprint = {2210.04802},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.04802}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.04802.svg)](https://codeofpaper.com/paper/2210.04802)

Discussion