0 abstract

Reinforcement learning (RL) provides an appealing formalism for learning control policies from experience. However, the classic active formulation of RL necessitates a lengthy active exploration process for each behavior, making it difficult to apply in real-world settings such as robotic control. If we can instead allow RL algorithms to effectively use previously collected data to aid the online learning process, such applications could be made substantially more practical: the prior data would provide a starting point that mitigates challenges due to exploration and sample complexity, while the online training enables the agent to perfect the desired skill. Such prior data could either constitute expert demonstrations or, more generally, sub-optimal prior data that illustrates potentially useful transitions. While a number of prior methods have either used optimal demonstrations to bootstrap reinforcement learning, or have used sub-optimal data to train purely offline, it remains exceptionally difficult to train a policy with potentially sub-optimal offline data and actually continue to improve it further with online RL. In this paper we systematically analyze why this problem is so challenging, and propose an algorithm that combines sample-efficient dynamic programming with maximum likelihood policy updates, providing a simple and effective framework that is able to leverage large amounts of offline data and then quickly perform online fine-tuning of RL policies. We show that our method, advantage weighted actor critic (AWAC), enables rapid learning of skills with a combination of prior demonstration data and online experience. We demonstrate these benefits on a variety of simulated and real-world robotics domains, including dexterous manipulation with a real multi-fingered hand, drawer opening with a robotic arm, and rotating a valve. Our results show that incorporating prior data can reduce the time required to learn a range of robotic skills to practical time-scales.

  • 背景:
    • offline 2 online:如果利用 offline dataset 来帮助 online RL,那么 offline dataset 可以提供一个 RL training 的起点,减轻从头开始 exploration 和 sample complexity 的挑战,而 online training 可以令 agent 更完全掌握技能。
    • offline dataset:什么都可以。可能是专家演示,或者更一般的,是包含 potentially useful transitions 的 sub-optimal data。
    • 先前工作:要么使用 optimal demos(最优演示)来引导 RL,要么使用 sub-optimal data 进行纯粹的 offline RL。使用 sub-optimal 的 offline data 训练一个策略,并继续跑 online RL 进一步改善策略,貌似是一个 gap。
  • method:
    • 在本文中,我们系统分析了 offline 2 online 的挑战性。
    • 提出了一种结合 sample-efficient dynamic programming(policy iteration 的策略评估)与 maximum likelihood policy updates(策略更新)的算法,提供了一个简单有效的框架,能先利用大量的 offline data,然后对 RL policy 进行快速 online fine-tune。
    • 我们的方法,即优势加权演员评论家 (advantage weighted actor-critic,AWAC),能够结合 offline data + online data。
  • 实验:
    • 各种 simulation 和 real world 的 robot manipulation,真机的多指灵巧手、用机械臂打开抽屉、旋转阀门。
    • 结果表明,结合 offline dataset,可以将学习一系列机器人技能所需的时间,减少到可行的时间尺度。

方法总结

  • 采用 policy iteration 的框架。
  • policy evaluation:从数据集 β 里采样 (s,a,r,s’),更新 \(BQ(s,a)=r(s,a)+\gamma E_{a’}Q(s’,a’)\) 。这里的 a 可能是 unseen data。
  • policy improvement:从数据集 β 里采样 (s,a),最大化 \(\pi_\beta(a|s)\exp\big(\frac{1}{\lambda}A^{\pi_k}(s,a)\big)\)
  • 数据集 β 的维护:最初用 offline dataset 初始化,然后逐渐添加 online 的数据(直接用 \(\pi_\theta\) 采样)。

open review

  • 贡献:

    • 使用 offline dataset 加速 online RL:提出了 Advantage-Weighted Actor-Critic(优势加权 actor-critic,AWAC)算法,使用隐式约束来减少 offline 训练时累积的 bootstrapping error,并减少 online fine-tune 时的 conservation(保守)。
    • proposed method 与 AWR 非常相似,但没有使用 Monte-Carlo 方法估计 behavior policy 的 value function,而是通过 bootstrapping 来估计当前策略的 Q 函数。
    • 实验:从人类演示和 off-policy data 中学习到困难 高维 奖励稀疏的 灵巧操纵问题,正文中是 MuJoCo 模拟器的三个问题。
  • 缺点:

    • novelty: incremental,貌似就是 AWR + fine-tune?(好像魔改了一点 AWR,但真的跟 AWR 很像)
    • 实验:实验并不能证明这种方法是合理的,AWAC 仅在 relocate-binary-v0 中优于其他方法,而在 Walker2d-v2 中一点都不好。ABM 几乎能获得相同的性能。()
    • 实验:貌似没有使用 D4RL?(后来又补实验了)
    • 写作:related work 仅罗列,没有讨论。
    • 贡献:online fine-tune 真的存在 bootstrapping error accumulation 的问题嘛?所以,提出的方法对 online training 真的有贡献嘛?

