提出无需模型内部信息的关键词重要性可视化方法
Visualizing token importance for black-box language models
- 基于分布敏感性分析,不依赖模型结构或分布假设
- 可识别输入词元对输出影响的关键位置,支持快速交互探索
- 适合高风险场景下模型可靠性审计,如医疗法律领域
我们研究黑盒大语言模型(LLM)的审计问题,以确保其在生产环境中可靠运行,尤其在法律、医疗和合规等高风险领域。现有方法多聚焦于单一行为特征(如偏见检测或公平性评估),而本文关注更普遍的问题:如何理解黑盒LLM输出对每个输入词元的依赖关系?由于大语言模型具有随机性且无法计算提示级梯度,这一问题极具挑战。为此,我们提出分布基础敏感性分析(DBSA),一种轻量级、模型无关的方法,可在不假设模型分布的前提下评估每个输入词元对输出的敏感性。该方法专为实践者设计,支持快速、即插即用的交互式探索。通过实例展示,DBSA能发现传统可解释性方法忽略的敏感模式。
原文摘要 · Abstract (English)
We consider the problem of auditing black-box large language models (LLMs) to ensure they behave reliably when deployed in production settings, particularly in high-stakes domains such as legal, medical, and regulatory compliance. Existing approaches for LLM auditing often focus on isolated aspects of model behavior, such as detecting specific biases or evaluating fairness. We are interested in a more general question -- can we understand how the outputs of black-box LLMs depend on each input token? There is a critical need to have such tools in real-world applications that rely on inaccessible API endpoints to language models. However, this is a highly non-trivial problem, as LLMs are stochastic functions (i.e. two outputs will be different by chance), while computing prompt-level gradients to approximate input sensitivity is infeasible. To address this, we propose Distribution-Based Sensitivity Analysis (DBSA), a lightweight model-agnostic procedure to evaluate the sensitivity of the output of a language model for each input token, without making any distributional assumptions about the LLM. DBSA is developed as a practical tool for practitioners, enabling quick, plug-and-play visual exploration of LLMs reliance on specific input tokens. Through illustrative examples, we demonstrate how DBSA can enable users to inspect LLM inputs and find sensitivities that may be overlooked by existing LLM interpretability methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。