Skip to content

Does On-Policy Distillation Make Recommendations Hotter? HERO's Two Teachers

THE ARGUMENT

The bias amplification in on-policy distillation is structural, not a tuning issue: the student inherits the teacher's preference and its own rollouts then starve tail paths of supervision. HERO patches both the teacher side and the data side but leaves online diversity unmeasured.

On this page

You have a purchase order in front of you: a vendor says their newly trained recommender should replace the one running your homepage, because it trains cheaper and clicks more. Do you sign? What the pitch leaves out is a side effect of the training method itself — the model drifts toward popular items, and the code paths for unpopular ones are almost never generated, so they are almost never learned. Higher clicks and a narrower shelf may be two faces of the same change. This paper [1] takes that side effect seriously: it traces the bias to the training loop, then patches the teacher side and the data side at once.

The bias is in the loop, not in the hyperparameters

The default judgment inside most teams is that on-policy distillation (OPD, where the student generates an item-code sequence itself and a teacher supplies a full next-token distribution at every step instead of a single ground-truth token as in SFT) is simply a stronger SFT: faster convergence, smaller training budget, and any residual skew is a sampling-weight problem. The paper [1] argues the opposite.

Amplification happens in two steps. First, inheritance: the teacher's distribution already favors tokens belonging to popular items, and the student aligns to that distribution at every step. Second, and more importantly, self-reinforcement: in the next rollout (the student generating trajectories from its own current parameters rather than following the ground truth), the student produces more codes built from those favored tokens, while unpopular-item code paths are rarely generated and therefore rarely supervised. Inheritance plus self-reinforcement, compounded round by round.

The paper gives a measurable form of this on 1688 data: the amplification ratio is the head-item generation share divided by the head-item share in the candidate set, and OPD produces a larger head share than SFT and GRPO under the same setting (Figure 1b). Figure 1a simultaneously shows OPD reaching a higher click hit with a smaller training budget. The efficiency gain and the bias gain arrive together — that is the actual trade-off, not a choice between a stronger and a weaker model.

Two teachers, routed by the popularity group of each ground-truth item

Rather than asking one teacher to be accurate on everything, the paper partitions the supervised training set by target-item frequency in the training interactions into a head subset and a tail subset, with a group label per example. The head teacher is trained on all head examples plus a randomly sampled fraction of tail examples; the tail teacher is trained on all tail examples plus the same fraction of head examples. The cross-group fraction ρ lies in [0,1] and keeps supervision from the other group. Both teachers are trained from scratch with teacher-forced negative log-likelihood and stay frozen throughout distillation.

Routing is one sentence: whichever group the ground-truth item belongs to determines the teacher. The student runs a trie-constrained beam search of width J and keeps the J completed code trajectories ranked by cumulative student log-probability; at every prefix of every trajectory, the routed teacher and the student are matched with a forward KL over the full next-token distribution. The generated tokens only decide where the loss is evaluated — gradients do not flow through the beam search.

Why not just temper a single teacher or reweight the tail? The paper's argument is about homogeneous signal: one teacher gives every example the same preference structure, and reweighting changes how often examples appear, not the direction of the teacher's preference on them. That sentence is, to my mind, the most useful one in the paper, because it attributes the bias to the source of the supervision rather than to the data mixture.

When the student never reaches the correct tail path, add that path

Routing decides who supervises, not where supervision happens. A student that favors popular items rarely visits the correct prefixes of tail targets, and those states go untaught. Figure 2 in the paper gives a concrete case: the student visits the prefix [a3, b7] while the ground-truth tail path passes through [a5, b7]. Because routing is determined by the ground truth, the tail teacher supervises this example on both prefixes, but only the first comes from the student's own generation.

The fix has two branches: a sequence-level cross-entropy on the ground-truth prefix for every example, and an additional KL between the tail teacher and the student on the ground-truth prefix for tail examples only. Coverage therefore includes both the states the student actually visits and the tail-relevant states the training targets point at.

This is still distillation, not tail oversampling: the signal is the tail teacher's full distribution rather than a one-hot label. That distinction is exactly what separates it from the tail-reweighted SFT baseline the paper compares against.

How the three losses combine, and what the training bill looks like

The final objective is deliberately plain: three terms with unit weights, the third applied only to tail examples. Only the student is updated, both teachers stay frozen, and inference uses the student alone — so serving cost does not change.

LossEvaluated onApplies toRole
rollout KLEvery prefix of the J student beam-search trajectoriesAll examplesTransfers the routed teacher's full distribution; densest signal
GT-CEGround-truth prefixAll examplesKeeps direct supervision on the observed next item
tail-GT-KLGround-truth prefixTail examples onlySoft supervision on correct tail paths the student never reaches
  • Training cost goes up: two extra teachers must be trained and kept frozen, which costs both memory and storage.
  • Rollout gets more expensive: every batch needs a trie-constrained beam search of width J, and larger J is slower.
  • Two hyperparameters you must set yourself: the cross-group fraction ρ and the beam width J, neither of which is given a value in the excerpt.
  • Routing depends on the popularity split; change the threshold and every sample-to-teacher mapping changes, forcing a retrain.

How strong the evidence is, and where it stops

The evidence comes in three layers. Offline: one 1688 industrial dataset plus three public datasets, against SFT, DPO-style methods, GRPO and a tail-reweighted SFT baseline; the metrics are Hit@K plus DTR (demand-to-recommendation ratio) and ORR-Top5 for skew and coverage. Analysis: component ablations, the head-to-tail accuracy trade-off, distributional feedback density, tail-prefix reachability under free rollout, and accuracy gains stratified by item popularity, with public-dataset ablations, user-activity strata and teacher-specialization transfer in the appendix. Online: deployment in the 'Guess What You Like' module on the 1688 homepage, a 15-day A/B test, and a 3.412% increase in GMV [1].

The limits are equally concrete. First, the excerpt gives no values for ρ, J or the code length, and does not state how the popularity split is cut — both directly determine the result, so anyone reproducing this has to decide them. Second, the online result is a single GMV number with no online diversity or coverage metric reported, so 3.412% shows the change is more profitable, not that it is fairer. Third, it is one module on one site over 15 days and does not transfer automatically to another catalog. Fourth, 'unpopular' is defined relative to training-interaction frequency; a low-frequency item is not automatically an item worth recommending.

That leaves a clear applicability boundary: HERO is worth trying when your generative recommender already runs OPD and you can say what a narrower shelf costs the business. If you have not yet decided which diversity metric to watch online, fixing the metric is a better use of the quarter than swapping the training method [1].

References

  1. Diverse-Teacher On-Policy Distillation for Generative Recommendation

Sign in to Padda

A code in your inbox. No password to remember.

Connecting to sign-in…