paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Metamorphic-Based Many-Objective Distillation of LLMs for Code-Related Tasks

基于蜕变测试的多目标蒸馏:面向代码相关任务的LLM压缩
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 4/10 · 论文聚焦于LLM知识蒸馏与鲁棒性优化,虽涉及代码任务和蜕变测试(一种程序分析技术),但核心是压缩模型而非静态分析/形式化验证与LLM的交叉;与用户关注的PL→AI(静态分析应用于ML系统)或AI→PL(LLM改进静态分析)方向仅有边缘关联。引用 4 inbox
Annibale Panichella
crossref: 2026-09-12

AI 速览

一句话:提出Morph,结合蜕变测试与多目标优化,蒸馏出兼顾准确率、效率与鲁棒性的代码LLM。

论文指出,知识蒸馏虽能压缩大语言模型,但压缩模型对代码微小改动(如参数名同义替换)极为敏感:在蜕变代码上误分类代码克隆的概率比原始LLM高440%,鲁棒性仅为其四分之一。为此作者提出Morph,将蜕变测试与多目标优化结合用于代码LLM的鲁棒蒸馏。Morph以预测翻转数衡量鲁棒性,高效探索模型配置空间,生成在准确率、效率与鲁棒性之间取得Pareto最优的压缩模型。作者在代码克隆检测与漏洞检测两个任务上,以CodeBERT和GraphCodeBERT为蒸馏对象,与最先进蒸馏方法AVATAR及微调未蒸馏模型对比。结果表明,相比AVATAR,Morph产出的压缩模型鲁棒性提升47%、效率提升25%(浮点运算更少),准确率持平或更高(最高+6%),模型大小相近。

问题
知识蒸馏得到的代码LLM压缩模型对蜕变代码鲁棒性差,代码微小等价改动会导致大量预测翻转与误分类。
方法
提出Morph,将蜕变测试的鲁棒性度量与多目标优化结合,探索配置空间生成在准确率、效率、鲁棒性上Pareto最优的蒸馏模型。
评估
在代码克隆检测与漏洞检测任务上,以CodeBERT和GraphCodeBERT为对象,与AVATAR及微调未蒸馏LLM对比鲁棒性、效率、准确率和模型大小。
原文摘要(Abstract)

Knowledge distillation compresses large language models (LLMs) into more compact and efficient versions that achieve similar accuracy on code-related tasks. However, as we demonstrate in this study, compressed models are four times less robust than the original LLMs when evaluated with metamorphic code. They exhibit a$\mathbf{4 4 0 \%}$higher probability of misclassifying code clones due to minor changes in the code fragment under analysis, such as replacing parameter names with synonyms. To address this issue, we propose Morph, a novel method that combines metamorphic testing with many-objective optimization for a robust distillation of LLMs for code. Morph efficiently explores the models' configuration space and generates Paretooptimal models that effectively balance accuracy, efficiency, and robustness to metamorphic code. Metamorphic testing measures robustness as the number of code fragments for which a model incorrectly makes different predictions between the original and their equivalent metamorphic variants (prediction flips). We evaluate Morph on two tasks-code clone and vulnerability detection-targeting CodeBERT and GraphCodeBERT for distillation. Our comparison includes Morph, the state-of-theart distillation method AVATAR, and the fine-tuned non-distilled LLMs. Compared to Avatar, Morph produces compressed models that are (i) 47 % more robust, (ii) 25 % more efficient (fewer floating-point operations), while maintaining (iii) equal or higher accuracy (up to$+6 \%$), and (iv) similar model size.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8700,
  title = {Metamorphic-Based Many-Objective Distillation of LLMs for Code-Related Tasks},
  author = {Annibale Panichella},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00230}
}