IEEE TKDE 2024
 paper
Introduction
O2O存在策略探索受限以及分布偏移问题,进而导致在线微调阶段样本效率低。文章提出OEMA算法首先使用离线数据训练乐观的探索策略,然后提出基于元学习的优化方法,减少分布偏移并提高O2O的适应过程。
Method

optimistic exploration strategy
离线学习方法TD3+BC的行为策略 
     
      
       
        
        
          π 
         
        
          e 
         
        
       
         ( 
        
       
         s 
        
       
         ) 
        
       
      
        \pi_e(s) 
       
      
    πe(s)是由目标策略 
     
      
       
        
        
          π 
         
        
          ϕ 
         
        
       
         ( 
        
       
         s 
        
       
         ) 
        
       
      
        \pi_\phi(s) 
       
      
    πϕ(s)加上一个正态分布中采样的噪声。文章指出,目标策略被优化靠近离线数据集的保守策略,为了提高目标策略的探索能力,本文提出基于价值不确定性度量的方法:
  
      
       
        
         
          
           
            
            
              π 
             
            
              e 
             
            
           
          
          
           
            
             
            
              = 
             
            
              arg 
             
            
               
             
             
              
              
                max 
               
              
                 
               
              
             
               π 
              
             
             
              
              
                Q 
               
              
                ^ 
               
              
              
              
                U 
               
              
                B 
               
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              π 
             
            
              ( 
             
            
              s 
             
            
              ) 
             
            
              ) 
             
            
              , 
             
            
           
          
         
         
          
           
            
            
              s 
             
            
              . 
             
            
              t 
             
            
              . 
             
            
           
          
          
           
            
             
             
             
               1 
              
             
               2 
              
             
            
              ∥ 
             
             
             
               π 
              
             
               ϕ 
              
             
            
              ( 
             
            
              s 
             
            
              ) 
             
            
              − 
             
            
              π 
             
            
              ( 
             
            
              s 
             
            
              ) 
             
            
              ∥ 
             
            
              ≤ 
             
            
              δ 
             
            
              , 
             
            
           
          
         
        
       
         \begin{aligned}\pi_{e}&=\arg\max_{\pi}\hat{Q}_{\mathrm{UB}}(s,\pi(s)),\\s.t.&\frac{1}{2}\|\pi_{\phi}(s)-\pi(s)\|\le\delta,\end{aligned} 
        
       
     πes.t.=argπmaxQ^UB(s,π(s)),21∥πϕ(s)−π(s)∥≤δ,
 其中 
     
      
       
        
         
         
           Q 
          
         
           ^ 
          
         
         
         
           U 
          
         
           B 
          
         
        
       
         ( 
        
       
         s 
        
       
         , 
        
       
         π 
        
       
         ( 
        
       
         s 
        
       
         ) 
        
       
         ) 
        
       
      
        \hat{Q}_{\mathrm{UB}}(s,\pi(s)) 
       
      
    Q^UB(s,π(s))为Q值的近似上界, 用来衡量认知不确定性。上述问题在保证策略约束的同时选择高不确信的动作。
