type
status
date
slug
summary
tags
category
icon
password
Property
Nov 17, 2024 05:22 PM
paper: Sample Efficient Actor-Critic with Experience Replay (ICLR 2017)
retrace(truncated IS ratio on Q)+TRPO
the first to consider Retrace in the policy
Importance weight truncation with bias correctiontruncation with bias correction trickEfficient TRPOtrainingNetwork for continuous action spacecriticactortraining
Importance weight truncation with bias correction
Retrace estimator for off-policy, 其递推公式如下:


Note:
- 这里只考虑了.
- 这里表示MC estimator,
Retrace这种估计是有bias的, 但属于contraction mapping, 最终会收敛到真实值.
truncation with bias correction trick
recall: Off-PAC的off-policy policy gradient采用marginal distribution:

可以将其转化为下式:

proof:
可以证明

Note:
- 这里修正的是policy gradient, 因为其第一项也采用了truncated IS, 因此policy gradient会有误差, 所以使用第二项作为correction term保证最终的policy gradient estimate是unbiased.
- 补充: 注意这里还是基于off-pac的off-policy policy gradient, 只修正了当前时刻下action dist在使用behavior policy后的影响, 对marginal state分布的不一致并没有修正.
对value的估计(Critic的学习)则还是使用Retrace不变: 单次MSE更新有bias, 但是contraction mapping保证最终收敛到正确的fixed point; 因为Policy实质上使用的是我们自己建模的Critic来进行, 所以用在policy gradient中, 我们假设其是无偏的.
我们使用network 对correction term中的进行建模

Note: 作者称公式(8)为 truncation with bias correction trick
然后通过采样trajectory, 获得policy gradient estimate(off-policy ACER gradient):

Note: 这里还建模了baseline 用于减小方差.
Efficient TRPO

average policy network: a running average of past policies and forces the updated policy to not deviate far from this average

为了使用trust region, 这里采用和TRPO不同的策略, 使用一个linear constraint

Note: 我们最终使用作为最终的梯度
每个training iter分两个阶段
- 根据公式(9)计算原始梯度, 并根据公式(12)得到.
- 根据chain rule计算最终梯度zu
remark: the algorithm advanced in this section can be thought of as a general strategy for modifying the backward messages in back-propagation so as to stabilize the activations
training
Note: 上述算法都是针对离散工作空间任务的, eg: Atari
作者采用了类似A3C的算法,

Note: 可以看到训练过程会混合on-policy update和off-policy update(更新次数更多), 也可以看作训练时混合on-policy和off-policy数据(比重更多).

Note: 只需要建模policy和Q
文中没有过多描述该网络结构,
对Atari游戏, 应该是类似A3C的Conv结构, 输入为image state S, 卷积后面跟不同的FC分别输出policy action logits和Q(二者输出是同维度的).
思考: 这里policy和Q没有显示地相互对应, 因为二者输出维度相同, 向量每个元素的order应该也保持相同比较好?
Network for continuous action space
Note: 离散动作空间的设计见上, 以下都是在连续动作空间task中考虑的, 需要额外一些设计
critic
new arch: Stochastic Dueling Networks (SDNs)

网络结构类似Dueling DQN, 最后输出的为V(x)和A(x,a), 然后合成出Q:

Note: 因为连续动作空间, 不能枚举所有action a对于的A(x,a), 所以只能使用采样的方法进行计算, 这点和Dueling DQN(只用在离散动作空间)略有不同; 也是架构名称中stochastic的由来
本文使用如下target来estimate V:

推导(using the truncation and bias correction trick):

Note: 即这里使用作为baseline构造A(), 再用V来补齐
对target Q:

recall: 在连续动作空间中,Retrace使用的是两边policy概率的微分之比
implementation:
因为Q和V是在同一个网络上的, 所以对相同的参数分布计算和Target V和Target Q之间的MSE作为loss.
actor

Note: 这里即, 即no truncation

缺点: is only a contraction if the target and behavior policies are close to each other;
可参考Retrace中论述
作者也论述了为什么在continuous action中用:
more efficient: could better utilize the returns as the traces are not cut by the truncated importance weights.
作者的实验也证明了在continuous control中学习更快
补充: 这篇论文也论述了不用IS的好处
training
