用图结构追踪LLM生成过程中的上下文影响,让推理更透明。
Explaining the Reasoning of Large Language Models Using Attribution Graphs
- 构建有向图捕捉每个词受提示和历史生成的影响
- 在多个模型上使解释忠实度平均提升40%
- 适合关注大模型可解释性的研究人员和安全评估者
大型语言模型(LLMs)能力惊人,但其推理过程不透明,引发安全与信任问题。虽然归因方法在计算机视觉中已成功用于解释决策,但现有上下文归因在处理自回归式LLM时,仅直接关联生成词与提示,忽略了生成之间的相互影响,导致解释不完整。为此,本文提出上下文归因图(CAGE)框架:通过构建一个有向图,量化每个生成项如何受到提示及所有先前生成项的影响。该图保持因果性与行随机性,使上下文归因可通过图中路径上的中间贡献求和计算。在多个模型、数据集、指标和方法下,CAGE将归因忠实度平均提升达40%。
原文摘要 · Abstract (English)
Large language models (LLMs) exhibit remarkable capabilities, yet their reasoning remains opaque, raising safety and trust concerns. Attribution methods, which assign credit to input features, have proven effective for explaining the decision making of computer vision models. From these, context attributions have emerged as a promising approach for explaining the behavior of autoregressive LLMs. However, current context attributions produce incomplete explanations by directly relating generated tokens to the prompt, discarding inter-generational influence in the process. To overcome these shortcomings, we introduce the Context Attribution via Graph Explanations (CAGE) framework. CAGE introduces an attribution graph: a directed graph that quantifies how each generation is influenced by both the prompt and all prior generations. The graph is constructed to preserve two properties-causality and row stochasticity. The attribution graph allows context attributions to be computed by marginalizing intermediate contributions along paths in the graph. Across multiple models, datasets, metrics, and methods, CAGE improves context attribution faithfulness, achieving average gains of up to 40%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。