arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.26476cs.CLcs.AIcs.LGcs.PFcs.SE
收藏

代码的回归语言模型

Regression Language Models for Code

Cornell University(康奈尔大学);Google DeepMind(谷歌DeepMind);Google Cloud(谷歌云)

Yash Akhauri, Xingyou Song, Arissa Wongpanich, Bryan Lewandowski, Mohamed S. Abdelfattah

AI总结:

提出回归语言模型(RLM),利用冻结的大语言模型编码器直接从文本预测代码执行结果(如内存占用、延迟、神经网络精度等),在多个任务上达到高相关度。

摘要:

我们研究代码到指标的回归:预测代码执行的数值结果,由于编程语言的开放性,这是一项具有挑战性的任务。虽然先前的方法依赖于繁重且特定领域的特征工程,但我们展示了一个统一的回归语言模型(RLM),使用冻结的LLM编码器可以直接从文本同时预测:(i) 多种高级语言(如Python和C++)代码的内存占用,(ii) Triton GPU内核的延迟,以及(iii) 以ONNX表示的已训练神经网络的精度和速度。特别是,一个基于T5Gemma的较小300M参数RLM在APPS的竞赛编程提交上获得了>0.9的Spearman等级相关系数,而单个统一模型在CodeNet的17种不同语言上获得了>0.5的平均Spearman等级相关系数。此外,RLM在五个经典NAS设计空间上获得了最高平均Kendall-Tau 0.46,这些空间此前由图神经网络主导,并且能同时预测多种硬件平台上的架构延迟。

英文摘要:

We study code-to-metric regression: predicting numeric outcomes of code executions, a challenging task due to the open-ended nature of programming languages. While prior methods have resorted to heavy and domain-specific feature engineering, we show that a single unified Regression Language Model (RLM) using a frozen LLM encoder can simultaneously predict directly from text, (i) the memory footprint of code across multiple high-level languages such as Python and C++, (ii) the latency of Triton GPU kernels, and (iii) the accuracy and speed of trained neural networks represented in ONNX. In particular, a relatively small 300M parameter RLM based on T5Gemma, obtains >0.9 Spearman-rank on competitive programming submissions from APPS, and a single unified model achieves >0.5 average Spearman-rank across 24 different programming languages from CodeNet. Furthermore, the RLM can obtain the highest average Kendall-Tau of 0.46 on five classic NAS design spaces previously dominated by graph neural networks, and simultaneously predict architecture latencies on numerous hardware platforms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