The Local Interaction Basis: Identifying Computationally-Relevant and Sparsely Interacting Features in Neural Networks

Lucius Bushnaq, Stefan Heimersheim, Nicholas Goldowsky-Dill, Dan Braun, Jake Mendel, Kaarel Hänni, Avery Griffin, Jörn Stöhler, Magdalena Wache, Marius HobbhahnarXiv 2024 · DOI

Abstract

Mechanistic interpretability aims to reverse-engineer neural networks into human-understandable components. However, standard units of analysis like individual neurons are often polysemantic, and statistical methods like Principal Component Analysis (PCA) are blind to a feature's functional role. We introduce the Local Interaction Basis (LIB), a method that identifies features based on their downstream causal influence. By aligning the basis with the Jacobian of layer-to-layer transformations, LIB uncovers sparse, computationally relevant circuits. While highly effective in modular toy models and simple image classifiers, LIB's linear constraints highlight the challenges of interpreting Large Language Models (LLMs) where features likely exist in non-linear superposition.

Introduction: The Unit of Analysis Problem

The field of mechanistic interpretability seeks to decompile neural networks into logical building blocks. A primary obstacle is that individual neurons are frequently polysemantic, firing for unrelated concepts (e.g., "French food" and "optical illusions"). While techniques like PCA can find new directions in activation space, they prioritize data variance over functional relevance. The authors propose that a truly useful basis must be computationally relevant, representing the actual "gears" of the model’s logic rather than just statistical noise.

Methods: The LIB Pipeline

The Local Interaction Basis is derived through a three-step recursive pipeline that starts at the output layer and moves backward through the network:

  1. Whitening and PCA: Directions with near-zero variance are dropped, and the data is "whitened" to ensure all directions have equal initial weight.
  2. Jacobian Alignment: This core step involves calculating the Jacobian matrix (gradients) between adjacent layers. By performing a Singular Value Decomposition (SVD) on these gradients, the basis is aligned with directions that exert the strongest causal influence on the subsequent layer.
  3. Interaction Graphs: Integrated Gradients are used to quantify the connection strength between features across layers, resulting in a "circuit diagram" of information flow.
The three-step pipeline for deriving the Local Interaction Basis and constructing interaction graphs.

Experimental Evaluation

The LIB method was evaluated across three distinct model architectures:

  • Modular Addition: A transformer trained on clock arithmetic ($x + y \pmod{113}$), where the underlying algorithm (Fourier transforms) is known.
  • CIFAR-10: A Multi-Layer Perceptron (MLP) trained for image classification.
  • Language Models: GPT2-small and Tinystories-1M.

Key Results

Modular Addition and Sparsity

In the modular addition task, LIB successfully identified the "clock" algorithm. The resulting interaction graphs were highly sparse, allowing researchers to ablate most nodes and edges while maintaining 99.9% accuracy. This sparsity serves as a proxy for "truth," suggesting that the basis has successfully isolated the model's internal logic.

Interaction graph for a modular addition model, showing sparse connections between frequency-based features across layers.

CIFAR-10 and Feature Isolation

For the CIFAR-10 model, LIB isolated a distinct "Animal vs. Vehicle" direction. This feature was so clean that a linear probe using only this direction achieved accuracy comparable to the full model. In contrast, PCA "smeared" this semantic information across multiple directions.

Large Language Models and the Linear Limit

Results on LLMs were more complex. While LIB identified some positional features, it failed to produce more interpretable features than PCA for general language tasks. The interaction graphs remained dense, suggesting that LLM features are likely overcomplete and stored in superposition. Because LIB is a linear transformation, it cannot unbundle more features than there are dimensions in the hidden layer.

Discussion and Future Work

The core philosophy of LIB is that computation should define activation: a feature's importance is determined by its downstream impact. While LIB is a powerful tool for smaller, cleaner models, its limitations on LLMs suggest that future interpretability research must combine interaction-based methods with techniques like Sparse Autoencoders (SAEs) to handle overcomplete feature sets. The ultimate goal remains the development of a "Global Interaction Basis" capable of mapping the high-dimensional logic of frontier AI models.

Summary updated

BibTeX
@misc{bushnaq2024local,
  author = {Lucius Bushnaq and Stefan Heimersheim and Nicholas Goldowsky-Dill and Dan Braun and Jake Mendel and Kaarel Hänni and Avery Griffin and Jörn Stöhler and Magdalena Wache and Marius Hobbhahn},
  title = {{The Local Interaction Basis: Identifying Computationally-Relevant and Sparsely Interacting Features in Neural Networks}},
  year = {2024},
  eprint = {2405.10928},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.10928},
}
Figure