arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.21629cs.SE
收藏

评估语言模型在显著类识别中的表现

Assessing Language Models for Salient Class Identification

School of Computer Science, Wuhan University(武汉大学计算机学院);Faculty of Information Engineering and Automation, Kunming University of Science and Technology(昆明理工大学信息工程与自动化学院)

Bo Xiong, Chaoran Cai, Zongen Ren, Kaipeng Xiong, Chong Wang, Peng Liang

AI总结:

研究语言模型能否直接从代码提交中识别显著类,无需特征工程或图构建,发现小模型在少样本提示下性能接近大模型,可降低成本和隐私障碍。

摘要:

代码审查要求审查者理解代码变更的核心意图,当一次提交修改多个类时,这变得困难。在这种提交中,一个或多个主要被修改的类(称为显著类)可能引发其他类的修改。准确识别显著类为审查者提供了导航代码变更的有效入口点,并有助于程序理解。现有的最先进方法依赖于复杂的程序分析过程,包括抽象语法树(AST)解析、类关系提取、手工特征工程或依赖图构建。为此,我们研究语言模型(LM)是否可以直接从提交中识别显著类,而无需特征工程、图构建或训练。我们首先构建了一个新的数据集ApacheJavaCM,源自ApacheCM数据集,包含7,911个提交和25,914个标记类。在该数据集上,我们系统评估了LM是否可以直接从提交中识别显著类,并与最强的可复现最先进(SOTA)基线进行比较。评估涵盖两个大型语言模型(LLM):GPT-5.4和DeepSeek-V3.2,一个小型语言模型(SLM):Qwen3.5-9B,以及三种提示策略:零样本、少样本和思维链。LM显著优于基线,并且在提交特征和所选LM上保持稳定。我们还发现,对于显著类识别任务,一个90亿参数的开源SLM Qwen3.5-9B在少样本提示下,性能与更大的闭源LLM GPT-5.4相当。这些结果表明,轻量级、可本地部署的SLM足以用于工业显著类识别任务,并且可以降低依赖闭源LLM所带来的成本和隐私障碍。

英文摘要:

Code review requires reviewers to understand the core intent of code changes, which becomes difficult when a commit modifies multiple classes. In such commits, one or more primarily modified classes, referred to as salient classes, may induce modifications in other classes. Accurate identification of salient classes offers reviewers an effective entry point to navigate code changes and facilitates program comprehension. Existing state-of-the-art approaches rely on complex program-analysis procedures, including Abstract Syntax Tree (AST) parsing, class relation extraction, handcrafted feature engineering, or dependency graph construction. To this end, we study whether language models (LMs) can identify salient classes directly from commits without feature engineering, graph construction, or training. We first construct a new dataset ApacheJavaCM, derived from the ApacheCM dataset, containing 7,911 commits and 25,914 labeled classes. On this dataset, we systematically evaluate whether LMs can identify salient classes directly from commits and compare with the strongest reproducible state-of-the-art (SOTA) baseline. The evaluation covers two large language models (LLMs), GPT-5.4 and DeepSeek-V3.2, one small language model (SLM), Qwen3.5-9B, and three prompting strategies: zero-shot, few-shot, and chain-of-thought. The LMs substantially outperform the baseline while remaining stable across commit characteristics and selected LMs. We also found that, for salient class identification tasks, a 9B-parameter open-source SLM, Qwen3.5-9B, under few-shot prompting, achieves performance comparable to that of a much larger closed-source LLM, GPT-5.4. These results suggest that lightweight, locally deployable SLMs are feasible options for the salient class identification task and can reduce both cost and privacy barriers associated with relying on closed-source LLMs.

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

↑