Mechanistic interpretability (often abbreviated as mech interp, mechinterp, or MI) is a subfield of research within explainable artificial intelligence that aims to understand the internal workings of neural networks by analyzing the mechanisms present in their computations. The approach seeks to analyze neural networks in a manner similar to how binary computer programs can be reverse-engineered to understand their functions.
The term mechanistic interpretability was coined by Chris Olah as a description of his work in circuit analysis as opposed to usual methods in interpretable AI. Circuit analysis attempted to completely characterize individual features and circuits within models, while the broader field tended towards gradient-based approaches like saliency maps.
Before circuit analysis, work in the subfield combined various techniques such as feature visualization, dimensionality reduction, and attribution with human-computer interaction methods to analyze models like the vision model Inception v1.
Mechanistic interpretability aims to identify structures, circuits or algorithms encoded in the weights of machine learning models. This contrasts with earlier interpretability methods that focused primarily on input-output explanations.
This hypothesis suggests that high-level concepts are represented as linear directions in the activation space of neural networks. Empirical evidence from word embeddings and large language models supports this view, although it does not hold up universally.
Mechanistic interpretability employs causal methods to understand how internal model components influence outputs, often using formal tools from causality theory.
Mechanistic interpretability, in the field of AI safety, is used to understand and verify the behavior of complex AI systems, and to attempt to identify potential risks such as AI misalignment.
A sparse autoencoder (SAE) is a model trained to disentangle neural network activations into sparse representations. The learned dimensions often represent simple, human-understandable concepts. The technique was applied to large language model interpretability by Anthropic.
A circuit in a neural network is composed of causal chains of feature activations. By mapping out what circuits lead to what downstream consequences, as well as by activating and inhibiting circuits, one can analyze how a neural network (such as an LLM) reaches a given result from a given input.