SAC Flow: Sample-Efficient Reinforcement Learning of Flow-Based Policies via Velocity-Reparameterized Sequential Modeling

TL;DR

Proposes SAC Flow, reparameterizing velocity with modern sequence models to stabilize flow policies, achieving state-of-the-art results.

cs.RO 🔴 Advanced 2025-09-30 42 views
Yixian Zhang Shu'ang Yu Tonghe Zhang Mo Guang Haojia Hui Kaiwen Long Yu Wang Chao Yu Wenbo Ding
Reinforcement Learning Flow Models Sequential Modeling Gradient Stability Robotics

Key Findings

Methodology

This work models flow-based policies as residual RNNs, revealing their equivalence. It introduces two reparameterizations: Flow-G with gated velocity (GRU-based) and Flow-T with Transformer decoding. These architectures address gradient explosion issues in multi-step sampling. By integrating noise-augmented rollouts, the authors develop a practical SAC-based training algorithm supporting end-to-end optimization. The approach enables direct training of expressive, multimodal policies, avoiding surrogate objectives or distillation. The method is validated on continuous control and robotic manipulation benchmarks, demonstrating superior sample efficiency and stability.

Key Results

  • On MuJoCo tasks, SAC Flow-G and Flow-T outperform baselines with up to 130% performance gains, showing faster convergence and higher final rewards. In Walker2D and Hopper environments, they achieve state-of-the-art results with fewer samples.
  • In offline-to-online transfer on OGBench and Robomimic, success rates increase by up to 60%, confirming robustness and efficiency. Ablation studies highlight the importance of gating and Transformer modules for gradient stability.
  • Gradient norm analysis shows that the proposed architectures prevent exploding gradients, unlike naive models. This stability translates into consistent performance across tasks and sampling steps.

Significance

This research addresses fundamental gradient instability in flow-based policies, enabling stable, efficient off-policy training. By connecting flow rollouts to sequence models, it unlocks new possibilities for high-capacity, multimodal policies in robotics and control. The approach reduces reliance on surrogate objectives, improves sample efficiency, and broadens the applicability of flow models in reinforcement learning, potentially transforming autonomous control systems.

Technical Contribution

The paper formalizes flow-based policy rollouts as residual RNNs, revealing their gradient pathologies. It introduces GRU and Transformer-based reparameterizations that stabilize backpropagation. The noise-augmented rollout enables likelihood computation for SAC, facilitating direct, end-to-end training. This combination of theoretical insight and architectural innovation significantly advances the stability and scalability of flow policies in RL.

Novelty

This is the first systematic treatment of flow policies as sequence models, leveraging modern architectures like GRU and Transformer for reparameterization. Unlike prior work relying on distillation or surrogate losses, this method enables direct, stable, and scalable end-to-end training. The theoretical connection to residual RNNs provides a new understanding of gradient issues in flow models, marking a significant step forward.

Limitations

  • Despite improvements, training stability may still be challenged in environments with extremely sparse rewards or high-dimensional states. Computational overhead from sequence architectures can limit real-time deployment.
  • The current models are tested primarily on simulated benchmarks; real-world robotic applications require further validation. Scalability to very large action spaces remains an open question.
  • Handling highly multimodal or complex policies might demand even more sophisticated architectures, which could increase complexity and training costs.

Future Work

Future directions include deploying SAC Flow on real robots to assess real-world robustness, developing more lightweight sequence architectures for efficiency, and integrating imitation learning to enhance exploration. Further research will explore extending the framework to multi-agent settings and high-dimensional control tasks, aiming for broader applicability and real-time performance.

AI Executive Summary

Flow-based policies have emerged as a promising approach for modeling complex, multimodal action distributions in reinforcement learning, especially in robotics. However, their training stability has been hampered by gradient explosion during multi-step sampling, limiting their practical deployment. This paper introduces SAC Flow, a novel framework that reparameterizes flow policies as residual sequence models—specifically, as GRUs and Transformers—addressing the core issue of gradient instability.

By establishing an algebraic equivalence between flow rollouts and residual RNNs, the authors reveal the root cause of gradient explosion. They then leverage modern sequence architectures to stabilize the backpropagation process, enabling direct end-to-end training within the SAC algorithm. The key innovation lies in the noise-augmented rollout, which maintains tractable likelihoods while preserving the policy’s expressiveness.

Experimental results across MuJoCo, OGBench, and Robomimic demonstrate that SAC Flow achieves up to 130% performance gains over baselines, with superior sample efficiency and training stability. In complex offline-to-online transfer tasks, success rates improve by 60%, showcasing robustness. The ablation studies confirm that gating mechanisms and Transformer-based decoding are crucial for gradient stability.

This work significantly advances the field by providing a theoretically grounded, practically effective method for stable, expressive flow policies. It opens new avenues for scalable, high-capacity reinforcement learning in robotics and control, with promising prospects for real-world deployment. Future research will focus on real robot validation, lightweight architectures, and broader application scenarios.

Deep Analysis

Background

近年来,流式策略在连续控制和机器人操控中展现出强大潜力,因其能建模复杂、多模态的动作分布。早期如RealNVP、Glow等生成模型在图像和数据生成中取得成功,但在强化学习中的应用受限于训练不稳定。Diffusion模型虽能捕获更丰富的分布,但训练成本高昂。流式策略结合流匹配目标,简化训练流程,已在MuJoCo等平台取得良好效果,但多步采样带来的梯度爆炸问题严重限制了其推广。传统方法多采用策略蒸馏或代理目标,牺牲模型表达能力。本文提出将流式策略视为序列模型,利用深度序列架构改善训练稳定性,为未来高效强化学习策略提供新思路。

