arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.04359cs.SE
收藏

LONGCODEU:在长代码理解上对长上下文语言模型进行基准测试

LONGCODEU: Benchmarking Long-Context Language Models on Long Code Understanding

Jia Li, Xuyuan Guo, Lei Li, Kechi Zhang, Ge Li, Jia Li, Zhengwei Tao, Fang Liu, Chongyang Tao, Yuqi Zhu, Zhi Jin

AI总结:

针对长上下文语言模型缺乏严格长代码理解评估框架的问题,提出LONGCODEU基准,从四个方面评估9个模型,发现当代码长度超32K时性能急剧下降且代码单元间关系理解最具挑战性。

摘要:

当前先进的长上下文语言模型为现实世界的软件工程应用提供了巨大潜力。然而,这一关键领域的进展仍受到一个根本局限的阻碍:缺乏用于长代码理解的严格评估框架。为消除这一障碍,我们从四个方面(8项任务)提出了一个长代码理解基准LONGCODEU,以评估实际应用所需的LCLM的长代码理解能力,包括代码单元感知、代码单元内理解、代码单元间关系理解以及长代码文档理解。我们在LONGCODEU上评估了9个流行的LCLM(即6个通用模型和3个代码模型)。我们的实验结果揭示了当前LCLM在长代码理解能力方面的关键局限。特别是,当长代码长度大于32K时,LCLM的性能急剧下降,远未达到其声称的128K-1M上下文窗口。在这四个方面中,代码单元间关系理解对LCLM来说最具挑战性。我们的研究为优化LCLM和推动软件工程的进步提供了有价值的见解。

英文摘要:

Current advanced long-context language models offer great potential for real-world software engineering applications. However, progress in this critical domain remains hampered by a fundamental limitation: the absence of a rigorous evaluation framework for long code understanding. To gap this obstacle, we propose a long code understanding benchmark LONGCODEU from four aspects (8 tasks) to evaluate LCLMs' long code understanding ability required for practical applications, including code unit perception, intra-code unit understanding, inter-code unit relation understanding, and long code documentation understanding. We evaluate 9 popular LCLMs on LONGCODEU (i.e., 6 general models and 3 code models). Our experimental results reveal key limitations in current LCLMs' capabilities for long code understanding. Particularly, the performance of LCLMs drops dramatically when the long code length is greater than 32K, falling far short of their claimed 128K-1M context windows. In the four aspects, inter-code unit relation understanding is the most challenging for LCLMs. Our study provides valuable insights for optimizing LCLMs and driving advancements in software engineering.

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

↑