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 条轨迹。

实验结果没有仔细看。

offline 2 online | AWAC:基于 AWR 的 policy update + online 补充数据集的更多相关文章

  1. ASP.NET Core MVC 2.x 全面教程_ASP.NET Core MVC 17. 基于Claim和Policy的授权 上

    首先补一下昨天没有讲的东西 只有管理员才能访问UserController RoleController都加上这个角色 Cliam 不是管理员角色的用户访问 cliam是name个Value值的键值对 ...

  2. ASP.NET Core MVC 2.x 全面教程_ASP.NET Core MVC 18. 基于Claim和Policy的授权 下 - 自定义Policy

    在加一个策略,要求cliam的值必须是123 第二个参数的类型 可变参数 ,可以是这三种类型 变成一个集合也可以 策略内置的几种方式 自定义 RequireAssetion的参数是个Func,Func ...

  3. 基于tensorflow的文本分类总结(数据集是复旦中文语料)

    代码已上传到github:https://github.com/taishan1994/tensorflow-text-classification 往期精彩: 利用TfidfVectorizer进行 ...

  4. Manually enable Appear Offline in Lync 2013 Preview via Registry

    refer to http://www.shudnow.net/2012/09/18/manually-enable-appear-offline-in-lync-2013-preview-via-r ...

  5. 基于 Java 2 运行时安全模型的线程协作--转

    在 Java 2 之前的版本,运行时的安全模型使用非常严格受限的沙箱模型(Sandbox).读者应该熟悉,Java 不受信的 Applet 代码就是基于这个严格受限的沙箱模型来提供运行时的安全检查.沙 ...

  6. Oracle性能调整ASH,AWR,ADDM

    ASH (Active Session History)ASH以V$SESSION为基础,每秒采样一次,记录活动会话等待的事件.不活动的会话不会采样,采样工作由新引入的后台进程MMNL来完成.ASH ...

  7. 基于.NET6的简单三层管理系统

    前言 笔者前段时间搬砖的时候,有了一个偷懒的想法:如果开发的时候,简单的CURD可以由代码生成器完成,相应的实体.服务都不需要再做额外的注册,这样开发人员可以省了很多事. 于是就开了这个项目,期望实现 ...

  8. 基于C#的机器学习--c# .NET中直观的深度学习

    在本章中,将会学到: l  如何使用Kelp.Net来执行自己的测试 l  如何编写测试 l  如何对函数进行基准测试 Kelp.Net是一个用c#编写的深度学习库.由于能够将函数链到函数堆栈中,它在 ...

  9. Policy Gradient Algorithms

    Policy Gradient Algorithms 2019-10-02 17:37:47 This blog is from: https://lilianweng.github.io/lil-l ...

  10. 基于正向扫描的并行区间连接平面扫描算法(IEEE论文)

    作者: Panagiotis Bouros ∗Department of Computer ScienceAarhus University, Denmarkpbour@cs.au.dkNikos M ...

随机推荐

  1. 数字孪生 3D 风电场,智慧风电之海上风电

    前言 截止 2021 年,全球已有 127 个国家做出了"碳中和"的承诺,能源低碳转型和实现碳中和已经成为全球共同的战略目标.根据权威机构预测,到 2050 年,可再生能源发电将占 ...

  2. 4、SpringBoot连接数据库引入druid

    系列导航 springBoot项目打jar包 1.springboot工程新建(单模块) 2.springboot创建多模块工程 3.springboot连接数据库 4.SpringBoot连接数据库 ...

  3. SpringCloud Alibaba Security安全认证

    一. Security配置(auth认证中心) 代码地址 https://github.com/typ1805/blog-cloud Spring Security是一套安全框架,可以基于RBAC(基 ...

  4. web - 解决 formdata 打印空对象

    获取单个值可以使用formData对象.get();而直接打印是看不到的.因为外界访问不到,你使用append方法后,对应的键值对就已经添加到表单里面了,你在控制台看到的是FormData原型,存储的 ...

  5. C#操作 excel 表格

    nuget引入: EPPlus.Core FileInfo file = new FileInfo(@"d:\test.xlsx"); using (ExcelPackage pa ...

  6. Linux-运行级别-init

  7. [转帖]已整理-shell内置字符串常用操作

    https://www.cnblogs.com/reachos/p/16803672.html bash 里面内置了一些常用的字符串操作: 1.字符串截取 a="abc" ${a: ...

  8. [转帖]Linux—微服务启停shell脚本编写模板

    https://www.jianshu.com/p/1e1080a39dc5 run.sh #!/bin/bash if [ -s java.pid ] then echo "重复启动,退出 ...

  9. [转帖] q命令-用SQL分析文本文件

    https://www.cnblogs.com/codelogs/p/16060830.html 简介# 在Linux上分析文本文件时,一般会使用到grep.sed.awk.sort.uniq等命令, ...

  10. Win10 查看无线局域网的密码

    1. 打开命令行 输入 control 打开控制面板 2. 进入网络和共享中心 3. 打开连接 4. 使用如下进行查看.