arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.09956cs.SEcs.LG
收藏

多任务大语言模型用于缺陷分类:基于辅助解码头的高效推理

Multi-task LLMs for Bug Classification: Efficient Inference with Auxiliary Decoding Heads

Recurse Ltd.;Department of Computing, Imperial College London(帝国理工学院计算机系)

Nikolai Rozanov

AI总结:

提出一种轻量级多任务大语言模型(MLC),通过令牌对齐算法和优化训练策略,实现全文件上下文下的行级缺陷定位,性能与代理方法相当但推理延迟降低数个数量级。

摘要:

基于大语言模型的代码生成技术被迅速采用,极大地加速了软件开发,但有效的验证方法仍然严重不足。现有的缺陷定位技术要么成本过高(每个文件需要数分钟的代理推理和数千个生成令牌),要么以粗粒度的函数级别运行,不适合精确调试。而专注于行级粒度且更轻量的工作往往在性能或上下文大小上受到限制。我们提出了一种新颖的行级缺陷定位方法,通过三个关键贡献解决了这些限制:(1)一种令牌对齐算法,克服了先前工作中的基本令牌化挑战;(2)一种轻量级多任务大语言模型用于缺陷定位(MLC),实现高效的行级缺陷分类;(3)一种针对多行预测的优化训练策略。我们的方法在全文件上下文下的行级缺陷定位中,在类似设置中达到了最先进的性能。同时,在Defects4J和PypiBugs基准测试中,我们达到了与代理方法相当的性能,同时将推理延迟降低了数个数量级,每个文件仅需生成一个令牌。我们还通过引入并在一个小型域外评估数据集(Python)上进行评估,进一步证明了强大的泛化能力。我们将在论文被接收后开源我们的代码、模型和数据集。

英文摘要:

The rapid adoption of LLM-powered code generation has dramatically accelerated software development, yet effective verification methods remain severely underdeveloped. Existing bug localization techniques are either prohibitively expensive, requiring minutes of agentic reasoning and thousands of generated tokens per file, and/or operate at coarse function-level granularity unsuitable for precise debugging. While works that focus on line-level granularity and are more light-weight are often limited in their performance or context size. We introduce a novel line-level bug localization approach that addresses these limitations through three key contributions: (1) a token alignment algorithm that overcomes fundamental tokenization challenges in previous work, (2) a lightweight multi-task LLM for bug localization (MLC) enabling efficient line-level bug classification, and (3) an optimized training recipe for multi-line prediction. Our method achieves state-of-the-art performance among similar setups on line-level bug localization with full-file context. At the same time we reach comparable performance to agentic approaches on Defects4J and PypiBugs benchmarks while reducing inference latency by orders of magnitudes, requiring only a single generated token per file. We further demonstrate strong generalization by introducing and evaluating on a small out-of-domain evaluation datasets in Python. We will open source our code, models, and datasets upon acceptance.

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

↑