Q-learning with Adjoint Matching
Qiyang Li, Sergey Levine
TL;DR
QAM addresses the challenge of leveraging the critic's action gradient to optimize expressive flow/diffusion policies in TD-based RL by applying adjoint matching to derive a stable, step-wise objective that preserves the correct tilt distribution ${p_\theta( X_1 ) \propto p_\beta( X_1 ) e^{Q_\phi(X_1)}}$. It combines this policy extraction with TD updates over an ensemble of critics, providing theoretical guarantees that the learned policy converges to the behavior-constrained optimum ${\pi^*(a|s) \propto \pi_\beta(a|s) \exp(\tau Q_\phi(s,a))}$. Empirically, QAM and its variants outperform strong baselines on offline RL and offline-to-online RL across long-horizon, sparse-reward tasks, including setups with action chunking, while maintaining stability through lean adjoint states. The approach offers a scalable, principled path to deploying highly expressive diffusion/flow policies in practical RL scenarios with limited data.
Abstract
We propose Q-learning with Adjoint Matching (QAM), a novel TD-based reinforcement learning (RL) algorithm that tackles a long-standing challenge in continuous-action RL: efficient optimization of an expressive diffusion or flow-matching policy with respect to a parameterized Q-function. Effective optimization requires exploiting the first-order information of the critic, but it is challenging to do so for flow or diffusion policies because direct gradient-based optimization via backpropagation through their multi-step denoising process is numerically unstable. Existing methods work around this either by only using the value and discarding the gradient information, or by relying on approximations that sacrifice policy expressivity or bias the learned policy. QAM sidesteps both of these challenges by leveraging adjoint matching, a recently proposed technique in generative modeling, which transforms the critic's action gradient to form a step-wise objective function that is free from unstable backpropagation, while providing an unbiased, expressive policy at the optimum. Combined with temporal-difference backup for critic learning, QAM consistently outperforms prior approaches on hard, sparse reward tasks in both offline and offline-to-online RL.
