SRM 论文阅读

0.SRM 的论文信息

1.介绍

介绍中提到了传统强化学习并不存在测试与训练中的分布的差距 (gap),同时也用图 1 详细展示了图像识别任务与强化学习任务中对于图像处理要求的不同。同时也不难想到,数据增强应该能帮助进行这种强化学习泛化的学习。

图 1 .对于图像识别任务(左),原始图像 <math xmlns="http://www.w3.org/1998/Math/MathML"> o o </math>o 和翻转图像 <math xmlns="http://www.w3.org/1998/Math/MathML"> o ^ \hat{o} </math>o^ 的特征对于分类是不变的。相比之下,对于 RL 中的 cartpole 摆动任务 (右),其目标是摆动一个未驱动的极点,这种不变特征将引导策略网络输出 <math xmlns="http://www.w3.org/1998/Math/MathML"> o o </math>o和 <math xmlns="http://www.w3.org/1998/Math/MathML"> o ^ \hat{o} </math>o^ 的相同动作。然而,对于 <math xmlns="http://www.w3.org/1998/Math/MathML"> o ^ \hat{o} </math>o^,更好的动作是将反向力应用于这个购物车基以保持摆动。因此, <math xmlns="http://www.w3.org/1998/Math/MathML"> o o </math>o 的预收集动作和奖励对于 <math xmlns="http://www.w3.org/1998/Math/MathML"> o ^ \hat{o} </math>o^ 来说并不准确。

文章因此从频域的角度研究基于图像的 RL 的泛化。作者的动机源于最近对计算机视觉的傅立叶分析的研究 : 不同类型的空间损坏会影响模型对不同频率范围的鲁棒性。例如,高频数据增强 (例如随机高斯噪声) 使模型偏向于利用输入中的低频信息,并提高对高频损坏的鲁棒性。此外,基于单一空间的数据增强很少提高具有不同频率特征的损坏类型的模型鲁棒性。受这种现象的启发,作者推测观察到的相同 RL 任务的傅里叶统计数据在不同的环境分布上也有所不同。在图 2 中,作者可视化了 DeepMind 控制套件上原始环境的观测频谱幅度以及 4 个移位环境分布之间的平均增量。移位的环境与原始环境表现出不同的频谱差异,每个环境在不同的频率区域是不同的。知道深度模型往往倾向于对某些频带产生偏差,作者假设环境分布之间的不同频谱模式是基于图像的 RL 泛化的关键挑战。

基于上述分析,作者通过引入频谱随机掩蔽 (SRM) 正则化来关注基于频率的增强,而不是基于空间的增强,如图 3 所示。作者提出的 SRM 可以很容易地兼容大多数现有的 RL 基准。为了防止模型关注输入图像上的某个频率范围,SRM 在训练阶段随机丢弃观测的偏频,迫使策略选择具有剩余信息的适当动作。通过这种方式,作者可以通过考虑整个频率分布来增加对不同损坏 (高、中或低频特征) 的鲁棒性。具体来说,输入观察由三个步骤操作 : (1) 快速傅里叶变换 (FFT),(2) 频谱随机掩蔽,(3) 傅里叶逆变换 (IFFT),在保持主要内容的同时增强了训练观察的多样性。

2.背景和方法演化

图 2 .四种移位环境的原始环境观测 <math xmlns="http://www.w3.org/1998/Math/MathML"> E [ ∥ F ( O ) ∥ ] \mathbb{E}[\|\mathcal{F}(\mathcal{O})\|] </math>E[∥F(O)∥] 的频谱幅度和观测频谱幅度差 <math xmlns="http://www.w3.org/1998/Math/MathML"> E [ ∥ F ( O − D ( O ) ) ∥ ] \mathbb{E}[\|\mathcal{F}(\mathcal{O}-\mathcal{D}(\mathcal{O}))\|] </math>E[∥F(O−D(O))∥]。 <math xmlns="http://www.w3.org/1998/Math/MathML"> F \mathcal{F} </math>F 是二维傅里叶变换, <math xmlns="http://www.w3.org/1998/Math/MathML"> D \mathcal{D} </math>D 是环境移位函数。每个环境的样本观察图像被放置在相应光谱图的左侧。DeepMind Control 套件中 cartpole swing 任务共有 500K 帧用于计算,并对结果进行平均。

强化学习的设定 RL问题通常被描述为马尔可夫决策过程(MDP) <math xmlns="http://www.w3.org/1998/Math/MathML"> M = < S , A , P , R , γ > \mathcal{M}=<\mathcal{S}, \mathcal{A}, \mathcal{P}, \mathcal{R}, \gamma> </math>M=<S,A,P,R,γ>,其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> S \mathcal{S} </math>S 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> A \mathcal{A} </math>A 分别表示状态空间和动作空间。 <math xmlns="http://www.w3.org/1998/Math/MathML"> P ( s t + 1 ∣ s t , a t ) \mathcal{P}\left(s_{t+1} \mid s_t, a_t\right) </math>P(st+1∣st,at) 是状态转换, <math xmlns="http://www.w3.org/1998/Math/MathML"> R ( s t , a t ) R\left(s_t, a_t\right) </math>R(st,at) 是奖励函数, <math xmlns="http://www.w3.org/1998/Math/MathML"> γ ∈ [ 0 , 1 ) \gamma \in[0,1) </math>γ∈[0,1) 是折扣因子。在这里,作者考虑连续控制任务的部分可观察 MDP (POMDP) <math xmlns="http://www.w3.org/1998/Math/MathML"> M = < O , A , P , R , γ > \mathcal{M}=<\mathcal{O}, \mathcal{A}, \mathcal{P}, \mathcal{R}, \gamma> </math>M=<O,A,P,R,γ>,因为 <math xmlns="http://www.w3.org/1998/Math/MathML"> S \mathcal{S} </math>S 通常不是直接从原始图像中获得的,其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> O \mathcal{O} </math>O 是图像的高维观察空间。按照约定,POMDP 通过将几个连续的环境帧 <math xmlns="http://www.w3.org/1998/Math/MathML"> { o t , o t − 1 , o t − 2 } \left\{o_t, o_{t-1}, o_{t-2}\right\} </math>{ot,ot−1,ot−2} 堆叠为单个状态 <math xmlns="http://www.w3.org/1998/Math/MathML"> s t ∈ O s_t \in \mathcal{O} </math>st∈O,转换为MDP。

