研究问题
Activation patching 用 clean、corrupted 和 patched 三次 forward pass 定位影响某行为的内部组件,但文献对 corruption、effect metric、patch window 和被破坏 token 的选择并不统一。论文问:这些看似实现细节的选择会不会改变‘机制位于哪里’的结论? 作者在 factual recall、indirect object identification(IOI)、算术、docstring completion 和 greater-than 等任务上比较方案,并试图给出实践建议及其适用边界。
模型与方法
基本流程先缓存 clean activation,再运行 corrupted prompt,最后把某组件的 clean activation 注入 corrupted run;patching effect 衡量输出恢复。组件可为 MLP layer、attention head 或 token-position 对。 Corruption 比较 Gaussian noise(GN:向关键信息 token embedding 加噪)与 symmetric token replacement(STR:用语义角色对应、仍在分布内的 token 替换)。Metric 比较目标 token probability、logit difference 与 KL divergence;另比较单层 effect 求和和一次联合 patch 多层的 sliding window。 主要模型包括 GPT-2 XL、GPT-2 small 与 GPT-\(J\)。作者通过滑动层窗、逐 head patch 和不同被破坏 token 重复实验,检查 localization peak、已知 circuit head 的检出率及内部 attention pattern 是否被 corruption 本身破坏。
Figure 1a · 对每个候选组件重复注入并测量输出恢复,形成 localization map。
物理解读:A large effect is conditional on how the input was corrupted and how recovery was measured; it is not an unconditional component importance score.
来源:paper.pdf \(p\). 2, Figure 1a
核心结果与证据
Factual recall 中,GN 在 GPT-2 XL 约第 16 层产生明显 MLP 峰,而 STR 的峰弱得多;跨 window size,GN peak 可为 STR 的 2–5 倍。但算术任务中 STR 有时更集中,说明差异不是固定缩放。 IOI circuit 的 Table 1 显示,在相同 metric 下 GN 与 STR 检出不同 head 集合且均有关键漏检。GN 还会扰乱 Name Mover attention:500 个 clean prompts 上 IO attention 平均约 0.58,GN 后分散到 IO/\(S_{1}\) 约 0.26/0.21;这支持 OOD corruption 可能破坏待测机制。 Probability 倾向漏掉抑制/negative components,作者更推荐 logit difference。Sliding-window joint patch 的 peak 通常比单层 effects 求和至少高 20%,Figure 5 的窗口 3/5/10 分别为 1.40×、1.75×、1.59×,提示非线性交互会被误读为简单层贡献相加。
建议与适用边界
作者建议条件允许时优先用 in-distribution 的 STR;无法 token 对齐或没有自然反事实时再谨慎考虑 GN。输出指标一般优先 logit difference,尤其不能只用 probability 判断 negative components;最好同时展示多个 metric。 Patching 的 token、组件粒度与 window 必须由具体因果问题决定。论文改变 IOI 中被 corruption 的 token 后能找回先前漏掉的 Name Movers,说明 activation patching 追踪的是干预所破坏的信息路径,不是与问题无关的唯一‘真实电路地图’。 这些是基于若干模型/任务的经验最佳实践,不是定理。STR 也可能改变语义、分词或难度,logit difference 依赖对照 token,KL 回答的是分布变化而非特定答案恢复;多方案一致性和正/负对照比单一热图更可信。
有效性与局限
实验覆盖多个经典任务,但多为小型/中型开源 Transformer 和手工模板;不能直接保证在现代 instruction-tuned、多 token 输出或多模态模型上相同。已知 circuit 本身也来自先前分析,不能当绝对 ground truth。 用离均值 2 SD 作为 head detection 是操作性阈值,相关 patch effects 可能非独立且分布未必高斯。window patch 的放大可能来自交互,也可能混入跨层协同和尺度效应,不能分配为单组件因果贡献。 论文揭示的是 method dependence:它削弱只凭单一 corruption/metric 得到强机制结论的可信度,但不意味着所有既有 activation-patching 结果都错误。独立复现、causal scrubbing/path patching、ablation 和行为对照仍必要。
复现与资源
原文:https://arxiv.org/abs/2309.16042。官方 PDF SHA-256:8ba9f928e321ad2f319bf0ac62ae582d8a70befbe88d0f85773302d64252d396。正文/附录记录 prompt 集、模型、corruption、metric、window 与扩展实验。 复现必须保存 clean/corrupt 配对规则、noise scale、token positions、patch tensor hook、component granularity、metric 符号、sample count、threshold 与随机种子;建议先复现单一 Figure,再做 corruption×metric×window 的完整敏感性矩阵。Evidence status: full-text verified; no independent reproduction performed.
阅读指南
先读 pp. 1–3 和 Figure 1 掌握三次 forward pass;pp. 3–6 比较 GN/STR 与 probability/logit difference;pp. 7–9 看 window、建议和 token-choice 反例,再用 Appendices \(C\)–I 检查跨任务稳健性。
← 上一篇 Active Ising Models of Flocking: A Field-Theoretic Approach
下一篇 → Neural Operators for Accelerating Scientific Simulations and Design
Discussion
评论与讨论
评论公开保存在 GitHub Discussions;阅读无需登录,发表评论需要 GitHub 账号。