TL;DR
Reinforcement learning typically relies on monolithic neural networks to estimate value functions, which struggle to scale effectively with more compute. This paper introduces floq, a novel approach that models the Q-function as a velocity field using flow-matching, allowing the model to iteratively compute Q-values. By providing dense supervision at each integration step, floq dramatically improves performance on complex offline RL tasks and offers a new, highly effective way to scale compute in value-based RL.
What Problem Does This Paper Address?
A major driver behind the success of modern generative models—like Large Language Models (LLMs) and diffusion models—is iterative computation. They build their outputs step-by-step (e.g., next-token prediction or progressive denoising) and receive dense supervision at every intermediate step.
In contrast, value-based Reinforcement Learning (RL) typically estimates Q-values using a monolithic architecture. A state-action pair goes in, and a single forward pass spits out a scalar Q-value. Standard Temporal Difference (TD) learning struggles to leverage the capacity of deeper or wider networks; simply swapping a standard MLP for a massive ResNet often leads to instability and poor generalization. The authors ask: Can we bring the benefits of iterative computation and dense intermediate supervision to value estimation in RL?
Methods
The authors introduce floq (flow-matching Q-functions). Instead of a standard network that directly outputs a Q-value, floq parameterizes the Q-function as a time-dependent velocity field.
Here is how the architecture works in practice:
- Inference (Integration): To get a Q-value,
floqsamples a random scalar noise value $z_0$. It then uses a numerical ODE solver (like the Euler method) to integrate the learned velocity field over $K$ steps from time $t=0$ to $t=1$. The final value $z_K$ is the Q-value estimate. - Training (Flow-Matching): The velocity field is trained using a linear flow-matching objective. The "target" distribution is a Dirac-delta centered on the TD-bootstrapped Q-value. Crucially, the network is supervised to predict the correct velocity at random intermediate points (interpolants) between the initial noise and the target Q-value.
- Policy Extraction: Backpropagating through an ODE solver to update an actor network is computationally expensive. To fix this, the authors distill the flow critic into a standard, one-step monolithic critic, which the policy then uses for standard actor updates.
The "Secret Sauce" Design Choices: Applying flow-matching to a scalar TD-learning problem is notoriously unstable. The authors introduce key fixes:
- Categorical Input Encoding: Because the intermediate value $z_t$ grows from random noise to a full Q-value during training, feeding it directly into the network causes massive activation spikes.
floqconverts $z_t$ into a categorical histogram (HL-Gauss encoding) to stabilize training. - Fourier Time Embeddings: To ensure the network actually pays attention to the integration time step $t$, it is passed through a high-dimensional Fourier feature mapping.
Key Insights and Ideas
- Curvature is Capacity: For flow-matching to actually add capacity to a scalar prediction, the trajectory from the initial noise to the final Q-value must be curved. If it's a straight line, the velocity doesn't depend on time, and the model collapses into a standard monolithic critic. The authors induce this necessary curvature by carefully tuning the range of the initial noise distribution.
- Iterative Compute > Parallel or Sequential Compute: The authors compared
floqagainst Ensembles (scaling parallel compute) and deep ResNets (scaling sequential compute). Even when matched for total inference FLOPs,floqsignificantly outperformed both. The gains come specifically from the dense supervision applied at every step of the iterative process, not just from having more parameters or layers. - Auxiliary Task Benefits: Even if
floqis restricted to just 1 integration step, it outperforms standard Q-learning. Why? Because predicting the gap between the target Q-value and various random noise inputs acts as a rich set of auxiliary representation-learning tasks.
Key Results
- Offline RL: On the hardest OGBench environments (where baseline success rates are below 50%),
floqachieves an average success rate of 38% compared to 21% for Flow Q-Learning (FQL)—a nearly 1.8x improvement. - Online Fine-Tuning: When transitioning from offline pre-training to online fine-tuning,
floqprovides a much stronger initialization, adapts faster, and converges to a higher final success rate than standard monolithic critics. - Compute Scaling: Increasing the number of integration steps ($K$) from 1 to 8 consistently improves the success rate, proving that
floqsuccessfully scales Q-function capacity.
Limitations and Future Work
- Overfitting at High Compute: As seen in the scaling charts, increasing the integration steps too high (e.g., $K=16$ on certain tasks) can actually degrade performance. This seems to be a broader issue with TD-learning overfitting to excessively sharp, high-capacity targets.
- Future Directions: The authors suggest exploring ways to dynamically set the number of integration steps at runtime. Furthermore, because
floqinherently represents a "cascaded" family of critics with different capacities inside a single network, future work could exploit this for more efficient policy extraction or cross-validation of model size.
Summary updated