Training Large Language Models (LLMs) to "think" before they speak—often called Chain-of-Thought (CoT) reasoning—has become the frontier of AI development. However, current training methods like Supervised Finetuning (SFT) and Reinforcement Learning (RL) face a tug-of-war between high costs, training instability, and a tendency for models to "hack" rewards.
A new paper, "Variational Reasoning for Language Models," proposes an elegant solution: treat those internal thinking traces as hidden (latent) variables and apply the principles of variational inference to optimize them.
TL;DR
The authors introduce a variational reasoning framework that treats thinking traces as latent variables, allowing them to optimize reasoning using the Evidence Lower Bound (ELBO). This approach unifies existing methods like Rejection Sampling and GRPO under one probabilistic roof while fixing a hidden bias in those methods that favors easier questions over hard ones.
What Problem Does This Paper Address?
Currently, we train reasoning models in two main ways:
- SFT: We give the model "gold" thinking traces. This is expensive to collect and often fails to generalize to new, harder problems.
- RL (e.g., PPO, GRPO): We let the model explore and reward it when it gets the right answer. This is notoriously unstable, prone to "reward hacking," and often causes the model's output diversity to collapse.
The core challenge is that we cannot directly observe the "perfect" thought process; we only see the final answer. Mathematically, this means we are trying to maximize the marginal likelihood of the correct answer by summing over all possible thinking paths—a calculation that is computationally impossible.
Methods
The authors bridge this gap using Variational Inference. They decompose the process into a question ($x$), a thinking trace ($z$), and an answer ($y$).
- The ELBO Objective: They derive an Evidence Lower Bound (ELBO) to make the intractable marginalization over thinking traces manageable.
- IWAE-style Multi-trace: Borrowing from Importance Weighted Autoencoders (IWAE), they extend the objective to use multiple parallel "rollouts" (thinking traces). This provides a tighter bound on the true likelihood, making the training signal much cleaner.
- Forward-KL Posterior: To train the "variational posterior" (the part of the model that generates the thinking trace given a hint), they use a forward-KL divergence. This prevents the model from collapsing into "shortcut reasoning" (like just leaking the answer into the thought trace) and makes better use of answer hints.
- Accuracy-Based Weighting: They introduce a per-token normalization and an accuracy-based estimator to reduce the high variance associated with long sequences of tokens.
Key Insights and Ideas
- Unifying the Field: The most striking theoretical contribution is showing that popular methods like Rejection Sampling Finetuning (RFT) and binary-reward RL (including the popular GRPO) are actually specific, "local" versions of their variational framework.
- The "Easy Question" Bias: Through their derivation, the authors discovered that RFT and GRPO have an implicit weighting by model accuracy. This means these methods naturally spend more "effort" learning from questions the model already finds easy, potentially neglecting the difficult cases where reasoning is most needed. The variational framework allows for a more balanced treatment.
- Stability through Probabilities: By treating reasoning as a latent variable problem rather than a pure reinforcement problem, the authors achieved much smoother training. Their logs show significantly fewer gradient spikes compared to standard RL baselines.
Datasets and Key Results
The models were trained on Bespoke-Stratos-17k, a curated dataset of ~16,700 math and coding problems paired with long-thinking traces. For evaluation, the authors used a massive battery of benchmarks including MATH500, AIME 24/25, AMC23, OlympiadBench, LiveCodeBench, GPQA-Diamond, and MMLU-Pro.
The framework was tested on the Qwen 2.5 and Qwen 3 model families with impressive results:
- Massive Gains: On Qwen 3-8B, the method improved math reasoning by over 160% and other domains by over 152% compared to the base model.
- Outperforming Baselines: It consistently beat strong baselines like Bespoke-Stratos and RLT. For example, on the difficult AIME24 math competition, the Qwen 3-8B variant achieved 45.63% accuracy, significantly higher than the Bespoke-Stratos baseline of 39.58%.
- Scaling with "Thoughts": The authors showed that as you increase the number of thinking traces ($K$) during training, performance continues to climb, suggesting a clear path for scaling reasoning capabilities.
Limitations and Future Work
While the framework is powerful, the authors noted a few areas for growth:
- Single-Round Training: The current experiments only used a single round of training ($T=1$). Multi-round iterative training could unlock even higher performance.
- Posterior Design: The "answer hint" used to guide the variational posterior was relatively simple. Exploring richer, more informative hints could help the model learn even more complex reasoning chains.
- Computational Cost: Generating multiple traces ($K$) for every training sample increases the computational overhead, representing a trade-off between training time and final model accuracy.
Summary updated