典型 RL 的目标是找到最优策略 <math xmlns="http://www.w3.org/1998/Math/MathML"> π θ ∗ \pi_\theta^* </math>πθ∗,使 MDPs 整个分布的预期累积奖励最大化 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> J ( π ) = ∑ t E ( s t , a t ) ∼ ρ π [ r ( s t , a t ) ] , (1) J(\pi)=\sum_t \mathbb{E}{\left(s_t, a_t\right) \sim \rho\pi}\left[r\left(s_t, a_t\right)\right], \tag{1} </math>J(π)=t∑E(st,at)∼ρπ[r(st,at)],(1)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> ρ π ( s t , a t ) \rho_\pi\left(s_t, a_t\right) </math>ρπ(st,at) 是轨迹分布的状态-动作边缘。在这项工作中,作者不考虑在单个 MDP 上学习最优策略,而是考虑一个可推广的 <math xmlns="http://www.w3.org/1998/Math/MathML"> π θ \pi_{\theta} </math>πθ,它能够在一组MDPs <math xmlns="http://www.w3.org/1998/Math/MathML"> M = < O ‾ , A , P , R , γ > \mathcal{M}=<\overline{\mathcal{O}}, \mathcal{A}, \mathcal{P}, \mathcal{R}, \gamma> </math>M=<O,A,P,R,γ> 上获得高折现收益,其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> O ‾ \overline{\mathcal{O}} </math>O 中的观测值在训练中不可见。

SAC 算法 SAC 是一种流行的连续控制任务的非策略方法。它学习了一个状态-动作值函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q ( s , a ) Q(s, a) </math>Q(s,a) 和一个随机策略 <math xmlns="http://www.w3.org/1998/Math/MathML"> π ( a ∣ s ) \pi(a \mid s) </math>π(a∣s),以基于最大熵 RL 框架找到最佳策略 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> J ( π ) = ∑ t E ( s t , a t ) ∼ ρ π [ r ( s t , a t ) + α H ( π ( ⋅ ∣ s t ) ) ] , (2) J(\pi)=\sum_t \mathbb{E}{\left(s_t, a_t\right) \sim \rho\pi}\left[r\left(s_t, a_t\right)+\alpha \mathcal{H}\left(\pi\left(\cdot \mid s_t\right)\right)\right], \tag{2} </math>J(π)=t∑E(st,at)∼ρπ[r(st,at)+αH(π(⋅∣st))],(2)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> α \alpha </math>α 是温度参数,它决定了熵项对奖励的相对重要性。 <math xmlns="http://www.w3.org/1998/Math/MathML"> α \alpha </math>α 将 SAC 退化为传统的 RL。 <math xmlns="http://www.w3.org/1998/Math/MathML"> H ( ⋅ ) \mathcal{H}(\cdot) </math>H(⋅) 通过使动作输出尽可能多样化而不是集中在一个动作上,为探索和鲁棒性提供了实质性的改进。特别是, <math xmlns="http://www.w3.org/1998/Math/MathML"> Q ( s , a ) Q(s, a) </math>Q(s,a) 通过最小化软贝尔曼残差来近似 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> J Q = E ( s t , a t ) ∼ D ( Q ( s t , a t ) − ( r t + γ V ˉ ( s t + 1 ) ) ) 2 , (3) J_Q=\mathbb{E}{\left(s_t, a_t\right) \sim \mathcal{D}}\left(Q\left(s_t, a_t\right)-\left(r_t+\gamma \bar{V}\left(s{t+1}\right)\right)\right)^2, \tag{3} </math>JQ=E(st,at)∼D(Q(st,at)−(rt+γVˉ(st+1)))2,(3)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> D \mathcal{D} </math>D 表示重放缓冲区, <math xmlns="http://www.w3.org/1998/Math/MathML"> V ˉ ( s t + 1 ) \bar{V}\left(s_{t+1}\right) </math>Vˉ(st+1) 是软目标值网络,近似为 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> V ˉ s t + 1 = E a t + 1 ∼ π [ Q ˉ ( s t + 1 , a t + 1 ) − α log ⁡ π ( a t + 1 ∣ s t + 1 ) ] , (4) \bar{V} s_{t+1}=\mathbb{E}{a{t+1} \sim \pi}\left[\bar{Q}\left(s_{t+1}, a_{t+1}\right)-\alpha \log \pi\left(a_{t+1} \mid s_{t+1}\right)\right], \tag{4} </math>Vˉst+1=Eat+1∼π[Qˉ(st+1,at+1)−αlogπ(at+1∣st+1)],(4)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> Q ˉ \bar{Q} </math>Qˉ 是目标 Q 函数,权重可以是 Q 中权重的指数移动平均值。在策略改进步骤中,通过最小化策略与软 Q 函数的指数之间的差异来更新策略 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> J π = E s t ∼ D [ D K L ( π ( ⋅ ∣ s t ) ∥ exp ⁡ ( Q ( s t , ⋅ ) ) Z ( s t ) ) ] , (5) J_\pi=\mathbb{E}{s_t \sim \mathcal{D}}\left[D{K L}\left(\pi\left(\cdot \mid s_t\right) \| \frac{\exp \left(Q\left(s_t, \cdot\right)\right)}{Z\left(s_t\right)}\right)\right], \tag{5} </math>Jπ=Est∼D[DKL(π(⋅∣st)∥Z(st)exp(Q(st,⋅)))],(5)

3.方法论

图 3.SRM的框架和几个例子。对于三个连续的观察,SRM 分别被用作数据增强。有三种掩蔽策略,包括直接擦除、受噪声干扰或交换的干扰。在训练期间,掩蔽策略、位置和比率可以动态变化。