不确信估计采用高斯分布。分布的均值为两个Q网络输出的均值,而方差表示如下:
  
      
       
        
         
          
           
            
             
             
               σ 
              
             
               Q 
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
              = 
             
             
              
               
               
                 ∑ 
                
                
                
                  i 
                 
                
                  = 
                 
                
                  1 
                 
                
                  , 
                 
                
                  2 
                 
                
               
               
               
                 1 
                
               
                 2 
                
               
              
                ( 
               
               
               
                 Q 
                
                
                
                  θ 
                 
                
                  i 
                 
                
               
              
                ( 
               
              
                s 
               
              
                , 
               
              
                a 
               
              
                ) 
               
              
                − 
               
               
               
                 μ 
                
               
                 Q 
                
               
              
                ( 
               
              
                s 
               
              
                , 
               
              
                a 
               
              
                ) 
               
               
               
                 ) 
                
               
                 2 
                
               
              
             
            
           
          
         
         
          
           
            
            
              = 
             
             
             
               1 
              
             
               2 
              
             
            
              ∣ 
             
             
             
               Q 
              
              
              
                θ 
               
              
                1 
               
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
              − 
             
             
             
               Q 
              
              
              
                θ 
               
              
                2 
               
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
              ∣ 
             
            
              . 
             
            
           
          
         
        
       
         \begin{gathered} \sigma_{Q}(s,a) =\sqrt{\sum_{i=1,2}\frac12(Q_{\theta_{i}}(s,a)-\mu_{Q}(s,a))^{2}} \\ =\frac12\Big|Q_{\theta_1}(s,a)-Q_{\theta_2}(s,a)\Big|. \end{gathered} 
        
       
     σQ(s,a)=i=1,2∑21(Qθi(s,a)−μQ(s,a))2=21 
                     Qθ1(s,a)−Qθ2(s,a) 
                     .
 那么 
     
      
       
        
         
         
           Q 
          
         
           ^ 
          
         
         
         
           U 
          
         
           B 
          
         
        
       
         = 
        
        
        
          μ 
         
        
          Q 
         
        
       
         ( 
        
       
         s 
        
       
         , 
        
       
         a 
        
       
         ) 
        
       
         + 
        
        
        
          β 
         
        
          UB 
         
        
        
        
          σ 
         
        
          Q 
         
        
       
         ( 
        
       
         s 
        
       
         , 
        
       
         a 
        
       
         ) 
        
       
      
        \hat{Q}_{\mathrm{UB}} =\mu_Q(s,a)+\beta_\text{UB}\sigma_Q(s,a) 
       
      
    Q^UB=μQ(s,a)+βUBσQ(s,a)。 
     
      
       
       
         β 
        
       
      
        \beta 
       
      
    β控制乐观程度,当取值-1时上式等价于:
  
      
       
        
         
          
           
            
           
          
          
           
            
             
             
              
              
                Q 
               
              
                ^ 
               
              
              
              
                U 
               
              
                B 
               
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
             
             
               ∣ 
              
              
               
               
                 β 
                
                
                
                  U 
                 
                
                  B 
                 
                
               
              
                = 
               
              
                − 
               
              
                1 
               
              
             
            
              = 
             
             
             
               μ 
              
             
               Q 
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
              − 
             
             
             
               σ 
              
             
               Q 
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
           
          
         
         
          
           
            
           
          
          
           
            
             
             
              
               
                
                 
                
               
               
                
                 
                  
                 
                   = 
                  
                  
                  
                    1 
                   
                  
                    2 
                   
                  
                 
                   ( 
                  
                  
                  
                    Q 
                   
                   
                   
                     θ 
                    
                   
                     1 
                    
                   
                  
                 
                   ( 
                  
                 
                   s 
                  
                 
                   , 
                  
                 
                   a 
                  
                 
                   ) 
                  
                 
                   + 
                  
                  
                  
                    Q 
                   
                   
                   
                     θ 
                    
                   
                     2 
                    
                   
                  
                 
                   ( 
                  
                 
                   s 
                  
                 
                   , 
                  
                 
                   a 
                  
                 
                   ) 
                  
                 
                   ) 
                  
                 
                   − 
                  
                  
                  
                    1 
                   
                  
                    2 
                   
                  
                 
                   ∣ 
                  
                  
                  
                    Q 
                   
                   
                   
                     θ 
                    
                   
                     1 
                    
                   
                  
                 
                   ( 
                  
                 
                   s 
                  
                 
                   , 
                  
                 
                   a 
                  
                 
                   ) 
                  
                 
                   − 
                  
                  
                  
                    Q 
                   
                   
                   
                     θ 
                    
                   
                     2 
                    
                   
                  
                 
                   ( 
                  
                 
                   s 
                  
                 
                   , 
                  
                 
                   a 
                  
                 
                   ) 
                  
                 
                   ∣ 
                  
                 
                
               
              
             
            
           
          
         
         
          
           
            
           
          
          
           
            
             
            
              = 
             
            
              min 
             
            
               
             
            
              ( 
             
             
             
               Q 
              
              
              
                θ 
               
              
                1 
               
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
              , 
             
             
             
               Q 
              
              
              
                θ 
               
              
                2 
               
              
             
            
              ( 
             
            
              s 
             
            
              , 
             
            
              a 
             
            
              ) 
             
            
              ) 
             
            
              , 
             
            
           
          
          
           
           
             (9) 
            
           
          
         
        
       
         \begin{aligned} &\hat{Q}_{\mathrm{UB}}(s,a)\Big|_{\beta_{\mathrm{UB}}=-1}=\mu_{Q}(s,a)-\sigma_{Q}(s,a) \\ &\begin{aligned}&=\frac{1}{2}(Q_{\theta_1}(s,a)+Q_{\theta_2}(s,a))-\frac{1}{2}|Q_{\theta_1}(s,a)-Q_{\theta_2}(s,a)|\end{aligned} \\ &=\min(Q_{\theta_{1}}(s,a),Q_{\theta_{2}}(s,a)),& \text{(9)} \end{aligned} 
        
       
     Q^UB(s,a) 
                      βUB=−1=μQ(s,a)−σQ(s,a)=21(Qθ1(s,a)+Qθ2(s,a))−21∣Qθ1(s,a)−Qθ2(s,a)∣=min(Qθ1(s,a),Qθ2(s,a)),(9)
 而当 
     
      
       
       
         β 
        
       
         = 
        
       
         1 
        
       
      
        \beta=1 
       
      
    β=1时等价于 
     
      
       
        
         
          
           
           
             Q 
            
           
             ^ 
            
           
           
           
             U 
            
           
             B 
            
           
          
         
           ( 
          
         
           s 
          
         
           , 
          
         
           a 
          
         
           ) 
          
         
           ∣ 
          
         
         
          
          
            β 
           
           
           
             U 
            
           
             B 
            
           
          
         
           = 
          
         
           1 
          
         
        
       
         = 
        
       
         max 
        
       
          
        
       
         ( 
        
        
        
          Q 
         
         
         
           θ 
          
         
           1 
          
         
        
       
         ( 
        
       
         s 
        
       
         , 
        
       
         a 
        
       
         ) 
        
       
         , 
        
        
        
          Q 
         
         
         
           θ 
          
         
           2 
          
         
        
       
         ( 
        
       
         s 
        
       
         , 
        
       
         a 
        
       
         ) 
        
       
         ) 
        
       
         , 
        
       
      
        \left.\hat{Q}_\mathrm{UB}(s,a)\right|_{\beta_\mathrm{UB}=1}=\max(Q_{\theta_1}(s,a),Q_{\theta_2}(s,a)), 
       
      
    Q^UB(s,a) 
              βUB=1=max(Qθ1(s,a),Qθ2(s,a)),
