AlignIQL: Constrained Offline Policy Extraction
- AlignIQL is a family of offline reinforcement learning algorithms that recasts policy extraction as a constrained optimization problem, unifying IQL and IDQL approaches.
- It provides two methods—AlignIQL and AlignIQL-hard—that offer closed-form solutions for implicit policy recovery while maintaining actor–critic decoupling.
- The algorithms achieve competitive or superior empirical performance in sparse-reward and high-dimensional tasks, with strong theoretical guarantees.
AlignIQL is a family of offline reinforcement learning (RL) algorithms that address the policy extraction problem in Implicit Q-Learning (IQL) by recasting the policy recovery as a constrained optimization (policy alignment) problem. It provides closed-form solutions—up to low-dimensional statewise multipliers—that strictly characterize the “implicit policy” encoded by a learned Q-value and value pair, giving rise to two practical algorithms: AlignIQL and AlignIQL-hard. Both methods retain IQL’s advantages of actor–critic decoupling and are theoretically grounded, yielding competitive or better empirical performance on challenging, sparse-reward tasks compared to prior state-of-the-art (He et al., 2024).
1. Foundations: IQL and the Implicit Policy Problem
Implicit Q-Learning (IQL) is an offline RL algorithm that enjoys stable training by decoupling actor and critic and never evaluating out-of-distribution (OOD) actions during Bellman updates. Specifically, IQL parameterizes:
- The value network via expectile (-quantile) regression:
- The Q-network by MSE regression to
- The actor via advantage-weighted regression (AWR):
Despite practical success, two fundamental questions arise: What policy is strictly “implied” by a generic learned pair ? And why does the AWR step recover sensible policies even when the critic is non-optimal? Prior work (IDQL) interprets IQL as an actor–critic method, positing that the implicit policy weights only hold when the critic achieves global optimality for convex loss . AlignIQL circumvents these limitations by directly characterizing the implicit policy via a principled optimization problem that holds for any (He et al., 2024).
2. The Implicit Policy-Finding (IPF) Optimization
AlignIQL formulates “policy alignment” as the solution to the implicit policy-finding (IPF) constrained program:
Here, is the behavioral policy, is a convex regularizer (e.g., induces KL divergence penalties). Slater’s condition applies, implying convexity and feasibility. This framework generalizes IQL and IDQL: IQL’s AWR appears as an approximate solution for simple and constant multipliers, while IDQL’s weight formula emerges from a general -loss under critic global optimality assumptions. AlignIQL, however, precisely characterizes the solution for any arbitrary critic.
3. Solution Characterization and Algorithms
3.1. AlignIQL-hard (Exact Constraint)
By formulating the Lagrangian with dual multipliers , for normalization and alignment constraints, and employing KKT conditions, the optimal solution is
where for . For , this reduces to the exponential-family solution
Typically settles negative, recovering the standard AWR functional form, i.e., . Determining requires solving two scalar nonlinear equations per state, for which small neural networks are used as dual function approximators, trained by dual ascent on
This yields the AlignIQL-hard algorithm, enforcing policy alignment exactly (up to dual approximation).
3.2. AlignIQL (Soft Constraint)
To mitigate dual ascent instability, AlignIQL proposes a soft-penalty relaxation:
with . The corresponding stationary solution is
For , the weights focus on actions where (strong alignment); yields policies that weight high- actions, heuristically resembling AWR. Proposition 3.10 shows that for (for alignment constants ), the IPF solution is a strict local minimum for the soft objective. Empirically, suffices across environments.
4. Implementation and Core Algorithmic Aspects
Both variants maintain full actor–critic decoupling: the critic is trained entirely from dataset using regression losses, without gradient flow from the actor. Policy extraction is performed at test time by evaluating the closed-form weights, with action sampling or maximization based on these weights.
Key implementation details include:
- Value network use of expectile-regression loss, (MuJoCo) or (AntMaze), matching IQL.
- Q-function learning by Bellman-MSE backup.
- Actor extraction weights:
- AlignIQL-hard:
- AlignIQL: (or variant for )
- Only computed at extraction, not during training.
- Learning rates: for , for duals .
- Samples per extraction state: 16, 64, or 256.
- Diffusion models used for behavioral policy estimation.
A summary pseudocode for training and extraction loops is given directly in the paper (He et al., 2024). All standard RL infrastructure is assumed, including target network updates and experience replay.
5. Theoretical Properties
Both versions of AlignIQL inherit the decoupling properties of IQL:
- Critic is trained independently of the actor, ensuring stable and robust convergence.
- Actor is always recovered post hoc, in closed form, without gradient entanglement between policy and value.
- AlignIQL-hard solves a globally convex IPF under Slater’s condition, attaining the globally optimal implicit policy under dual optimization.
- AlignIQL’s soft-penalty version, although nonconvex, ensures (under suitable ) that the IPF policy is a strict local minimum of the relaxed objective, and is empirically more stable (avoiding dual-exponential instability).
This structure guarantees robustness to hyperparameter tuning and extends theoretical guarantees of policy alignment to arbitrary learned critics, regardless of optimality.
6. Empirical Results and Comparative Performance
Comprehensive benchmarks on D4RL locomotion, AntMaze, and Adroit suites establish AlignIQL’s empirical advantages. Key results are summarized below:
| Benchmark | IQL | IDQL | CQL | Diff-QL | SfBC | SQL | AlignIQL |
|---|---|---|---|---|---|---|---|
| Locomotion | 76.9 | 78.0 | 63.9 | 87.9 | 75.6 | 83.3 | 75.7 |
| AntMaze | 63.0 | 74.4 | — | 69.8 | 74.2 | — | 79.1 |
In highly saturated locomotion benchmarks, AlignIQL is on par with SOTA. In sparse AntMaze tasks, it outperforms all baselines by 5–15 points (on 0–100 scale). Adroit task results show similar trends, with AlignIQL matching or exceeding IDQL—despite sharing and model capacity.
Further, as the action-sampling budget per state increases, IQL and IDQL can degrade due to OOD action overemphasis, while AlignIQL’s robust alignment (especially with in sparse domains) ensures sustained or improved convergence speed and final performance. All results are means over ten seeds with standard error reporting; improvements above three points are statistically significant ().
Strengths of AlignIQL include minimal increase in hyperparameter burden (just for soft variant, typically suffices), no need for extra networks or large dual updates in the soft variant, and exact alignment in the hard variant (at the expense of sensitivity and stability in very sparse settings).
7. Significance and Research Impact
AlignIQL reframes the core question of policy extraction from learned Q-value and value networks as a convex, constrained optimization that generalizes and subsumes established heuristics (AWR, IDQL). This formalization clarifies when and why the standard exponential-weight approach is justified, provides theoretically guaranteed alignment, and retains IQL’s simplicity and scalability.
Its demonstration of significant improvements in sparse-reward and high-dimensional domains establishes a new paradigm for principled policy recovery in offline RL—particularly in regimes where nuanced alignment of actor and critic is essential (He et al., 2024).