paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An Empirical Study of Knowledge Distillation for Code Understanding Tasks

代码理解任务中知识蒸馏的实证研究
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 2/10 · 该论文研究代码理解任务中的知识蒸馏,属于“机器学习+程序语言”的模型压缩实证研究,与用户关注的静态分析、Agentic 程序、LLM/Agent 辅助静态分析、浮点程序分析和贝叶斯程序分析均无直接关联。仅在“机器学习用于程序”的大方向上存在弱相关性。引用 4 inbox
Ruiqi Wang, Zezhou Yang, Cuiyun Gao, Xin Xia, Qing Liao
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:系统实证评估知识蒸馏在代码理解任务中的有效性,覆盖两类蒸馏方法与多组师生模型配置。

预训练语言模型在代码理解任务上表现强大,但其计算开销大、推理延迟高,难以大规模部署。知识蒸馏通过将大教师模型的知识迁移到紧凑学生模型,可在保持大部分性能的同时实现高效推理,然而该技术在代码理解领域尚缺乏系统研究。本文对代码理解任务中的知识蒸馏展开系统实证研究,涵盖基于 logit 与基于特征的两类主流蒸馏方法,在三个下游任务上使用两个来自不同领域的教师预训练语言模型和八个学生模型进行实验。结果表明,与标准微调相比,知识蒸馏对不同规模的学生模型均能带来显著性能提升;代码专用预训练模型作为教师效果更佳;最新的基于特征的蒸馏方法表现最优,仅用 5% 参数即可保留教师模型最高 98% 的性能。此外,学生架构与教师架构相似并不必然带来更好性能。论文还讨论了蒸馏过程与推理的效率及行为,并总结了研究发现与未来方向。

问题
预训练语言模型在代码理解任务上性能强但计算密集、推理延迟高,而知识蒸馏在该领域的有效性与使用方式尚未被系统探索。
方法
系统实验对比基于 logit 与基于特征的两类知识蒸馏方法,在三个下游任务上使用两个不同领域的教师模型和八个学生模型,并与标准微调进行对照。
评估
通过多任务、多模型的实验比较蒸馏与微调的性能,分析教师模型选择、蒸馏方法、学生架构相似性以及参数效率(如 5% 参数保留 98% 教师性能)的影响。
原文摘要(Abstract)

Pre-trained language models (PLMs) have emerged as powerful tools for code understanding. However, deploying these PLMs in large-scale applications faces practical challenges due to their computational intensity and inference latency. Knowledge distillation (KD), a promising model compression and acceleration technique, addresses these limitations by transferring knowledge from large teacher models to compact student models, enabling efficient inference while preserving most of the teacher models’ capabilities. While this technique has shown remarkable success in natural language processing and computer vision domains, its potential for code understanding tasks remains largely underexplored. In this paper, we systematically investigate the effectiveness and usage of KD in code understanding tasks. Our study encompasses two popular types of KD methods, i.e., logit-based and feature-based KD methods, experimenting across eight student models and two teacher PLMs from different domains on three downstream tasks. The experimental results indicate that KD consistently offers notable performance boosts across student models with different sizes compared with standard fine-tuning. Notably, code-specific PLM demonstrates better effectiveness as the teacher model. Among all KD methods, the latest feature-based KD methods exhibit superior performance, enabling student models to retain up to 98% teacher performance with merely 5% parameters. Regarding student architecture, our experiments reveal that similarity with teacher architecture does not necessarily lead to better performance. We further discuss the efficiency and behaviors in the KD process and inference, summarize the implications of findings, and identify promising future directions.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2508-15423,
  title = {An Empirical Study of Knowledge Distillation for Code Understanding Tasks},
  author = {Ruiqi Wang and Zezhou Yang and Cuiyun Gao and Xin Xia and Qing Liao},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3764547}
}