paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Enabling Global, Human-Centered Explanations for LLMs: From Tokens to Interpretable Code and Test Generation

面向 LLM 的全局、以人为中心的解释:从 token 到可解释的代码与测试生成
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 论文聚焦代码大模型的可解释性,属于 LLM 与程序语言交叉,但研究目标本身是解释 LLM 的推理行为,未涉及静态分析、形式化验证、浮点或贝叶斯程序分析等核心方向,且仅使用旧的小模型 codeparrot-small 验证。引用 5 inbox
Dipin Khati, Daniel Rodriguez-Cardenas, David N. Palacio, Alejandro Velasco, Michele Tufano, Denys Poshyvanyk
crossref: 2026-09-12

AI 速览

一句话:提出 CodeQ 框架,将 token 级归因聚合映射为高层编程类别,为代码大模型提供全局可解释性。

论文指出,面向代码的大语言模型(LM4Code)正深度融入软件工程,但准确率指标掩盖了模型的推理过程,现有的事后可解释方法又多局限于 token 级的局部解释,开发者难以据此形成全局理解。为此,作者提出 code rationales(CodeQ)框架:把 token 级 rationale 映射到高层编程类别(如语法、语义、结构线索),并聚合成千上万条解释以进行统计分析,从而揭示模型系统性的推理偏好。评估表明,这种聚合能从含噪的 token 数据中提炼出清晰信号,将解释不确定性(Shannon 熵)降低 50% 以上;同时发现代码生成模型 codeparrot-small 一贯偏好缩进等浅层句法线索而非深层语义逻辑。此外,37 人用户研究显示,该模型的推理与人类开发者显著不一致——这些现象在传统指标下完全不可见,说明全局可解释性对建立对 LM4Code 的信任至关重要。

问题
代码大模型的输出难以取信于人:常规准确率指标无法揭示其推理过程,而现有事后可解释方法只提供局部、token 级的解释,无法给出开发者可理解的全局分析。
方法
提出 CodeQ 框架,将 token 级 rationale 映射并聚合到高层编程类别,进而在数千条解释上做统计分析以刻画模型的系统性推理行为。
评估
以 Shannon 熵衡量解释不确定性,验证聚合可降噪 50% 以上;用 codeparrot-small 分析其推理偏好,并通过 37 人用户研究比较模型推理与人类开发者推理的一致性。
原文摘要(Abstract)

As Large Language Models for Code (LM4Code) become integral to software engineering, establishing trust in their output becomes critical. However, standard accuracy metrics obscure the underlying reasoning of generative models, offering little insight into how decisions are made. Although post-hoc interpretability methods attempt to fill this gap, they often restrict explanations to local, token-level insights, which fail to provide a developer-understandable global analysis. Our work highlights the urgent need for global, code-based explanations that reveal how models reason across code. To support this vision, we introduce code rationales (Code\(\mathbb {Q}\)), a framework that enables global interpretability by mapping token-level rationales to high-level programming categories. Aggregating thousands of these token-level explanations allows us to perform statistical analyses that expose systemic reasoning behaviors. We validate this aggregation by showing it distills a clear signal from noisy token data, reducing explanation uncertainty (Shannon entropy) by over 50%. Additionally, we find that a code generation model (codeparrot-small) consistently favors shallow syntactic cues (e.g., indentation) over deeper semantic logic. Furthermore, in a user study with 37 participants, we find its reasoning is significantly misaligned with that of human developers. These findings, hidden from traditional metrics, demonstrate the importance of global interpretability techniques to foster trust in LM4Code.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot11887,
  title = {Enabling Global, Human-Centered Explanations for LLMs: From Tokens to Interpretable Code and Test Generation},
  author = {Dipin Khati and Daniel Rodriguez-Cardenas and David N. Palacio and Alejandro Velasco and Michele Tufano and Denys Poshyvanyk},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3787764}
}