# Horizon-Scalable Q-Learning

Horizon-Scalable Q-Learning extends targets only through actions the critic trusts

Haoran Xu, Pragya Srivastava, Xinjie Liu, Siddhant Agarwal, Amy Zhang · arXiv · 2026-11-7

- **Problem** Off-policy Q-learning from offline data gets less accurate as the task horizon grows. One-step TD lets small errors accumulate along the chain, while multi-step TD adds bias from suboptimal logged actions.
- **Method** HQL extends targets through logged actions only when the critic rates them highly.
- **Results** On a combination-lock task, HQL avoids the failures of both one-step and multi-step TD across horizons. On OGBench, it reaches a mean success rate of 0.74, while 8-step TD reaches 0.49.

## Why a small TD loss can hide a large start-state error

One-step TD bootstraps after every logged transition, so each update moves value back by only one transition. Because the telescoping sum runs to the terminal state with an exact terminal value, the error at the start is fully determined by those downstream residuals. A critic can therefore reach a small TD loss while its start-state values stay off by an amount that grows with the horizon.

The residual model treats each one-step residual as zero mean with variance sigma squared, and weakly correlated across steps. Under this model, the start-state error of one-step TD scales with the square root of the horizon, as RMSE(eps\_t) is approximately sigma\_eff times the square root of H minus t. The long-run variance sigma\_eff squared is the sum of the per-step variance and twice the lagged covariances.

The authors note that a small per-step training loss, L\_TD, does not certify a small value error, since RMSE at the start equals the square root of H times L\_TD. A discount gamma below one caps this growth at a horizon of order 1 over one minus gamma.

Multi-step targets shorten the chain by following the logged trajectory for several steps before bootstrapping. Each spanned suboptimal action, however, adds a systematic bias to the target. For n-step backups, the residual term is divided by n, while the bias term grows with n toward the linear limit H times the absolute average advantage.

So no single fixed n suits every logged action, because the best lookahead changes from step to step.

The authors merge both effects into one expression for the start-state error. A longer backup trades residual accumulation for behavior-action bias, which is the trade-off the gate resolves transition by transition.

## Gating each logged action in the HQL target

HQL decides where to continue through the dataset by attaching a binary gate to every logged transition. When the gate is closed, the target falls back to a one-step bootstrap instead of extending through the logged action. The authors' figure shows the same rule as a trace that is cut at a failing action while the suffix after the cut still learns.

The HQL target has two parts: a one-step bootstrap from the target policy, and a correction carried back from the next transition. The correction term is multiplied by the gate c at the next transition, so a closed gate removes it. Setting every gate to zero gives one-step TD, and setting every gate to one gives the uncorrected multi-step return.

The gate compares the logged action with N candidates, each drawn from the behavior policy µ at the same state. The gate ci equals one when the logged action's critic value is at least the largest candidate value, and zero otherwise. Because the gate uses only the ordering of critic values, it doesn't depend on the scale of Q. The gate needs no behavior density, and N is its only hyperparameter.

In practice, HQL samples a window of H consecutive transitions and computes a gated target at every position in it. Each target in the window has a maximal reach that shrinks from H decisions down to one. Under a fixed budget of B critic targets, one-step TD samples B transitions while HQL samples B divided by H windows. Chunked-HQL lets one decision be a chunk of L primitive actions, so a window of H chunks spans L times H environment steps.

## Why the gate needs no action density

Per-decision importance sampling says a gate preserves the target policy's value only when it stays within the policy-to-behavior probability ratio. That ratio is hard to estimate with flow or diffusion policies, so the bound is hard to use directly. The authors note that the density ratio is unavailable when the policy is implicit, such as a flow sampler whose outputs are selected among its own samples.

The fix starts from the exponential tilt that behavior-regularized RL methods approximate, which the paper writes as pi equals mu times exp of tau Q, divided by Z. Because the tilt multiplies the behavior density, the behavior density cancels from the ratio. The log ratio then reduces to tau times Q minus log Z, so the authors never evaluate a density.

They estimate the normalizer from N behavior samples with a log-sum-exp, subtracting log N.

