Skip to content
AI.info

Research

Adaptive Neighborhood-Constrained Q Learning for Offline Reinforcement Learning

Adaptive Neighborhood-Constrained Q Learning for Offline Reinforcement Learning Overview Research area: Offline reinforcement learning (RL), specifically action-selection constraints that combat extra

arXiv
2511.02567
Published
2025-11-04
Authors
Yixiu Mao, Yun Qu, Qi Wang, Xiangyang Ji

AI summary

Adaptive Neighborhood-Constrained Q Learning for Offline Reinforcement Learning

Overview

  • Research area: Offline reinforcement learning (RL), specifically action-selection constraints that combat extrapolation error from out-of-distribution (OOD) actions.
  • Technical level: Advanced. The paper combines a new constraint definition with measure-theoretic approximation results (Hausdorff distance, standardness assumption), neural tangent kernel (NTK) analysis, and a bilevel optimization algorithm.
  • Scope: The authors categorize existing offline RL constraints (density, support, sample), propose a fourth "neighborhood" constraint, prove several of its properties, and instantiate it as the ANQ algorithm evaluated on D4RL Gym locomotion and AntMaze benchmarks.

What This Paper Is About

Offline RL algorithms must avoid querying actions that never appeared in the fixed dataset, because Q values for such actions are unreliable and lead to overestimation. Existing fixes each have a drawback: density constraints are overly conservative when the behavior policy is poor, support constraints require modeling a behavior policy that is hard to fit in high dimensions, and sample constraints cannot generalize beyond the dataset at all. The paper introduces a neighborhood constraint — restricting Bellman-target actions to the union of small balls around dataset actions — and shows it approximates the least restrictive support constraint without any behavior modeling.

Key Contributions

  1. A systematic categorization of action-selection constraints in offline RL into density, support, and sample constraints, with an analysis of the theoretical and practical limitations of each (summarized in Table 1 alongside the new neighborhood category).
  2. A new neighborhood constraint that restricts Bellman-target action selection to the union of ε-neighborhoods of dataset actions, proven to approximate the behavior policy's support under a standardness assumption (Theorem 1), to bound extrapolation error under the NTK regime (Lemma 2), and to bound distribution shift under Lipschitz transition dynamics (Proposition 1).
  3. An adaptive variant of the constraint where each data point gets its own radius, ε·exp(−α·A(s,a)), assigning larger radii to low-advantage dataset actions and smaller radii to high-advantage ones, enabling pointwise conservatism.
  4. The ANQ algorithm (Adaptive Neighborhood-constrained Q learning), an efficient bilevel optimization framework — inner maximization of Q within each neighborhood via an auxiliary policy, outer maximization via expectile regression — plus a policy extraction step that performs weighted regression toward the optimized in-neighborhood actions rather than toward dataset actions.

Main Findings

  • State-of-the-art on D4RL Gym locomotion: ANQ reports a locomotion total of 1194.5, compared with 1139.9 for SPOT, 1041.2 for OneStep RL, 1033.1 for IQL, 1013.2 for TD3BC, 1010.2 for CQL, 975.3 for AWAC, 972.6 for DT, 968.0 for BCQ, and 581.7 for BEAR. ANQ is described as outperforming existing methods on most tasks.
  • Large gains on AntMaze: ANQ's AntMaze total is 441.6, versus 392.4 for IQL, 359.6 for SPOT, 218.0 for CQL, 142.8 for BCQ, 142.0 for BEAR, 132.2 for AWAC, 120.2 for TD3BC, 112.6 for OneStep RL, and 95.4 for DT. The largest margins are reported in the most complex large-maze settings (antmaze-l-p: 56.2 ± 4.9; antmaze-l-d: 55.8 ± 4.0).
  • Robustness to noisy data: On datasets mixing random and expert data at varying ratios, ANQ generally outperforms CQL (density), IQL (sample), and SPOT (support), with the advantage widening as the expert proportion decreases (Figure 1(a)).
  • Adaptivity helps: Comparing the adaptive neighborhood against a uniform neighborhood (α = 0) across varying inverse temperature α shows the adaptive version further mitigates the effect of low-quality data (Figure 1(b)).
  • Robustness to limited data: On AntMaze datasets with randomly discarded transitions, ANQ performs better across nearly all discard ratios than IQL and SPOT (CQL is omitted due to consistently inferior AntMaze performance), and the gap widens as data shrinks (Figure 2(a)).
  • Neighborhood size matters in low-data regimes: Varying the Lagrange multiplier λ, which is inversely proportional to the overall neighborhood radius, shows that an appropriately large neighborhood is important for good performance when data is limited.
  • Competitive runtime: On a GeForce RTX 3090, ANQ is described as being among the fastest tier of offline RL algorithms, on par with efficient baselines such as AWAC, IQL, and TD3BC; detailed runtime analysis is in Section D.1 (specific timing numbers are not reported in the provided content).

Methodology in Plain English

The authors start by defining what it means for the Bellman target to be "safe." Instead of forcing the target action to be an exact dataset action (sample constraint) or forcing the whole trained policy to match the behavior policy (density constraint), they allow the target action to lie within a small ball around any dataset action for that state. The union of all those balls forms the "neighborhood set."

