← Latest papers
💬 NLP

Masked Distillation: Internalizing the Chain-of-Thought in Language Models

This paper introduces "masked distillation," a framework that internalizes the reasoning capabilities of Large Reasoning Models into a student model's parameters by training it to predict only solution tokens while receiving feedback conditioned on the teacher's Chain-of-Thought, thereby enabling direct answer generation and reducing inference latency without sacrificing accuracy.

Original authors: Durgesh Kalwar, Vardhan Palod, Subbarao Kambhampati

Published 2026-07-28
📖 5 min read🧠 Deep dive

Original authors: Durgesh Kalwar, Vardhan Palod, Subbarao Kambhampati

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 world where your favorite AI assistant is like a brilliant but chatty student. When you ask it a tricky question, it doesn't just blurt out the answer; it scribbles pages of notes, draws diagrams, and talks through every single step of its thinking before finally writing down the solution. This "thinking out loud" process, known in the tech world as a "Chain of Thought," has made AI models incredibly smart at math and logic puzzles. However, there's a catch: those pages of notes take up a lot of time and energy to generate. It's like paying a taxi driver to drive you all the way to the grocery store, but also paying them to drive around the entire city block first just to "think" about which aisle you need. Scientists have long wondered: Can we teach the AI to do all that thinking inside its head? If we could, the AI would skip the long, chatty notes and just give you the answer instantly, saving massive amounts of time and computer power.

This paper, titled "Masked Distillation," dives right into that question. The researchers, working with Large Reasoning Models (LRMs), asked if they could take a smart "teacher" model that loves to think out loud and train a smaller "student" model to internalize that thinking process. They wanted to see if the student could learn to skip the notes entirely and just output the final answer, while still being just as smart. They tested this using a clever technique called "Masked Distillation." Imagine the teacher is solving a puzzle while the student is watching. The teacher sees the full question and its own detailed thought process, but the student is only shown the question. The goal was to see if the student could learn the teacher's secret logic and then solve the puzzle on its own without ever needing to write down the steps, even though the teacher had all the notes to guide the learning process.

The team set up two main experiments. In the first, they used the same AI model as both the teacher and the student, just asking it to think differently. In the second, they used a bigger, smarter model as the teacher and a smaller, simpler one as the student. They also introduced a "scaffold" concept. Think of this like training wheels on a bike. Sometimes, the student might need to see a little bit of the teacher's notes (the "scaffold") to get the answer right, rather than trying to do everything from scratch. They tested how much of the teacher's thinking the student needed to see to get the best results.

The results were a mix of "wow" and "not so fast." On a dataset of grade-school math problems called GSM8K, the student models were amazing. They successfully learned to internalize the teacher's thinking. The fully "masked" student (one that never wrote down any notes) got 76.0% of the answers right, which was a huge jump from its starting ability, and it did so using only 369.6 tokens (units of text) on average, compared to the teacher's 2,398.1 tokens. That's a massive 6.5x reduction in effort!

However, on a trickier number puzzle called Countdown, the story changed. Here, the student that tried to do everything in its head (fully masked) actually got worse, dropping to 41.7% accuracy. It turned out that for this specific type of puzzle, the student needed to see some of the teacher's notes to succeed. But here's the cool part: the researchers found a sweet spot. By letting the student see just a tiny bit of the teacher's thinking (about 30% of the notes, or an "alpha" of 0.3), the student's accuracy skyrocketed to 86.2%. This was almost as good as the teacher (87.3%) but still used about 1.3 times fewer tokens than the teacher. It was like giving the student just enough training wheels to balance perfectly without needing the whole bike.

The paper also looked at how well these students handled new, unseen puzzles (out-of-distribution tasks). On the math side, the students did well, but on the Countdown puzzles, the results were a bit more mixed. Interestingly, in some cases, the students trained with a little bit of scaffolding actually generalized better than the teacher itself when the puzzles got harder or changed slightly.

One key finding was that the method of teaching mattered. When they tried to teach the student just by showing it the teacher's notes and asking it to copy them (a method called Supervised Fine-Tuning), it didn't work as well. The "Masked Distillation" method, which uses a more complex way of comparing the student's guesses to the teacher's actual thoughts, was much more effective at transferring the "thinking" skills.

In the end, the paper suggests that we can't just magically delete all the thinking steps for every problem. Whether an AI can "think silently" depends heavily on the type of problem and how much the student model already knows about that topic. For familiar tasks like basic math, the AI can learn to think silently and save a ton of time. For harder, unfamiliar puzzles, it might still need a little help—a small scaffold of notes—to get the job done right. The researchers conclude that this "scaffold" is a powerful tool we can tune, allowing us to find the perfect balance between how smart the AI is and how fast it can give us an answer.

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 →