原问题一种简单的解决方法是使用BC将其转化为无约束问题:
  
      
       
        
         
         
           π 
          
         
           e 
          
         
           naive 
          
         
         
         
           ( 
          
         
           s 
          
         
           ) 
          
         
        
          = 
         
        
          arg 
         
        
           
         
         
          
          
            max 
           
          
             
           
          
         
           π 
          
         
         
          
          
            Q 
           
          
            ^ 
           
          
         
           UB 
          
         
         
         
           ( 
          
         
           s 
          
         
           , 
          
         
           π 
          
         
           ( 
          
         
           s 
          
         
           ) 
          
         
           ) 
          
         
        
          − 
         
        
          λ 
         
        
          ∥ 
         
         
         
           π 
          
         
           ϕ 
          
         
        
          ( 
         
        
          s 
         
        
          ) 
         
        
          − 
         
        
          π 
         
        
          ( 
         
        
          s 
         
        
          ) 
         
        
          ∥ 
         
        
       
         \pi_e^\text{naive}{ ( s ) }=\arg\max_{\pi}\hat{Q}_\text{UB}{ ( s , \pi ( s ) ) }-\lambda\|\pi_\phi(s)-\pi(s)\| 
        
       
     πenaive(s)=argπmaxQ^UB(s,π(s))−λ∥πϕ(s)−π(s)∥
 然而,由于目标策略通过策略改进不断更新,这种基于行为克隆的惩罚项无法缩小行为策略和目标策略之间的差距,违反了带约束的原问题。