They then prove that, as the number of dataset actions grows, the union of these balls covers the true support of the behavior policy within a controlled Hausdorff distance (Theorem 1). This is the key argument for why the neighborhood constraint can stand in for the support constraint without ever fitting a behavior model — which is the expensive, error-prone part of support-constrained methods.

To make the constraint adaptive, each dataset action gets its own radius: ε·exp(−α·A(s,a)), where A is the advantage. Low-advantage actions get big neighborhoods so the algorithm can search for something better; high-advantage actions get small neighborhoods so extrapolation error stays low.

Enforcing a maximum over a union of balls is tricky, so the authors decompose it into a bilevel problem. The inner problem trains an auxiliary policy that outputs small action offsets from dataset actions, kept within each action's radius by a Lagrange penalty; it learns to find the best nearby action per dataset point. The outer problem picks the best neighborhood by fitting a value function V with expectile regression (τ near 1) on the Q values of those optimized actions, which implicitly does the max over all neighborhoods. The Q network is then trained normally against R + γV(s′).

Finally, policy extraction uses weighted behavior cloning, but the regression targets are the optimized in-neighborhood actions rather than the raw dataset actions, weighted by exponentiated advantage. The authors note this distinguishes ANQ from AWR, AWAC, CRR, 10% BC, IQL, and SQL, all of which regress toward dataset actions. The framework is presented as radius-agnostic: replacing ε·exp(−α·A(s,a)) with ε·f(s,a) for any positive f yields a valid algorithm with all other equations unchanged.

Why This Matters

This work reframes the trade-off at the center of offline RL: you do not have to choose between the looseness of support constraints (which require fragile generative modeling) and the tightness of sample constraints (which cannot improve on the dataset). By showing a neighborhood union approximates the support, it offers a middle path that is both theoretically justified and cheap to compute.

Real-world applications the paper points to:

  • Robotics, where imperfect or suboptimal demonstrations are common and behavior-policy modeling of high-dimensional, multi-modal action data is unreliable.
  • Autonomous systems, where data collection is suboptimal or biased toward safe, non-expert driving/control behavior.
  • Healthcare, cited as a setting where data is rare or partially missing — the limited-data experiments directly target this.
  • Any offline decision-making setting where data collection is costly or exploration is risky, which the introduction identifies as the general motivation for offline RL and the reason large-scale existing datasets are attractive.

Industry relevance: Offline RL is the practical route to applying RL to logged data in industrial control, recommendation, and operations without live experimentation. ANQ's claim of being among the fastest tier of algorithms on par with AWAC, IQL, and TD3BC matters because training cost often decides whether a method is deployable, and its robustness to noisy and degraded data matches the messy logs that real systems produce.

Future Directions

  • Alternative adaptation criteria: The authors use advantage/data quality as the radius-modulation function. The paper's radius-agnostic framework (arbitrary f: S × A → R+) explicitly invites other schemes, and the truncated content does not report what else was tested.
  • Tighter theory for the adaptive case: Lemma 2 bounds extrapolation under a uniform radius bound, and Proposition 1 concerns a deterministic policy satisfying the neighborhood constraint with threshold ε. How these guarantees change under per-sample, advantage-dependent radii is not fully spelled out in the provided content.
  • Scaling beyond the tested domains: Evaluation covers Gym-MuJoCo locomotion and AntMaze from D4RL. Behavior-policy modeling is described as hard specifically because real-world data is high-dimensional and multi-modal, so whether the neighborhood approach holds up in genuinely high-dimensional action spaces (e.g., pixel-based or dexterous control) remains open here.
  • Interaction with other method families: The baseline list includes the sequence-modeling method DT, but the paper does not report combining neighborhood constraints with sequence models — a natural next question.

Target Audience

Offline RL researchers and graduate students who want both the theory (support approximation, extrapolation bounds, distribution-shift bounds) and a practical algorithm; practitioners working with fixed, noisy, or scarce logged datasets who need a method that is easy to implement, fast to train, and does not require fitting a generative behavior model. Readers should be comfortable with Bellman backups, Q learning, and expectile regression; the theoretical sections assume familiarity with NTK analysis and measure-theoretic covering arguments.

Authors’ abstract

Offline reinforcement learning (RL) suffers from extrapolation errors induced by out-of-distribution (OOD) actions. To address this, offline RL algorithms typically impose constraints on action selection, which can be systematically categorized into density, support, and sample constraints. However, we show that each category has inherent limitations: density and sample constraints tend to be overly conservative in many scenarios, while the support constraint, though least restrictive, faces challenges in accurately modeling the behavior policy. To overcome these limitations, we propose a new neighborhood constraint that restricts action selection in the Bellman target to the union of neighborhoods of dataset actions. Theoretically, the constraint not only bounds extrapolation errors and distribution shift under certain conditions, but also approximates the support constraint without requiring behavior policy modeling. Moreover, it retains substantial flexibility and enables pointwise conservatism by adapting the neighborhood radius for each data point. In practice, we employ data quality as the adaptation criterion and design an adaptive neighborhood constraint. Building on an efficient bilevel optimization framework, we develop a simple yet effective algorithm, Adaptive Neighborhood-constrained Q learning (ANQ), to perform Q learning with target actions satisfying this constraint. Empirically, ANQ achieves state-of-the-art performance on standard offline RL benchmarks and exhibits strong robustness in scenarios with noisy or limited data.

Read the original paper