让大模型的特征交互解释可扩展到千级输入,突破传统方法瓶颈。
SPEX: Scaling Feature Interaction Explanations for LLMs
- 基于稀疏傅里叶变换与通道解码,高效识别重要特征交互。
- 在千级输入下比传统方法重建模型输出准确率高20%。
- 适用于长文本、闭源大模型,揭示抽象与组合推理机制。
大型语言模型(LLMs)因其捕捉输入特征间复杂交互的能力而革新了机器学习。主流事后解释方法如SHAP提供边际特征归因,其扩展到交互重要性时仅能处理约20个输入长度。我们提出谱解释器(SPEX),一种模型无关的交互归因算法,可高效扩展至约1000个输入长度。SPEX利用真实数据中普遍存在的交互稀疏性,通过通道解码算法实现稀疏傅里叶变换,快速识别关键交互。我们在三个需依赖长上下文交互的任务数据集上进行实验,结果表明:在大输入场景下,SPEX比边际归因方法在忠实重构LLM输出方面最高提升20%;成功识别出显著影响模型输出的关键特征与交互。在HotpotQA数据集上,SPEX发现的交互与人工标注高度一致。此外,我们用该方法为闭源大模型(GPT-4o mini)生成解释,揭示其抽象推理能力,并在视觉-语言模型中验证组合推理过程。
原文摘要 · Abstract (English)
Large language models (LLMs) have revolutionized machine learning due to their ability to capture complex interactions between input features. Popular post-hoc explanation methods like SHAP provide marginal feature attributions, while their extensions to interaction importances only scale to small input lengths ($\approx 20$). We propose Spectral Explainer (SPEX), a model-agnostic interaction attribution algorithm that efficiently scales to large input lengths ($\approx 1000)$. SPEX exploits underlying natural sparsity among interactions -- common in real-world data -- and applies a sparse Fourier transform using a channel decoding algorithm to efficiently identify important interactions. We perform experiments across three difficult long-context datasets that require LLMs to utilize interactions between inputs to complete the task. For large inputs, SPEX outperforms marginal attribution methods by up to 20% in terms of faithfully reconstructing LLM outputs. Further, SPEX successfully identifies key features and interactions that strongly influence model output. For one of our datasets, HotpotQA, SPEX provides interactions that align with human annotations. Finally, we use our model-agnostic approach to generate explanations to demonstrate abstract reasoning in closed-source LLMs (GPT-4o mini) and compositional reasoning in vision-language models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。