Core Problem

流式策略在强化学习中的核心难题是多步采样引发的梯度爆炸和消失,导致训练不稳定,难以实现端到端优化。现有方法多通过策略蒸馏或代理目标规避梯度路径,但牺牲了模型的表达能力和训练效率。如何在保证模型复杂度的同时,确保梯度稳定,成为关键难题。此外,如何兼容离线和在线学习场景,提升样本利用率,也是亟待解决的问题。

Innovation

本文的创新主要包括:1)将流式策略转化为残差RNN,揭示其梯度路径本质;2)引入门控GRU架构,利用门控机制稳定梯度流;3)设计Transformer解码架构,通过全局上下文增强动作生成;4)结合噪声增强的rollout策略,确保端到端可训练性。这些创新突破了传统流模型的梯度限制,显著提升训练稳定性和样本效率,为流式策略在强化学习中的应用提供了新技术基础。

Methodology

  • �� 将流式采样过程转化为残差RNN,分析其梯度路径;• 设计Flow-G架构,利用GRU门控机制调节Velocity,缓解梯度爆炸;• 设计Flow-T架构,采用Transformer解码Velocity,通过全局上下文增强动作表达;• 采用噪声增强的rollout策略,确保每一步的概率密度可计算,支持SAC训练;• 结合SAC算法,优化策略和Q值函数,支持从零和离线迁移学习;• 实现端到端训练流程,避免策略蒸馏和代理目标,提升训练效率。

Experiments

在MuJoCo、OGBench和Robomimic数据集上进行评估,比较基线包括QSM、DIME、FlowRL、SAC和PPO。采用不同采样步数和训练策略,测试模型的样本效率、训练稳定性和迁移能力。通过消融实验验证门控和Transformer架构对梯度稳定的贡献。实验指标包括成功率、平均奖励和训练时间,结果显示SAC Flow在多任务中均优于对比方法,特别是在复杂迁移任务中表现出色。

Results

在连续控制任务中,SAC Flow-G和Flow-T实现了最高性能,提升幅度达130%,在Walker2D、Hopper等环境中训练速度快,稳定性强。在离线迁移任务中,成功率比传统方法高出60%,验证了离线到在线迁移的优势。消融分析表明,门控机制和Transformer架构显著降低梯度爆炸风险,确保训练过程的稳定性。这些结果充分证明了方法的有效性和实用性。

Applications

该方法适用于机器人自主控制、工业自动化、仿真训练等场景。只需环境状态信息和动作空间定义,即可训练高效策略。未来可结合模仿学习和迁移学习,提升机器人在复杂环境中的自主适应能力,推动智能机器人行业的快速发展。

Limitations & Outlook

当前模型在极端稀疏奖励和高维状态空间中仍存在训练不稳定的问题,模型复杂度较高,计算成本较大,限制了实时应用。此外,模型对多模态策略的适应性仍需验证,未来需优化架构以降低计算负担。

Plain Language Accessible to non-experts

想象你在一个工厂里,生产线上的机器人需要不断调整动作以完成不同任务。传统的方法就像让机器人每次都从头开始思考下一步,容易出现混乱或错误。现在,研究人员发现,可以把这个过程看成是机器人在记忆和调整自己动作的连续过程,就像我们在玩积木游戏时不断叠加和调整积木。通过引入智能的“调节器”和“观察者”,机器人可以更平稳地学习不同动作,避免出现“梯度爆炸”这种让它难以学习的问题。这样一来,机器人不仅学得快,还能在复杂环境中表现得更好,就像我们教会它一位经验丰富的老师一样。这项研究让机器人变得更聪明、更稳定,未来可以用在各种自动化场景中,比如自动驾驶、工业机器人等。

ELI14 Explained like you're 14

想象你在学校学骑自行车,一开始总是摇摇晃晃,容易摔倒。后来,你的老师告诉你:要保持平衡,就像在平衡木上一样,用眼睛看远一点,慢慢调整方向。这个研究就像是给机器人装上了“聪明的平衡器”,让它在学会动作的同时,不会因为太快或太复杂而失控。科学家们发现,把机器人学动作的过程变成一种连续的“记忆和调整”游戏,就像我们在玩拼图一样。通过用特别的“观察眼”和“调节器”,机器人可以更稳、更快地学会完成任务,不会轻易崩溃或迷失方向。这就像你在游戏中学会了怎么稳住自己,变得越来越厉害。未来,这样的机器人可以帮我们做很多事情,比如帮忙搬东西、开车、甚至做饭!

Abstract

Training expressive flow-based policies with off-policy reinforcement learning is notoriously unstable due to gradient pathologies in the multi-step action sampling process. We trace this instability to a fundamental connection: the flow rollout is algebraically equivalent to a residual recurrent computation, making it susceptible to the same vanishing and exploding gradients as RNNs. To address this, we reparameterize the velocity network using principles from modern sequential models, introducing two stable architectures: Flow-G, which incorporates a gated velocity, and Flow-T, which utilizes a decoded velocity. We then develop a practical SAC-based algorithm, enabled by a noise-augmented rollout, that facilitates direct end-to-end training of these policies. Our approach supports both from-scratch and offline-to-online learning and achieves state-of-the-art performance on continuous control and robotic manipulation benchmarks, eliminating the need for common workarounds like policy distillation or surrogate objectives.

cs.RO cs.LG