# E2S Finetuning: From Expert Demonstrations to On-Policy Learning

- **ID:** 1283
- **Kind:** post
- **URL:** https://mk322.github.io/blog/learned-on-policy-sampler/
- **Authors:** Haoqiang Kang (Murray Kang)
- **Venue:** research blog, October 2026
- **Published:** 2026
- **Source:** x
- **Language:** en
- **Access:** free
- **Tags:** e2s, expert-to-student, gflownet, on-policy-sft, amortized-sampling
- **Topics:** post-training, SFT, GFlowNets, on-policy data
- **Added:** 2026-10-06
- **Page:** https://papers.projxon.ai/entries/1283

## Summary

E2S (Expert-to-Student) Finetuning turns off-policy expert demonstrations into more on-policy SFT data via amortized sampling. The formulation is constrained generation: the expert trace defines the validity constraint C_tau (e.g., semantically equivalent responses, correct outcomes on math), while the student model decides the relative probabilities of valid responses. Among normalized distributions supported on the valid set, the closest to the student under KL is the student distribution conditioned on validity: q*(y) = p(y)*1[y in C_tau]/Z_tau. While Finetuning with Sampling (arXiv 2610.02140) reaches this target with per-example MCMC search, E2S amortizes the search by training a conditional sampler across examples with GFlowNets: trajectory balance with a shared offset z_tau becomes a group-relative loss (no normalizer network) that matches the accepted-output distribution. Implementation uses LoRA adapters on the student backbone as the sampler (expert trace conditions the sampler; student scoring and SFT use only the original prompt). Two variants: E2S-Offline (fit sampler once against the fixed student, generate a dataset, then SFT) and E2S-Online (refit the sampler against the current student after each update). In the Finetuning-with-Sampling math setting (Qwen2.5-3B, MATH levels 3-5, 8,230 training problems), Math avg. / Prior avg.: base 31.8/42.2, expert SFT 24.2/38.9, GRPO 45.7/41.4, MCMC+SFT 53.4/42.0, E2S-Offline 55.5/42.1 (+3.9% relative vs MCMC+SFT), E2S-Online 59.4/42.2 (+11.2% relative vs MCMC+SFT, +6.0 points vs MCMC+SFT, +35.2 points vs vanilla expert SFT, while matching the base on prior tasks). Drawing 1/2/4 responses per expert example lifts offline Math avg. 55.0 -> 56.3 -> 57.2. Diversity is a property of the target distribution (preserving relative mass across valid reasoning modes), not an extra bonus term.

## Research notes

- Discovered via @haoqik322 (Haoqiang 'Murray' Kang, UCSD PhD / Google DeepMind research intern) X post 2026-10-06 ~8:14 AM ET (https://x.com/haoqik322/status/2107444259200618570, ~2.7K views, 52 likes, 48 bookmarks). Related: entry 944 ('Finetuning with Sampling', arXiv 2610.02140) — the paper whose per-example MCMC approach E2S amortizes; its math setting and baseline scores are reused. Caveats: author's weekend project; all numbers self-reported (baseline scores from entry 944's study); the author notes the comparison evaluates complete training schedules rather than matched total compute, and retention is averaged over three prior benchmarks (Chemistry, MMLU, GPQA). No code or dataset link found in the post at catalog time. The '+6.0 points over MCMC+SFT' headline in the announcement is the E2S-Online result (59.4 vs 53.4); '+35.2 over vanilla expert SFT' is 59.4 vs 24.2.

## Similar entries

- [Finetuning with Sampling: SFT Learns Better Than You Think](https://papers.projxon.ai/entries/863) (paper, #863)
- [SFT, RL, and On-Policy Distillation Through a Distributional Lens](https://papers.projxon.ai/entries/1095) (post, #1095)
- [Sharpening Tax in Post-Training](https://papers.projxon.ai/entries/858) (paper, #858)
- [K2 Horizon data release — DATA_NAVIGATOR index and the post-training data-generation pipelines](https://papers.projxon.ai/entries/1443) (tool, #1443)
- [Predictive Data Debugging: Reveal and Shape What Your Model Learns, Before You Train](https://papers.projxon.ai/entries/1101) (post, #1101)
- [Score Centering Stabilizes Off-policy Reinforcement Learning](https://papers.projxon.ai/entries/1281) (paper, #1281)
