一句话:提出含216个代码任务的CrossCodeBench基准,并验证上下文学习可显著提升源代码模型跨任务泛化。
预训练源代码模型虽具备一定泛化能力,但在目标任务上微调仍需大量数据,且泛化效果受微调数据规模与质量影响,这对资源有限或不可用的目标任务不利。为此,论文提出 CrossCodeBench 大规模基准,涵盖 216 个已有代码相关任务,并为每个任务标注任务描述、指令等元信息,包括详细的任务信息和解题指南。借助这些元信息,可以方便地构造多种“训练/评估”任务划分,以评估模型不同的跨任务泛化能力。初步实验表明,few-shot 学习和从任务指令中学习等上下文学习方法能大幅提升模型的跨任务泛化能力,显示该基准用于跨任务学习研究的潜力。
Despite the recent advances showing that a model pre-trained on large-scale source code data is able to gain appreciable generalization capability, it still requires a sizeable amount of data on the target task for fine-tuning. And the effectiveness of the model generalization is largely affected by the size and quality of the fine-tuning data, which is detrimental for target tasks with limited or unavailable resources. Therefore, cross-task generalization, with the goal of improving the generalization of the model to unseen tasks that have not been seen before, is of strong research and application value. In this paper, we propose a large-scale benchmark that includes 216 existing code-related tasks. Then, we annotate each task with the corresponding meta information such as task description and instruction, which contains detailed information about the task and a solution guide. This also helps us to easily create a wide variety of “training/evaluation” task splits to evaluate the various cross-task generalization capabilities of the model. Then we perform some preliminary experiments to demonstrate that the cross-task generalization of models can be largely improved by in-context learning methods such as few-shot learning and learning from task instructions, which shows the promising prospects of conducting cross-task learning research on our benchmark. We hope that the collection of the datasets and our benchmark will facilitate future work that is not limited to cross-task generalization.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2302-04030,
title = {CrossCodeBench: Benchmarking Cross-Task Generalization of Source Code Models},
author = {Changan Niu and Chuanyi Li and Vincent Ng and Bin Luo},
booktitle = {ICSE},
year = {2023},
doi = {10.1109/icse48619.2023.00055}
}