3.1 频谱随机掩蔽

作者首先介绍如何通过本节中的频谱随机掩蔽策略生成新的样本。假设有一个灰度图像观测 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i ∈ R H × W o_i \in \mathbb{R}^{H \times W} </math>oi∈RH×W (对于 RGB 图像,将同样的操作用在每个颜色通道),傅里叶域谱 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( o i ) \mathcal{F}\left(o_i\right) </math>F(oi) 可以通过快速傅里叶变换计算 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> F ( o i ) ( u , v ) = ( ∑ h = 0 H − 1 ∑ w = 0 W − 1 o i ( h , w ) e − j 2 π ( u h / H + v w / W ) ) , (6) \mathcal{F}\left(o_i\right)(u, v)=\left(\sum_{h=0}^{H-1} \sum_{w=0}^{W-1} o_i(h, w) e^{-j 2 \pi(u h / H+v w / W)}\right), \tag{6} </math>F(oi)(u,v)=(h=0∑H−1w=0∑W−1oi(h,w)e−j2π(uh/H+vw/W)),(6)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> u ∈ [ 0 , H − 1 ] u \in[0, H-1] </math>u∈[0,H−1] 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> v ∈ [ 0 , W − 1 ] v \in[0, W-1] </math>v∈[0,W−1] 是频域分量的水平和垂直索引, <math xmlns="http://www.w3.org/1998/Math/MathML"> o i ( h , w ) o_i(h, w) </math>oi(h,w) 是位置 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( h , w ) (h, w) </math>(h,w) 处的像素值。请注意,下标 i 只是样本的索引,与时间步长无关。为了更好地处理和可视化,作者使用放置在频谱中心的最低频率分量的 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( o i ) \mathcal{F}\left(o_i\right) </math>F(oi) 的移位版本。


