Source-linked AI summary
IDQL: Implicit Q-Learning as an Actor-Critic Method with Diffusion Policies
Philippe Hansen-Estruch, Ilya Kostrikov, Michael Janner, Jakub Grudzien Kuba, Sergey Levine
TL;DR
Offline RL needs to learn policies without overvaluing out-of-distribution actions, and IQL leaves unclear which policy realizes its learned values. The paper recasts IQL as actor-critic learning, derives a behavior-regularized implicit actor, and extracts it with diffusion-model samples and critic-based reweighting. IDQL outperforms prior offline RL methods while remaining relatively insensitive to hyperparameter tuning, although the original expectile loss performs best on current tasks.
Problem
IQL avoids unseen-action value queries, but which policy attains the values represented by its implicitly trained Q-function remains unclear.
Method
IDQL generalizes IQL’s critic objective and uses expressive diffusion behavior samples with critic-derived importance weights to extract the implicit actor.
Results
IDQL outperforms prior offline RL methods on D4RL benchmarks and performs particularly well when hyperparameter tuning is restricted.
Takeaways & Limitations
IQL can be understood as an actor-critic method whose critic loss induces a behavior-regularized actor, making policy extraction central to practical performance.
Takeaways & Limitations
The original expectile loss performs best among the generalized loss choices on current tasks.
Abstract
from arXiv · showhide
Effective offline RL methods require properly handling out-of-distribution actions. Implicit Q-learning (IQL) addresses this by training a Q-function using only dataset actions through a modified Bellman backup. However, it is unclear which policy actually attains the values represented by this implicitly trained Q-function. In this paper, we reinterpret IQL as an actor-critic method by generalizing the critic objective and connecting it to a behavior-regularized implicit actor. This generalization shows how the induced actor balances reward maximization and divergence from the behavior policy, with the specific loss choice determining the nature of this tradeoff. Notably, this actor can exhibit complex and multimodal characteristics, suggesting issues with the conditional Gaussian actor fit with advantage weighted regression (AWR) used in prior methods. Instead, we propose using samples from a diffusion parameterized behavior policy and weights computed from the critic to then importance sampled our intended policy. We introduce Implicit Diffusion Q-learning (IDQL), combining our general IQL critic with the policy extraction method. IDQL maintains the ease of implementation of IQL while outperforming prior offline RL methods and demonstrating robustness to hyperparameters. Code is available at https://github.com/philippe-eecs/IDQL.
1 Introduction
The paper studies how IQL handles out-of-distribution actions and which policy realizes the values learned by its implicit critic. It reinterprets IQL as actor-critic learning and introduces IDQL, using diffusion-based policy extraction to represent complex implicit actors.
- IQL avoids querying value estimates for unseen actions by training Q-functions with dataset actions and expectile-based state-value targets.
- The paper generalizes IQL with arbitrary convex critic losses, linking each loss to a behavior-regularized implicit actor with a distinct divergence from behavior.
- The induced implicit actor can be complex and multimodal, making the unimodal Gaussian AWR policy extraction used by IQL potentially inaccurate.
- IDQL combines the generalized IQL critic with diffusion-model samples and critic-based reweighting to approximate the intended implicit actor.
- IDQL outperforms prior methods on D4RL benchmarks and remains portable across antmaze and locomotion with limited hyperparameter tuning.
2 Related Work
Related offline RL methods address out-of-distribution actions through constraints, density models, supervised terms, or Q-value penalties. Prior work also explores expressive generative policies, including diffusion models, but uses them in different critic-learning or policy-definition frameworks.
- Offline RL methods constrain divergence, model action densities, add supervised terms, or penalize Q-values for out-of-distribution actions.
- The paper distinguishes its practical contribution from prior Q-learning approaches by focusing primarily on policy extraction motivated by the generalized IQL perspective.
- Expressive generative approaches include autoregressive behavior cloning, trajectory transformers with reward conditioning or beam search, and diffusion-based behavioral cloning.
- DQL uses diffusion to parameterize an actor in a TD3+BC-style method, while SfBC uses diffusion-based importance reweighting before critic value iteration.
3 Preliminaries
The paper formulates offline RL around an MDP and a fixed dataset generated by a behavior policy. It reviews IQL’s expectile value learning, AWR extraction, and diffusion models used to represent behavior distributions.
- An offline RL agent receives a fixed transition dataset collected from a behavior policy rather than interacting freely with the environment.
- Implicit Q-learning: IQL estimates a state value by expectile regression over dataset action Q-values, then uses that value in Q-function updates without an explicit policy.
- Policy extraction: IQL extracts a policy with AWR, while the temperature α balances critic exploitation against behavior cloning.
- Diffusion models: Diffusion models represent behavior distributions through a Markovian noising and denoising process with latent action variables and a variance schedule.
- Diffusion models: The practical diffusion implementation directly parameterizes a score network, and samples actions through Langevin sampling or reverse diffusion.
4 Implicit Q-Learning as an Actor-Critic Method
Generalized IQL can be viewed as an actor-critic method: the convex critic loss determines an implicit behavior-regularized actor. Different losses induce different trade-offs between matching behavior and favoring high-value actions, while the resulting actor may be complex or multimodal.
- Generalized IQL: IQL’s generalized critic objective induces an implicit actor distribution, establishing IQL as an actor-critic method.Theorem 4.1 links the critic loss to an actor reweighted from the behavior policy.
- Generalized IQL: The implicit actor is proportional to the behavior policy multiplied by a loss-dependent importance weight.The form of the convex loss determines how strongly the actor deviates from behavior.
- Loss functions: The exponential objective corresponds to an AWR policy with a KL-divergence constraint, but it can be unstable in practice.Its weights emphasize actions with the highest Q-values, although the paper reports that this loss does not yield the best practical performance.
- Loss functions: Expectile, quantile, and exponential losses produce distinct actors, respectively covering broad outcomes, concentrating near a quantile, or covering high-value actions.In the bandit example, expectiles vary smoothly with τ, quantiles track the cumulative distribution, and exponential objectives align with the maximum.
- Policy extraction: Standard IQL’s unimodal Gaussian AWR actor may poorly approximate the complex, potentially multimodal implicit actor because the critic is trained independently.The decoupling avoids adapting the critic to the explicit actor’s parameterization, but leaves policy extraction as an approximation problem.
- Policy extraction: General IQL extracts the actor by sampling from a learned behavior model, critic-reweighting the samples, and resampling or selecting the highest-Q action.The paper notes that highest-Q selection often performs better at evaluation time.
5 Implicit Diffusion Q-Learning
IDQL uses an expressive diffusion model for behavior-policy sampling and combines those samples with critic-based reweighting to approximate the implicit actor. The implementation uses a regularized residual network because naïve diffusion models can generate outliers and inaccurate continuous-action distributions.
- IDQL: Diffusion models are used because policy extraction requires an expressive behavior distribution capable of representing complex action distributions.The paper motivates diffusion models through their use in modeling complex distributions, including continuous action spaces.
- IDQL: IDQL parameterizes the behavior policy with a diffusion model and applies the general IQL policy-extraction procedure.The method uses the DDPM objective for behavior cloning and then critic-based reweighting to recover the intended policy.
- Diffusion architecture: Naïve DDPMs on continuous action spaces can produce outliers and poorly fit data distributions, risking erroneously high Q-values for out-of-distribution actions.This issue is demonstrated on toy 2D continuous datasets.
- Diffusion architecture: Increasing MLP batch size and capacity improves diffusion fit but does not eliminate many outliers.The paper therefore seeks a high-capacity yet well-regularized architecture.
- Diffusion architecture: IDQL uses an LN_Resnet score network to obtain higher-quality samples with fewer outliers than a standard MLP architecture.The architecture combines residual blocks and layer normalization.
6 Experimental Evaluation
Experiments evaluate IDQL across offline benchmarks, hyperparameter regimes, online finetuning, critic objectives, and diffusion-policy architectures. IDQL is competitive or superior to prior methods, especially on antmaze, while retaining computational efficiency and robustness.
- 6.1 Offline RL Results: IDQL performs competitively on locomotion and outperforms prior methods on antmaze under the standard evaluation protocol.In the one-hyperparameter regime, IDQL degrades only slightly while prior methods suffer considerably more.
- 6.1 Offline RL Results: IDQL outperforms all methods in total score and achieves the strongest antmaze results in the full offline RL comparison.Table 1 describes IDQL as on par or better than other state-of-the-art methods.
- 6.1 Offline RL Results: +70 points: IDQL outperforms the best method, IQL, on antmaze with only one hyperparameter tuned per domain.This margin is reported for the one-hyperparameter evaluation.
- 6.1 Offline RL Results: IDQL remains computationally efficient like IQL and is much faster than the other two diffusion methods.Separating critic training from the expressive policy model accounts for this efficiency.
- 6.2 Online Finetuning: IDQL yields large pre-training and final-finetuning improvements over IQL, while remaining competitive with RLPD and Cal-QL during finetuning.Most gains arise in the hardest antmaze-large environments.
- 6.3 IQL Objective Ablations: Expectile and quantile objectives perform well with argmax extraction, whereas the exponential loss is unstable and performs worse.Overall, the expectile objective performs strongest with greedy extraction; implicit policy distributions underperform argmax extraction.
- 6.3 IQL Objective Ablations: LN_Resnet reduces sensitivity to the number of diffusion samples N compared with an MLP architecture.For locomotion, larger N improves performance; for antmaze, increasing N has a small effect.
7 Discussion and Limitations
The paper generalizes IQL into an actor-critic framework and introduces IDQL, which combines expressive diffusion policies with critic-based reweighting. It reports strong benchmark performance and practical robustness, while noting overfitting and fine-tuning limitations.
- Discussion: IDQL generalizes IQL by showing that convex asymmetric critic losses induce behavior-regularized implicit actors.The implicit actor can be expressed as a reweighted behavior distribution.
- Discussion: The proposed diffusion policy extraction method uses expressive behavior-model samples and critic-based reweighting to approximate the implicit actor.This preserves the decoupled critic training central to IQL.
- Discussion: IDQL achieves state-of-the-art results across offline RL benchmarks and is relatively insensitive to hyperparameter tuning.The authors emphasize ease of implementation and practical use when tuning is restricted.
- Limitations: IDQL can overfit in small-dimensional action spaces, while dropout mitigates this issue at the expense of performance elsewhere.The paper also reports that IDQL does not work well for online fine-tuning of Adroit environments.
- Discussion: The original expectile loss performs best among the generalized loss choices on current tasks.The broader loss-function framework is retained as a direction for future research.
B Proof of Theoretical Results
The proof establishes convexity-based optimality for the generalized value objective and connects its solution to the induced implicit policy formulation.
- Proof: The generalized objective is convex with respect to the value function V(s).This convexity supports identifying the optimizer used in the theoretical derivation.
- Proof: The proof uses f′(0)=0 and convexity to express f′(x) through its magnitude and the sign of x.This relation is used to manipulate the first-order condition.
- Proof: The derivation introduces Zimp as a normalization constant for the implicit distribution involving |Q(s,a)−V*(s)|.The normalized expression links the value solution to an action distribution.
- Proof: V*(s) is shown to solve the optimization problem defined by the generalized objective.This is the proof’s central optimality conclusion.
C Additional Derivations
The additional derivations solve the generalized value objective under convexity and relate the implicit policy’s divergence from behavior to advantage and temperature.
- Additional Derivations: The derivation removes irrelevant terms before expanding the expectation of the objective.It assumes the behavior policy has positive support, µ(a|s)>0.
- Additional Derivations: Convexity of the objective enables solving directly for the optimal value V*(s).The derivation explicitly concludes that V*(s) can then be obtained.
- Additional Derivations: The derivation computes the KL divergence between the exponential implicit policy and the behavior policy.This connects policy regularization to the implicit actor construction.
- Additional Derivations: The behavior-policy divergence is related to the advantage and the temperature hyperparameter.Thus, temperature participates in controlling the relationship between the implicit and behavior policies.
D Experimental Details
The experiments use specified compute, update schedules, and limited hyperparameter sweeps to evaluate IDQL across offline RL settings. The authors acknowledge fairness concerns in the comparison protocol and weak Adroit fine-tuning performance.
- Experimental Details: Results use Titan X GPUs from a university cluster containing more than 80 GPUs.The implementation is based on JAX, Flax, and the jaxrl repository.
- Experimental Details: Standard offline RL training uses 1.5 million critic updates and 3 million diffusion behavior-policy updates.Critic learning was slightly unstable beyond 2 million updates.
- Experimental Details: The hyperparameter experiment sweeps one principal parameter per method while holding other hyperparameters constant.For IQL and IDQL, the expectile τ is swept over 0.6, 0.7, 0.8, and 0.9.
- Experimental Details: The authors caution that selecting the best hyperparameter per domain may not fairly represent every algorithm.They use the protocol to assess out-of-the-box performance without excessive tuning.
- Experimental Details: Fine-tuning failed to improve pretrained performance on Adroit tasks, where significant exploration is required.The authors identify behavior regularization as potentially harmful in this setting.
- Experimental Details: The critic and value networks use the IQL parameterization: two-layer MLPs with hidden size 256 and ReLU activations.The remaining architecture details concern the diffusion model.
F.1 Other Prior Offline RL Work Results
IDQL is competitive with prior offline RL methods on locomotion and outperforms them on antmaze, while remaining computationally efficient and benefiting from targeted design choices. Its performance depends on diffusion settings, architecture, and sampling strategy, with gains also appearing during antmaze-large finetuning.
- Other Prior Offline RL Work Results: IDQL performs on par or better than other state-of-the-art offline RL methods in Table 4.The reported IDQL results are averaged over 10 seeds.
- Other Prior Offline RL Work Results: IDQL remains competitive with prior methods on locomotion tasks and outperforms all prior methods on antmaze tasks.The comparison includes BC, DT, TD3+BC, CQL, IQL, EQL, and SfBC.
- Other Prior Offline RL Work Results: IDQL outperforms IQL consistently on Maze2D but comes short against Diffuser.The paper suggests model-based planning may generalize better in Maze2D environments.
- Diffusion Steps T and Beta Schedule: The variance-preserving beta schedule generally works best, while low T performs well and linear schedules require excessively large T.The authors recommend sweeping both T and the noise schedule; T = 50 was best for 2D datasets and T = 5 for D4RL.
- Architecture and Batch Ablations: Larger batch sizes improve antmaze performance but have only small effects on locomotion, and architecture or capacity matters more than batch size.The ablations identify larger capacity, dropout, and regularization as important for strong D4RL performance.
- AWR Ablation: AWR-weighted DDPM training usually performs worse than IDQL with one sample and is at best comparable when using 64 samples plus argmax.The results are averaged over 10 seeds, and the paper concludes that AWR is unnecessary for this setting.
- Online Finetuning: IDQL improves sample efficiency and performance over IQL during antmaze-large finetuning, while its frozen actor reaches peak performance with 100k samples.The one-hyperparameter variant is evaluated with training curves for locomotion and antmaze tasks.
G LN_Resnet Architecture
The cited passages situate LN_Resnet within the implementation and related-work context, specifying its practical configuration and contrasting alternative critic and statistic choices.
- LN_Resnet Architecture: The practical LN_Resnet implementation uses hidden dimension 256 and n = 3 residual blocks.The passage identifies this architecture as the one described in Section 5.
- Other Prior Offline RL Work: A cited prior approach uses a SARSA critic objective equivalent to expectile τ = 0.5, followed by greedy extraction via AWR.This passage describes Brandfonbrener et al.'s method as related offline RL work.
- Statistic for RL: Quantile statistics are presented as a way to induce an implicit policy distribution while, like IQL, avoiding Q-function queries on out-of-distribution actions.The passage frames quantiles as a potential statistic for measuring distributions in this algorithm family.