← Latest papers
💬 NLP

Induction in Both Directions: A Mechanistic Analysis of In-Context Learning in Masked Diffusion Language Models

This paper provides a mechanistic analysis of masked diffusion language models (DLMs), revealing that they implement a direction-symmetric bidirectional induction circuit for in-context learning and implicitly compute global masking fractions as timesteps, though they only outperform autoregressive models when leveraging full bidirectional context.

Original authors: Andy Catruna, Emilian Radoi

Published 2026-07-20
📖 4 min read☕ Coffee break read

Original authors: Andy Catruna, Emilian Radoi

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 you are trying to teach a robot how to finish a sentence. For years, the best way to do this was to make the robot read a story from left to right, word by word, guessing the next one based only on what it had already seen. This is how most modern AI writers work; they are like a person reading a book who can only see the pages they've already turned. But recently, scientists have started building a different kind of robot. Instead of reading left-to-right, this new robot sees a whole page of text where some words are hidden behind black boxes. It looks at the visible words on both the left and the right, guesses what's inside the box, fills it in, and then repeats the process until the whole page is clear. This is called a "diffusion" model.

The big question for scientists is: How does this new robot learn? When you show a robot a pattern, like "The cat sat on the mat. The cat sat on the [BLANK]," and it figures out the blank should be "mat," we call that "induction." It's the robot's way of saying, "I've seen this before, so I know what comes next." We know exactly how the old, left-to-right robots do this trick, but we have no idea how the new, "look-at-everything" robots pull it off. Do they use the same brain circuits? Do they have a secret superpower because they can see both sides of the missing word? Understanding this is crucial because if we want to build better AI, we need to know how these different machines actually think, not just what they say.


In this paper, the researchers decided to play detective with two very similar robots to see how they solve the same puzzle. They built a standard "left-to-right" robot and a new "look-at-everything" robot, making sure they were twins in every way except for how they read. They gave them a simple game: find a repeated pattern in a long string of random letters and copy the missing letter from the matching spot.

The team discovered that the new robot doesn't just copy the old robot's tricks; it learns a brand new, two-way superpower. While the old robot can only look backward to find its answer, the new robot builds a special "induction circuit" that works in both directions. It's like the robot has two little helpers: one who whispers what was just to the left of the missing word, and another who whispers what was just to the right. These helpers write these clues into the robot's memory. Then, a third "detective" part of the robot uses those clues to scan the entire text—both the past and the future—to find the matching pattern and copy the answer.

Here is the twist: The new robot is only better than the old one when it is allowed to peek at both sides of the missing word. If you block its view of the future and force it to only look at the past (just like the old robot), it performs exactly the same. This proves the new robot isn't just a "smarter" version of the old one; its advantage comes entirely from its ability to see both sides of the gap at the same time.

The researchers also found something surprising about how the robot knows when to guess. Usually, these robots are told exactly what step of the guessing game they are on (like "Step 1 of 100"). But these robots weren't given that information. Instead, the paper shows that the robot secretly counts how many black boxes are still on the page. It uses this count as a hidden timer. If there are many boxes left, it acts one way; if there are few, it acts another. The scientists proved this by poking the robot's brain and showing that changing this "box count" directly changes how confident the robot is in its guesses.

In short, the paper reveals that these new diffusion robots don't just think differently; they think in a symmetrical, two-way street. They gather clues from both sides, match them up, and even keep a secret mental tally of how much work is left to do, all without being explicitly told how to do it. This gives us a clearer map of how these powerful new tools are learning to understand the world.

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 →