atlas

Research map / Architectures and efficiency / Attention and transformers

Finding Transformer Circuits With Edge Pruning

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Vision transformer pruning · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Frames automated circuit discovery as gradient-based edge pruning on a disentangled residual stream, yielding sparser, more faithful circuits in GPT-2 and scaling to CodeLlama-13B.

Problem

Automated circuit discovery in Transformers is either too slow (greedy ACDC search) or relies on inaccurate first-order approximations (EAP), limiting faithfulness, scale, and dataset size.

Approach

Learn continuous hard-concrete masks over edges between components (rather than over heads, neurons or layers), replacing pruned edges with corrupted activations via interchange ablation, using a disentangled residual stream so each node can read from arbitrary upstream nodes, and optimizing with a Lagrangian sparsity target.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Edge Pruning instead of ACDC or EAPGPT-2 Small circuit discovery · IOI, 200 examplesKL divergence: 0.92 (ACDC); 3.47 (EAP); 0.25 (Edge Pruning)Helped
Use Edge Pruning instead of ACDC or EAPGPT-2 Small circuit discovery · IOI, 400 examplesKL divergence: 0.88 (ACDC); 3.66 (EAP); 0.22 (Edge Pruning)Helped
Use Edge Pruning instead of EAPGPT-2 Small circuit discovery · IOI, 100K examplesKL divergence: 3.78 (EAP); 0.20 (Edge Pruning)Helped
Use Edge Pruning instead of EAPGPT-2 Small circuit discovery · IOI, 100K examplestime (s): 12,260 (EAP); 3,042 (Edge Pruning)Helped
Increase the training data from 200 to 400 examplesACDC · IOIKL divergence: 0.92 -> 0.88Helped
Add node masks alongside edge masks (ablation)Edge Pruning · Circuit discovery at high sparsitysparsityHelped
Use the instruction-prompted circuit rather than the full modelCodeLlama-13B-Instruct · Boolean Expressions, instruction promptedaccuracy (%): 82.00 -> 79.25Hurt
Use the few-shot circuit rather than the full modelCodeLlama-13B-Instruct · Boolean Expressions, few-shotaccuracy (%): 89.25 -> 87.25Hurt
Use the IP circuit under few-shot promptingCodeLlama-13B-Instruct IP circuit · Boolean Expressions, few-shotaccuracy (%): 79.25 (instruction prompted) -> 74.50 (few-shot)Hurt
Use the FS circuit under instruction promptingCodeLlama-13B-Instruct FS circuit · Boolean Expressions, instruction promptedaccuracy (%): 87.25 (few-shot) -> 75.75 (instruction prompted)Hurt
Restrict the circuit to edges shared by IP and FS circuitsCodeLlama-13B-Instruct · Boolean Expressions, instruction prompted and few-shotaccuracy (%): 79.25 -> 72.50 (instruction prompted); 87.25 -> 68.25 (few-shot)Hurt

Surprising findings

Limitations

Experimental setup

Datasets: IOI (single template, IOI-t1) IOI (30 templates, HuggingFace fahamu/ioi) Greater Than Gendered Pronoun Tracr xproportion and reverse Boolean Expressions (BBH-derived, in-house generated)

Benchmarks: IOI-t1 IOI Greater Than Gendered Pronoun Tracr xproportion Tracr reverse Boolean Expressions

Metrics: KL divergence logit difference probability difference exact match Kendall's Tau accuracy runtime sparsity ROC AUC vs manual circuits

Baselines: ACDC EAP

Builds on: ACDC EAP (edge attribution patching) CoFi pruning hard concrete distribution (L0 regularization) interchange ablation

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy