用树模型代理大模型,高效发现关键特征交互。
ProxySPEX: Inference-Efficient Interpretability via Sparse Feature Interactions in LLMs
- 先用树模型拟合掩码输出,再提取重要交互
- 比SPEX少10倍推理次数,重构精度高20%
- 适合需要高效解释的大模型应用者
大语言模型通过捕捉输入特征间的复杂交互实现了卓越性能。现有方法需枚举所有特征组合以识别交互,随输入数n增长而严重变慢。近期Kang等(2025)提出的SPEX利用交互稀疏性,使n≈10³的规模成为可能,但需数万次模型推理,对大模型成本过高。本文观察到LLM特征交互具有层次性——高阶交互常伴随其低阶子集,据此提出ProxySPEX:先用梯度提升树拟合掩码后的模型输出,再提取关键交互。在四个高维数据集上验证,ProxySPEX相比边际归因方法重构精度提升20%,推理次数仅为SPEX的十分之一。该方法能高效近似特征的Shapley值。进一步应用于两类可解释性任务:数据归因(识别影响CIFAR-10测试预测的训练样本间交互),以及机制可解释性(揭示问答任务中注意力头之间跨层及层内交互)。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have achieved remarkable performance by capturing complex interactions between input features. To identify these interactions, most existing approaches require enumerating all possible combinations of features up to a given order, causing them to scale poorly with the number of inputs $n$. Recently, Kang et al. (2025) proposed SPEX, an information-theoretic approach that uses interaction sparsity to scale to $n \approx 10^3$ features. SPEX greatly improves upon prior methods but requires tens of thousands of model inferences, which can be prohibitive for large models. In this paper, we observe that LLM feature interactions are often hierarchical -- higher-order interactions are accompanied by their lower-order subsets -- which enables more efficient discovery. To exploit this hierarchy, we propose ProxySPEX, an interaction attribution algorithm that first fits gradient boosted trees to masked LLM outputs and then extracts the important interactions. Experiments across four challenging high-dimensional datasets show that ProxySPEX more faithfully reconstructs LLM outputs by 20% over marginal attribution approaches while using $10\times$ fewer inferences than SPEX. By accounting for interactions, ProxySPEX efficiently identifies the most influential features, providing a scalable approximation of their Shapley values. Further, we apply ProxySPEX to two interpretability tasks. Data attribution, where we identify interactions among CIFAR-10 training samples that influence test predictions, and mechanistic interpretability, where we uncover interactions between attention heads, both within and across layers, on a question-answering task.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。