Sparse dictionary learning has been a rapidly growing technique in mechanistic interpretability to attack superposition and extract more human-understandable features from model activations. We ask a further question based on the extracted more monosemantic features: How do we recognize circuits connecting the enormous amount of dictionary features? We propose a circuit discovery framework alternative to activation patching. Our framework suffers less from out-of-distribution and proves to be more efficient in terms of asymptotic complexity. The basic unit in our framework is dictionary features decomposed from all modules writing to the residual stream, including embedding, attention output and MLP output. Starting from any logit, dictionary feature or attention score, we manage to trace down to lower-level dictionary features of all tokens and compute their contribution to these more interpretable and local model behaviors. We dig in a small transformer trained on a synthetic task named Othello and find a number of human-understandable fine-grained circuits inside of it.
翻译:稀疏字典学习作为机制可解释性中快速发展的技术,可用于克服叠加效应并从模型激活中提取更易理解的特征。基于提取的更具单义性的特征,我们提出进一步问题:如何识别连接海量字典特征的电路?我们提出一种替代激活补丁的电路发现框架。该框架较少受分布外问题影响,且渐进复杂度效率更高。框架基本单元是从所有写入残差流的模块(包括嵌入层、注意力输出层和MLP输出层)中分解出的字典特征。从任意logit、字典特征或注意力分数出发,我们能够追溯至所有标记的低层字典特征,并计算其对更可解释且局部化的模型行为的贡献。我们深入研究了基于合成任务Othello训练的小型Transformer,发现其内部存在大量人类可理解的细粒度电路。