## Distillation vs. Reinforcement Learning Norris: Welcome back to Mechanical Dreams, the podcast where we try to keep up with the relentless pace of machine learning, one paper at a time. I am Professor Norris. Linda: And I am Linda! Today we have an incredibly exciting paper from researchers at Tencent and Renmin University of China. It is called 'Learning beyond Teacher: Generalized On-Policy Distillation with Reward Extrapolation'. Norris: Learning beyond the teacher, huh? A very bold claim. I have been teaching for decades, and while I certainly hope my students surpass me eventually, in the realm of model distillation, we usually expect a smaller, slightly worse copy of the expert. You are telling me this paper breaks that rule? Linda: It actually does! But before we get into how they surpass the teacher, let us set the stage. Our audience knows that knowledge distillation is essentially the bedrock of model compression. Most people are familiar with off-policy distillation, basically Supervised Fine-Tuning, or SFT, where the student just trains on trajectories generated by the teacher. Norris: Right, the classic approach. You minimize the Kullback-Leibler divergence between the teacher's and student's output distributions, or you just use cross-entropy loss on the teacher's tokens. SFT is effective, but it is passive. The major drawback of this paradigm is its off-policy nature. The student is just mimicking the teacher's past behavior rather than exploring and learning from its own actions. As a result, it may fail to adapt and generalize from its own experience at test time. Linda: Exactly, Professor! That is why On-Policy Distillation, or OPD, has been gaining so much traction recently as an effective post-training paradigm. In OPD, instead of feeding the student fixed data, the student generates its own trajectories. Then, we calculate the reverse KL divergence between the student and the teacher on those specific, student-generated tokens. Norris: I have always liked OPD. By sampling trajectories from the student and aligning it with the teacher's logit distribution on each token, it effectively acts like dense on-policy learning. Reinforcement learning on language models is notoriously sparse, as you usually only get a reward at the very end of a sequence. Say, a '1' if the math answer is right, and a '0' if it is wrong. OPD gives you a rich, continuous feedback signal at every single token. Linda: Yes! And empirically, OPD achieves faster and more effective distillation than off-policy methods. But here is the kicker: despite how well OPD works, the mechanistic understanding of it has been pretty limited in the field. People knew it worked, but its full potential was under-explored because the theoretical connection to standard dense reinforcement learning was not fully mapped out. Norris: Ah, so we are moving from the alchemy phase into the chemistry phase. I love it when a paper formally grounds an empirical trick. So, I take it the authors sat down and did the math to connect OPD with RL? Linda: They absolutely did. And that mathematical connection is exactly what allows them to generalize the framework and ultimately extrapolate the reward. Which is how they get the student to outperform the teacher. Norris: Well, color me intrigued. Let us dive into the math behind this magic. ## The Math Behind the Magic Norris: So, Linda, you promised us the math behind the magic. How exactly do we get from on-policy distillation, which is just minimizing KL divergence, to a full-blown reinforcement learning objective? Linda: It all starts with a very clever mathematical slight of hand. Let us recall the standard RL objective first. You want to maximize a reward, but you also apply a KL divergence penalty to keep the policy model from drifting too far from a reference model. You control the strength of that penalty with a coefficient called beta. Norris: Right, the classic KL-constrained RL setup. PPO, DPO, they all rely on this to stop the model from completely destroying its own language capabilities while trying to maximize the reward. Linda: Exactly. Now, look at the standard On-Policy Distillation objective. You are just trying to minimize the reverse KL divergence between the student model and the teacher model on trajectories generated by the student. There is no explicit reward function, and no reference model. Norris: So how do they bridge the gap? Linda: The authors take the OPD objective and essentially add zero to it. They introduce a third model, which they call the reference model, and they add and subtract its log-probabilities inside the equation. Norris: Ah, the oldest trick in the mathematician's playbook. Adding a term and subtracting it right back. Let me guess, they regroup the terms after that? Linda: You guessed it! When they rearrange the terms, the OPD objective completely transforms. It becomes mathematically equivalent to the KL-constrained RL objective. Norris: That is fascinating. But if it becomes an RL objective, what on earth is acting as the reward? We did not define a reward model. Linda: The token-level reward naturally emerges from the math as the log-probability of the teacher model minus the log-probability of the reference model. Norris: Let me think about that for a second. So the reward is literally the log-probability shift from the reference distribution to the expert distribution. You are rewarding the student for generating tokens that the expert would favor more than the baseline reference model would. Linda: Precisely! And the beauty of this is that it acts as a dense reward. The paper points out that this takes essentially the same form as the implicit reward defined in Direct Preference Optimization, or DPO. But unlike standard RL where you only get a sparse reward at the end of the final token, OPD gives you this implicit reward at every single token. Norris: I love that. Dense credit assignment is so much more efficient for training. But wait, if OPD is mathematically equivalent to this RL objective, what happens to that beta coefficient? The one that controls the KL penalty? Linda: That is the critical insight of the whole paper, Professor! Because of how the math simplifies, the beta coefficient in standard OPD is strictly locked at one. The reward term and the KL regularization are always weighted exactly equally. Norris: Aha! So standard OPD is effectively running dense RL, but it is rigidly locked. You cannot tune the balance between optimizing for the reward and staying close to the reference model. It forces a one-to-one ratio. Linda: Exactly. And there is one more key difference the authors point out. In standard RL, your reference model is almost always just the policy model's starting checkpoint. But in this rewritten OPD math, the reference model can technically be any model. Because it is introduced by adding and subtracting its log-probabilities, it ultimately cancels out if you simplify the objective back to its original form. Norris: Okay, let me summarize this so I am sure I have it. OPD is secretly dense KL-constrained RL. Its reward is the difference in log-probabilities between the teacher and a flexible reference model. And, most importantly, its penalty weight is permanently stuck at a one-to-one ratio. Linda: You have got it perfectly. And identifying that rigid one-to-one constraint is what sparked the authors' main contribution. They looked at that fixed beta and asked, 'Why not unfix it?' Norris: Which is exactly where we get to the title of the paper. By unfixing that ratio, they must be introducing a way to scale this implicit reward. The so-called Generalized On-Policy Distillation. Linda: Exactly! They introduce a reward scaling factor called lambda. And this lambda parameter is what allows them to push the student to learn beyond the teacher. Norris: I am officially hooked. Let us talk about what happens when you start playing with this lambda dial. ## Extrapolating the Reward Norris: Alright, Linda. You have your hands on this lambda dial we just discovered. We know that if lambda equals one, we are just doing standard On-Policy Distillation. What happens when we turn it down? Linda: If you set lambda between zero and one, you get what the authors call 'reward interpolation'. Mathematically, it forces the student's log-probability distribution to match a linear interpolation between the teacher and the reference model. Norris: Make sense. So the student lands somewhere in the middle in terms of performance and even response length. I could see that being quite useful if you want to control inference compute budgets, effectively dialing in exactly how much reasoning you want to pay for. Linda: Exactly! But the real star of the show is when you crank lambda past one. They call this Reward Extrapolation, or ExOPD for short. Norris: Now, as a skeptical old professor, the word 'extrapolation' in machine learning sets off some serious alarm bells. If you push a model to go beyond the teacher's distribution by extrapolating the reward, aren't you just begging the model to overfit or hack the reward signal? Linda: Your instincts are spot on, Professor. The authors were very transparent about that. They tested various lambda values, and if you push it too high, say to 1.5, the model does become unstable and performance drops. Norris: Ah, the classic RL failure mode. Give it a loophole and it will exploit it to the end of time. Linda: Right! It starts aggressively fitting the peak of the log ratio, which introduces bias. It also starts generating excessively long responses because of the length bias inherent in the implicit reward. But they found a sweet spot. Norris: Let me guess, just a slight nudge past one? Linda: They found that a lambda of 1.25 is just right. It provides enough push for the student to learn beyond the teacher's capability boundary without collapsing into gibberish. Norris: Talk is cheap, Linda. Do they have the empirical numbers to back up this 'learning beyond' claim? Linda: They absolutely do! They ran preliminary experiments using the Qwen3-4B model. They took domain-specific RL teachers for math and code, and then used ExOPD to distill those capabilities back into the base student model. Notice that both the student and teacher are exactly the same size here. Norris: Okay, a same-sized student and teacher. Standard distillation usually means the student slightly underperforms the teacher. OPD might closely match it. What did ExOPD do? Linda: With lambda set to 1.25, the ExOPD student consistently outperformed standard OPD. And here is the crazy part: it outperformed the domain teacher itself on benchmarks like AIME for math and HumanEval+ for code. Norris: Wait, it beat the teacher? Let me wrap my head around this. You are telling me a 4B parameter student, trained purely by distilling from a 4B parameter RL-trained teacher, ended up with higher accuracy than the model it was learning from? Linda: Yes! And they even checked to make sure it was not just because the teacher was under-trained. They compared ExOPD against a teacher that had an extra 100 steps of RL training. The ExOPD student with fewer steps still showed better improvement than the teacher with continued RL. Norris: That is genuinely remarkable. By tweaking that one mathematical constraint, you turn a mimicking process into an extrapolation process. The student is not just following the teacher's footsteps; it is looking at the direction the teacher is walking and taking an extra step forward on its own. Linda: That is a beautiful way to put it! And this was just the single-teacher setting. The authors realized that if ExOPD works this well for one domain, it could be the perfect tool for something even harder: merging multiple domain experts together. ## Merging Experts and Reward Correction Norris: So at the end of our last chapter, you dropped a cliffhanger about merging multiple experts. It is one thing to push past a single teacher's benchmark, but combining a math expert and a code expert without them stepping on each other's toes? That sounds like a tall order. Linda: It really is, but ExOPD handles it beautifully. They took the Qwen3-4B base model and created a math expert and a code expert through domain-specific RL. Then they used ExOPD to merge those capabilities back into the single base model. Norris: How did it compare to standard approaches? Usually, people just use off-policy SFT on a mix of the datasets, or perhaps try to average the weights of the models. Linda: They actually compared it to both. They ran supervised fine-tuning, which produced a sub-optimal student. They also tested a weight extrapolation method called ExPO. ExPO is training-free, which is nice, but it lacks good controllability and did not consistently beat the teachers. But ExOPD with our magic lambda of 1.25? It was the only method that produced a unified student capable of surpassing both domain teachers on all benchmarks. Norris: A single 4B model beating two specialized 4B experts at their own games. I suppose the extrapolated reward gives it just enough momentum to synthesize those skills rather than just averaging them out. Did they look at why that is happening during training? Linda: They did! They analyzed the training dynamics and found that ExOPD achieves higher training rewards than standard OPD, but it also causes the student to generate longer responses. They noticed the response entropy was higher, meaning the student generates more diverse answers. Norris: That makes complete sense. Extrapolating the reward pushes the model into slightly less charted territory, increasing diversity and forcing it to search for better reasoning paths. But Linda, the paper also mentioned strong-to-weak distillation. Distilling a large teacher into a much smaller student. How does ExOPD hold up there? Linda: That is their second major set of experiments. They used a large 30B parameter Qwen3 teacher and distilled it into 1.7B and 4B students. Now, think back to the math we discussed in chapter two. The token-level reward is the log-probability of the teacher minus the log-probability of the reference model. Norris: Right. But if the teacher is a 30B model and the student is a 1.7B model, what on earth are they using for the reference model? Linda: By default, they just use the student's base model. So the reward is the 30B teacher's log-probability minus the 1.7B student base model's log-probability. Even with this default setup, ExOPD brings significant improvements. For example, on the AIME24 math benchmark, standard OPD on the 1.7B student hit 33 percent accuracy. ExOPD bumped that to over 37 percent. Norris: That is a solid jump. But as a statistician, that default reward signal sounds incredibly noisy to me. A 30B model and a 1.7B model have fundamentally different internal knowledge capacities. Comparing their logits directly introduces a massive distribution bias. Linda: You are right on the money, Professor. Which brings us to a brilliant trick they call 'reward correction'. Because the reference model in their Generalized OPD framework can technically be anything, they realized they could swap out the student base model and replace it with the teacher's pre-RL base model. Norris: Oh, that is very clever! By using the 30B pre-RL model as the reference, the reward becomes the difference between the 30B RL expert and the 30B base model. You are perfectly isolating the exact implicit reward induced by the teacher's RL post-training. Linda: Exactly. It mathematically cleans up the reward signal before feeding it to the small student. You are isolating the pure reasoning improvement without the noise of the capacity gap. Norris: But wait, there is no free lunch in machine learning, Linda. If your reference model during distillation is a 30B parameter model instead of a 1.7B parameter model, your computational overhead just skyrocketed. You are running forward passes on two 30B models for every step. Linda: Guilty as charged! The authors explicitly note that limitation. Reward correction requires access to the teacher's pre-RL variant, which you might not always have, and it definitely incurs much higher computational costs. Norris: I appreciate the transparency from the authors on the compute cost. But assuming you have the server farm and the checkpoint, does this reward correction actually move the needle further than the default ExOPD? Linda: It does! They ran experiments specifically to validate it, using their trained 4B RL experts as teachers and a 1.7B student. Applying reward correction consistently boosted the performance of ExOPD across the board on both math and code generation benchmarks. Norris: Fascinating. So if you have the compute, you can essentially surgically extract the RL reasoning behaviors from a massive model and inject them into a tiny one. It sounds like they have mapped out a whole new landscape for model distillation. ## Conclusion and Future Outlook Norris: We have covered a lot of ground today. From the mathematical equivalence between on-policy distillation and dense reinforcement learning, all the way to pushing a student past its own teacher using reward correction. Linda: It really is a complete rethinking of what knowledge distillation can be. We are no longer just squeezing a large model into a small box. We are giving the small model a compass and a speed boost, and telling it to keep walking in the direction the teacher pointed. Norris: I love that analogy. But as with all great papers, answering one question usually spawns three more. Did the authors outline where they want to take this Generalized OPD framework next? Linda: They did. In their conclusion, they highlight three main directions for future work. First, they want to validate the generalizability of ExOPD on much larger-scale models. Testing this on a 70 billion or even a 400 billion parameter model could yield some incredible results. Norris: Oh, absolutely. The dynamics of reward extrapolation could behave very differently when the student already has a massive world model baked into its parameters. The capacity to absorb that extrapolated signal might be exponential. What else? Linda: Second, they want to assess the robustness of ExOPD in multi-teacher distillation, but with a broader and more diverse set of domain teachers. We saw it work beautifully for just math and code, but what if you have ten different experts? Can a single student extrapolate all of those domains simultaneously without catastrophic interference? Norris: That would be the ultimate test for creating a unified generalist model. If you can efficiently merge dozens of highly specialized RL teachers using this lambda factor, you could bypass the need for massive, mixed-domain reinforcement learning runs from scratch, which are notoriously difficult to balance. Linda: Exactly! And finally, they want to evaluate the effectiveness of ExOPD across different model families. They used the Qwen3 architecture for these experiments, but seeing if this holds up across Llama, Mistral, or other open-weight models is a crucial next step for the open-source community. Norris: A very solid roadmap. Well, Linda, you promised a paper that broke the rules of traditional distillation, and you certainly delivered. I am officially a fan of reward extrapolation, despite my initial skepticism. Linda: I am so glad you liked it, Professor! It is definitely a paper our listeners should pull up and read through, especially for those beautiful mathematical derivations in the appendix. It bridges the gap between empirical tricks and rigorous theory. Norris: Agreed. To our audience of grad students, researchers, and engineers, the paper is 'Learning beyond Teacher: Generalized On-Policy Distillation with Reward Extrapolation' by Yang and colleagues from Tencent and Renmin University. Highly recommended. Thank you all for joining us on this episode of Mechanical Dreams. I am Professor Norris. Linda: And I am Linda! Keep building, keep exploring, and we will catch you next week!