Grafy News
Try Grafy free

New RCD method improves LLM compression via reasoning circuits

Researchers propose Reasoning Circuit Distillation (RCD) to better transfer reasoning capabilities from large to small models by targeting internal logic.

Illustration for the news story: New RCD method improves LLM compression via reasoning circuitsSource: Grafy Research Lab

Researchers have developed a new way to compress large language models (LLMs) by focusing on their internal reasoning structures rather than just their final answers. This approach, called Reasoning Circuit Distillation (RCD), aims to help smaller "student" models inherit the complex logic of larger "teacher" models without losing their own intrinsic computational patterns.

What is Reasoning Circuit Distillation?

Traditional knowledge distillation typically works by making a smaller model match the output distributions of a larger one. However, according to the research paper by Wenshui Luo, Jialiang Tang, Jie Yang, and Chen Gong, simply matching outputs does not capture how a model actually arrives at a conclusion. Furthermore, forcing a student model to match the exact internal representations of a teacher can disrupt the student's own unique way of processing information.

To solve this, the authors propose RCD. This method identifies "reasoning circuits"—specific paths of information flow between Transformer components like attention modules and MLP blocks—that are most critical to a model's performance on a given task. Instead of forcing the student to copy the teacher's structure, RCD aligns the "predictive effects" of their respective circuits. This means the student learns to produce similar shifts in logic when its own internal reasoning paths are modified.

How are reasoning circuits identified?

Finding these circuits requires identifying which specific connections (edges) in a Transformer architecture contribute most to a correct answer. The researchers use a technique called Edge Attribution Patching with Integrated Gradients (EAP-IG). This method calculates an attribution score for every edge in the model to determine its importance.

Figure 1 illustrates this concept using the Qwen2.5-Coder model series. The figure shows the 80 most critical edges for code generation, where different thicknesses and colors represent the significance and direction of the information flow. Notably, the researchers observed that models of different sizes develop different patterns; for instance, the 1.5B parameter model uses more attention heads in intermediate layers, whereas the 7B model exhibits a simpler, more sparse forward pattern.

Figure 1: Reasoning circuits of two Qwen2.5-Coder models, each containing the 80 most critical edges for the code generation task. The blue and red edges indicate positiv…
Figure 1. Reasoning circuits of two Qwen2.5-Coder models, each containing the 80 most critical edges for the code generation task. The blue and red edges indicate positive effects and negative effects, respectively, while thicker edges indicate greater significance. The sparser 7B circuit (left panel) suggests less intermediate computation than its 1.5B counterpart (right panel). Figure 1 of “Distilling Model-Inherent Reasoning Circuit for Large Language Models” by Wenshui Luo, Jialiang Tang, Jie Yang et al. (arXiv.org), CC BY 4.0.

Why does model size change reasoning patterns?

One of the core findings of the study is that models with different capacities or architectures do not share the same internal logic. Even if two models have the same number of layers, their "reasoning circuits" can look entirely different due to how they were trained.

Figure 4 demonstrates this by comparing the reasoning circuits of the Qwen2.5-Math-7B-Instruct and Qwen2.5-Math-1.5B models. While both models possess 28 Transformer layers, their critical edges are distributed differently. The 7B model relies more heavily on MLP chains in the later layers, while the 1.5B model utilizes a different configuration to achieve its results. Because of these inherent differences, RCD is designed to be "model-inherent," meaning it respects the unique architecture of both the teacher and the student.

Figure 4: The reasoning circuits of Qwen2.5-Math-7B-Instruct and Qwen2.5-Math-1.5B. Blue and red edges denote positive and negative attribution scores, respectively, whil…
Figure 4. The reasoning circuits of Qwen2.5-Math-7B-Instruct and Qwen2.5-Math-1.5B. Blue and red edges denote positive and negative attribution scores, respectively, while edge thickness represents attribution magnitude. Although both models contain 28 Transformer layers, their critical edges differ substantially: the 7B model relies more on MLP chains in the intermediate and later layers, whereas the 1.5B… Figure 4 of “Distilling Model-Inherent Reasoning Circuit for Large Language Models” by Wenshui Luo, Jialiang Tang, Jie Yang et al. (arXiv.org), CC BY 4.0.

How effective is the RCD method?

In experimental evaluations involving mathematical reasoning and code generation, the RCD method consistently outperformed existing state-of-the-art knowledge distillation techniques. The researchers also analyzed the method across three distinct reasoning modes: prompt-to-reasoning (how logic begins), step-to-next-step (how logic progresses), and reasoning-to-answer (how logic concludes).

By aligning the predictive effects across these transitions, RCD narrows the capability gap between large and small models more effectively than methods that only look at final outputs or attempt to force structural alignment. The paper provides theoretical guarantees for the recovery of these circuits and shows that the RCD loss effectively controls the discrepancy in how these circuits influence predictions.

Applying this research to AI workflows

Understanding how models reason is becoming central to the development of more efficient, specialized AI. For researchers and developers looking to dive deeper into the technical specifics of such papers, the Reader app in Grafy can be used to upload and query complex scientific documents. This allows for a more granular exploration of mathematical proofs and experimental data found in mechanistic interpretability research.

Frequently asked questions

What is the main goal of Reasoning Circuit Distillation?

The main goal of RCD is to compress large language models into smaller ones more effectively. It achieves this by aligning the functional impact of a model's internal reasoning circuits rather than just matching the final text outputs or forcing the student to copy the teacher's exact internal structure.

How does RCD differ from traditional knowledge distillation?

Traditional knowledge distillation focuses on aligning output distributions or intermediate feature representations between models. In contrast, RCD identifies the specific computational circuits unique to each model and aligns their predictive effects, which prevents the student model's natural reasoning patterns from being disrupted during the process.

Can different sized models use the same reasoning circuits?

No, the research suggests that models of different sizes or architectures develop distinct reasoning circuits during pre-training. For example, larger models might use more complex paths, while smaller models might use sparser patterns. RCD accounts for this by discovering separate, model-inherent circuits for both the teacher and the student.

Source: Wenshui Luo, Jialiang Tang, Jie Yang, and Chen Gong, "Distilling Model-Inherent Reasoning Circuit for Large Language Models"


Source: Grafy Research Lab — Distilling Model-Inherent Reasoning Circuit for Large Language Models