TL;DR
AlignIQL reframes the challenge of extracting policies from Implicit Q-Learning (IQL) as a constrained optimization problem, introducing the concept of "policy alignment" to ensure the extracted policy truly matches what the learned value function evaluates. By relaxing this into a soft-constrained objective, the authors derive a simple, closed-form weighting mechanism that significantly boosts performance on challenging trajectory-stitching tasks like AntMaze and enhances robustness against corrupted data.
What Problem Does This Paper Address?
Offline Reinforcement Learning (RL) aims to train optimal policies entirely from pre-collected datasets without any environment interaction. A major hurdle here is dealing with out-of-distribution (OOD) actions—actions not present in the dataset that might receive erroneously high value estimates from a standard Q-function.
Implicit Q-Learning (IQL) elegantly bypasses this by learning a value function using only the actions present in the dataset via expectile regression. However, IQL leaves open a critical question: how do we actually recover the policy implied by the learned value function?
Traditionally, IQL uses a heuristic called Advantage Weighted Regression (AWR) to extract the policy. But AWR doesn't guarantee that the extracted policy aligns with what the value function is actually evaluating. While recent methods like IDQL try to fix this "implicit policy-finding problem" (IPF), they rely on the strict assumption that the learned value function is perfectly optimal. AlignIQL steps in to solve the IPF problem for any learned sub-optimal value function.
Methods
The authors formally define Policy Alignment as a state where the extracted policy $\pi$ satisfies the standard actor-critic consistency condition: the expected Q-value under the policy equals the state value ($\mathbb{E}_{a \sim \pi}[Q(s,a)] = V(s)$).
They formulate the Implicit Policy-Finding problem as a constrained optimization problem that minimizes divergence from the behavior policy while enforcing policy alignment. They propose two ways to solve it:
- AlignIQL-hard: Solves the exact constrained problem using Karush-Kuhn-Tucker (KKT) conditions. While theoretically optimal, it requires training two additional multiplier neural networks, which can introduce instability and hyperparameter sensitivity.
- AlignIQL (Soft Constraint): Relaxes the hard constraint by adding a quadratic penalty term: $\eta(Q(s,a) - V(s))^2$.
This soft relaxation yields a beautiful, elegant closed-form solution for the policy importance weights:
$$w(s,a) \propto \exp(-\eta(Q(s,a) - V(s))^2)$$
Unlike traditional AWR, which aggressively weights actions with the highest Q-values, AlignIQL favors actions where the Q-value is closest to the state value $V(s)$. This acts as a confidence check, balancing behavior cloning with strict policy alignment.
AlignIQL easily integrates with standard Gaussian policies or advanced generative models like diffusion models (D-AlignIQL), where it is used to resample action candidates generated by a diffusion behavior model.
Datasets
The authors evaluated AlignIQL across several standard and corrupted offline RL benchmarks:
- D4RL AntMaze: Highly challenging environments (Umaze, Medium, Large) requiring complex trajectory stitching.
- D4RL MuJoCo (HalfCheetah): Used specifically for robustness testing under various data corruption scenarios (random perturbations added to states, actions, rewards, or dynamics).
- Atari Benchmarks: Discrete, image-based control tasks (Breakout, Qbert, Seaquest) sampled at highly restricted data levels (1% or 0.5% of the original dataset) to simulate data-scarce regimes.
Key Insights and Ideas
- Alignment over Exploitation: Standard AWR can over-exploit a critic by selecting actions with dangerously high Q-value estimates, even if those estimates are unreliable. AlignIQL focuses on consistency ($Q \approx V$). If a Q-value deviates wildly from the expected state value, it receives a lower weight, protecting the policy from corrupted or poorly estimated critics.
- No Architectural Overhead: By utilizing the soft-constraint formulation, AlignIQL achieves policy alignment simply by modifying the importance weights during the policy extraction phase. It retains the core benefit of IQL—completely decoupling actor and critic training.
- Implicit Optimality: In IQL, the value function $V(s)$ approximates the maximum Q-value when the expectile parameter $\tau$ approaches 1. Minimizing $(Q - V)^2$ naturally guides the policy toward the maximum action value while maintaining a robust safety margin.
Key Results
AntMaze Trajectory Stitching
When paired with a diffusion-based behavior model, D-AlignIQL achieved SOTA results on the challenging AntMaze benchmark, outperforming other diffusion-based methods like DiffusionQL, SfBC, and IDQL.
As shown in Table 1, D-AlignIQL achieved the highest average score (80.2) across all tasks, proving particularly dominant in the larger, more complex maze environments.
Robustness to Data Corruption
AlignIQL demonstrated exceptional resilience against adversarial data corruption, particularly observation attacks.
Because $V(s)$ is trained via a neural network over in-sample data, it naturally smooths out noisy inputs. By anchoring weights to $V(s)$, AlignIQL remains stable even when the Q-function fluctuates due to corrupted state observations.
Limitations and Future Work
The primary limitation of AlignIQL is its dependency on the critic: if the learned value function is fundamentally flawed, the policy alignment constraint will force the actor to align with an inaccurate critic. However, the authors note that in practice, value functions are typically learned much more reliably than policies in offline settings.
For future work, the authors suggest extending the policy alignment framework to Safe RL (where safety constraints must be satisfied alongside value alignment) and Offline-to-Online (O2O) learning, where maintaining a well-aligned policy could prevent policy collapse during the initial online adaptation phase.
Summary updated