补充 : 关于傅里叶变化 (Fourier transform)

  • 连续傅里叶级数推导 : 对于周期为 <math xmlns="http://www.w3.org/1998/Math/MathML"> P P </math>P 的函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> s ( x ) s(x) </math>s(x)

    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> s ( x ) ∼ A 0 + ∑ n = 1 ∞ ( A n cos ⁡ ( 2 π n x P ) + B n sin ⁡ ( 2 π n x P ) ) {\displaystyle s(x)\sim A_{0}+\sum {n=1}^{\infty }\left(A{n}\cos \left({\frac {2\pi nx}{P}}\right)+B_{n}\sin \left({\frac {2\pi nx}{P}}\right)\right)} </math>s(x)∼A0+n=1∑∞(Ancos(P2πnx)+Bnsin(P2πnx))

    对于下面几个关键点我们进行推导 (其实就是和差化积再积分)
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ cos ⁡ ( 2 π n x p ) cos ⁡ ( 2 π k x p ) d x = p ( sin ⁡ ( 2 π x ( k − n ) p ) k − n + sin ⁡ ( 2 π x ( k + n ) p ) k + n ) 4 π + constant ∫ sin ⁡ ( 2 π n x p ) cos ⁡ ( 2 π k x p ) d x = p ( cos ⁡ ( 2 π x ( k − n ) p ) k − n − cos ⁡ ( 2 π x ( k + n ) p ) k + n ) 4 π + constant ∫ sin ⁡ ( 2 π n x p ) sin ⁡ ( 2 π k x p ) d x = p ( sin ⁡ ( 2 π x ( k − n ) p ) k − n − sin ⁡ ( 2 π x ( k + n ) p ) k + n ) 4 π + constant \begin{aligned} \int \cos \left(\frac{2 \pi n x}{p}\right) \cos \left(\frac{2 \pi k x}{p}\right) d x=\frac{p\left(\frac{\sin \left(\frac{2 \pi x(k-n)}{p}\right)}{k-n}+\frac{\sin \left(\frac{2 \pi x(k+n)}{p}\right)}{k+n}\right)}{4 \pi}+\text {constant}\\ \int \sin \left(\frac{2 \pi n x}{p}\right) \cos \left(\frac{2 \pi k x}{p}\right) d x=\frac{p\left(\frac{\cos \left(\frac{2 \pi x(k-n)}{p}\right)}{k-n}-\frac{\cos \left(\frac{2 \pi x(k+n)}{p}\right)}{k+n}\right)}{4 \pi}+\text {constant}\\ \int \sin \left(\frac{2 \pi n x}{p}\right) \sin \left(\frac{2 \pi k x}{p}\right) d x=\frac{p\left(\frac{\sin \left(\frac{2 \pi x(k-n)}{p}\right)}{k-n}-\frac{\sin \left(\frac{2 \pi x(k+n)}{p}\right)}{k+n}\right)}{4 \pi}+\text {constant} \end{aligned} </math>∫cos(p2πnx)cos(p2πkx)dx=4πp(k−nsin(p2πx(k−n))+k+nsin(p2πx(k+n)))+constant∫sin(p2πnx)cos(p2πkx)dx=4πp(k−ncos(p2πx(k−n))−k+ncos(p2πx(k+n)))+constant∫sin(p2πnx)sin(p2πkx)dx=4πp(k−nsin(p2πx(k−n))−k+nsin(p2πx(k+n)))+constant

    由此不难推出
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> A 0 = 1 P ∫ P s ( x )   d x A n = 2 P ∫ P s ( x ) cos ⁡ ( 2 π n x P )   d x for n ≥ 1 B n = 2 P ∫ P s ( x ) sin ⁡ ( 2 π n x P )   d x for n ≥ 1 \begin{array}{c} {\displaystyle {\begin{aligned}A_{0}&={\frac {1}{P}}\int {P}s(x)\,dx\\A{n}&={\frac {2}{P}}\int {P}s(x)\cos \left({\frac {2\pi nx}{P}}\right)\,dx\qquad {\text{for }}n\geq 1\qquad \\B{n}&={\frac {2}{P}}\int _{P}s(x)\sin \left({\frac {2\pi nx}{P}}\right)\,dx\qquad {\text{for }}n\geq 1\end{aligned}}} \end{array} </math>A0AnBn=P1∫Ps(x)dx=P2∫Ps(x)cos(P2πnx)dxfor n≥1=P2∫Ps(x)sin(P2πnx)dxfor n≥1

  • 傅里叶级数的指数形式 由欧拉公式 <math xmlns="http://www.w3.org/1998/Math/MathML"> e i x = cos ⁡ x + i sin ⁡ x e^{ix}=\cos x+i\sin x </math>eix=cosx+isinx,可以将傅里叶级数简化成复数指数的形式。重新进行相关定义 :

    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> c 0 = A 0 c n = ( A n − i B n ) / 2 for n > 0 c n = ( A − n + i B − n ) / 2 for n < 0 \begin{array}{c} {\displaystyle {\begin{aligned}c_{0}&=A_{0}&\\c_{n}&=(A_{n}-iB_{n})/2\qquad &{\text{for }}n>0\\c_{n}&=(A_{-n}+iB_{-n})/2\qquad &{\text{for }}n<0\end{aligned}}} \end{array} </math>c0cncn=A0=(An−iBn)/2=(A−n+iB−n)/2for n>0for n<0

    代入上面的级数定义可以证实
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> c n = 1 P ∫ P s ( x ) e − 2 π i n x P   d x for n ∈ Z {\displaystyle c_{n}={\frac {1}{P}}\int _{P}s(x)e^{-{\frac {2\pi inx}{P}}}\,dx\qquad {\text{for}}\ n\in \mathbb {Z} } </math>cn=P1∫Ps(x)e−P2πinxdxfor n∈Z

    同时也可以用此对 <math xmlns="http://www.w3.org/1998/Math/MathML"> A n A_n </math>An 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> B n B_n </math>Bn 进行复原 :
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> A 0 = c 0 A n = c n + c − n for n > 0 B n = i ( c n − c − n ) for n > 0 \begin{array}{c} {\displaystyle {\begin{aligned}A_{0}&=c_{0}&\\A_{n}&=c_{n}+c_{-n}\qquad &{\textrm {for}}~n>0\\B_{n}&=i(c_{n}-c_{-n})\qquad &{\textrm {for}}~n>0\end{aligned}}} \end{array} </math>A0AnBn=c0=cn+c−n=i(cn−c−n)for n>0for n>0

    通过这些定义,傅里叶级数可以写为 :
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> s ( x ) ∼ ∑ n = − ∞ ∞ c n ⋅ e 2 π i n x P s(x)\sim \sum {n=-\infty }^{\infty }c{n}\cdot e^{\frac {2\pi inx}{P}} </math>s(x)∼n=−∞∑∞cn⋅eP2πinx

  • 傅里叶变化 (Fourier Transform, FT) 下面,我们让 <math xmlns="http://www.w3.org/1998/Math/MathML"> P → + ∞ P\rightarrow+\infty </math>P→+∞,与此同时取对应的 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n 使得 <math xmlns="http://www.w3.org/1998/Math/MathML"> n P → ξ ∈ R \frac{n}{P}\rightarrow\xi\in\mathbb{R} </math>Pn→ξ∈R,可以推得

    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> g ( ξ ) = ∫ − ∞ ∞ s ( x ) e − i 2 π ξ x   d x g(\xi )=\int _{-\infty }^{\infty }s(x)\ e^{-i2\pi \xi x}\,dx </math>g(ξ)=∫−∞∞s(x) e−i2πξxdx

    此时的 <math xmlns="http://www.w3.org/1998/Math/MathML"> g ( ξ ) g(\xi) </math>g(ξ) 其实可看作 <math xmlns="http://www.w3.org/1998/Math/MathML"> c n c_n </math>cn 的推广,同时也可以推广得到
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> s ( x ) = ∫ − ∞ ∞ g ( ξ ) e i 2 π ξ x   d ξ , ∀ x ∈ R s(x)=\int _{-\infty }^{\infty }g(\xi )\ e^{i2\pi \xi x}\,d\xi ,\quad \forall \ x\in \mathbb {R} </math>s(x)=∫−∞∞g(ξ) ei2πξxdξ,∀ x∈R

  • 二维离散傅里叶变换的性质

    • (1) 可分离性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) f(x, y) </math>f(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) F(u, v) </math>F(u,v), 图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> g ( x , y ) g(x, y) </math>g(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> G ( u , v ) G(u, v) </math>G(u,v), 则图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> h ( x , y ) = f ( x , y ) ⋅ g ( x , y ) h(x, y)=f(x, y) \cdot g(x, y) </math>h(x,y)=f(x,y)⋅g(x,y), 它的傅立叶变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> H ( u , v ) = F ( u , v ) ⋅ G ( u , v ) H(u, v)=F(u, v) \cdot G(u, v) </math>H(u,v)=F(u,v)⋅G(u,v) 。
    • (2) 线性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f 1 ( x , y ) f_1(x, y) </math>f1(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F 1 ( u , v ) F_1(u, v) </math>F1(u,v), 图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f 2 ( x , y ) f_2(x, y) </math>f2(x,y) 的傅立叶变换函数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F 2 ( u , v ) F_2(u, v) </math>F2(u,v), 则 <math xmlns="http://www.w3.org/1998/Math/MathML"> a f 1 ( x , y ) + b f 2 ( x , y ) a f_1(x, y)+b f_2(x, y) </math>af1(x,y)+bf2(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> a F 1 ( u , v ) + b F 2 ( u , v ) a F_1(u, v)+b F_2(u, v) </math>aF1(u,v)+bF2(u,v)。
    • (3) 共轭对称性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) f(x, y) </math>f(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) F(u, v) </math>F(u,v), <math xmlns="http://www.w3.org/1998/Math/MathML"> x \mathrm{x} </math>x 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> y \mathrm{y} </math>y 的取值周期为 <math xmlns="http://www.w3.org/1998/Math/MathML"> M M </math>M 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> N N </math>N, 它的共轭函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ∗ ( x , y ) f^*(x, y) </math>f∗(x,y), 则它共轭函数的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ∗ ( − u + p M , − v + q N ) F^*(-u+p M,-v+q N) </math>F∗(−u+pM,−v+qN), <math xmlns="http://www.w3.org/1998/Math/MathML"> p p </math>p 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> q q </math>q 是任意整数。
    • (4) 位移性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) f(x, y) </math>f(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) F(u, v) </math>F(u,v), 则 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x − x 0 , y − y 0 ) f\left(x-x_0, y-y_0\right) </math>f(x−x0,y−y0) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) e − j 2 π ( u x 0 + v y 0 ) / N F(u, v) e^{-\mathrm{j} 2 \pi\left(u x_0+v y_0\right) / N} </math>F(u,v)e−j2π(ux0+vy0)/N, <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) e j 2 π ( u 0 x + v 0 y ) / N f(x, y) e^{\mathrm{j} 2 \pi\left(u_0 x+v_0 y\right) / N} </math>f(x,y)ej2π(u0x+v0y)/N 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u − u 0 , v − v 0 ) F\left(u-u_0, v-v_0\right) </math>F(u−u0,v−v0)。
    • (5) 尺度变换性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) f(x, y) </math>f(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) F(u, v) </math>F(u,v), 则图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( a x , b y ) f(\mathrm{ax}, \mathrm{by}) </math>f(ax,by) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> 1 ∣ a b ∣ F ( u a , v b ) \frac{1}{|\mathrm{ab}|} F\left(\frac{u}{a}, \frac{v}{b}\right) </math>∣ab∣1F(au,bv)。
    • (6) 旋转不变性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( r , θ ) f(r, \theta) </math>f(r,θ) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( w , φ ) F(w, \varphi) </math>F(w,φ), 则 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( r , θ + θ 0 ) f\left(r, \theta+\theta_0\right) </math>f(r,θ+θ0) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( w , φ + θ 0 ) F\left(w, \varphi+\theta_0\right) </math>F(w,φ+θ0) 。
    • (7) 卷积性 : 如果图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) f(x, y) </math>f(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) F(u, v) </math>F(u,v), 图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> g ( x , y ) g(x, y) </math>g(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> G ( u , v ) G(u, v) </math>G(u,v), 则图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> h 1 ( x , y ) = f ( x , y ) ∗ g ( x , y ) h_1(x, y)=f(x, y) * g(x, y) </math>h1(x,y)=f(x,y)∗g(x,y), 它的傅立叶变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> H 1 ( u , v ) = F ( u , v ) ⋅ G ( u , v ) H_1(u, v)=F(u, v) \cdot G(u, v) </math>H1(u,v)=F(u,v)⋅G(u,v);图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> h 2 ( x , y ) = f ( x , y ) ⋅ g ( x , y ) h_2(x, y)=f(x, y) \cdot g(x, y) </math>h2(x,y)=f(x,y)⋅g(x,y), 它的傅立叶变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> H 2 ( u , v ) = F ( u , v ) ∗ G ( u , v ) H_2(u, v)=F(u, v) * G(u, v) </math>H2(u,v)=F(u,v)∗G(u,v) 。
    • (8) DC 系数 : 对于图像函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x , y ) f(x, y) </math>f(x,y) 的傅立叶变换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( u , v ) F(u, v) </math>F(u,v), <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( 0 , 0 ) F(0,0) </math>F(0,0) 是傅立叶换的 DC 系数, 则 <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( 0 , 0 ) F(0,0) </math>F(0,0) 为;

    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> F ( 0 , 0 ) = ∑ x = 0 M − 1 ∑ y = 0 N − 1 f ( x , y ) exp ⁡ ( 0 ) = ∑ x = 0 M − 1 ∑ y = 0 N − 1 f ( x , y ) F(0,0)=\sum_{x=0}^{M-1} \sum_{y=0}^{N-1} f(x, y) \exp (0)=\sum_{x=0}^{M-1} \sum_{y=0}^{N-1} f(x, y) </math>F(0,0)=x=0∑M−1y=0∑N−1f(x,y)exp(0)=x=0∑M−1y=0∑N−1f(x,y)


