Skip to content

Asynchronous RLHF: Faster and More Efficient Off-Policy RL for Language Models

optionalcorefrontierpaperrubric 12/122024 · ICLR 2025 · ~50 min

Michael Noukhovitch, Shengyi Huang, Sophie Xhonneux, …, Aaron Courville

Status

TL;DR. Standard RLHF alternates generate → label → train on the same GPUs, and generation runs in slow training libraries. This paper puts generation on separate GPUs running vLLM, so the trainer works on the previous batch while the next one is generated. The price is one step of off-policy staleness. Among PPO, RLOO and Online DPO, Online DPO tolerates staleness best. Async then matches sync quality at lower wall-clock time on TLDR, a LLaMA 3.1 8B chatbot and GSM8k.

Why it matters now. Every modern RLVR and agent-RL stack (verl, OpenRLHF, AReaL, PipelineRL) is some form of asynchronous RL. This paper is the clean small-scale study of the core trade-off: throughput against off-policy bias and variance. Async changes when data was generated relative to the weights. It changes nothing about the reward. For search agents, where a rollout waits on retrieval and judging, generation is the bottleneck, which is exactly the regime the paper analyses.

Cleanba-style async (App. D, Algorithm 1). At step t, generate with θ_t while training on the completions sampled at step t−1:

yt∼πθt(⋅∣x),θt+1=arg⁡max⁡θ loss(x,yt−1)y_t \sim \pi_{\theta_t}(\cdot\mid x), \qquad \theta_{t+1} = \arg\max_\theta\ \text{loss}\big(x, y_{t-1}\big)

The update is therefore always one step off-policy. With generation time G and training time T, a synchronous step costs G + T and an async step costs max(G, T), so the ideal speed-up is at most 2×.

Measuring off-policy tolerance. To vary staleness in a controlled way, the paper generates N mini-batches at once and then takes N sequential updates. The first update is on-policy and the last is N−1 steps stale. Results are plotted as gold win-rate against KL (measured as SFT perplexity) on TLDR with a 6.7B gold reward model.

Online DPO samples two completions per prompt, ranks them with the reward model, and applies the DPO loss:

L=−log⁡σ ⁣(βlog⁡πθ(y+∣x)πref(y+∣x)−βlog⁡πθ(y−∣x)πref(y−∣x))\mathcal{L} = -\log\sigma\!\Big(\beta\log\tfrac{\pi_\theta(y^+\mid x)}{\pi_\text{ref}(y^+\mid x)} - \beta\log\tfrac{\pi_\theta(y^-\mid x)}{\pi_\text{ref}(y^-\mid x)}\Big)

The loss depends on the pair and the reference model, not on the policy that sampled the pair. This is one reason stale pairs remain useful.

Synchronous versus Cleanba-style asynchronous RLHF Top: synchronous RLHF on shared GPUs alternates generation and training, so each step costs generation time plus training time. Bottom: asynchronous RLHF puts generation on a vLLM GPU and training on the other GPUs. While the generator samples batch t with weights theta t, the trainer updates on batch t minus 1, so every update is one step off-policy and a step costs the maximum of generation and training time. Synchronous: one GPU pool, steps run in series gen y₁ (θ₁) train on y₁ gen y₂ (θ₂) train on y₂ step time = G + T fully on-policy Asynchronous (Cleanba-style): separate GPUs, overlapped generator (vLLM) gen y₁ (θ₁) gen y₂ (θ₂) gen y₃ (θ₃) trainer (other GPUs) train: y₁→θ₂ train: y₂→θ₃ step time = max(G, T) speed-up ≤ 2× when G = T θ₃ is learned from data sampled by θ₂: one step stale Trade-off: throughput gained vs off-policy bias/variance. Online DPO tolerated staleness best; PPO kept its win-rate vs KL frontier but moved along it more slowly.
Original sketch. Synchronous RLHF serialises generation and training. Cleanba-style async overlaps them on separate GPUs, so each update uses data from the previous policy version.

