← Latest papers
💬 NLP

Tracing Computation Density in LLMs

This paper introduces the s-Trace method to reveal that large language models operate in a modular, two-phase manner where a sparse subgraph of early layers provides a rough prediction based on shallow statistics, which is then incrementally refined by denser computations in later layers, with the necessary computation amount correlating to model uncertainty.

Original authors: Corentin Kervadec, Iuliia Lysova, Iuri Macocco, Marco Baroni, Gemma Boleda

Published 2026-05-27
📖 4 min read☕ Coffee break read

Original authors: Corentin Kervadec, Iuliia Lysova, Iuri Macocco, Marco Baroni, Gemma Boleda

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a massive, billion-person orchestra (the Large Language Model) playing a symphony. Every time you ask a question, all billions of musicians start playing at once to create the answer. It seems like they are all working equally hard, right?

This paper asks a simple question: Do they really? Or is it possible that only a tiny, specific group of musicians is actually doing the heavy lifting, while the rest are just standing by?

The authors developed a new tool called s-Trace to find out. Think of s-Trace as a "spotlight" that can turn off parts of the orchestra to see if the music still sounds the same. By gradually turning off more and more musicians (edges in the computer graph), they figured out exactly how many are needed to get the job done.

Here is what they discovered, broken down into simple concepts:

1. The Two-Act Play

The authors found that the orchestra doesn't work in a straight line. Instead, the music is built in two distinct phases:

  • Act 1: The "Core" Construction (The Rough Draft)
    Imagine a small group of musicians in the front row (the early layers of the model). When the spotlight is very dim, only these few are playing. Surprisingly, they can already play the main melody well enough that you know exactly what song is coming next.

    • The Magic Number: It turns out that a tiny fraction of the model—about 0.1% of all its parts—is enough to predict the most likely next word. This is called the "Minimal Core."
    • Who is in the Core? Interestingly, this core isn't just one type of musician. It's a balanced mix of different tools (residual connections, MLPs, and attention heads) working together in the early stages of the process.
  • Act 2: The "Refinement" (The Polish)
    Once the main melody is there, the rest of the orchestra (the later layers) slowly joins in. They don't change the song; they just add the fancy decorations, the subtle emotions, and the perfect harmonies.

    • The Cost: To get from "good enough" to "perfect," you need to turn on a lot more musicians. The more you want to refine the answer, the more of the massive orchestra you have to activate. This phase is where the model adds the nuance needed for a high-quality, human-like response.

2. The "Difficulty" Meter

The paper also found that the orchestra doesn't always use the same amount of energy. It adapts to how hard the task is:

  • Easy Words (High Frequency): If the next word is something very common (like "the" or "and"), the orchestra stays small. The "Minimal Core" is enough. It's like a musician playing a simple, repetitive beat; they don't need the whole band.
  • Hard Words (Low Frequency): If the next word is rare or tricky, the model gets "uncertain." To handle this, it turns on more of the orchestra, especially the later layers, to figure out the complex details.
  • The Connection: The more uncertain the model is about the answer, the more "musicians" it recruits. The amount of work the model does is directly linked to how hard the input is to guess.

3. Why This Matters (According to the Paper)

The authors suggest that Large Language Models aren't just giant, messy blobs of math. They have a modular organization:

  • They have a sparse, efficient core that handles the basics (like recognizing simple patterns).
  • They have a dense, expansive layer that handles the complex, nuanced details.

This is similar to how humans might process language: we use a quick, automatic reflex for common words, but we engage our full brain power when we encounter something rare or complex.

Summary Analogy

Think of the model like a chef cooking a meal:

  • The Core (0.1%): This is the chef grabbing the basic ingredients (flour, water, salt) and mixing them. You can tell immediately that they are making bread.
  • The Refinement (The rest): This is the chef kneading, baking, adding spices, and plating the dish. The bread is already "bread" after the first step, but to make it a delicious loaf of sourdough, they need to use the whole kitchen and all the tools.

The paper concludes that for many tasks, the "chef" doesn't need the whole kitchen to know what they are cooking, but they do need the whole kitchen to make it taste good.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →