NeurIPS 2026 · Main Conference · SydneyConference page ↗  
NeurIPS 2026

Latency-Conditioned Selection Bias in RLHF

Prakul Sunil Hiremath

Dept. of Computer Science, Visvesvaraya Technological University, Belagavi, India · prakulhiremath@vtu.ac.in

A faster training pipeline can quietly change what a model learns.

The idea in one picture Ten rollouts sorted by finish time. Short ones finish before the cutoff and are kept; the longest ones miss it and are discarded. Training therefore sees mostly short answers, and the model drifts toward shorter outputs. 1 · Ten answers race. Longer ones finish later. cutoff discardedkept 2 · Training sees mostly short answers Long, high-reward reasoning is under-represented. 3 · The model drifts shorter and shallower GSM8K accuracy 68.4% → 44.1%Mean reasoning length 421 → 193 tokens 4 · EGI warns early. SPW re-weights: 66.9%

Schematic of the mechanism. Numbers are from the paper (LLaMA-3-8B, GSM8K, k/N = 0.67).

The short version

Pick your level

To speed up RLHF, many systems start training once the first k of N parallel answers finish and throw the rest away. That looks harmless. It is not.

Imagine a class where the teacher grades only the first ten homework papers handed in. Quick, short answers always get graded; careful, long ones come in late and get skipped. After a while, students learn that being brief pays off, even when careful work would score higher.

AI models trained this way can do the same thing: they learn to say less, and reason worse.

Three sentences

  • Catch. Models write one token at a time, so longer answers finish later and get dropped more often.
  • Consequence. Where longer reasoning earns more reward, training shifts toward shorter outputs.
  • Remedy. We formalize it, measure it, and study an early-warning signal (EGI) and a correction (SPW).

1 · The problem

A system shortcut with a hidden side effect

In RLHF a model generates answers, a reward scores them, and the model is nudged toward high scorers. Asynchronous Partial Rollouts (APR) launch N generations and begin the update when the first k finish. The rest are discarded. The hidden assumption is that the first k are a fair sample. They are not: finishing first correlates with being short.

Try it: a rollout race

Twenty answers are generated at once; each bar is how long one took. Move the slider to change how many we wait for.

