Partially Rewriting a Transformer in Natural Language

Gonçalo Paulo, Nora Belrose
1/31/2025
cs.LGcs.CL

No official code found. Best implementation: EleutherAI/delphi (278 stars, Apache-2.0, last commit 2026-04-27).

Abstract

The greatest ambition of mechanistic interpretability is to completely rewrite deep neural networks in a format that is more amenable to human understanding, while preserving their behavior and performance. In this paper, we attempt to partially rewrite a large language model using simple natural language explanations. We first approximate one of the feedforward networks in the LLM with a wider MLP with sparsely activating neurons - a transcoder - and use an automated interpretability pipeline to generate explanations for these neurons. We then replace the first layer of this sparse MLP with an LLM-based simulator, which predicts the activation of each neuron given its explanation and the surrounding context. Finally, we measure the degree to which these modifications distort the model's final output. With our pipeline, the model's increase in loss is statistically similar to entirely replacing the sparse MLP output with the zero vector. We employ the same protocol, this time using a sparse autoencoder, on the residual stream of the same layer and obtain similar results. These results suggest that more detailed explanations are needed to improve performance substantially above the zero ablation baseline.

View on arXivView PDF

Code Implementations(1)

EleutherAI/delphiCommunity100%
Apache-2.0

Delphi was the home of a temple to Phoebus Apollo, which famously had the inscription, 'Know Thyself.' This library lets language models know themselves through automated interpretability.

27862PythonJun 18, 20245 months agoApache-2.0

Similar Papers

Cite this paper

@article{paulo2025partially,
  title  = {Partially Rewriting a Transformer in Natural Language},
  author = {Gonçalo Paulo and Nora Belrose},
  year   = {2025},
  eprint = {2501.18838},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.18838v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.18838.svg)](https://codeofpaper.com/paper/2501.18838)

Discussion