Exploring Distributional Shifts in Large Language Models for Code Analysis

03/16/2023
by   Shushan Arakelyan, et al.
0

We systematically study the capacity of two large language models for code - CodeT5 and Codex - to generalize to out-of-domain data. In this study, we consider two fundamental applications - code summarization, and code generation. We split data into domains following its natural boundaries - by an organization, by a project, and by a module within the software project. This makes recognition of in-domain vs out-of-domain data at the time of deployment trivial. We establish that samples from each new domain present both models with a significant challenge of distribution shift. We study how well different established methods can adapt models to better generalize to new domains. Our experiments show that while multitask learning alone is a reasonable baseline, combining it with few-shot finetuning on examples retrieved from training data can achieve very strong performance. In fact, according to our experiments, this solution can outperform direct finetuning for very low-data scenarios. Finally, we consider variations of this approach to create a more broadly applicable method to adapt to multiple domains at once. We find that in the case of code generation, a model adapted to multiple domains simultaneously performs on par with those adapted to each domain individually.

READ FULL TEXT

page 7

page 14

research
07/09/2022

Few-shot training LLMs for project-specific code-summarization

Very large language models (LLMs), such as GPT-3 and Codex have achieved...
research
08/18/2023

Domain Adaptive Code Completion via Language Models and Decoupled Domain Databases

Large Language Models (LLMs) have demonstrated remarkable performance in...
research
07/07/2022

Meta-Learning the Difference: Preparing Large Language Models for Efficient Adaptation

Large pretrained language models (PLMs) are often domain- or task-adapte...
research
05/23/2023

Domain Private Transformers

Large, general purpose language models have demonstrated impressive perf...
research
05/23/2023

USB: A Unified Summarization Benchmark Across Tasks and Domains

An abundance of datasets exist for training and evaluating models on the...
research
08/30/2019

Exploring Domain Shift in Extractive Text Summarization

Although domain shift has been well explored in many NLP applications, i...
research
01/21/2020

AutoMATES: Automated Model Assembly from Text, Equations, and Software

Models of complicated systems can be represented in different ways - in ...

Please sign up or login with your details

Forgot password? Click here to reset