【5分钟 Paper】Prioritized Experience Replay

简介: 【5分钟 Paper】Prioritized Experience Replay
  • 论文题目:Prioritized Experience Replay

所解决的问题?

  Experience replay能够让强化学习去考虑过去的一些经验,在【1】这篇文章之前通常采用随机采样的方式在记忆库中采样。但是有一些记忆比较关键,因此随机采样的方式就不太好。作者提出了一种prioritizing experience的方式,来提高学习的效率。

  • 参考文献【1】:Lin, Long-Ji. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8(3-4):293–321, 1992.

背景

  之前的做法像DQN基本上都是从记忆库中sample一些experience data出来之后给model update一次之后就被丢弃了。但是这里会有些问题,就是如果采样方式比较好的话一来会切断数据之间的相关性,二来,对于一些相似度高的数据可以少采样一点,而很少见的数据可以多拿来更新几次。

  作者从以下文献获得灵感:

  Experiences with high magnitude TD error also appear to be replayed more often(Singer & Frank, 2009; McNamara et al., 2014).

  • 参考文献1:Singer, Annabelle C and Frank, Loren M. Rewarded outcomes enhance reactivation of experience in the hippocampus (海马体). Neuron, 64(6):910–921, 2009
  • 参考文献2:McNamara, Colin G, Tejero-Cantero, ´Alvaro, Trouche, St´ephanie, Campo-Urriza, Natalia, and Dupret, David. Dopaminergic neurons promote hippocampal reactivation and spatial memory persistence. Nature neuroscience, 2014.

  The TD error provides one way to measure these priorities (van Seijen & Sutton, 2013). 作者将这种方法用于model-free的强化学习中,而非model-base的方法中。

  • van Seijen, Harm and Sutton, Richard. Planning by prioritized sweeping with small backups. In Proceedings of The 30th International Conference on Machine Learning, pp. 361–369, 2013.

  做replay memory之前我们需要明确两个点。选择什么样的experiences去存储,选择什么样的experiencereplay,怎么实现?作者只解决后面这个问题。

