paperbot · PL 论文追踪

全部论文 待读 收藏

P2 TokenScope: Token-Level Explainability and Interpretability for Code-Oriented Tasks in Large Language Models

TokenScope:面向大语言模型代码任务的 Token 级可解释性与解释性分析
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 3/10 · 该论文关注代码生成LLM的Token级可解释性与交互式分析,属于PL与ML交叉,但与用户核心方向(静态分析用于ML/Agentic程序、LLM/Agent改进静态分析/形式化验证、浮点或贝叶斯程序分析)无直接关联,且研究目标偏向解释LLM本身。引用 0 inbox
Amirreza Esmaeili, Fatemeh Hendijani Fard
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 TokenScope,一个面向代码生成 LLM 的交互式 Token 级可解释性分析工具,统一解码信号与 AST 结构。

理解大语言模型在代码生成中如何做出 Token 级决策,对研究者和实践者都是挑战。现有工具多关注模型内部或生成结果,缺少解码时信号、细粒度不确定性度量以及探索替代生成路径的交互机制。本文提出 TokenScope,一个面向基于解码器 LLM 的交互式可解释性与分析工具,在生成过程中展示 Token 级指标、注意力模式和结构信息,并支持交互式 Token 替换、反事实分支以及基于抽象语法树(AST)的代码感知聚合。通过统一解码时信号与结构化程序分析,TokenScope 使研究者能够系统考察 LLM 在代码生成过程中的行为。

问题
如何理解基于解码器的 LLM 在代码生成中的 Token 级决策,尤其是现有工具缺少解码时信号、细粒度不确定性和交互式替代路径探索能力。
方法
提出交互式分析工具 TokenScope,暴露 Token 级指标、注意力模式和结构信息,并支持 Token 替换、反事实分支与基于 AST 的代码感知聚合。
评估
摘要以工具能力展示与交互式分析支持为主,通过统一解码时信号和结构程序分析来系统研究代码生成行为;未报告量化实验。
原文摘要(Abstract)

Understanding how Large Language Models (LLMs) make token-level decisions during code generation remains a major challenge for both researchers and practitioners. While recent tools provide insights into model internals or generation outcomes, they often lack decoding-time signals, fine-grained uncertainty measures, and interactive mechanisms for exploring alternative generation paths. We present TokenScope, an interactive interpretability and analysis tool for decoder-based LLMs that exposes token-level metrics, attention patterns, and structural information during generation. TokenScope supports interactive token replacement, counterfactual branching, and code-aware aggregation via abstract syntax trees. By unifying decoding-time signals with structural program analysis, TokenScope enables systematic investigation of LLM behaviour during code generation.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{EsmaeiliF26,
  title = {TokenScope: Token-Level Explainability and Interpretability for Code-Oriented Tasks in Large Language Models},
  author = {Amirreza Esmaeili and Fatemeh Hendijani Fard},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3806421}
}