RA3: Mid-Training with Temporal Action Abstractions for Faster Reinforcement Learning (RL) Post-Training in Code LLMs

TL;DR: A new research from Apple, formalizes what โ€œmid-trainingโ€ should do before reinforcement learning RL post-training and introduces RA3 (Reasoning as Action Abstractions)โ€”an EM-style procedure that learns temporally consistent latent actions from expert traces, then fine-tunes on those bootstrapped traces. It shows mid-training should (1) prune to a compact near-optimal action subspace and (2) shorten the effective planning horizon, improving RL convergence. Empirically, RA3 improves HumanEval/MBPP by ~8/4 points over base/NTP and accelerates RLVR on HumanEval+, MBPP+, LiveCodeBench, and Codeforces.

What does the research present?

The research team present the first formal treatment of how mid-training shapes post-training reinforcement learning RL: they breakdown outcomes into (i) pruning efficiencyโ€”how well mid-training selects a compact near-optimal action subset that shapes the initial policy priorโ€”and (ii) RL convergenceโ€”how quickly post-training improves within that restricted set. The analysis argues mid-training is most effective when the decision space is compact and the effective horizon is short, favoring temporal abstractions over primitive next-token actions.

https://arxiv.org/pdf/2509.25810

Algorithm: RA3 in one pass

RA3 derives a sequential variational lower bound (a temporal ELBO) and optimizes it with an EM-like loop:

  • E-step (latent discovery): use RL to infer temporally consistent latent structures (abstractions) aligned to expert sequences.
  • M-step (model update): perform next-token prediction on the bootstrapped, latent-annotated traces to make those abstractions part of the modelโ€™s policy.

Results: code generation and RLVR

On Python code tasks, the research team reports that across multiple base models, RA3 improves average pass@k on HumanEval and MBPP by ~8 and ~4 points over the base model and an NTP mid-training baseline. In post-training, RLVR converges faster and to higher final performance on HumanEval+, MBPP+, LiveCodeBench, and Codeforces when initialized from RA3. These are mid- and post-training effects respectively; the evaluation scope is code generation.

Key Takeaways

  1. The research team formalizes mid-training via two determinantsโ€”pruning efficiency and impact on RL convergenceโ€”arguing effectiveness rises when the decision space is compact and the effective horizon is short.
  2. RA3 optimizes a sequential variational lower bound by iteratively discovering temporally consistent latent structures with RL and then fine-tuning on bootstrapped traces (EM-style).
  3. On code generation, RA3 reports ~+8 (HumanEval) and ~+4 (MBPP) average pass@k gains over base/NTP mid-training baselines across several model scales.
  4. Initializing post-training with RA3 accelerates RLVR convergence and improves asymptotic performance on HumanEval+, MBPP+, LiveCodeBench, and Codeforces.

Editorial Comments

RA3โ€™s contribution is concrete and narrow: it formalizes mid-training around two determinantsโ€”pruning efficiency and RL convergenceโ€”and operationalizes them via a temporal ELBO optimized in an EM loop to learn persistent action abstractions before RLVR. The researchers report ~+8 (HumanEval) and ~+4 (MBPP) average pass@k gains over base/NTP and faster RLVR convergence on HumanEval+, MBPP+, LiveCodeBench, and Codeforces.


Check out theย Technical Paper. Feel free to check out ourย GitHub Page for Tutorials, Codes and Notebooks.ย Also,ย feel free to follow us onย Twitterย and donโ€™t forget to join ourย 100k+ ML SubRedditย and Subscribe toย our Newsletter. Wait! are you on telegram?ย now you can join us on telegram as well.

+ posts

Michal Sutter is a data science professional with a Master of Science in Data Science from the University of Padova. With a solid foundation in statistical analysis, machine learning, and data engineering, Michal excels at transforming complex datasets into actionable insights.