在将图像从空间域转换到频域后,作者构造了一个二进制掩蔽矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> M ∈ { 0 , 1 } H × W \mathbf{M} \in\{0,1\}^{H \times W} </math>M∈{0,1}H×W。作者引入了两个半径参数 <math xmlns="http://www.w3.org/1998/Math/MathML"> r 1 , r 2 ∈ [ 0 , 0.5 ] r_1, r_2 \in[0,0.5] </math>r1,r2∈[0,0.5] 来控制光谱邻域的位置和比率被屏蔽 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( r 1 < r 2 ) \left(r_1<r_2\right) </math>(r1<r2)。如图 3 所示, <math xmlns="http://www.w3.org/1998/Math/MathML"> M M </math>M 是通过将两个同心圆 (半径为 <math xmlns="http://www.w3.org/1998/Math/MathML"> r 1 r_1 </math>r1 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> r 2 r_2 </math>r2) 之间的环空区域设置为 0 来构造的。 <math xmlns="http://www.w3.org/1998/Math/MathML"> Δ r = r 2 − r 1 \Delta r=r_2-r_1 </math>Δr=r2−r1 决定掩码区域的大小。掩蔽区域的面积比定义为 <math xmlns="http://www.w3.org/1998/Math/MathML"> r p = r 2 2 − r 1 2 r_p=r_2^2-r_1^2 </math>rp=r22−r12。因此,作者提出了 3 种典型的掩蔽策略类型:擦除、噪声和交换。如果频率分量位于 <math xmlns="http://www.w3.org/1998/Math/MathML"> r 1 r_1 </math>r1 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> r 2 r_2 </math>r2 之间,它将被屏蔽;否则,将保留频率信号 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> F ^ ( o i ) = M ⋅ F ( o i ) + ( 1 − M ) ⋅ F ( Z ) , (7) \hat{\mathcal{F}}\left(o_i\right)=\mathbf{M} \cdot \mathcal{F}\left(o_i\right)+(\mathbf{1}-\mathbf{M}) \cdot \mathcal{F}(\mathbf{Z}), \tag{7} </math>F^(oi)=M⋅F(oi)+(1−M)⋅F(Z),(7)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> Z \mathbf{Z} </math>Z 由特定的掩蔽策略计算。对于擦除策略,作者将 <math xmlns="http://www.w3.org/1998/Math/MathML"> Z \mathbf{Z} </math>Z 设置为 <math xmlns="http://www.w3.org/1998/Math/MathML"> 0 H × W \mathbf{0}^{H \times W} </math>0H×W,并且在后续训练中只会充分探索非掩码频率分量。随机噪声策略将 <math xmlns="http://www.w3.org/1998/Math/MathML"> Z \mathbf{Z} </math>Z 设置为随机噪声图像。交换策略通过设置 <math xmlns="http://www.w3.org/1998/Math/MathML"> Z = I \mathbf{Z}=\mathbf{I} </math>Z=I 替换另一个图像 <math xmlns="http://www.w3.org/1998/Math/MathML"> I \mathbf{I} </math>I 中具有相同频率分量的去除频率分量,该 <math xmlns="http://www.w3.org/1998/Math/MathML"> Z = I \mathbf{Z}=\mathbf{I} </math>Z=I 的灵感来自于 Cutmix 和 Mixup。考虑到第三方数据 <math xmlns="http://www.w3.org/1998/Math/MathML"> I \mathbf{I} </math>I 并不总是可用的,在训练期间,作者随机打乱训练批次并从混洗批次中选择 <math xmlns="http://www.w3.org/1998/Math/MathML"> I = o j ( j ≠ i ) \mathbf{I}=o_j(j \neq i) </math>I=oj(j=i),其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> o j o_j </math>oj 与 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i o_i </math>oi 具有相同的批次索引。