13
    keptdiscarded
    Average length, all 20–
    Average length, kept–
    Kept vs. reality–

    Illustrative simulation (latency grows with length plus noise). Measured data are in Evidence.

    Why this isn't the usual off-policy problem

    V-trace-style corrections fix data from an older policy. Here every kept answer comes from the current policy, so those ratios equal 1 and change nothing. The distortion comes from the system clock.

    2 · Mechanism

    How the clock becomes a length filter

    Let α(τ) be the chance an answer τ finishes before the cutoff. Training sees a reweighted distribution:

    pAPR(τ) ∝ pθ(τ) · α(τ)α depends on the serving system and never increases with length

    If reward and selection probability move in opposite directions, Cov(R, α) < 0, the learning signal is weakened along the direction of longer, more careful outputs. That is Latency-Conditioned Selection Bias (LCSB).

    Glossary for newcomers
    Rollout
    One full answer the model generates.
    APR
    Training on the first k finished rollouts and discarding the rest.
    α
    Probability an answer makes it into the batch.
    EGI
    Effective Gradient Information: usable learning signal per token generated.
    SPW
    Selection-Probability Weighting: weight each kept answer by 1/α.
    ESS
    Effective sample size: tells you if the weights are balanced enough to trust.

    3 · Theory

    Can the bias flip the direction of learning?

    Smallest example: one decision, two paths. A shallow path pays rs; a deep path is longer and pays more, rd > rs. Let αs ≥ αd be their chances of beating the cutoff.

    Result (Thm 4.1, Cor 4.2)

    The APR gradient reverses sign exactly when

    αs / αd > rd / rshow much more often short is kept beats how much more long pays

    Try it: the preference-flip condition

    Shallow reward fixed at 1; policy at θ = 0.5.

    2.0
    0.90
    0.30
    αs/αd–
    rd/rs–
    Gradient toward deep–

    The general result (Thm 4.4) is attenuation under monotonicity and a negative covariance; full inversion is proved only for the two-path model. PPO's KL penalty limits step size but cannot restore trajectories that were never in the batch.

    4 · Evidence

    Does it really happen?

    Step 1 · The length filter is real

    We timed 12,000 generations on a vLLM server (LLaMA-3-8B) across HH-RLHF, MBPP and GSM8K.

    12,000timed rollouts
    r² = 0.918latency explained by output length
    2.9×a 400-token answer is this much less likely to be kept than a 100-token one (k/N = 0.67)
    Latency rises almost linearly with output tokens (r² 0.918); selection probability falls with length, faster under more truncation; 91.8% of latency variance is sequence length.
    Latency is essentially length. Place the original figure at assets/fig-latency.png.

    Step 2 · It hurts learning, and the model gets shallower

    68.4% → 44.1%GSM8K accuracy, on-policy vs. APR (LLaMA-3-8B, 3 seeds)
    421 → 193mean reasoning tokens
    67.8%throughput-matched synchronous run (N = k = 96): not a batch-size artifact
    Accuracy falls as truncation increases and as task horizon grows; degraded policies produce shorter outputs; SPW stays near on-policy.
    Degradation tracks truncation and horizon. Place at assets/fig-degradation.png.
    Main results by task
    TaskLengthOn-policyAPRAPR+SPWThroughput
    HH-RLHF (reward)870.7420.7360.7391.83×
    MBPP (pass@1)2430.5230.4810.5162.12×
    GSM8K (acc.)4120.6840.4410.6692.47×

    k/N = 0.67. GSM8K row: LLaMA-3-8B, 3 seeds (±1.8 to ±2.6). HH-RLHF and MBPP rows: GPT-2 runs.

    Step 3 · It is causal

    We trained on-policy but injected artificial latency, varying how tightly it tracks length. Cut that link and accuracy recovers.

    Synthetic latency injection
    Latency noiser²AccuracyMean output
    none1.0041.2%188
    σ = c/20.7949.1%221
    σ = c0.5155.8%267
    σ = 3c0.1361.7%341
    random order0.0063.1%409

    GPT-2 124M, 5 seeds.

    5 · Detect and fix

    A warning signal and a correction

    Diagnostic

    EGI

    Usable gradient signal per token generated. Throughput can look great while this quietly falls.

    It dropped below 0.6× baseline about 600 (MBPP) to 1,700 (GSM8K) steps before reward curves separated.

    Correction

    SPW

    Weight each kept answer by 1/α (capped), targeting the on-policy gradient when overlap is adequate.

    GSM8K: 66.9% (97.8% of on-policy) at <0.3% overhead, keeping 2.38× throughput.

    EGI on GSM8K (relative to on-policy)

    On-policy
    1.00
    APR
    0.42
    APR+SPW
    0.95

    Warning level: 0.6×. EGI is a general alarm, not specific to LCSB.

    SPW by example (k/N = 0.67)

    100 tok
    .89
    400 tok
    .31

    Weights ≈ 1/.89 = 1.12 and 1/.31 = 3.23: the rarer long answer counts about 2.9× as much.

    ∇JSPW = Σ wi∇log π(τi)R(τi) / Σ wi, wi = min(1/α̂, wmax)α̂ estimated online from completion times

    Is a bigger KL penalty enough?

    No. It shrinks the damage but does not close the gap.

    KL ablation
    GSM8K, LLaMA-3-8BAccuracyLengthEGI
    On-policy (β 0.02)68.4%4211.00
    APR (β 0.02)44.1%1930.42
    APR (β 0.05)49.7%2280.56
    APR (β 0.10)54.2%2670.68
    APR (β 0.20)58.3%3050.79
    APR+SPW (β 0.02)66.9%4020.95
    Where SPW applies, and where it stops
    • Alpha is estimated per 100-token bin, weights capped at 10, 50-step warm-up.
    • Trust it while ESS/n > 0.3.
    • At k/N ≤ 0.4 with horizons ≥ 500 tokens, ESS/n < 0.15: reduce truncation instead.

    6 · Practical guidance

    When is APR safe?

    The effect grows with output length and truncation. Short tasks sit in the low-risk region.

    Quick self-check

    A rule of thumb from the measured regimes, not a guarantee.

    300
    0.67

    Checklist (mean length ≳ 150 tokens)

    • Measure latency vs. length in your own stack.
    • Track EGI beside tokens/sec (thresholds: GSM8K 0.60, MBPP 0.63, HH-RLHF 0.85).
    • Apply SPW when EGI drops; monitor ESS/n.
    • Avoid k/N ≤ 0.4 on long tasks unless ESS confirms reweighting works.

    7 · Scope and honesty

    What this paper does and does not claim

    • Discard-style APR only. Recycle-style systems are outside the analysis.
    • Tasks where longer is better. The effect needs Cov(R, α) < 0; brevity-rewarded tasks were not tested.
    • PPO only. GRPO-style group normalization needs its own treatment.
    • Theory. General result is attenuation; inversion is shown for the two-path model.
    • Scale. 8B runs use 3 seeds; horizons are a few hundred tokens.
    • Backend. Measured on vLLM v0.4.1; exact selection probabilities will differ elsewhere.
    • Code. No code is released; details are in the appendix for re-implementation.
    Experimental setup
    • Models: GPT-2 (124M), 10 seeds; LLaMA-3-8B, 3 seeds; PPO.
    • Tasks: HH-RLHF (≈87 tok), MBPP (≈243), GSM8K (≈412).
    • Rollouts: N = 96, k = 64 (k/N = 0.67); synchronous baselines N = k.
    • Hardware: 2× NVIDIA Tesla T4 GPUs.
    • Latency study: 12,000 requests, vLLM v0.4.1, concurrency 8–32.
    • Evaluation: 500 held-out prompts (8B model); mean ± standard error.

    Cite

    BibTeX

    @inproceedings{hiremath2026latencyconditioned, title = {Latency-Conditioned Selection Bias in {RLHF}}, author = {Hiremath, Prakul Sunil}, booktitle = {The Fortieth Annual Conference on Neural Information Processing Systems}, year = {2026}, url = {https://openreview.net/forum?id=xOXpq3oPYW} }