所采用的方法?

   prioritized replay 中一个核心的问题就是如何来选择这个transition (s,a,r,s'),作者采用TD-error来衡量transition的重要性(how far the value is from its next-step bootstrap estimate (Andre et al., 1998))。

  • 参考文献1:Andre, David, Friedman, Nir, and Parr, Ronald. Generalized prioritized sweeping. In Advances in Neural Information Processing Systems. Citeseer, 1998.

  greedy TD-error prioritization会产生一些问题:1. TD-error的样本可能永远不会被采样到;2. 整个算法对噪声会非常敏感;3. TD-error大的样本很容易使得神经网络过拟合(因为一直采样TD-error大的样本)。

  • stochastic sampling method

  基于以上几点,作者提出stochastic sampling method,介于pure greedy prioritizationuniform random sampling之间的一种采样方法。the probability of sampling transition i ii as:

image.png

 其中p i > 0 p_{i} >0pi>0, is the priority of transition i ii,指数α \alphaα determines how much prioritization is used,当α = 0 \alpha =0α=0时,就是随机选(uniform case)。

  对于上述的P ( i ) P(i)P(i),作者提出了两个变种:

image.png

  对于上述算法的实现细节:如下所示:

  • For the rank-based variant:我们可以用一个分段线性函数来近似累积密度函数,k kk段的概率是相等的。分段边界可以预先计算出来(因为只与N NNα \alphaα有关系)。在运行时,我们选择一个片段,然后在这个片段中的所有transition中均匀地采样。选k kkminibatch的大小,从每一个片段中选出一个transition-这是一种分层抽样,可以平衡minibatch。意思就是先划分片段,然后从里面随机抽。

  • Proportional prioritization

  • Annealing the bias(为减少bias)

  随机更新对期望值的估计依赖于与预期相同的分布相对应的更新。优先重放机制引入了bias,它以一种不受控制的方式改变了这个分布,因此改变收敛结果(即使策略和状态分布是固定的)。通过引入importance-sample (IS) weights来弥补:

image.png

其中1 N \frac{1}{N}N1表示样本最开始服从的分布,1 P ( i ) \frac{1}{P(i)}P(i)1表示的是样本引入优先级之后的分布。但是我们就是要做有偏估计,所以引入β \betaβ系数控制有偏和无偏的量,一旦有偏估计之后算法收敛性无法保证,因此可以随着迭代次数增加β \betaβ慢慢变成1。

  算法伪代码如下图所示:

取得的效果?

  可以看出,rank-based的方法和proportional的方法都能加速收敛。

所出版信息?作者信息?

  这篇文章是ICLR2016上面的一篇文章。第一作者Tom SchaulGoogle DeepMindSenior research ScientistPostDoc at New York University from 2011-2013, PhD Student at IDSIA from 2007-2011。

参考链接

扩展阅读

  1. Some transitions may not be immediately useful to the agent,but might become so when the agent competence increases (Schmidhuber,1991).
  • 参考文献:Schmidhuber, J¨urgen. Curious model-building control systems. In Neural Networks, 1991. 1991 IEEE International Joint Conference on, pp. 1458–1463. IEEE, 1991.
  1. TD-errors同时也有被用于 explore (White et al., 2014) or which features to select (Geramifard et al., 2011; Sun et al., 2011)
  • 参考文献 1:White, Adam, Modayil, Joseph, and Sutton, Richard S. Surprise and curiosity for big data robotics. In Workshops at the Twenty-Eighth AAAI Conference on Artificial Intelligence, 2014.
  • 参考文献 2 Geramifard, Alborz, Doshi, Finale, Redding, Joshua, Roy, Nicholas, and How,Jonathan. Online discovery of feature dependencies . In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 881–888, 2011.
  • 参考文献 3:Sun, Yi, Ring, Mark, Schmidhuber, J¨urgen, and Gomez, Faustino J. Incremental basis construction from temporal difference error. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 481–488, 2011.

我的微信公众号名称:深度学习与先进智能决策

微信公众号ID:MultiAgent1024

公众号介绍:主要研究分享深度学习、机器博弈、强化学习等相关内容!期待您的关注,欢迎一起学习交流进步!


相关文章
|
机器学习/深度学习 编解码 人工智能
Reading Notes: Human-Computer Interaction System: A Survey of Talking-Head Generation
由于人工智能的快速发展,虚拟人被广泛应用于各种行业,包括个人辅助、智能客户服务和在线教育。拟人化的数字人可以快速与人接触,并在人机交互中增强用户体验。因此,我们设计了人机交互系统框架,包括语音识别、文本到语音、对话系统和虚拟人生成。接下来,我们通过虚拟人深度生成框架对Talking-Head Generation视频生成模型进行了分类。同时,我们系统地回顾了过去五年来在有声头部视频生成方面的技术进步和趋势,强调了关键工作并总结了数据集。 对于有关于Talking-Head Generation的方法,这是一篇比较好的综述,我想着整理一下里面比较重要的部分,大概了解近几年对虚拟人工作的一些发展和
《Improving Real-Time Performance by Utilizing Cache Allocation Technology》电子版地址
Improving Real-Time Performance by Utilizing Cache Allocation Technology
85 0
《Improving Real-Time Performance by Utilizing Cache Allocation Technology》电子版地址
|
机器学习/深度学习 数据采集 人工智能
Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
|
机器学习/深度学习 自然语言处理 PyTorch
Re6:读论文 LeSICiN: A Heterogeneous Graph-based Approach for Automatic Legal Statute Identification fro
Re6:读论文 LeSICiN: A Heterogeneous Graph-based Approach for Automatic Legal Statute Identification fro
Re6:读论文 LeSICiN: A Heterogeneous Graph-based Approach for Automatic Legal Statute Identification fro
Don't give me five!
Don't give me five!
94 0
Delivery Automatic Creation for UB type STO
Delivery Automatic Creation for UB type STO
Delivery Automatic Creation for UB type STO
|
JavaScript 前端开发
Guidelines for Function Compute Development - Troubleshoot Timeout Issues
Endless codes and endless bugs When you write code, you may inadvertently introduce some hidden bugs, even if you test a large proportion of the codes to the maximum extent possible.
1637 0
Uptime And Monitoring Strategies For Cloud-Based E-Commerce Applications/Websites
In order to keep your e-commerce site functioning properly, you need to take positive steps to monitor both its performance and functionality.
1516 0