Trajectory Balance with Asynchrony: Decoupling Exploration and Learning for Fast, Scalable LLM Post-Training

Brian Bartoldson, Siddarth Venkatraman, James Diffenderfer, Moksh Jain, Tal Ben-Nun, Seanie Lee, Minsu Kim, Johan Obando-Ceron, Yoshua Bengio, Bhavya Kailkhura

TL;DR

Trajectory Balance with Asynchrony (TBA) is a novel distributed reinforcement learning (RL) framework that drastically accelerates large language model (LLM) post-training. By utilizing an off-policy GFlowNet objective, TBA decouples slow text generation from policy updates, achieving up to $50\times$ wall-clock speedups over traditional on-policy methods while matching or exceeding their performance.

What Problem Does This Paper Address?

Post-training alignment (via RLHF or RLAIF) is essential for transforming raw language models into helpful assistants and skilled reasoners. However, standard RL algorithms like PPO or RLOO are on-policy, meaning data generation and policy updates must happen sequentially. This creates a massive hardware bottleneck: while the model sequentially decodes text token-by-token, the training GPUs sit idle; during backpropagation, the generation workers wait.

An obvious fix is asynchronous distributed RL, where parallel "actors" generate data while a central "learner" updates the model. However, as the learner updates, the data in the replay buffer quickly becomes off-policy (stale). Standard policy gradient methods break down or suffer severe performance degradation when forced to learn from highly off-policy data. This paper tackles a fundamental question: How can we design an asynchronous RL framework for LLMs that is mathematically robust to highly off-policy data?

Methods

The authors introduce Trajectory Balance with Asynchrony (TBA). Instead of standard policy gradients, TBA leverages the Trajectory Balance (TB) objective from Generative Flow Networks (GFlowNets), specifically its low-variance VarGrad variant. Because the TB objective is inherently off-policy, it can naturally tolerate the stale data generated by asynchronous workers.

The architecture splits compute into two distinct roles:

  • SEARCHER Nodes: Multiple parallel nodes run text generation asynchronously using a local, slightly delayed copy of the policy. They score the completions using a reward model and push the trajectories into a global replay buffer.
  • TRAINER Node: A single node continuously samples from the global replay buffer and updates the master policy using the TB objective.

Every $k$ steps, the searchers pull the updated weights from the trainer.

Figure 2: Fast, scalable LLM post-training with TBA. Continuously (solid lines), multiple SEARCHER nodes (left) collect trajectories, while a TRAINER node (right) samples from a re- play buffer to train the policy off-policy. Periodically (dashed lines), updated policy weights are sent to SEARCHER nodes, and new trajectories are added to the TRAINER node’s buffer. This avoids bottlenecks at any given node, which can be 1 or more GPUs, keeping resource utilization high.

To maintain stability, the authors implement two variants:

  1. TBA: Uses a custom sampling strategy that alternates between recency-prioritizing (sampling from the latest sync step) and reward-prioritizing (sampling high-reward trajectories) to balance exploration and stability.
  2. TBA': Built on top of the open-source PRIME-RL framework, this variant stabilizes training by periodically resetting the reference policy to match the current training policy rather than using a complex hyperparameter schedule.

Datasets

The framework was evaluated across three distinct alignment tasks using several open-source model families (Pythia, RhoMath, and Qwen):

  • Mathematical Reasoning (MR): Evaluated on the GSM8K dataset (grade-school math word problems) using an SFTed RhoMath-1B base model.
  • Preference Fine-Tuning (PFT): Evaluated on the TL;DR Reddit summarization dataset using Pythia models ranging from 410M to 2.8B parameters.
  • Automated Red-Teaming (RT): Tasked with generating adversarial prompts to uncover vulnerabilities in victim models (GPT-2 and Llama 3.1 8B), evaluated using RoBERTa and LlamaGuard-3 toxicity classifiers.
  • Scalability Benchmarks: Tested on the MATH dataset and a Countdown task using Qwen 2.5 7B Base and Qwen 3 4B Instruct.