为了解决该问题,提出在TD3的行为策略上增加一项扰动模型 
     
      
       
       
         ξ 
        
       
      
        \xi 
       
      
    ξ。行为策略改为
  
      
       
        
         
         
           π 
          
         
           e 
          
         
        
          ( 
         
        
          s 
         
        
          ) 
         
        
          = 
         
         
         
           π 
          
         
           ϕ 
          
         
        
          ( 
         
        
          s 
         
        
          ) 
         
        
          + 
         
         
         
           ξ 
          
         
           ω 
          
         
        
          ( 
         
        
          s 
         
        
          , 
         
         
         
           π 
          
         
           ϕ 
          
         
        
          ( 
         
        
          s 
         
        
          ) 
         
        
          ) 
         
        
          + 
         
        
          ϵ 
         
        
       
         \pi_e(s)=\pi_\phi(s)+\xi_\omega(s,\pi_\phi(s))+\epsilon 
        
       
     πe(s)=πϕ(s)+ξω(s,πϕ(s))+ϵ
 而对扰动模型的参数最小化下列损失函数
  
      
       
        
        
          L 
         
        
          ( 
         
        
          ω 
         
        
          ) 
         
        
          = 
         
        
          − 
         
         
         
           E 
          
          
          
            s 
           
          
            ∼ 
           
          
            B 
           
          
         
         
         
           [ 
          
          
           
           
             Q 
            
           
             ^ 
            
           
           
           
             U 
            
           
             B 
            
           
          
         
           ( 
          
         
           s 
          
         
           , 
          
          
          
            π 
           
          
            e 
           
          
         
           ( 
          
         
           s 
          
         
           ) 
          
         
           ) 
          
         
           ] 
          
         
        
       
         \mathcal{L}(\omega)=-\mathbb{E}_{s\sim\mathcal{B}}\left[\hat{Q}_{\mathrm{UB}}(s,\pi_e(s))\right] 
        
       
     L(ω)=−Es∼B[Q^UB(s,πe(s))]
Meta Adaptation for Distribution Shift Reduction
接着,为了解决在线微调存在的分布偏移问题,采用元学习的方法。具体的,保留两个buffer,Buffer B B B存储离线以及在线所有数据, B r B_r Br存储最新在线数据。
meta training
首先在B上训练策略:
  
      
       
        
         
         
           L 
          
          
          
            t 
           
          
            r 
           
          
            n 
           
          
         
        
          ( 
         
        
          ϕ 
         
        
          ) 
         
        
          = 
         
        
          − 
         
         
         
           E 
          
          
          
            s 
           
          
            ∼ 
           
          
            B 
           
          
         
         
         
           [ 
          
          
          
            Q 
           
           
           
             θ 
            
           
             1 
            
           
          
          
          
            ( 
           
          
            s 
           
          
            , 
           
           
           
             π 
            
           
             ϕ 
            
           
          
            ( 
           
          
            s 
           
          
            ) 
           
          
            ) 
           
          
         
           ] 
          
         
        
       
         \mathcal{L}_{trn}(\phi)=-\mathbb{E}_{s\sim\mathcal{B}}\left[Q_{\theta_1}\left(s,\pi_\phi(s)\right)\right] 
        
       
     Ltrn(ϕ)=−Es∼B[Qθ1(s,πϕ(s))]
 然后基于SGD的一次梯度下降得到: 
      
       
        
         
         
           ϕ 
          
         
           ′ 
          
         
        
          = 
         
        
          ϕ 
         
        
          − 
         
        
          α 
         
         
         
           ∇ 
          
         
           ϕ 
          
         
         
         
           L 
          
          
          
            t 
           
          
            r 
           
          
            n 
           
          
         
        
          ( 
         
        
          ϕ 
         
        
          ) 
         
        
       
         \phi^{\prime}=\phi-\alpha\nabla_{\phi}\mathcal{L}_{trn}(\phi) 
        
       
     ϕ′=ϕ−α∇ϕLtrn(ϕ)
