Introduction
Offline Reinforcement Learning (RL) presents a significant challenge: learning optimal behaviors from a static dataset without the benefit of environment interaction. A primary hurdle is distributional shift, where an agent overestimates the value of unseen actions, potentially leading to policy collapse. While Diffusion Policies have emerged as a powerful solution for capturing complex, multi-modal action distributions, they suffer from high computational costs. Specifically, optimizing these policies with "guidance"—steering them toward high-reward actions—typically requires backpropagating gradients through lengthy sampling chains during training.
The FlowQ Approach
To address these inefficiencies, FlowQ transitions from Stochastic Differential Equation (SDE)-based Diffusion Models to Ordinary Differential Equation (ODE)-based Flow Matching. The core contribution is the introduction of Energy-Guided Flow Matching.
In this framework, the model does not merely mimic the dataset distribution $p_1(x_1)$. Instead, it learns to map a source distribution to an "energy-weighted" target distribution: $\hat{p}_1(x_1) \propto p_1(x_1) \exp(-\lambda \mathcal{E}(x_1))$. In the context of RL, the energy function $\mathcal{E}$ is defined as the negative Q-function, representing the predicted value of an action.
To make this optimization tractable and "simulation-free," FlowQ employs a first-order Taylor expansion to approximate the energy function. This mathematical shortcut allows for the derivation of a closed-form target velocity field, enabling the training loss to be calculated directly from the data and the Q-function without running a full ODE solver during policy updates.
Key Insights: Efficiency and Guidance
The most significant advantage of FlowQ is its constant training time. Unlike traditional diffusion methods that become increasingly slow as the number of sampling steps grows, FlowQ's training overhead remains flat. This is because the guidance is "baked" into the model weights during training, rather than being applied iteratively at inference or through expensive backpropagation.
As shown in the visualizations of different schedules $h(t)$, the choice of the probability path significantly influences how effectively the model captures the target posterior. The use of the Taylor expansion acts as a bridge, transforming a complex, intractable distribution into a manageable Gaussian path.
Experimental Results
FlowQ was evaluated on the D4RL benchmark, covering locomotion (HalfCheetah, Hopper, Walker2d), navigation (AntMaze), and manipulation (Adroit) tasks.
- Performance: FlowQ achieved state-of-the-art results, with average scores of 85.6 in locomotion and 69.3 in AntMaze, rivaling or surpassing methods like DiffusionQL and IQL.
- Training Efficiency: In head-to-head comparisons with DiffusionQL, FlowQ maintained a consistent training time of approximately 50 seconds for $10^4$ gradient steps. In contrast, DiffusionQL's training time quadrupled as sampling steps increased to 50.
- Robustness: The method proved particularly effective in high-dimensional and multi-modal environments like AntMaze and Adroit, where precise action selection is critical.
Conclusion and Future Work
FlowQ offers a scalable and efficient alternative to diffusion-based policies for offline RL. By leveraging flow matching and Taylor-approximated energy guidance, it achieves high performance without the typical training bottlenecks.
However, some limitations remain. The reliance on a first-order Taylor expansion may introduce approximation errors in highly non-linear Q-landscapes. Additionally, while training is fast, inference still requires solving an ODE, which is computationally heavier than standard MLP policies. Future research may explore adaptive energy scaling to dynamically adjust guidance throughout the training process.
Summary updated