Key Insights and Ideas

  • The GFlowNet Advantage: GFlowNets treat sequence generation as a path-consistency problem rather than a token-level credit assignment problem. This formulation makes the Trajectory Balance objective uniquely robust to data generated by older versions of the model, bypassing the core limitation of asynchronous policy gradients.
  • Reference Resetting is Essential: In highly off-policy settings, keeping the reference policy fixed causes the KL-divergence penalty to explode. Periodically resetting the reference policy to the current training policy acts as a powerful stabilizer, mirroring successful empirical strategies used in industry models like Kimi K1.5/K2.
  • Scaling Searchers Improves Exploration: In automated red-teaming, adding more asynchronous searchers doesn't just decrease wall-clock time; it actively improves the diversity of the generated attacks. A larger pool of searchers explores different regions of the solution space simultaneously, populating the replay buffer with high-quality, non-redundant data.

Key Results

TBA redefines the efficiency-performance Pareto frontier across all evaluated tasks:

  • Mathematical Reasoning: On GSM8K, TBA achieved a $50\times$ speedup compared to VinePPO while improving final test accuracy by 1.8%. It also outperformed Online DPO by 2.0% in accuracy while running 1.6x faster.
Figure 1: TBA excels on the GSM8K mathematical reasoning task. All plotted points use 4xA100 GPUs (or comparable L40S GPUs). DPO and RLOO baselines taken from Noukhovitch et al. [48], PPO and VinePPO baselines taken from Kazemnejad et al. [31]. The baseline model is the SFTed RhoMath-1B [37] model, which gets 40% accuracy after SFT and before RL. Appendix B has details.
  • Preference Fine-Tuning: TBA demonstrated a $\approx 5\times$ speedup over asynchronous Online DPO baselines on the TL;DR dataset, establishing a superior win-rate vs. KL-divergence trade-off across multiple model scales.
Figure 3: TBA scales search and improves RL efficiency on the PFT summarization task. All plotted points use 4xA100 GPUs, but TBA allocates 3 GPUs to search, and Online DPO allocates 1 GPU to search. TBA produces large-scale off-policy data that its trajectory balance objective can leverage, creating massive efficiency benefits. Online DPO baselines taken from Noukhovitch et al. [48]. Dashed and solid lines use 256 and 425 updates, respectively. Appendix B has details.
Figure 4: TBA defines a new KL vs. win-rate Pareto frontier on the PFT summarization task. The baseline “Online DPO” frontier is created by increasing the degree of off-policyness, starting from on-policy Online DPO, results from [48]. The TBA frontier is created by altering the training steps, searcher count, and KL annealing schedule as described in Appendix B.
  • Automated Red-Teaming: TBA delivered $4\times$ to $7\times$ speedups over synchronous GFlowNet baselines while discovering more diverse and effective adversarial prompts.

Limitations and Future Work

  • High Gradient Variance: Because the Trajectory Balance objective operates at the full trajectory level rather than the token level, it can suffer from high gradient variance. The authors mitigate this by generating a large number of completions per prompt ($K=20$ to $40$), which requires careful memory management.
  • Future Directions: The authors suggest that future work could incorporate partial energy functions to better balance bias and variance during policy updates. Additionally, optimizing the communication protocol for the global replay buffer will be critical to preventing communication overhead when scaling to hundreds of searcher nodes.

Summary updated

BibTeX
@inproceedings{bartoldson2025trajectory,
  author = {Brian Bartoldson and Siddarth Venkatraman and James Diffenderfer and Moksh Jain and Tal Ben-Nun and Seanie Lee and Minsu Kim and Johan Obando-Ceron and Yoshua Bengio and Bhavya Kailkhura},
  title = {{Trajectory Balance with Asynchrony: Decoupling Exploration and Learning for Fast, Scalable LLM Post-Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=VwPt1WDQNB},
}
Figure