Subscribe
Topic

Interpretability

Methods for understanding what happens inside neural networks. Posts explain the logit lens and tuned lens, activation patching, sparse autoencoders, superposition, representation engineering, integrated gradients and CKA similarity.

Articles

1-11
  1. The Logit Lens and Tuned Lens: Mathematical Foundations, Residual Stream Projections, and Representation Dynamics in Transformers

    Large language models based on decoder-only transformer architectures process information through a sequence of stacked attention and multi-layer perceptron (MLP) blocks connected by a residual stream. While the final output distribution over the vocabulary is produced by projecting the final hidden state through an unembedding matrix, understanding how intermediate representations evolve across depth remains a central problem in mechanistic interpretability. The logit lens and the tuned lens p

    AI
    5 min read
  2. Activation Patching and Causal Tracing: Mathematical Foundations, Counterfactual Interventions, and Circuit Discovery in Large Language Models

    Activation Patching and Causal Tracing: Mathematical Foundations, Counterfactual Interventions, and Circuit Discovery in Large Language Models Mechanistic interpretability aims to reverse-engineer the computational graphs implemented by trained neural networks into human-understandable algorithms. In autoregressive Transformer models, standard observational tools such as attention map visualization and linear probing often fail to distinguish between active computational paths and passive corre

    Education
    8 min read
  3. Integrated Gradients: How Axiomatic Attribution Solves the Gradients-at-Saturation Problem in Deep Neural Networks

    Integrated Gradients: How Axiomatic Attribution Solves the Gradients-at-Saturation Problem in Deep Neural Networks Feature attribution methods in deep learning aim to answer a fundamental interpretability question: given an input vector and a trained neural network, how much did each input dimension contribute to the model's final output score? In natural language processing and computer vision, practitioners routinely need to identify which input tokens, pixels, or tabular variables drove a sp

    AI
    10 min read
  4. Centered Kernel Alignment: How CKA Measures Representation Similarity Across Layers and Architectures

    Understanding how deep neural networks represent information across layers, training steps, and disparate architectures has long been a central challenge in machine learning interpretability. When two neural networks are trained on the exact same dataset, even from identical model architectures, their learned weight matrices and individual neuron activations differ completely due to random initialization, data shuffling, and non-convex optimization. Because representations are not aligned to a s

    AI
    9 min read
  5. Activation Patching and Circuit Discovery in Large Language Models: How Causal Mediation Maps Transformer Subgraphs

    Understanding how large language models perform complex reasoning requires moving beyond passive behavioral evaluation. While behavioral benchmarks measure model outputs on specific datasets, they treat the underlying neural network as an inscrutable black box. Mechanistic interpretability aims to reverse-engineer transformer weights and intermediate representations into human-understandable algorithms and computational graphs. At the core of modern mechanistic interpretability is causal mediat

    AI
    7 min read
  6. The Logit Lens: How Direct Unembedding Decodes Intermediate Representations in Large Language Models

    Autoregressive large language models process input tokens through deep stacks of transformer blocks, generating a final probability distribution over the vocabulary at the final layer. For years, the intermediate computations occurring within these hidden layers were treated as opaque black boxes. Mechanistic interpretability research has demonstrated that modern transformer architectures operate through a structured, iterative refinement process across their residual stream. The logit lens and

    AI
    6 min read
  7. Knowledge Editing in Large Language Models: How Causal Tracing, ROME, and MEMIT Modify Factual Storage in MLP Weights

    Updating factual information in pre-trained large language models has traditionally required two imperfect extremes: computationally expensive continual pre-training, or external prompt-stuffing through Retrieval-Augmented Generation (RAG). Standard gradient descent fine-tuning on isolated facts leads to catastrophic forgetting, parameter drift, and degraded general reasoning. To solve this, mechanistic interpretability researchers introduced direct model editing: a paradigm that treats transfo

    AI
    6 min read