Clipping that ratio at one gives a soft gate, which keeps partial credit for logged actions near the best candidate. As tau goes to zero, every gate equals one, so the target becomes an uncorrected multi-step return. As tau goes to infinity, the soft gate becomes exactly the value comparison of the hard gate in Eq. 7. So the hard gate is the tau-to-infinity limit of a valid gate, and it avoids choosing a temperature.

The authors also report that the hard gate outperforms the soft gate at every tau they tried.

The gate only needs the ordering of critic values, so the reward scale doesn't change its decisions. In the algorithm, the gate is computed at every position of a sampled trajectory window. Its only hyperparameter is the number of candidates N, which the authors use to set the best-of-N comparison.

## Value error on the combination lock

The combination lock has H linearly ordered states, where the correct action advances and any other action resets to the start. The offline data holds length-64 windows, with M=100 windows per state-action pair, and the authors corrupt the non-optimal actions at rates that leave 100 to 25 percent of windows clean. Because the dynamics are deterministic, the true Q-function has a closed form, which lets the authors measure the error directly.

On clean data, the error of one-step TD grows by about three orders of magnitude as H goes from 512 to 4096. The text describes 64-step TD as degrading sharply under corruption, and the figure caption says it diverges once any corruption appears. HQL's error stays below both one-step TD and 64-step TD at every horizon, because the gate cuts traces at the corrupted actions.