All numbers are paper-reported.

  • TLDR on 4×A100. One step off-policy async matches sync win-rate and KL at 410m, 1B and 2.8B. At 2.8B it is 25% faster (§3.5).
  • Training-bound optimisation (§4.2). K = 4 sampling roughly doubles the reward margin. Halving steps and learning rate then trains about 2.5× faster than sync, at higher KL.
  • Chatbot (Table 1). LLaMA 3.1 8B with No Robots SFT and a GPT-4o-labelled reward model, trained for 100k episodes on 8 H100s (1 vLLM GPU and 7 training GPUs). Sync and async both reach a 57.2% GPT-4o win-rate against human responses. Compute time is 230 for sync and 142 for async, which the paper reports as 38% faster.
  • GSM8k (Table 2). Rho-1B, 4 samples per prompt, 512k episodes. Pass@1 is 52.2% for sync Online DPO (218 min) and 52.6% for async (129 min), against 40.3% for SFT. The “68% faster” claim is a speed ratio, unlike Table 1’s time reduction.
  • Staleness in the real async runs is exactly one step. Agent stacks with partial rollouts have multi-version trajectories, which is the problem studied in missing old logits.
  • Every task is single-turn, so the paper does not cover tool observations, loss masking or long-horizon credit.
  • The ”% faster” figures use different conventions in the two tables. Compare the raw times instead.
  • The TLDR study uses small Pythia models and a synthetic gold reward model. Robustness at larger scale is extrapolated from the trend across 410m–2.8B.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    Table 1 reports compute time 230 (sync) vs 142 (async) and calls it 38% faster; Table 2 reports 218 vs 129 minutes and calls it 68% faster. Compute both the time reduction and the speed ratio for each table, say which convention each claim uses, and estimate the generation-to-training time ratio implied by perfect overlap.

    What a strong answer covers
    • Table 1: the time reduction is 1 − 142/230 ≈ 38%, and the speed ratio is 230/142 ≈ 1.62, i.e. about 62% faster. The "38%" is a time reduction.
    • Table 2: the time reduction is 1 − 129/218 ≈ 41%, and the speed ratio is 218/129 ≈ 1.69. The "68%" is close to a speed ratio. The two headline numbers use different conventions.
    • With perfect overlap, the sync step takes G + T and the async step takes max(G, T), so the speed-up is 1 + min(G, T)/max(G, T), which is at most 2× when G = T.
    • A speed-up of 1.62 implies min/max ≈ 0.62, and 1.69 implies about 0.69. Real runs also pay weight-sync and idle overheads, so these are rough bounds, not measurements.
  2. Mechanism

    In the N-mini-batch experiment, PPO with larger N stays on the same win-rate vs KL Pareto curve but moves along it more slowly, whereas Online DPO keeps learning even at N = 64. Explain both observations at the level of each loss and the signal the policy sees from stale data.

    What a strong answer covers
    • With N mini-batches per generation round, the k-th update uses data that is k − 1 gradient steps old. Only the first update is on-policy.
    • PPO clips the ratio π_θ/π_old. On stale data more tokens fall outside the clip and give zero gradient, so progress per sample shrinks. The trade-off between reward and drift is unchanged, which is why the curve is the same but traversed slowly.
    • Online DPO compares two completions of the same prompt through their log-ratios to the reference model. Its gradient does not depend on which policy sampled the pair, so stale pairs remain usable training signal.
    • Best-of-2 SFT also samples two completions but loses performance off-policy. This points to the contrastive form of the loss, not the second sample, as the source of robustness.
  3. What if…

    Section 3.4 scales the policy (410m→2.8B) with a fixed reward model, and then the reward model with a fixed policy. What did each sweep do to off-policy robustness, and why is it plausible that only policy size helps?

    What a strong answer covers
    • Larger policies cluster the N = 1…64 runs closer to the best Pareto point. At 2.8B even N = 64 is near optimal.
    • A larger reward model reaches a given win-rate at lower KL (less overoptimisation, as in Gao et al.) but does not make off-policy runs relatively better.
    • Plausible mechanism: a bigger policy changes less per gradient step in distribution space, so stale data stays closer to on-policy. The reward model only scores samples and does not control how fast the policy drifts.
    • Caveat: these are TLDR results with Pythia models judged by a 6.7B gold reward model, and the trend covers only 410m–2.8B.
  4. Design

    You are training a search agent whose reward needs a slow retrieval-and-judge pipeline (several seconds per rollout), on 4 GPUs. Using the paper's generation-bound and training-bound analysis, decide how to split GPUs and what to do with idle time on each side, and state the trade-off you would monitor.

    What a strong answer covers
    • A slow judge means generation plus reward dominates, so the run is generation-bound. Put generation on vLLM GPUs and give the trainer fewer GPUs.
    • Idle trainer time can buy extra updates per batch (T = 2–3 "PPO epochs"). The paper finds this improves sample efficiency but raises KL drift.
    • If instead training dominates, sample K > 2 completions and train on the best and worst. With K = 4 the reward margin about doubled, and steps and learning rate were halved, giving 2.5× faster training than sync, again at higher KL.
    • Monitor reward against wall-clock time, KL (or SFT perplexity) to the reference, judge-score drift and the staleness distribution. Use a held-out retrieval evaluation, because the judge can be overoptimised.
  5. Critique

    The headline claim is that one-step-off-policy async RLHF matches sync RLHF. Identify two aspects of the evaluation that limit how far this claim transfers to multi-turn agent RL with long trajectories, and design an experiment that would falsify it there.

    What a strong answer covers
    • Staleness was capped at one step in the Cleanba-style runs. Agent trajectories with partial rollouts can span several versions, which is a different regime.
    • The tasks are single-turn: TLDR, No Robots and GSM8k. There are no tool observations, no loss masking and no trajectory-level credit assignment.
    • KL is proxied by SFT perplexity, and win-rate comes from a gold RM or a GPT-4o judge. Equal win-rate does not mean equal behaviour.
    • Falsifying test: train the same agent sync and async with version gaps of 1, 2 and 4 on a tool benchmark. Measure success against wall-clock time, collapse frequency and per-token ratio statistics across seeds. A widening gap as staleness grows would bound the claim.
  6. Connect

    Appendix B argues that CoPG-style log(π_θ/π_old)·A gives the same gradient as vanilla RLOO and so has no off-policy correction, and proposes Proximal RLOO instead. Derive why, and relate the fix to PPO's ratio.

    What a strong answer covers
    • ∇_θ log(π_θ/π_old) = ∇_θ log π_θ, because π_old is constant in θ. So log-ratio·A has exactly the REINFORCE/RLOO gradient, and π_old drops out.
    • The importance-weighted surrogate (π_θ/π_old)·A has gradient r·∇log π_θ·A. This reweights stale samples by how much more or less likely the current policy makes them.
    • Proximal RLOO keeps the RLOO leave-one-out baseline and adds the ratio with a PPO-style clip, which makes it a PPO objective with a critic-free baseline.
    • The paper reports that CoPG-style RLOO drops to 0 by N = 16 while Proximal RLOO stays robust, which is why the corrected version was used in the main loss comparison.

Done with this page?

Status