Sparse Functional Circuits in Transformer Language Models

This direction is merged into another direction: functional sparsity. Its last version stays readable and citable here.

Version 1 of 169 papers70 conceptsfrozen 2026-10-04

Large Language Models (LLMs) are often described as "black boxes"—monolithic blocks of billions of parameters where knowledge is diffused uniformly. However, a growing body of research suggests this intuition is wrong. Instead of a dense soup of information, these models behave more like a collection of specialized, highly sparse "circuits."

Whether it is solving an arithmetic problem, translating a sentence, or refusing a harmful prompt, the heavy lifting is typically performed by a tiny fraction of the model’s total capacity—often less than 1%.

The Myth of Distributed Representation

In the early days of neural network interpretation, the prevailing theory was that knowledge was broadly distributed across the entire network. If you wanted to find where a model stored the concept of "syntax," you would look at the whole vector space.

Recent work has challenged this. Victor Sanh, Alexander M Rush, and Steven Cao demonstrated this through subnetwork probing in Low-Complexity Probing via Finding Subnetworks. Instead of training a new model to "probe" what a Transformer knows, they looked for a subnetwork already inside it. They found that specific linguistic tasks could be solved by selecting a subnetwork described by as few as 72 bits.

This suggests that models don't just "know" things; they have internal "organs"—sparse, identifiable circuits—dedicated to specific functions. Nadir Durrani and Yonatan Belinkov confirmed this in Analyzing Individual Neurons in Pre-trained Language Models, showing that as little as 4% of a network's neurons are sufficient to match full-model performance on lexical tasks.

Localizing the Logic of Reasoning

If linguistic knowledge is sparse, what about complex reasoning? Researchers have applied "causal interventions"—systematically turning parts of the model on and off—to find the "logic gates" of the Transformer.

In Discovering Variable Binding Circuitry with Desiderata, Xander Davies and David Bau localized the machinery for symbolic reasoning (like variable binding) in LLaMA-13B to just nine attention heads and one MLP block. Similarly, Sarah Wiegreffe found that the ability to answer multiple-choice questions is not a model-wide accumulation of evidence but a two-stage process localized to a few "symbol binding" heads in the middle layers, as detailed in Answer, Assemble, Ace: Understanding How Transformers Answer Multiple Choice Questions.

Arithmetic follows the same pattern. Wei Zhang and colleagues discovered in Interpreting and Improving Large Language Models in Arithmetic Calculation that less than 5% of attention heads are responsible for math. Interestingly, Yaniv Nikankin argues in Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics that these circuits don't actually learn "math" in the human sense; they act as a "bag of heuristics" where tiny subsets of neurons vote for likely numerical patterns.

Surgical Knowledge Editing

The discovery of these circuits has profound implications for how we "fix" or "update" models. If a fact is stored in a specific 2% of the model, we should be able to edit that fact without touching the other 98%.

Deniz Bayazit, Negar Foroutan, and Antoine Bosselut developed a method to identify knowledge-critical subnetworks in Discovering Knowledge-Critical Subnetworks in Pretrained Language Models. By masking these tiny subsets, they could "delete" specific facts while leaving the model's general language abilities entirely intact.

This surgical precision extends to safety. Zhenhong Zhou and Haiyang Yu found that a minuscule number of attention heads—representing just 0.006% of total parameters—are responsible for a model's ability to refuse harmful queries. Silencing just these few heads, as shown in On the Role of Attention Heads in Large Language Model Safety, can bypass safety guardrails without damaging the model's general helpfulness.

The Hierarchy of Skills

Are these circuits independent, or do they build on each other? Wenya Wang introduced the concept of skill paths in Skill Path: Unveiling Language Skills from Circuit Graphs, providing evidence that language skills are both stratified by layer depth and inclusive. This means complex skills are physically built upon the circuits of simpler ones.

This modularity is so extreme that some researchers, like Jingcheng Niu and Zining Zhu, have identified "sheaves"—self-contained, ultra-sparse sub-networks that can perform tasks like grammar or factual recall entirely on their own, even if the rest of the model is deactivated (Sheaf Discovery with Joint Computation Graph Pruning and Flexible Granularity).

Why Circuit Discovery Works

The reason we can find these circuits is that Transformers are inherently redundant. For any specific prompt, the majority of parameters are idle. Tung-Yu Wu and Fazl Barez demonstrated in Query Circuits: Explaining How Language Models Answer User Prompts that as little as 1.3% of a model’s connections account for its performance on a specific reasoning task.

By treating the model not as a single function, but as a graph of potential pathways, researchers can use techniques like Edge Pruning (Danqi Chen, Finding Transformer Circuits With Edge Pruning) to "unmask" the active reasoning pathways. This shift from global analysis to circuit discovery is turning mechanistic interpretability from a speculative art into a precise science of neural "reverse engineering."

Papers in this version

Showing 60 of 69 papers.

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_sparse_functional_circuits_in_transforme_289d31f6,
  title = {Sparse Functional Circuits in Transformer Language Models},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/sparse-functional-circuits-in-transformer-language-models/rdr_289d31f68f0a4842a4f1b0bece3e8cea},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_sparse_functional_circuits_in_transforme_289d31f6_v1,
  title = {Sparse Functional Circuits in Transformer Language Models},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/sparse-functional-circuits-in-transformer-language-models/rdr_289d31f68f0a4842a4f1b0bece3e8cea/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}