提出高效近似留一法归因的新方法,速度提升300倍以上。
AttriBoT: A Bag of Tricks for Efficiently Approximating Leave-One-Out Context Attribution
- 利用缓存激活、分层归因和小模型代理加速计算
- 相比之前方法更贴近真实模型的留一法误差,速度提升超300倍
- 适合需要大规模可解释性分析的AI应用开发者
大型语言模型(LLM)中上下文输入的影响促使人们发展上下文归因方法,以量化每个上下文片段对模型生成结果的影响。留一法(LOO)误差通过移除特定上下文片段后模型输出概率的变化来衡量其影响,虽具理论合理性,但对大模型而言计算成本过高。本文提出AttriBoT,一系列高效估算LOO误差的新技术:利用缓存激活避免重复计算,采用分层归因减少运算量,并用小型代理模型模拟大模型行为。整体实现超过300倍的速度提升,且对目标模型的LOO误差保真度优于现有方法。该效率使单次归因计算比生成响应本身快30倍,极大推动了大规模可解释性应用的发展。我们开源了易用高效的AttriBoT实现,促进高效上下文归因方法的持续研究。
原文摘要 · Abstract (English)
The influence of contextual input on the behavior of large language models (LLMs) has prompted the development of context attribution methods that aim to quantify each context span's effect on an LLM's generations. The leave-one-out (LOO) error, which measures the change in the likelihood of the LLM's response when a given span of the context is removed, provides a principled way to perform context attribution, but can be prohibitively expensive to compute for large models. In this work, we introduce AttriBoT, a series of novel techniques for efficiently computing an approximation of the LOO error for context attribution. Specifically, AttriBoT uses cached activations to avoid redundant operations, performs hierarchical attribution to reduce computation, and emulates the behavior of large target models with smaller proxy models. Taken together, AttriBoT can provide a >300x speedup while remaining more faithful to a target model's LOO error than prior context attribution methods. This stark increase in performance makes computing context attributions for a given response 30x faster than generating the response itself, empowering real-world applications that require computing attributions at scale. We release a user-friendly and efficient implementation of AttriBoT to enable efficient LLM interpretability as well as encourage future development of efficient context attribution methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。