meta test
然后利用最新在线数据集测试:
  
      
       
        
         
         
           L 
          
          
          
            t 
           
          
            s 
           
          
            t 
           
          
         
        
          ( 
         
         
         
           ϕ 
          
         
           ′ 
          
         
        
          ) 
         
        
          = 
         
        
          − 
         
         
         
           E 
          
          
          
            s 
           
          
            ∼ 
           
           
           
             B 
            
           
             r 
            
           
          
         
        
          [ 
         
         
         
           Q 
          
          
          
            θ 
           
          
            1 
           
          
         
        
          ( 
         
        
          s 
         
        
          , 
         
         
         
           π 
          
          
          
            ϕ 
           
          
            ′ 
           
          
         
        
          ( 
         
        
          s 
         
        
          ) 
         
        
          ) 
         
        
          ] 
         
        
       
         \mathcal{L}_{tst}(\phi')=-\mathbb{E}_{s\sim\mathcal{B}_r}[Q_{\theta_1}(s,\pi_{\phi'}(s))] 
        
       
     Ltst(ϕ′)=−Es∼Br[Qθ1(s,πϕ′(s))]
meta optimization
最后将上述两个损失函数用下面的元优化目标共同优化
  
      
       
        
        
          ϕ 
         
        
          = 
         
        
          arg 
         
        
           
         
         
          
          
            min 
           
          
             
           
          
         
           ϕ 
          
         
         
         
           L 
          
          
          
            t 
           
          
            r 
           
          
            n 
           
          
         
        
          ( 
         
        
          ϕ 
         
        
          ) 
         
        
          + 
         
        
          β 
         
         
         
           L 
          
          
          
            t 
           
          
            s 
           
          
            t 
           
          
         
        
          ( 
         
        
          ϕ 
         
        
          − 
         
        
          α 
         
         
         
           ∇ 
          
         
           ϕ 
          
         
         
         
           L 
          
          
          
            t 
           
          
            r 
           
          
            n 
           
          
         
        
          ( 
         
        
          ϕ 
         
        
          ) 
         
        
          ) 
         
        
       
         \phi=\arg\min_\phi\mathcal{L}_{trn}(\phi)+\beta\mathcal{L}_{tst}(\phi-\alpha\nabla_\phi\mathcal{L}_{trn}(\phi)) 
        
       
     ϕ=argϕminLtrn(ϕ)+βLtst(ϕ−α∇ϕLtrn(ϕ))
问题
- 原文中在meta optimization中对 
      
       
        
        
          ϕ 
         
        
       
         \phi 
        
       
     ϕ梯度更新是否修正为:
 ϕ ← ϕ − α ∂ ( L t r n ( ϕ ) + β L t s t ( ϕ − α ∇ ϕ L t r n ( ϕ ) ) ) ∂ ϕ \phi\leftarrow\phi-\alpha\frac{\partial\left(\mathcal{L}_{trn}\left(\phi\right) +\beta\mathcal{L}_{tst}\left(\phi-\alpha\nabla_{\phi}\mathcal{L}_{trn}\left(\phi\right)\right)\right)}{\partial\phi} ϕ←ϕ−α∂ϕ∂(Ltrn(ϕ)+βLtst(ϕ−α∇ϕLtrn(ϕ)))
- 基于这个偏导出现的第二个问题。这是源码中元学习的训练过程
# Compute actor losse
            actor_loss = -self.critic.Q1(state, self.actor(state)).mean()
            """ Meta Training"""
            self.actor_optimizer.zero_grad()
            actor_loss.backward(retain_graph=True)
            self.hotplug.update(3e-4)
            """Meta Testing"""
            self.beta = max(0.0, self.beta - self.anneal_step)
            meta_actor_loss = -self.critic.Q1(meta_state, self.actor(meta_state)).mean()
            weight = self.beta * actor_loss.detach() / meta_actor_loss.detach()
            meta_actor_loss_norm = weight * meta_actor_loss
            meta_actor_loss_norm.backward(create_graph=True)
            """Meta Optimization"""
            self.actor_optimizer.step()
            self.hotplug.restore()