掩蔽策略也会影响监督信号,因为它与 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i o_i </math>oi 相关。假设 <math xmlns="http://www.w3.org/1998/Math/MathML"> a i , r i a_i, r_i </math>ai,ri 是观察 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i o_i </math>oi 的监督信号,其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> a i a_i </math>ai 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> r i r_i </math>ri 分别表示动作和奖励。对于擦除和随机噪声策略, <math xmlns="http://www.w3.org/1998/Math/MathML"> a i a_i </math>ai 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> r i r_i </math>ri 保持不变。对于交换策略,监督信号取决于掩蔽区域 <math xmlns="http://www.w3.org/1998/Math/MathML"> r p r_p </math>rp 的面积比。如果 <math xmlns="http://www.w3.org/1998/Math/MathML"> r p < 0.5 r_p<0.5 </math>rp<0.5,我们保持 <math xmlns="http://www.w3.org/1998/Math/MathML"> a i a_i </math>ai 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> r i r_i </math>ri 不变,否则我们将 <math xmlns="http://www.w3.org/1998/Math/MathML"> a i , r i a_i, r_i </math>ai,ri 替换为 <math xmlns="http://www.w3.org/1998/Math/MathML"> a j a_j </math>aj 和 <math xmlns="http://www.w3.org/1998/Math/MathML"> r j r_j </math>rj。

一旦得到掩模傅里叶谱 ^F(oi)(u, v),我们通过相应的傅里叶逆变换 <math xmlns="http://www.w3.org/1998/Math/MathML"> F − 1 \mathcal{F}^{-1} </math>F−1 将其逆变换恢复为空间域 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> o ^ i ( h , w ) = 1 H W ∑ h = 0 H − 1 ∑ w = 0 W − 1 F ^ ( o i ) ( u , v ) e j 2 π ( u h / H + v w / W ) \hat{o}i(h, w)=\frac{1}{H W} \sum{h=0}^{H-1} \sum_{w=0}^{W-1} \hat{\mathcal{F}}\left(o_i\right)(u, v) e^{j 2 \pi(u h / H+v w / W)} </math>o^i(h,w)=HW1h=0∑H−1w=0∑W−1F^(oi)(u,v)ej2π(uh/H+vw/W)

对于观测 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i o_i </math>oi,其下一个观测 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i ′ o_i' </math>oi′ 也经历了与 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i o_i </math>oi 相同的 SRM 操作。算法 1 详细说明了如何通过 SRM 生成新的样本。


