paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SPT-code

SPT-Code:面向源代码的序列到序列预训练模型
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 3/10 · 该论文研究源代码的序列到序列预训练模型,属于机器学习与程序语言交叉,但聚焦代码表示学习和代码摘要/生成等下游任务,并未涉及静态分析、Agentic 程序、LLM/Agent 改进分析或浮点/贝叶斯程序分析等核心方向。引用 156 inbox
Changan Niu, Chuanyi Li, Vincent Ng, Jidong Ge, Liguo Huang, Bin Luo
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出面向源代码的序列到序列预训练模型 SPT-Code,用三个专用预训练任务提升五项代码下游任务性能。

现有代码预训练模型多只预训练 Transformer 编码器,解码器未参与;且常直接复用自然语言预训练任务,为学习代码的自然语言描述还需依赖源码-描述双语语料,限制预训练数据规模。为此,论文提出 SPT-Code,一个面向源代码的序列到序列预训练模型,并设计三个专用预训练任务,使其在不依赖双语语料的情况下学习源代码内容、对应代码结构以及代码的自然语言描述;微调后可将三方面信息用于下游任务。实验表明,SPT-Code 在五项代码相关下游任务上取得当时最优性能。

问题
现有代码预训练模型多只预训练编码器,且沿用自然语言预训练任务,并依赖双语语料来学习代码的自然语言描述,导致解码器利用不足和预训练数据受限。
方法
提出序列到序列模型 SPT-Code,设计三个不依赖双语语料的预训练任务,分别学习源代码、代码结构和代码的自然语言描述,并在下游任务微调时联合利用三类信息。
评估
在五项代码相关下游任务上进行微调与评测,结果表明 SPT-Code 达到当时最优性能。
原文摘要(Abstract)

Recent years have seen the successful application of large pretrained models to code representation learning, resulting in substantial improvements on many code-related downstream tasks. But there are issues surrounding their application to SE tasks. First, the majority of the pre-trained models focus on pre-training only the encoder of the Transformer. For generation tasks that are addressed using models with the encoder-decoder architecture, however, there is no reason why the decoder should be left out during pre-training. Second, many existing pre-trained models, including state-of-the-art models such as T5-learning, simply reuse the pretraining tasks designed for natural languages. Moreover, to learn the natural language description of source code needed eventually for code-related tasks such as code summarization, existing pretraining tasks require a bilingual corpus composed of source code and the associated natural language description, which severely limits the amount of data for pre-training. To this end, we propose SPT-Code, a sequence-to-sequence pre-trained model for source code. In order to pre-train SPT-Code in a sequence-to-sequence manner and address the aforementioned weaknesses associated with existing pre-training tasks, we introduce three pre-training tasks that are specifically designed to enable SPT-Code to learn knowledge of source code, the corresponding code structure, as well as a natural language description of the code without relying on any bilingual corpus, and eventually exploit these three sources of information when it is applied to downstream tasks. Experimental results demonstrate that SPT-Code achieves state-of-the-art performance on five code-related downstream tasks after fine-tuning.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2201-01549,
  title = {SPT-code},
  author = {Changan Niu and Chuanyi Li and Vincent Ng and Jidong Ge and Liguo Huang and Bin Luo},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510096}
}