其中,meta-testing中计算weight以及meta_actor_loss_norm不太明白。按照本人的理解,原文计算 
     
      
       
        
        
          L 
         
         
         
           t 
          
         
           s 
          
         
           t 
          
         
        
       
      
        L_{tst} 
       
      
    Ltst对 
     
      
       
       
         ϕ 
        
       
      
        \phi 
       
      
    ϕ求偏导:
  
      
       
        
         
          
          
            β 
           
           
           
             ∂ 
            
           
           
           
             L 
            
            
            
              t 
             
            
              s 
             
            
              t 
             
            
           
           
           
             ( 
            
           
             ϕ 
            
           
             − 
            
           
             α 
            
            
            
              ∇ 
             
            
              ϕ 
             
            
            
            
              L 
             
             
             
               t 
              
             
               r 
              
             
               n 
              
             
            
            
            
              ( 
             
            
              ϕ 
             
            
              ) 
             
            
           
             ) 
            
           
          
          
          
            ∂ 
           
          
            ϕ 
           
          
         
        
          = 
         
        
          β 
         
         
          
           
           
             ∂ 
            
           
           
           
             L 
            
            
            
              t 
             
            
              s 
             
            
              t 
             
            
           
           
           
             ( 
            
           
             ϕ 
            
           
             − 
            
           
             α 
            
            
            
              ∇ 
             
            
              ϕ 
             
            
            
            
              L 
             
             
             
               t 
              
             
               r 
              
             
               n 
              
             
            
            
            
              ( 
             
            
              ϕ 
             
            
              ) 
             
            
           
             ) 
            
           
          
          
          
            ∂ 
           
           
           
             ϕ 
            
           
             ′ 
            
           
          
         
         
          
          
            ∂ 
           
           
           
             ϕ 
            
           
             ′ 
            
           
          
          
          
            ∂ 
           
          
            ϕ 
           
          
         
        
       
         \frac{\beta{\color{red}\partial}\mathcal{L}_{tst}\left(\phi-\alpha\nabla_{\phi}\mathcal{L}_{trn}\left(\phi\right)\right)}{\partial\phi}=\beta\frac{{\color{red}\partial}\mathcal{L}_{tst}\left(\phi-\alpha\nabla_{\phi}\mathcal{L}_{trn}\left(\phi\right)\right)}{\partial\phi'}\frac{\partial\phi'}{\partial\phi} 
        
       
     ∂ϕβ∂Ltst(ϕ−α∇ϕLtrn(ϕ))=β∂ϕ′∂Ltst(ϕ−α∇ϕLtrn(ϕ))∂ϕ∂ϕ′
 中间的偏导自然是由meta-test小节的损失函数所得到的meta_actor_loss。而 
     
      
       
       
         β 
        
        
         
         
           ∂ 
          
          
          
            ϕ 
           
          
            ′ 
           
          
         
         
         
           ∂ 
          
         
           ϕ 
          
         
        
       
         = 
        
       
         β 
        
        
         
         
           ∂ 
          
          
          
            L 
           
           
           
             t 
            
           
             s 
            
           
             t 
            
           
          
         
         
         
           ∂ 
          
         
           ϕ 
          
         
        
       
         / 
        
        
         
         
           ∂ 
          
          
          
            L 
           
           
           
             t 
            
           
             s 
            
           
             t 
            
           
          
         
         
         
           ∂ 
          
          
          
            ϕ 
           
          
            ′ 
           
          
         
        
       
         = 
        
       
         β 
        
        
         
         
           ∂ 
          
          
          
            L 
           
           
           
             t 
            
           
             r 
            
           
             n 
            
           
          
         
         
         
           ∂ 
          
         
           ϕ 
          
         
        
       
         / 
        
        
         
         
           ∂ 
          
          
          
            L 
           
           
           
             t 
            
           
             r 
            
           
             n 
            
           
          
         
         
         
           ∂ 
          
          
          
            ϕ 
           
          
            ′ 
           
          
         
        
       
      
        \beta\frac{\partial\phi'}{\partial\phi}=\beta\frac{\partial L_{tst}}{\partial\phi}/\frac{\partial L_{tst}}{\partial\phi'}=\beta\frac{\partial L_{trn}}{\partial\phi}/\frac{\partial L_{trn}}{\partial\phi'} 
       
      
    β∂ϕ∂ϕ′=β∂ϕ∂Ltst/∂ϕ′∂Ltst=β∂ϕ∂Ltrn/∂ϕ′∂Ltrn就是那个weight。
 但这样应该使用从相同的Buffer中获得状态数据,这并未在源码中体现。
可能有误,欢迎指正



