算法 1 频谱随机掩蔽 (Spectrum Random Masking, SRM)

  • 输入 : 采样一批状态转移 : <math xmlns="http://www.w3.org/1998/Math/MathML"> { o i , a i , r i , o i ′ ∣ i = 1 , ⋯   , K } ∼ B \left\{o_i, a_i, r_i, o_i^{\prime} \mid i=1, \cdots, K\right\} \sim \mathcal{B} </math>{oi,ai,ri,oi′∣i=1,⋯,K}∼B; 零矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> 0 ∈ R H × W \mathbf{0} \in \mathbb{R}^{H \times W} </math>0∈RH×W; 随机噪声图谱 <math xmlns="http://www.w3.org/1998/Math/MathML"> N ∈ R H × W \mathbf{N} \in \mathbb{R}^{H \times W} </math>N∈RH×W; 掩蔽矩阵 <math xmlns="http://www.w3.org/1998/Math/MathML"> M ∈ { 0 , 1 } H × W \mathbf{M} \in\{0,1\}^{H \times W} </math>M∈{0,1}H×W。
  • 输出 : 强化的状态转移 <math xmlns="http://www.w3.org/1998/Math/MathML"> { o ^ i , a ^ i , r ^ i , o ^ i ′ ∣ i = 1 , ⋯   , K } \left\{\hat{o}_i, \hat{a}_i, \hat{r}_i, \hat{o}_i^{\prime} \mid i=1, \cdots, K\right\} </math>{o^i,a^i,r^i,o^i′∣i=1,⋯,K}
  • 初始化 : <math xmlns="http://www.w3.org/1998/Math/MathML"> r 1 ← Rand ⁡ ( 0 , 0.5 ) , r 2 ← Rand ⁡ ( r 1 , 0.5 ) , Δ r = r 2 − r 1 , r p = r 2 2 − r 1 2 r_1 \leftarrow \operatorname{Rand}(0,0.5), r_2 \leftarrow \operatorname{Rand}\left(r_1, 0.5\right), \Delta r=r_2-r_1, r_p=r_2^2-r_1^2 </math>r1←Rand(0,0.5),r2←Rand(r1,0.5),Δr=r2−r1,rp=r22−r12
    1. for <math xmlns="http://www.w3.org/1998/Math/MathML"> i = 1 , ⋯   , K i=1, \cdots, K </math>i=1,⋯,K do :
    2. 根据式 (6) 进行快速傅里叶变换: <math xmlns="http://www.w3.org/1998/Math/MathML"> F ( o i ) ← o i \mathcal{F}\left(o_i\right) \leftarrow o_i </math>F(oi)←oi
    3. if 掩蔽策略是 'Erasing' (擦除) :
    4. <math xmlns="http://www.w3.org/1998/Math/MathML"> F ^ ( o i ) = M ⋅ F ( o i ) + ( 1 − M ) ⋅ F ( 0 ) , a i ^ ← a i , r i ^ ← r i \hat{\mathcal{F}}\left(o_i\right)=\mathbf{M} \cdot \mathcal{F}\left(o_i\right)+(\mathbf{1}-\mathbf{M}) \cdot \mathcal{F}(\mathbf{0}), \hat{a_i} \leftarrow a_i, \hat{r_i} \leftarrow r_i </math>F^(oi)=M⋅F(oi)+(1−M)⋅F(0),ai^←ai,ri^←ri
    5. else if 掩蔽策略是 'Noise' (噪声) :
    6. <math xmlns="http://www.w3.org/1998/Math/MathML"> F ^ ( o i ) = M ⋅ F ( o i ) + ( 1 − M ) ⋅ F ( N ) , a i ^ ← a i , r ^ i ← r i \hat{\mathcal{F}}\left(o_i\right)=\mathbf{M} \cdot \mathcal{F}\left(o_i\right)+(\mathbf{1}-\mathbf{M}) \cdot \mathcal{F}(\mathbf{N}), \hat{a_i} \leftarrow a_i, \hat{r}_i \leftarrow r_i </math>F^(oi)=M⋅F(oi)+(1−M)⋅F(N),ai^←ai,r^i←ri
    7. else if 掩蔽策略是 'Swapping' (交换) :
    8. Random Shuffle Batch: <math xmlns="http://www.w3.org/1998/Math/MathML"> { o j , a j , r j , o j ′ ∣ j = 1 , ⋯   , K } \left\{o_j, a_j, r_j, o_j^{\prime} \mid j=1, \cdots, K\right\} </math>{oj,aj,rj,oj′∣j=1,⋯,K}
    9. <math xmlns="http://www.w3.org/1998/Math/MathML"> F ^ ( o i ) = M ⋅ F ( o i ) + ( 1 − M ) ⋅ F ( o j ) \hat{\mathcal{F}}\left(o_i\right)=\mathbf{M} \cdot \mathcal{F}\left(o_i\right)+(\mathbf{1}-\mathbf{M}) \cdot \mathcal{F}\left(o_j\right) </math>F^(oi)=M⋅F(oi)+(1−M)⋅F(oj)
    10. if <math xmlns="http://www.w3.org/1998/Math/MathML"> r p ≤ 0.5 r_p \leq 0.5 </math>rp≤0.5 then
    11. <math xmlns="http://www.w3.org/1998/Math/MathML"> a ^ i ← a i , r ^ i ← r i \hat{a}_i \leftarrow a_i, \hat{r}_i \leftarrow r_i </math>a^i←ai,r^i←ri
    12. else
    13. <math xmlns="http://www.w3.org/1998/Math/MathML"> a ^ i ← a j , r ^ i ← r j \hat{a}_i \leftarrow a_j, \hat{r}_i \leftarrow r_j </math>a^i←aj,r^i←rj
    14. end if
    15. end if
    16. 根据式 8 进行傅里叶反变换: <math xmlns="http://www.w3.org/1998/Math/MathML"> o ^ i ← F ^ ( o i ) \hat{o}_i \leftarrow \hat{\mathcal{F}}\left(o_i\right) </math>o^i←F^(oi)
    17. 使用 <math xmlns="http://www.w3.org/1998/Math/MathML"> o i ′ o_i^{\prime} </math>oi′ 重复步骤 (2)~(15) 以获得 <math xmlns="http://www.w3.org/1998/Math/MathML"> o ^ i ′ \hat{o}_i^{\prime} </math>o^i′
    18. end for

3.2 基于 SRM 的强化学习

