Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Models

Samuel Marks, Can Rager, Eric J. Michaud, Yonatan Belinkov, David Bau +1 more
3/28/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: saprmarks/feature-circuits (223 stars, MIT, last commit 2025-10-14). 1 more below.

Abstract

We introduce methods for discovering and applying sparse feature circuits. These are causally implicated subnetworks of human-interpretable features for explaining language model behaviors. Circuits identified in prior work consist of polysemantic and difficult-to-interpret units like attention heads or neurons, rendering them unsuitable for many downstream applications. In contrast, sparse feature circuits enable detailed understanding of unanticipated mechanisms. Because they are based on fine-grained units, sparse feature circuits are useful for downstream tasks: We introduce SHIFT, where we improve the generalization of a classifier by ablating features that a human judges to be task-irrelevant. Finally, we demonstrate an entirely unsupervised and scalable interpretability pipeline by discovering thousands of sparse feature circuits for automatically discovered model behaviors.

View on arXivView PDF

Code Implementations(2)

MIT
22345Shell, PythonOct 23, 20231 years agoMIT
MIT

This repository contains code, data, and links to autoencoders for replicating the experiments of Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Models.

00Shell, PythonJan 22, 20251 years agoMIT

Similar Papers

Cite this paper

@article{marks2024sparse,
  title  = {Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Models},
  author = {Samuel Marks and Can Rager and Eric J. Michaud and Yonatan Belinkov and David Bau and Aaron Mueller},
  year   = {2024},
  eprint = {2403.19647},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.19647v3},
  journal = {ICLR 2024 2024}
}

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/2403.19647.svg)](https://codeofpaper.com/paper/2403.19647)

Discussion