PrT-Flow: Probability-Tractable Flow Matching for Reinforcement Learning
Organizations: School of Computer Science and Engineering, Sun Yat-sen University
Abstract
Diffusion models and Flow Matching can represent flexible distributions over robot actions, but many reinforcement learning algorithms also require the probability of each action. We introduce PrT-Flow (Probability-Tractable Flow Matching), which computes probability density while retaining multimodal, multi-step action generation. Its Jacobian-Tractable Transformer (JTT) makes each sampling step invertible and enables efficient computation of its Jacobian determinant. We train these finite steps with Conditional Euler-step Training (CET), which supervises their displacement over one step during sampling rather than their instantaneous velocity. We prove that, under certain assumptions, CET has the same minimizers as fitting the Euler-solver updates of Flow Matching. PrT-Flow achieves 96% success on Robomimic Lift after 300 epochs of imitation learning, matching the diffusion policy reference, and 96% success on OGBench Cube-Triple after 600k online steps. These results demonstrate that invertible networks with tractable probability densities can learn effective robot policies and support SAC-style actor-critic training. Our code is available at https://github.com/Sunlight-zero/PrT-Flow .
Figures & tables
| Algorithm 1 Forward sampling and action probability density |
| 1: observation condition , step count , policy parameters 2: normalized action chunk and 3: 4: 5: 6: for do 7: 8: Apply the composed JTT update to obtain and its log-determinant 9: 10: end for 11: 12: 13: return |
| Algorithm 2 Conditional Euler-step Training |
| 1: demonstration windows after normalization and inverse-tanh transformation , initialized , step count , batch size , update budget 2: trained policy parameters 3: 4: for do 5: Sample a minibatch from 6: for do 7: Draw and 8: ; ; 9: 10: end for 11: 12: Take one optimizer step on using 13: end for 14: return |
| Policy | Evaluation epoch | Success rate |
|---|---|---|
| DDPM reference | 300 | 96% |
| PrT-Flow (JTT, CET) | 300 | 96% |
| Policy | Dev. SR | Dev. return | Final SR | Final return |
|---|---|---|---|---|
| Flow-G, | 88% | 92% | ||
| Flow-G, | 56% | 50% | ||
| PrT-Flow, CET | 94% | 96% |
| Design choice | Configuration | Successful episodes |
|---|---|---|
| Supervised quantity | CET finite-step quotient | 49/50 |
| Zero-step generator | 33/50 | |
| Coordinate frame | Learned orthogonal frames | 49/50 |
| Fixed initial random orthogonal frames | 33/50 |
| Supervised quantity / time sampling | Endpoint coordinates | Dev. SR | Dev. return | Final SR | Final return |
|---|---|---|---|---|---|
| Generator velocity / continuous | Action | 88% | 94% | ||
| CET quotient / grid | Generative space | 94% | 96% |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Lift | Cube-Triple |
|---|---|---|
| Batch size | 256 | 256 |
| Optimizer | AdamW | Adam |
| Learning rate | ||
| Weight decay | — | |
| AdamW / | / | — |
| Cosine warm-up (optimizer steps) | 100 | — |
| Comparison | FP32 | FP64 |
|---|---|---|
| vs. | ||
| vs. | ||
| Analytic vs. autodifferentiated log-derivative | ||
| Forward vs. inverse log probability |
| Comparison | Metric | Discrepancy |
|---|---|---|
| Analytic vs. autodifferentiated local log-determinant | Maximum absolute difference | |
| FP32 vs. FP64 forward log probability | Maximum absolute difference | |
| FP32 vs. FP64 parameter gradient of mean log probability | Relative difference |