![Figure 3: Combination lock.HQL remains accurate under data corruption as the horizon grows. The figure illustrates the RMSE between the learnedQθ and the trueQ…](https://refivu.com/papers/7423413a-b61a-4919-884f-a61103a7ae8f/figures/figure-11a0eeeb00f199d43c161ee98a9c0c69.png?thumb=512)

**Figure 3** :Combination lock.HQL remains accurate under data corruption as the horizon grows. The figure illustrates the RMSE between the learnedQθ and the trueQ∗, averaged uniformly over all2H state–action pairs of the corrupted combination lock, after1M updates (log scale). Panels vary the corruption fraction of the dataset. n-step TD (n = 64) diverges as soon as any corruption is present; 1-step TD is unaffected by corruption but its error grows sharply with the horizonH.

[Original paper](https://arxiv.org/abs/2611.10987v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## OGBench and OCBench results: does HQL beat the baselines at a matched budget?

On the OGBench configurations, HQL reaches a mean success rate of 0.74, while 8-step TD, the best TD baseline, reaches 0.49. The 8-step TD baseline uses n=8 because that matches the average reach of a 16-step window.

It is the weakest method on average, which the authors read as evidence that the gate drives the gain. Averaged over five tasks, HQL ends at 74 against 62 for LQL and 45 for QC.

![Figure 4: HQL versus baseline TD methods at matched critic update budget.Success rate averaged over the five tasks of each configuration and over5seeds, with s…](https://refivu.com/papers/7423413a-b61a-4919-884f-a61103a7ae8f/figures/figure-f0027b4d3a9b408dc131b2c888fcece2.png?thumb=512)

**Figure 4** :HQL versus baseline TD methods at matched critic update budget.Success rate averaged over the five tasks of each configuration and over5seeds, with standard deviation shown as the band; gray marks the offline phase. HQL outperforms all baselines on all six configurations, especially on the challenging long-horizon ones.

[Original paper](https://arxiv.org/abs/2611.10987v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Haoran Xu, Pragya Srivastava, Xinjie Liu, Siddhant Agarwal, Amy Zhang · Horizon-Scalable Q-Learning · Original paper figure · Extracted the figure area from page 8 of the original PDF.

The authors explain QC's weakness by its critic choosing among L·dim(A)-dimensional chunks, where a fixed best-of-N search covers the space sparsely. QC also runs each chunk open loop for L steps, with L set to 8, so it cannot correct within a chunk. Adding the gate to chunked actions raises QC's success rate from 45 to 81 in Chunked-HQL.

The figure for this comparison reports a single seed per task.

The gap is largest on switch-3x3, switch-4x4 and chamber-medium.

## Why HQL's targets stay short

Most HQL targets in the combination-lock and OGBench analysis never reach far, so the gate is doing the real work. The authors logged how many steps each target's trace survives across training. The authors read this as HQL choosing which targets to extend, rather than extending them far.

The comparison with the baselines explains what that choice buys. n-step TD extends every target and inherits the bias of every action it spans. 1-step TD extends none of its targets, so it cannot carry reward far back.

Chunked-HQL shows the same pattern on OCBench, where the gate uses N=2 while the bootstrap uses best-of-16.

The window length H matters little, because a 16-step window already exceeds the reach the gate uses. The width N matters more: a smaller N gives better results on OGBench. A logged action that is exchangeable with the N proposals beats all of them with probability 1/(N+1). So a larger N accepts fewer logged actions, and HQL approaches 1-step TD as N grows.

The ablation setup is detailed in Appendix A.8.

## Pairing HQL with other policy extractors

HQL's gate only needs the critic and a behavior sampler, so it can sit under other policy extractors without changing its rule. They kept the hard gate unchanged and replaced only the best-of-N policy with the QAM policy.

The largest gains were on cube-triple, from 1% to 80%, and on humanoidmaze-giant, from 0% to 63%. Value gradient flow (VGF) treats the policy as an implicit one that moves behavior samples toward high-value actions with a few Q-gradient ascent steps. With HQL as its critic, VGF also improved on all four tasks, with the largest change on antmaze-giant, from 28% to 90%.

## Soft gate versus hard gate

The question is whether a finite temperature tau beats the hard gate, since a soft gate keeps partial credit for logged actions close to the best candidate.

The hard gate achieved the best mean success rate, 61%, and the soft gate rose from 36% to 57% as tau increased. The soft gate improves steadily as it approaches the hard gate, which means the finite-tau results move toward the hard-gate result. The soft gate was only better on cube-double at tau equal to 1, while scene and puzzle-3x3 ended at the same value for every gate.

The authors read this as the hard gate being the strongest member of the family, not just the limit that removes tau.

## Where the evidence stops

The combination-lock experiments use deterministic dynamics, so stochastic dynamics aren't covered by the evidence. The combination lock is a modified chain with H linearly ordered states and two actions, so its structure is simple by design. The OCBench results use one seed per cell, which limits how much run-to-run spread the comparison can show.

The soft-gate comparison also uses one seed, with H equal to 8 and 1M offline and 1M online steps.

The gate-width ablation used two seeds per setting, while the main OGBench table averages over five seeds. The window-length ablation covers only H values of 8, 16 and 32, so larger windows weren't tested. Increasing L makes each chunk run open loop, so the policy must search a larger action space of L·dim(A) dimensions. The authors don't test a wider best-of-N search for Q-chunking beyond the sampling width they report.

## Paper info

- **Authors**: Haoran Xu, Pragya Srivastava, Xinjie Liu, Siddhant Agarwal, Amy Zhang
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-7
- **Added**: 2026-11-10
- **Updated**: 2026-11-7
- **Version**: v1
- **arXiv**: 2611.10987
- **Category**: cs.LG · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.10987v1) · [PDF ↗](https://arxiv.org/pdf/2611.10987v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Learning accurate off-policy state-action value functions (Q-functions) from offline datasets becomes harder as the task horizon grows. One-step temporal-difference (TD) learning bootstraps after every transition, so small per-step errors accumulate along the horizon, and early states can be badly misvalued even when the TD loss is small. Multi-step TD shortens this chain by following the dataset trajectory for several steps; however, since the behavior policy is often suboptimal, every followed action adds a bias, and no fixed number of steps suits a whole trajectory. In this paper, we propose Horizon-Scalable Q-Learning (HQL), a simple method that enables accurate long-horizon value learning by automatically balancing between one-step and multi-step returns. HQL extends a target through a dataset action only when the critic values it at least as highly as the best-of-N actions sampled from the BC policy, and otherwise falls back to a one-step target. We show that this rule is a principled off-policy correction that needs no action densities, which makes HQL compatible with expressive flow and diffusion policies. Experiments show that HQL avoids the failures of both one-step and multi-step TD on a combination-lock task across horizons, and outperforms prior horizon-reduction methods on long-horizon OGBench and OCBench tasks.

## Quote from the paper

Haoran Xu, Pragya Srivastava, Xinjie Liu, Siddhant Agarwal, Amy Zhang (2026). Horizon-Scalable Q-Learning. arXiv:2611.10987v1. https://arxiv.org/abs/2611.10987v1

**BibTeX**

```
@misc{xu2026horizon,
  title = {{Horizon-Scalable Q-Learning}},
  author = {Haoran Xu and Pragya Srivastava and Xinjie Liu and Siddhant Agarwal and Amy Zhang},
  year = {2026},
  eprint = {2611.10987},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10987v1}
}
```

## Other paper commentary

- [Uncertainty-Guided Reward Labeling for Reinforcement Learning under Limited Feedback](https://refivu.com/en/papers/16259af5-2139-4a6b-a517-f5d12bc434bf-uncertainty-guided-reward-labeling-for-reinforcement.md)
- [Probably Safe Sim-to-Real Transfer with Lifetime Validity](https://refivu.com/en/papers/0b314123-d9b1-4121-af5f-f57316cf9b93-probably-safe-sim-to-real-transfer-with-lifetime.md)
- [Encoding Memory in World Models with Test-Time Model-Based Reinforcement Learning](https://refivu.com/en/papers/ec709044-32af-41ae-8953-a79d5ad964d1-encoding-memory-in-world-models-with-test-time.md)
- [Training Stability under Adaptive Curricula](https://refivu.com/en/papers/8dfc5dca-17c3-43e0-be3d-554290933796-training-stability-under-adaptive-curricula.md)
- [CS-Pi: Constraint-Satisfying Flow Policy Sampling](https://refivu.com/en/papers/17a3a0d4-2f79-463a-b689-339f8435d667-cs-pi-constraint-satisfying-flow-policy-sampling.md)
- [Detecting Silent Faults at the Environment-Trainer Boundary in Reinforcement Learning](https://refivu.com/en/papers/120934bf-3f39-44e6-8cb6-8532b7b3c1c5-detecting-silent-faults-at-the-environment-trainer-boundary.md)
- [PIA: Agentic Physics-Informed Runtime Anomaly Detection](https://refivu.com/en/papers/9759ea5e-4edd-4749-bb03-45759285d767-pia-agentic-physics-informed-runtime-anomaly-detection.md)
- [LongCap: Hour-Scale Timestamped Audio Captioning via Chunk-wise Processing](https://refivu.com/en/papers/3d29785b-d68d-4ba4-8ec6-d0cb9c1d3076-longcap-hour-scale-timestamped-audio-captioning-via-chunk.md)
- [Advancements in Cloud-Native Systems: A Systematic Mapping Study of Reliability and Scalability across Cloud-Native, Edge-Native and AI-Enabled Systems](https://refivu.com/en/papers/dcc9a55c-1402-4ca3-b4fb-5c370442536e-advancements-in-cloud-native-systems-a-systematic-mapping.md)
- [When Safety Becomes An Outlier: Understanding the Retention of LLM Safety Behaviors](https://refivu.com/en/papers/c80b7b08-3909-41c2-8f34-04547cb431aa-when-safety-becomes-an-outlier-understanding-the-retention.md)
- [Improving Analytic Constants via Interpretable AI-Guided Lean Proof Refinement](https://refivu.com/en/papers/a19c3267-630e-4a04-bea7-d13ab044849e-improving-analytic-constants-via-interpretable-ai-guided.md)
- [Lightfoot: Graph Retrieval-Augmented Generation with Exact, Model-Free Document Deletion](https://refivu.com/en/papers/ca2f413f-5381-4976-85c5-107ed66a4512-lightfoot-graph-retrieval-augmented-generation-with-exact.md)

## Terms in this paper

- [RMSE](https://refivu.com/en/terms/ad2579cf164a-rmse)
- [gate](https://refivu.com/en/terms/d90d1e12cf79-gate)
- [Per-decision importance sampling](https://refivu.com/en/terms/da8dad164a3b-per-decision-importance-sampling)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/7423413a-b61a-4919-884f-a61103a7ae8f-horizon-scalable-q-learning)
