LLM Distillation Performance Degradation: Teacher-Student Cooperation Data Synthesis Explained

    Knowledge distillation is widely used to transfer capabilities from a larger teacher model to a smaller student model, but teacher-generated data can sometimes reduce student performance on complex reasoning tasks. This article examines why distribution mismatch between teacher and student outputs can trigger catastrophic forgetting, introduces TESSY (Teacher-Student Cooperation Data Synthesis), and summarizes experimental results and engineering practices for applying the approach in real projects.

    1. A Counterintuitive Phenomenon: Learning from a “Top Student” Can Lower Performance

    In LLM engineering, knowledge distillation is a widely used technical route: a larger, more capable teacher model generates training samples, and those samples are used to fine-tune a smaller student model. The goal is to obtain capabilities close to those of the large model at lower cost. Intuitively, this approach seems sound—just as an ordinary student reviewing a top student’s notes should benefit from the material.

    However, a research team recently observed a confusing phenomenon in complex reasoning tasks such as code generation: after training on teacher-generated data, the student model’s performance did not improve but declined. In published experiments, an 8B-parameter open-source student model trained with traditional pure-teacher data dropped by about 3% and 10% on two widely used code benchmarks. In other words, “learning from the teacher” did not help the student learn new skills; instead, it caused the student to lose capabilities it already had.

    This phenomenon is not isolated. Many engineers working on model fine-tuning have had similar experiences: they carefully prepare a large number of high-quality question-answer pairs generated by a strong model, complete training with high expectations, and then find that evaluation scores are lower than the baseline. What exactly is going wrong?

    2. Root Cause: Not Content Quality, but Mismatched “Language Habits”

    The research team’s answer is instructive: the core problem is not the quality of the teacher-generated content, but the large difference in “expression distribution” between the teacher and the student.

    A everyday analogy can help illustrate this. Imagine a new chef apprentice studying under a top chef. The top chef writes a detailed recipe full of professional jargon such as “heat the wok with plenty of oil,” “fragrant and caramelized,” and “a lingering aftertaste,” along with many notes that only professional chefs can fully understand. The apprentice, however, is used to plain expressions such as “fry scallion, ginger, and garlic until fragrant, then add diced chicken and stir-fry until the color changes.” The two “recipe languages” are very different. When the apprentice receives the top chef’s recipe, they may become confused and even ruin dishes they could originally make.

    Mapping this analogy back to model training makes the mechanism clear:

    1. Distribution shift. Each model forms its own output distribution during pretraining—wording preferences, sentence structures, and the rhythm of reasoning. To the student model, the teacher model’s outputs are out-of-distribution data.

    2. Induced catastrophic forgetting. When fine-tuning data differs too much from the student’s own distribution, training effectively forces the student to abandon its existing expression and reasoning patterns and rigidly imitate an unfamiliar style. Gradient updates can substantially perturb the student’s original parameter structure, eroding general capabilities learned during pretraining.

    3. Form overwhelming content. The student model spends a large amount of learning capacity imitating the teacher’s surface style, rather than fully absorbing the teacher’s truly valuable contribution—reasoning logic and problem-solving approaches. It learns the “skin” but loses the “bone.”

    This insight reframes the cause of distillation failure from “data quality” to “data-student compatibility,” pointing toward a clear direction for solving the problem.

    3. Solution: Teacher and Student “Co-Write” Each Training Sample

    Since the core issue is style mismatch, the solution naturally points in one direction: construct training data that contains both teacher wisdom and the student’s expression habits.

    The research team proposes TESSY (Teacher-Student Cooperation Data Synthesis). Its core idea is elegant: instead of letting the teacher independently create questions and provide complete answers, the teacher and student divide responsibilities and jointly complete each training sample:

    • The teacher handles “key reasoning steps”: the core parts that require deep thinking and reflect problem-solving intelligence, such as algorithm selection, state transition design, and boundary condition checks. These are generated by the teacher model to ensure an upper bound on reasoning quality.
    • The student handles “transitions and connections”: bridging sentences between reasoning steps, explanatory text, and stylistic expression are completed by the student model itself, ensuring that the overall text falls within the student’s familiar distribution.

    As a result, the synthesized training data takes the form of “the teacher’s skeleton + the student’s flesh.” During fine-tuning, the student no longer faces an unfamiliar language style. Instead, it sees content that it “could say but did not think of,” which greatly reduces learning resistance and allows core knowledge to be absorbed efficiently.

    From a machine learning theory perspective, this method is essentially distribution-aligned data augmentation: it anchors the supervision signal near the student model’s output distribution while retaining the teacher model’s guidance at high-value decision points. This balances “learnability” and “learning quality.” It is also consistent with the idea in curriculum learning of “starting from the student’s current level and gradually increasing difficulty.”

    4. Experimental Results: From Decline to Significant Improvement

    The experimental data show a striking contrast. Taking code generation as an example: the same 8B-parameter student model trained with traditional pure-teacher data dropped by about 3.25% and 10.02% on two code benchmarks. After switching to cooperatively synthesized data, its scores improved by about 11.25% and 6.68%, respectively. The swing between decline and improvement is close to 15 percentage points, strongly validating the decisive impact of style matching on distillation effectiveness.

    It is worth emphasizing that the two experiments differed only in how the training data was generated. Model structure, training hyperparameters, data scale, and other conditions remained consistent. Therefore, the improvement can be reasonably attributed to the cooperative synthesis mechanism itself.

    5. Engineering Implementation: Applying the Idea in Real Projects

    Developers who want to apply this idea in their own projects can refer to the following practical framework:

    1. Identify key decision points. Not every token in an answer deserves teacher involvement. First perform a structural analysis of the task and identify the “high-value reasoning fragments” that truly affect the result—for example, algorithm framework design in code tasks or core transformation steps in math tasks. Concentrate teacher compute on these positions to control synthesis cost.

    2. Design an alternating generation pipeline. A typical process is: the teacher generates the first key step → the student explains and transitions in its own words → the teacher generates the next key step → the student continues bridging, alternating until completion. Illustrative pseudocode is shown below:

    1. def synthesize_sample(question, teacher, student, max_steps=8):
    2. context = f"Question: {question}\nAnswer:\n"
    3. for i in range(max_steps):
    4. # Teacher produces a key reasoning step
    5. key_step = teacher.generate(context + "[Key step]")
    6. context += key_step
    7. # Student fills in transitions and explanations in its own style
    8. bridge = student.generate(context + "[Bridge explanation]")
    9. context += bridge
    10. if is_finished(context):
    11. break
    12. return context

    3. Apply quality filtering. Cooperatively generated data also needs validation. For example, code samples should pass compilation and unit tests, and math samples should have their final answers verified. This avoids solidifying errors from either the teacher or the student into the training set.

    4. Monitor training stability. Even when the data distribution has been aligned, it is still advisable to fine-tune with a lower learning rate and a small number of steps, and to monitor general capability metrics with a fixed evaluation set before and after training to prevent forgetting.

    5. Use platform capabilities. This type of data synthesis involves large-scale batch inference and places high demands on compute scheduling and task orchestration. Developers can use general-purpose compute services, object storage, and task scheduling capabilities from mainstream cloud platforms to build an elastically scalable data synthesis pipeline, quickly turning method research into engineering capacity.

    6. Conclusion and Outlook

    The value of the TESSY idea goes beyond a specific framework. More importantly, it corrects a long-overlooked assumption in the distillation field—that “teacher outputs are naturally good training data.” Practice shows that training data effectiveness = content quality × compatibility with the student, and both are indispensable. In the future, student-centered data construction methods—such as dynamically adjusting teacher-student participation and adaptively selecting demonstration granularity based on the student’s current level—are worth continued exploration. For developers, before starting any distillation or fine-tuning work, evaluating the distribution match between the data and the target model may help avoid the “learning makes it worse” trap and ensure that every unit of training investment produces real returns.