A Recipe for Long-Context Reasoning in Large Language Models via On-Policy Optimization and Distillation

Miguel Moura Ramos, Duarte Miguel Alves, Andre Martins


Abstract
Existing approaches to post-train models for long-context tasks face complementary limitations: (i) supervised fine-tuning (SFT) provides stable supervision but suffers from exposure bias; (ii) reinforcement learning methods such as Group Relative Policy Optimization (GRPO) train on model-generated trajectories but struggle with long-horizon credit assignment and sparse rewards; and (iii) on-policy distillation (OPD) provides dense token-level guidance but does not directly optimize task rewards. We study these complementary strategies for long-context alignment and derive a recipe that combines GRPO with OPD-style teacher guidance: the student learns from its own rollouts using outcome-level rewards, while a stronger teacher provides dense token-level regularization in place of the standard reference policy. This is especially useful when process-level supervision is difficult to obtain. To support this study, we introduce LongBlocks, a synthetic multilingual dataset spanning multi-hop reasoning, contextual grounding, and long-form generation. Through controlled ablations, we isolate the roles of cold-start initialization, teacher anchoring, and data mixing, showing that our recipe yields a more stable and effective path to long-context reasoning than GRPO or OPD while preserving short-context capabilities.
Anthology ID:
2026.findings-emnlp.2097
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
44658–44676
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.2097/
DOI:
Bibkey:
Cite (ACL):
Miguel Moura Ramos, Duarte Miguel Alves, and Andre Martins. 2026. A Recipe for Long-Context Reasoning in Large Language Models via On-Policy Optimization and Distillation. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 44658–44676, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
A Recipe for Long-Context Reasoning in Large Language Models via On-Policy Optimization and Distillation (Ramos et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.2097.pdf