3 offline RL + online fine-tune 的挑战

  • section 3.2:在 data efficiency 方面,对于 online fine-tune,发现 on-policy fine-tune 和 Monte-Carlo return 的效率,比 off-policy 的 actor-critic 低。
  • section 3.3:对普通 actor-critic 算法,offline 2 online 会发生可怕的事情。
    • 在 replay buffer 里面放了一些 offline dataset,但 SACfD-prior 的性能跟 SAC-scratch(从头开始训,不能访问 offline data)类似,这表明 off-policy RL 其实不能直接利用 off-policy data(?)(原文说的好迷惑,感觉有点没道理)
    • (见图 3.2)SACfD-pretrain 是通过 behavior cloning 预训练的,结果一旦 online 训练,性能便迅速下降到没有训过的模样了()
  • 仍然主要因为,Q function 中 off-policy bootstrapping error 的 accumulation,即,对于在 offline data 里 unobserved 的 action 更新 Q function。
  • 为解决这种 extrapolation error,offline RL 会约束 policy update,使得 D(\(\pi\), \(\pi_\beta\)) ≤ ε,其中 \(\pi_\beta\) 是 offline behavior policy 的混合分布(比如使用一些 advantage weighted 混合)。
  • section 3.4:过于保守的 online learning。虽然 constraint offline RL 性能很好,但很难 online fine-tune(图 3.3)。
    • 当 offline 学到的 behavior model 不准确,或无法对新数据进行很好地建模时,受约束的优化(因为希望 online policy 的 action distribution 跟 offline policy 相近)会变得过于保守,导致 fine-tune 的改进有限。
    • 因此,我们需要一种 1. 防止 offline 不稳定、2. 防止 offline 的 bootstrap error 累积、3. online 不会过于保守 的 off-policy 算法,用于提供 offline 的训练起点。

4 method: AWAC

  • AWAC 貌似使用了 policy iteration 框架(policy update + policy evaluation)。
  • policy update:
    • 用 TD bootstrapping 去对 critic 的 value function 做 maximize update。但是,如果这样 naive 地做,可能会导致 3.4 节描述的 online fine-tune 性能无提升问题。
    • 我们通过限制 policy distribution 接近 actor 在 online update 期间迄今为止观察到的数据,来避免 bootstrapping error 的 accumulation,同时令新策略最大化 advantage。
  • policy update 的策略约束:
    • 根据 3.3 节,如果使用显式的 behavior model(?)来强制执行约束,fine-tune 性能会不好。因此,我们进行隐式约束。
    • 公式 8: \(\pi_{k+1}=\arg\max_a E[A^{\pi_k}(s,a)]\) ,最大化 advantage。
    • 公式 9: \(s.t. D_{KL}(\pi|\pi_\beta)\le \epsilon\) ,policy update 的约束。
    • 首先,写出公式 8 9 的拉格朗日, \(L(\pi,\lambda)=E_{a\sim\pi}[A(s,a)]+\lambda(\epsilon-D_{KL}(\pi(s)|\pi_\beta(s)))\) 。好像使用一些 KKT,能得到神奇闭式解, \(\pi^*(a|s)\propto \pi_\beta(a|s)\exp\big(\frac{1}{\lambda}A^{\pi_k}(s,a)\big)\) 。(看起来好像 AWR)
    • 公式 13:貌似是通过 argmax,直接更新 policy 的参数 θ。公式 13 声称,只需在 offline data + online 采到的 data 里采样即可,无需建模 behavior policy \(\pi_\beta\)
  • policy evaluation:
    • 公式 2 3:普通的 bellman update 计算 Q function。
    • \(BQ = r(s,a) + \gamma Q(s’,a’)\) 里的 s,a,s’ 都是从 β 里采样的。
    • 算法细节可以看 Appendix A.2。
  • 声称的 novelty:
    • 与 AWR [41] 相比,AWAC 使用 TD bootstrap,限制提高效率,甚至渐近提高性能。(没太看懂)
    • 与ABM [49]、MPO [2]、BEAR [30]、BCQ [14] 等 offline RL 相比,AWAC 不做 behavior policy 的 modelling(?)

6 experiment

出现了很像 Pieter Abbeel 组的 we aim to answer the following question。(这篇文章是 Sergey Levine 组的)

真机照片,有几张感觉拍的不够有质感()

MuJoCo 模拟器 [53] 中使用 28-DoF 五指手的复杂操作技能,用 25 个 human demo 训了一个 behavior cloning 的策略,然后用这个策略生成了 500 条轨迹。

实验结果没有仔细看。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。