在非策略强化学习中,观察是从重放缓冲区中采样的。在 RL 中使用数据增强的一种直观方法是在将它们传递给代理进行训练之前执行增强。同时,堆叠连续状态帧 <math xmlns="http://www.w3.org/1998/Math/MathML"> s t = { o t , o t − 1 , o t − 2 } s_t=\left\{o_t, o_{t-1}, o_{t-2}\right\} </math>st={ot,ot−1,ot−2} 上的增强过程应该是一致的,以保持时间信息 (如位置和速度) 不变。给定一个参数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> v ∈ V v \in \mathcal{V} </math>v∈V 的增强函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> τ ( ⋅ , v ) \tau(\cdot, v) </math>τ(⋅,v),原始观察 <math xmlns="http://www.w3.org/1998/Math/MathML"> s t ∈ O s_t \in \mathcal{O} </math>st∈O 的增强观察 <math xmlns="http://www.w3.org/1998/Math/MathML"> s ^ t ∈ O ^ \hat{s}_t \in \hat{\mathcal{O}} </math>s^t∈O^ 可以通过 <math xmlns="http://www.w3.org/1998/Math/MathML"> s ^ t = τ ( s t , v ) \hat{s}_t=\tau\left(s_t, v\right) </math>s^t=τ(st,v) 获得。最优地, <math xmlns="http://www.w3.org/1998/Math/MathML"> τ : O × V → O ^ \tau: \mathcal{O} \times \mathcal{V} \rightarrow \hat{\mathcal{O}} </math>τ:O×V→O^ 应该保持代理的 Q 值和策略 <math xmlns="http://www.w3.org/1998/Math/MathML"> π \pi </math>π :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> { Q ( s t , a t ) = Q ( τ ( s t , v ) , a t ) , π ( a t ∣ s t ) = π ( a t ∣ τ ( s t , v ) ) , (9) \left\{\begin{aligned} Q\left(s_t, a_t\right) & =Q\left(\tau\left(s_t, v\right), a_t\right), \\ \pi\left(a_t \mid s_t\right) & =\pi\left(a_t \mid \tau\left(s_t, v\right)\right), \end{aligned}\right.\tag{9} </math>{Q(st,at)π(at∣st)=Q(τ(st,v),at),=π(at∣τ(st,v)),(9)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> a t ∈ A a_t \in \mathcal{A} </math>at∈A 是状态 <math xmlns="http://www.w3.org/1998/Math/MathML"> s t s_t </math>st 下的动作。然而,实际上即使从原始观察中学习值和策略函数是不稳定的,更不用说外观差异很大的增强数据。因此,RL 优化中只能采用随机移位和随机裁剪等弱数据增强,如 DrQ 和 RAD。相比之下,随机卷积和旋转等强数据增强总是以特定方式应用。在 SVEA 中,原始图像和增强图像都用于优化 q 函数,但只采用前者计算 Bellman 方程的 q 目标。在 SECANT 中,弱增强的专家策略引导学生策略具有很强的增强学习鲁棒表示。直观地说,正如我们将在实验部分展示的那样,SRM 具有弱数据增强和强数据增强的优点 : 它可以以普通方式插入任何基于图像的 RL 方法,同时提供显着的性能提升。

在训练期间,我们在每批观察上应用概率为 0.5 的 SRM。在测试时没有应用数据增强。为了评估 SRM 的有效性,我们采用 DrQ 和 SVEA 两种流行的方法作为我们的基本算法。前者是一种将数据增强直接插入 RL 算法的简单方法,相应的 SAC 目标分别替换为 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> J Q = E ( s t , a t ) ∼ D [ ( Q ( s t , a t ) + Q ( s ^ t , a ^ t ) ) 2 − ( r t + γ V ˉ ( s t + 1 ) + V ˉ ( s ^ t + 1 ) 2 ) 2 ] . (10) J_Q=\mathbb{E}_{\left(s_t, a_t\right) \sim \mathcal{D}}\left[\frac{\left(Q\left(s_t, a_t\right)+Q\left(\hat{s}t, \hat{a}t\right)\right)}{2}-\left(r_t+\gamma \frac{\bar{V}\left(s{t+1}\right)+\bar{V}\left(\hat{s}{t+1}\right)}{2}\right)^2\right] .\tag{10} </math>JQ=E(st,at)∼D[2(Q(st,at)+Q(s^t,a^t))−(rt+γ2Vˉ(st+1)+Vˉ(s^t+1))2].(10)

而后者精心设计,其中 Q-target 是使用从未增强数据严格计算的,以缓解高方差的问题,其目标是 :
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> J Q = E ( s t , a t ) ∼ D [ ( Q ( s t , a t ) + Q ( s ^ t , a ^ t ) ) 2 − ( r t + γ V ˉ ( s t + 1 ) ) 2 ] (11) J_Q=\mathbb{E}_{\left(s_t, a_t\right) \sim \mathcal{D}}\left[\frac{\left(Q\left(s_t, a_t\right)+Q\left(\hat{s}_t, \hat{a}t\right)\right)}{2}-\left(r_t+\gamma \bar{V}\left(s{t+1}\right)\right)^2\right]\tag{11} </math>JQ=E(st,at)∼D[2(Q(st,at)+Q(s^t,a^t))−(rt+γVˉ(st+1))2](11)

通过在方程式 (4) 和 (5) 中联合求解具有策略和价值网络的 Q 函数,RL 系统有可能从不同的观察中学习以进行策略学习。

4.实验

略。

5.感想

这个方法整体来说感觉是一种很有意思的数据增强的方法,对于傅里叶变换部分我需要进一步的思考和理解。

6.参考资料

相关推荐
萱仔学习自我记录39 分钟前
PEFT库和transformers库在NLP大模型中的使用和常用方法详解
人工智能·机器学习
BulingQAQ4 小时前
论文阅读:PET/CT Cross-modal medical image fusion of lung tumors based on DCIF-GAN
论文阅读·深度学习·生成对抗网络·计算机视觉·gan
hsling松子4 小时前
使用PaddleHub智能生成,献上浓情国庆福
人工智能·算法·机器学习·语言模型·paddlepaddle
正在走向自律4 小时前
机器学习框架
人工智能·机器学习
好吃番茄5 小时前
U mamba配置问题;‘KeyError: ‘file_ending‘
人工智能·机器学习
slomay6 小时前
关于对比学习(简单整理
经验分享·深度学习·学习·机器学习
AI完全体7 小时前
【AI知识点】偏差-方差权衡(Bias-Variance Tradeoff)
人工智能·深度学习·神经网络·机器学习·过拟合·模型复杂度·偏差-方差
卷心菜小温8 小时前
【BUG】P-tuningv2微调ChatGLM2-6B时所踩的坑
python·深度学习·语言模型·nlp·bug
陈苏同学8 小时前
4. 将pycharm本地项目同步到(Linux)服务器上——深度学习·科研实践·从0到1
linux·服务器·ide·人工智能·python·深度学习·pycharm
FL16238631299 小时前
[深度学习][python]yolov11+bytetrack+pyqt5实现目标追踪
深度学习·qt·yolo