paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs

面向代码 LLM 的高资源到低资源编程语言知识迁移
OOPSLA 8(OOPSLA2)2024匹配度 2/10 · 论文聚焦用半合成数据提升低资源语言的 Code LLM 代码生成能力,属于程序语言与 LLM 的交叉,但未涉及静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,也与 Agentic 程序分析无关;其研究目标本身是改进 LLM,与用户核心方向不匹配。引用 99 inbox
Federico Cassano, John Gouwar, Francesca Lucchetti, Claire Schlesinger, Anders Freeman, Carolyn Jane Anderson, Molly Q Feldman, Michael Greenberg, Abhinav Jangda, Arjun Guha
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 MultiPL-T,用半合成数据将高资源语言知识迁移到低资源代码 LLM,并验证微调效果。

Code LLM 在高资源语言上表现优异,但在低资源语言上因数据稀缺而明显下降。论文提出 MultiPL-T:先用 Code LLM 为高资源源语言代码合成单元测试并过滤低覆盖样本;再翻译代码到目标低资源语言;最后用编译器把测试编译到目标语言,过滤错误翻译,生成验证过的训练语料。作者以 Python 为源,为 Julia、Lua、OCaml、R 和 Racket 生成数万条样本,并微调 StarCoderBase 与 Code Llama。在自然语言到代码任务上,这些模型优于其他微调方案;对 DeepSeek Coder 和 StarCoder2 的 Racket 实验也持续占优,且易扩展、比延长训练更高效。

问题
Code LLM 在高资源语言上表现良好,但在低资源编程语言上因训练数据不足而性能显著下降。
方法
MultiPL-T 用 Code LLM 合成单元测试并将高资源语言代码翻译到低资源语言,再用轻量编译器编译测试以过滤错误翻译,生成经测试验证的目标语言训练语料。
评估
以 Python 为源语言为五种低资源语言生成数万条样本,微调 StarCoderBase、Code Llama、DeepSeek Coder 和 StarCoder2,并在自然语言到代码任务上与其他微调方法比较。
原文摘要(Abstract)

Over the past few years, Large Language Models of Code (Code LLMs) have started to have a significant impact on programming practice. Code LLMs are also emerging as building blocks for research in programming languages and software engineering. However, the quality of code produced by a Code LLM varies significantly by programming language. Code LLMs produce impressive results on high-resource programming languages that are well represented in their training data (e.g., Java, Python, or JavaScript), but struggle with low-resource languages that have limited training data available (e.g., OCaml, Racket, and several others). This paper presents an effective approach for boosting the performance of Code LLMs on low-resource languages using semi-synthetic data. Our approach, called M ulti PL-T, generates high-quality datasets for low-resource languages, which can then be used to fine-tune any pretrained Code LLM. M ulti PL-T translates training data from high-resource languages into training data for low-resource languages in the following way. 1) We use a Code LLM to synthesize unit tests for commented code from a high-resource source language, filtering out faulty tests and code with low test coverage. 2) We use a Code LLM to translate the code from the high-resource source language to a target low-resource language. This gives us a corpus of candidate training data in the target language, but many of these translations are wrong. 3) We use a lightweight compiler to compile the test cases generated in (1) from the source language to the target language, which allows us to filter our obviously wrong translations. The result is a training corpus in the target low-resource language where all items have been validated with test cases. We apply this approach to generate tens of thousands of new, validated training items for five low-resource languages: Julia, Lua, OCaml, R, and Racket, using Python as the source high-resource language. Furthermore, we use an open Code LLM (StarCoderBase) with open training data (The Stack), which allows us to decontaminate benchmarks, train models without violating licenses, and run experiments that could not otherwise be done. Using datasets generated with M ulti PL-T, we present fine-tuned versions of StarCoderBase and Code Llama for Julia, Lua, OCaml, R, and Racket that outperform other fine-tunes of these base models on the natural language to code task. We also present Racket fine-tunes for two very recent models, DeepSeek Coder and StarCoder2, to show that M ulti PL-T continues to outperform other fine-tuning approaches for low-resource languages. The M ulti PL-T approach is easy to apply to new languages, and is significantly more efficient and effective than alternatives such as training longer.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{abs-2308-09895,
  title = {Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs},
  author = {Federico Cassano and John Gouwar and Francesca Lucchetti and Claire Schlesinger and Anders Freeman and Carolyn Jane Anderson and Molly Q Feldman and Michael Greenberg and Abhinav Jangda and Arjun Guha},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689735}
}