ZHANGYUXUAN-zR commited on
Commit
6ee564f
·
verified ·
1 Parent(s): 9d4c46a

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/5kTlVBkzSRx/5kTlVBkzSRx.md +202 -0
  2. parse/train/5kTlVBkzSRx/5kTlVBkzSRx_content_list.json +930 -0
  3. parse/train/5kTlVBkzSRx/5kTlVBkzSRx_middle.json +0 -0
  4. parse/train/5kTlVBkzSRx/5kTlVBkzSRx_model.json +0 -0
  5. parse/train/7aogOj_VYO0/7aogOj_VYO0.md +475 -0
  6. parse/train/7aogOj_VYO0/7aogOj_VYO0_content_list.json +0 -0
  7. parse/train/7aogOj_VYO0/7aogOj_VYO0_middle.json +0 -0
  8. parse/train/7aogOj_VYO0/7aogOj_VYO0_model.json +0 -0
  9. parse/train/B1kJ6H9ex/B1kJ6H9ex.md +397 -0
  10. parse/train/B1kJ6H9ex/B1kJ6H9ex_content_list.json +0 -0
  11. parse/train/B1kJ6H9ex/B1kJ6H9ex_middle.json +0 -0
  12. parse/train/B1kJ6H9ex/B1kJ6H9ex_model.json +0 -0
  13. parse/train/BkMWx309FX/BkMWx309FX.md +0 -0
  14. parse/train/BkMWx309FX/BkMWx309FX_content_list.json +0 -0
  15. parse/train/BkMWx309FX/BkMWx309FX_middle.json +0 -0
  16. parse/train/BkMWx309FX/BkMWx309FX_model.json +0 -0
  17. parse/train/Dx3x05MlFwj/Dx3x05MlFwj.md +495 -0
  18. parse/train/Dx3x05MlFwj/Dx3x05MlFwj_content_list.json +1081 -0
  19. parse/train/Dx3x05MlFwj/Dx3x05MlFwj_middle.json +0 -0
  20. parse/train/Dx3x05MlFwj/Dx3x05MlFwj_model.json +0 -0
  21. parse/train/S1lIMn05F7/S1lIMn05F7.md +380 -0
  22. parse/train/S1lIMn05F7/S1lIMn05F7_content_list.json +0 -0
  23. parse/train/S1lIMn05F7/S1lIMn05F7_middle.json +0 -0
  24. parse/train/S1lIMn05F7/S1lIMn05F7_model.json +0 -0
  25. parse/train/S1ldO2EFPr/S1ldO2EFPr.md +0 -0
  26. parse/train/S1ldO2EFPr/S1ldO2EFPr_content_list.json +0 -0
  27. parse/train/S1ldO2EFPr/S1ldO2EFPr_middle.json +0 -0
  28. parse/train/S1ldO2EFPr/S1ldO2EFPr_model.json +0 -0
  29. parse/train/S5S3eTEmouw/S5S3eTEmouw.md +471 -0
  30. parse/train/S5S3eTEmouw/S5S3eTEmouw_content_list.json +0 -0
  31. parse/train/S5S3eTEmouw/S5S3eTEmouw_middle.json +0 -0
  32. parse/train/S5S3eTEmouw/S5S3eTEmouw_model.json +0 -0
  33. parse/train/Skl4mRNYDr/Skl4mRNYDr.md +449 -0
  34. parse/train/Skl4mRNYDr/Skl4mRNYDr_content_list.json +0 -0
  35. parse/train/Skl4mRNYDr/Skl4mRNYDr_middle.json +0 -0
  36. parse/train/Skl4mRNYDr/Skl4mRNYDr_model.json +0 -0
  37. parse/train/XPZIaotutsD/XPZIaotutsD.md +454 -0
  38. parse/train/XPZIaotutsD/XPZIaotutsD_content_list.json +0 -0
  39. parse/train/XPZIaotutsD/XPZIaotutsD_middle.json +0 -0
  40. parse/train/XPZIaotutsD/XPZIaotutsD_model.json +0 -0
  41. vlm/dev/0YXmOFLb1wQ/0.png +3 -0
  42. vlm/dev/0YXmOFLb1wQ/1.png +3 -0
  43. vlm/dev/0YXmOFLb1wQ/10.png +3 -0
  44. vlm/dev/0YXmOFLb1wQ/11.png +3 -0
  45. vlm/dev/0YXmOFLb1wQ/12.png +3 -0
  46. vlm/dev/0YXmOFLb1wQ/13.png +3 -0
  47. vlm/dev/0YXmOFLb1wQ/14.png +3 -0
  48. vlm/dev/0YXmOFLb1wQ/15.png +3 -0
  49. vlm/dev/0YXmOFLb1wQ/2.png +3 -0
  50. vlm/dev/0YXmOFLb1wQ/3.png +3 -0
parse/train/5kTlVBkzSRx/5kTlVBkzSRx.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2
+
3
+ Xiangxiang $\mathbf { C h u ^ { 1 } }$ , Zhi Tian1,2, Yuqing Wang1, Bo Zhang1 Haibing Ren1, Xiaolin Wei1, Huaxia Xia1, Chunhua Shen2∗
4
+
5
+ 1 Meituan Inc. 2 The University of Adelaide, Australia 1 {chuxiangxiang,wangyuqing06,zhangbo97,renhaibing,weixiaolin02,xiahuaxia}@meituan.com 2 zhi.tian@outlook.com, chunhua@me.com
6
+
7
+ # Abstract
8
+
9
+ Very recently, a variety of vision transformer architectures for dense prediction tasks have been proposed and they show that the design of spatial attention is critical to their success in these tasks. In this work, we revisit the design of the spatial attention and demonstrate that a carefully devised yet simple spatial attention mechanism performs favorably against the state-of-the-art schemes. As a result, we propose two vision transformer architectures, namely, Twins-PCPVT and TwinsSVT. Our proposed architectures are highly efficient and easy to implement, only involving matrix multiplications that are highly optimized in modern deep learning frameworks. More importantly, the proposed architectures achieve excellent performance on a wide range of visual tasks including image-level classification as well as dense detection and segmentation. The simplicity and strong performance suggest that our proposed architectures may serve as stronger backbones for many vision tasks. Our code is available at: https://git.io/Twins.
10
+
11
+ # 1 Introduction
12
+
13
+ Recently, Vision Transformers [1–3] have received increasing research interest. Compared to the widely-used convolutional neural networks (CNNs) in visual perception, Vision Transformers enjoy great flexibility in modeling long-range dependencies in vision tasks, introduce less inductive bias, and can naturally process multi-modality input data including images, videos, texts, speech signals, and point clouds. Thus, they have been considered to be a strong alternative to CNNs. It is expected that vision transformers are likely to replace CNNs and serve as the most basic component in the next-generation visual perception systems.
14
+
15
+ One of the prominent problems when applying transformers to vision tasks is the heavy computational complexity incurred by the spatial self-attention operation in transformers, which grows quadratically in the number of pixels of the input image. A workaround is the locally-grouped self-attention (or self-attention in non-overlapped windows as in the recent Swin Transformer [4]), where the input is spatially grouped into non-overlapped windows and the standard self-attention is computed only within each sub-window. Although it can significantly reduce the complexity, it lacks the connections between different windows and thus results in a limited receptive field. As pointed out by many previous works [5–7], a sufficiently large receptive field is crucial to the performance, particularly for dense prediction tasks such as image segmentation and object detection. Swin [4] proposes a shifted window operation to tackle the issue, where the boundaries of these local windows are gradually moved as the network proceeds. Despite being effective, the shifted windows may have uneven sizes. The uneven windows result in difficulties when the models are deployed with ONNX or TensorRT, which prefers the windows of equal sizes. Another solution is proposed in PVT [8]. Unlike the standard self-attention operation, where each query computes the attention weights with all the input tokens, in PVT, each query only computes the attention with a sub-sampled version of the input tokens. Although its computational complexity in theory is still quadratic, it is already manageable in practice.
16
+
17
+ From a unified perspective, the core in the aforementioned vision transformers is how the spatial attention is designed. Thus, in this work, we revisit the design of the spatial attention in vision transformers. Our first finding is that the global sub-sampled attention in PVT is highly effective, and with the applicable positional encodings [9], its performance can be on par or even better than state-of-the-art vision transformers (e.g., Swin). This results in our first proposed architecture, termed Twins-PCPVT. On top of that, we further propose a carefully-designed yet simple spatial attention mechanism, making our architectures more efficient than PVT. Our attention mechanism is inspired by the widely-used separable depthwise convolutions and thus we name it spatially separable self-attention (SSSA). Our proposed SSSA is composed of two types of attention operations—(i) locally-grouped self-attention (LSA), and (ii) global sub-sampled attention (GSA), where LSA captures the fine-grained and short-distance information and GSA deals with the long-distance and global information. This leads to the second proposed vision transformer architecture, termed Twins-SVT. It is worth noting that both attention operations in the architecture are efficient and easy-to-implement with matrix multiplications in a few lines of code. Thus, all of our architectures here have great applicability and can be easily deployed.
18
+
19
+ We benchmark our proposed architectures on a number of visual tasks, ranging from image-level classification to pixel-level semantic/instance segmentation and object detection. Extensive experiments show that both of our proposed architectures perform favorably against other state-of-the-art vision transformers with similar or even reduced computational complexity.
20
+
21
+ # 2 Related Work
22
+
23
+ Convolutional neural networks. Characterized by local connectivity, weight sharing, shiftinvariance and pooling, CNNs have been the de facto standard model for computer vision tasks. The top-performing models [10–13] in image classification also serve as the strong backbones for downstream detection and segmentation tasks.
24
+
25
+ Vision Transformers. Transformer was firstly proposed by [14] for machine translation tasks, and since then they have become the state-of-the-art models for NLP tasks, overtaking the sequence-tosequence approach built on LSTM. Its core component is multi-head self-attention which models the relationship between input tokens and shows great flexibility.
26
+
27
+ In 2020, Transformer was introduced to computer vision for image and video processing [1–3, 9, 15– 17, 17–32]. In the image classification task, ViT [1] and DeiT [2] divide the images into patch embedding sequences and feed them into the standard transformers. Although vision transformers have been proved compelling in image classification compared with CNNs, a challenge remains when it is applied to dense prediction tasks such as object detection and segmentation. These tasks often require feature pyramids for better processing objects of different scales, and take as inputs the highresolution images, which significantly increase the computational complexity of the self-attention operations.
28
+
29
+ Recently, Pyramid Vision Transformer (PVT) [8] is proposed and can output the feature pyramid [33] as in CNNs. PVT has demonstrated good performance in a number of dense prediction tasks. The recent Swin Transformer [4] introduces non-overlapping window partitions and restricts self-attention within each local window, resulting in linear computational complexity in the number of input tokens. To interchange information among different local areas, its window partitions are particularly designed to shift between two adjacent self-attention layers. The semantic segmentation framework OCNet [34] shares some similarities with us and they also interleave the local and global attention. Here, we demonstrate this is a general design paradigm in vision transformer backbones rather than merely an incremental module in semantic segmentation.
30
+
31
+ Grouped and Separable Convolutions. Grouped convolutions are originally proposed in AlexNet [35] for distributed computing. They were proved both efficient and effective in speeding up the networks. As an extreme case, depthwise convolutions [12, 36] use the number of groups that is equal to the input or output channels, which is followed by point-wise convolutions to aggregate the information across different channels. Here, the proposed spatially separable self-attention shares some similarities with them.
32
+
33
+ Positional Encodings. Most vision transformers use absolute/relative positional encodings, depending on downstream tasks, which are based on sinusoidal functions [14] or learnable [1, 2]. In CPVT [9], the authors propose the conditional positional encodings, which are dynamically conditioned on the inputs and show better performance than the absolute and relative ones.
34
+
35
+ # 3 Our Method: Twins
36
+
37
+ We present two simple yet powerful spatial designs for vision transformers. The first method is built upon PVT [8] and CPVT [9], which only uses the global attention. The architecture is thus termed Twins-PCPVT. The second one, termed Twins-SVT, is based on the proposed SSSA which interleaves local and global attention.
38
+
39
+ # 3.1 Twins-PCPVT
40
+
41
+ PVT [8] introduces the pyramid multi-stage design to better tackle dense prediction tasks such as object detection and semantic segmentation. It inherits the absolute positional encoding designed in ViT [1] and DeiT [2]. All layers utilize the global attention mechanism and rely on spatial reduction to cut down the computation cost of processing the whole sequence. It is surprising to see that the recently-proposed Swin transformer [4], which is based on shifted local windows, can perform considerably better than PVT, even on dense prediction tasks where a sufficiently large receptive field is even more crucial to good performance.
42
+
43
+ In this work, we surprisingly found that the less favored performance of PVT is mainly due to the absolute positional encodings employed in PVT [8]. As shown in CPVT [9], the absolute positional encoding encounter difficulties in processing the inputs with varying sizes (which are common in dense prediction tasks). Moreover, this positional encoding also breaks the translation invariance. On the contrary, Swin transformer makes use of the relative positional encodings, which bypasses the above issues. Here, we demonstrate that this is the main cause why Swin outperforms PVT, and we show that if the appropriate positional encodings are used, PVT can actually achieve on par or even better performance than the Swin transformer.
44
+
45
+ Here, we use the conditional position encoding (CPE) proposed in CPVT [9] to replace the absolute PE in PVT. CPE is conditioned on the inputs and can naturally avoid the above issues of the absolute encodings. The position encoding generator (PEG) [9], which generates the CPE, is placed after the first encoder block of each stage. We use the simplest form of PEG, i.e., a 2D depth-wise convolution without batch normalization. For image-level classification, following CPVT, we remove the class token and use global average pooling (GAP) at the end of the stage [9]. For other vision tasks, we follow the design of PVT. Twins-PCPVT inherits the advantages of both PVT and CPVT, which makes it easy to be implemented efficiently. Our extensive experimental results show that this simple design can match the performance of the recent state-of-the-art Swin transformer. We have also attempted to replace the relative PE with CPE in Swin, which however does not result in noticeable performance gains, as shown in our experiments. We conjecture that this maybe due to the use of shifted windows in Swin, which might not work well with CPE.
46
+
47
+ Architecture settings We report the detailed settings of Twins-PCPVT in Table 2 (in supplementary), which are similar to PVT [8]. Therefore, Twins-PCPVT has similar FLOPs and number of parameters to [8].
48
+
49
+ # 3.2 Twins-SVT
50
+
51
+ Vision transformers suffer severely from the heavy computational complexity in dense prediction tasks due to high-resolution inputs. Given an input of $H \times W$ resolution, the complexity of selfattention with dimension $d$ is $\mathcal { O } ( H ^ { 2 } W ^ { 2 } d )$ . Here, we propose the spatially separable self-attention (SSSA) to alleviate this challenge. SSSA is composed of locally-grouped self-attention (LSA) and global sub-sampled attention (GSA).
52
+
53
+ ![](images/fec150010c9fe25574fcd045b5d0727df84edd7d8819dfbc9908baa560445e02.jpg)
54
+ Figure 1 – Architecture of Twins-SVT-S. “PEG" is the positional encoding generator from CPVT [9].
55
+
56
+ Locally-grouped self-attention (LSA). Motivated by the group design in depthwise convolutions for efficient inference, we first equally divide the 2D feature maps into sub-windows, making self-attention communications only happen within each sub-window. This design also resonates with the multi-head design in selfattention, where the communications only occur within the channels of the same head. To be specific, the feature maps are divided into $m \times n$ sub-windows. Without loss of generality, we assume $H \% m = 0$ and $W \% n = 0$ . Each group contains $\textstyle { \frac { H W } { m n _ { * } } }$ elements, and thus the computation cost of the self-attention in this window is $\begin{array} { r } { \mathcal { O } \big ( \frac { H ^ { 2 } W ^ { 2 } } { m ^ { 2 } n ^ { 2 } } d \big ) } \end{array}$ , and the total cost is $\begin{array} { r } { \mathcal { O } ( \frac { H ^ { 2 } W ^ { 2 } } { m n } d ) } \end{array}$ . If we let $\begin{array} { r } { \dot { k } _ { 1 } = \frac { H } { m } } \end{array}$ and $\textstyle k _ { 2 } \ = \ { \frac { W } { n } }$ , the cost can be
57
+
58
+ ![](images/12ea80c3e81cb7eced3ec463d4e28c76d5d0784a7607a8261852efa72d93e84d.jpg)
59
+ Figure 2 – (a) Twins-SVT interleaves locally-grouped attention (LSA) and global sub-sampled attention (GSA). (b) Schematic view of the locally-grouped attention (LSA) and global sub-sampled attention (GSA).
60
+
61
+ computed as $\mathcal { O } ( k _ { 1 } k _ { 2 } H W d )$ , which is significantly more efficient when $k _ { 1 } \ll H$ and $k _ { 2 } \ll W$ and grows linearly with $H W$ if $k _ { 1 }$ and $k _ { 2 }$ are fixed.
62
+
63
+ Although the locally-grouped self-attention mechanism is computation friendly, the image is divided into non-overlapping sub-windows. Thus, we need a mechanism to communicate between different sub-windows, as in Swin. Otherwise, the information would be limited to be processed locally, which makes the receptive field small and significantly degrades the performance as shown in our experiments. This resembles the fact that we cannot replace all standard convolutions by depth-wise convolutions in CNNs.
64
+
65
+ Global sub-sampled attention (GSA). A simple solution is to add extra standard global selfattention layers after each local attention block, which can enable cross-group information exchange. However, this approach would come with the computation complexity of $\mathcal { O } ( H ^ { 2 } W ^ { 2 } d )$ .
66
+
67
+ Here, we use a single representative to summarize the important information for each of $m \times n$ sub-windows and the representative is used to communicate with other sub-windows (serving as the key in self-attention), which can dramatically reduce the cost to $\begin{array} { r } { \mathcal { O } ( m n H W d ) = \mathcal { O } ( \frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } ) } \end{array}$ . This is essentially equivalent to using the sub-sampled feature maps as the key in attention operations, and thus we term it global sub-sampled attention (GSA). If we alternatively use the aforementioned LSA and GSA like separable convolutions (depth-wise $^ +$ point-wise). The total computation cost√ is $\begin{array} { r } { \mathcal { O } ( \frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } + k _ { 1 } k _ { 2 } \bar { H } W d ) } \end{array}$ . We have $\begin{array} { r } { \frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } + k _ { 1 } k _ { 2 } H W d \geq 2 H W d \sqrt { H W } } \end{array}$ . The minimum is obtained when $\boldsymbol { k } _ { 1 } \cdot \boldsymbol { k } _ { 2 } = \sqrt { H W }$ . We note that $H = W = 2 2 4$ is popular in classification. Without loss of generality, we use square sub-windows, i.e., $k _ { 1 } = k _ { 2 }$ . Therefore, $k _ { 1 } = k _ { 2 } = 1 5$ is close to the global minimum for $H = W = 2 2 4$ . However, our network is designed to include several stages with variable resolutions. Stage 1 has feature maps of $5 6 \times 5 6$ , the minimum is obtained when $k _ { 1 } \stackrel { \cdot } { = } k _ { 2 } = \sqrt { 5 6 } \approx 7 .$ Theoretically, we can calibrate optimal $k _ { 1 }$ and $k _ { 2 }$ for each of the stages. For simplicity, we use $k _ { 1 } = k _ { 2 } = 7$ everywhere. As for stages with lower resolutions, we control the summarizing window-size of GSA to avoid too small amount of generated keys. Specifically, we use the size of 4, 2 and 1 for the last three stages respectively.
68
+
69
+ As for the sub-sampling function, we investigate several options including average pooling, depthwise strided convolutions, and regular strided convolutions. Empirical results show that regular strided convolutions perform best here. Formally, our spatially separable self-attention (SSSA) can be written as
70
+
71
+ $$
72
+ \begin{array} { r l } & { \hat { \mathbf { z } } _ { i j } ^ { l } = \mathrm { L S A } \left( \mathrm { L a y e r N o r m } \left( \mathbf { z } _ { i j } ^ { l - 1 } \right) \right) + \mathbf { z } _ { i j } ^ { l - 1 } , } \\ & { \mathbf { z } _ { i j } ^ { l } = \mathrm { F F N } \left( \mathrm { L a y e r N o r m } \left( \hat { \mathbf { z } } _ { i j } ^ { l } \right) \right) + \hat { \mathbf { z } } _ { i j } ^ { l } , } \\ & { \hat { \mathbf { z } } ^ { l + 1 } = \mathrm { G S A } \left( \mathrm { L a y e r N o r m } \left( \mathbf { z } ^ { l } \right) \right) + \mathbf { z } ^ { l } , } \\ & { \mathbf { z } ^ { l + 1 } = \mathrm { F F N } \left( \mathrm { L a y e r N o r m } \left( \hat { \mathbf { z } } ^ { l + 1 } \right) \right) + \hat { \mathbf { z } } ^ { l + 1 } , } \\ & { i \in \{ 1 , 2 , . . . . , m \} , j \in \{ 1 , 2 , . . . . , n \} } \end{array}
73
+ $$
74
+
75
+ where LSA means locally-grouped self-attention within a sub-window; GSA is the global sub-sampled attention by interacting with the representative keys (generated by the sub-sampling functions) from each sub-window $\hat { \mathbf { z } } _ { i j } \mathbf { \bar { \Psi } } \in \mathcal { R } ^ { k _ { 1 } \times k _ { 2 } \times \mathbf { \bar { C } } }$ . Both LSA and GSA have multiple heads as in the standard self-attention.The PyTorch code of LSA is given in Algorithm 1 (in supplementary).
76
+
77
+ Again, we use the PEG of CPVT [9] to encode position information and process variable-length inputs on the fly. It is inserted after the first block in each stage.
78
+
79
+ Model variants. The detailed configure of Twins-SVT is shown in Table 3 (in supplementary). We try our best to use the similar settings as in Swin [4] to make sure that the good performance is due to the new design paradigm.
80
+
81
+ Comparison with PVT. PVT entirely utilizes global attentions as DeiT does while our method makes use of spatial separable-like design with LSA and GSA, which is more efficient.
82
+
83
+ Comparison with Swin. Swin utilizes the alternation of local window based attention where the window partitions in successive layers are shifted. This is used to introduce communication among different patches and to increase the receptive field. However, this procedure is relatively complicated and may not be optimized for speed on devices such as mobile devices. Swin Transformer depends on torch.roll() to perform cyclic shift and its reverse on features. This operation is memory unfriendly and rarely supported by popular inference frameworks such as NVIDIA TensorRT, Google TensorflowLite, and Snapdragon Neural Processing Engine SDK (SNPE), etc. This hinders the deployment of Swin either on the server-side or on end devices in a production environment. In contrast, Twins models don’t require such an operation and only involve matrix multiplications that are already optimized well in modern deep learning frameworks. Therefore, it can further benefit from the optimization in a production environment. For example, we converted Twins-SVT-S from PyTorch to TensorRT , and its throughput is boosted by $1 . 7 \times$ . Moreover, our local-global design can better exploit the global context, which is known to play an important role in many vision tasks.
84
+
85
+ Finally, one may note that the network configures (e.g., such as depths, hidden dimensions, number of heads, and the expansion ratio of MLP) of our two variants are sightly different. This is intended because we want to make fair comparisons to the two recent well-known transformers PVT and Swin. PVT prefers a slimmer and deeper design while Swin is wider and shallower. This difference makes PVT have slower training than Swin. Twins-PCPVT is designed to compare with PVT and shows that a proper positional encoding design can greatly boost the performance and make it on par with recent state-of-the-art models like Swin. On the other hand, Twins-SVT demonstrates the potential of a new paradigm as to spatially separable self-attention is highly competitive to recent transformers.
86
+
87
+ # 4 Experiments
88
+
89
+ # 4.1 Classification on ImageNet-1K
90
+
91
+ We first present the ImageNet classification results with our proposed models. We carefully control the experiment settings to make fair comparisons against recent works [2, 8, 9]. All our models are trained for 300 epochs with a batch size of 1024 using the AdamW optimizer [37]. The learning rate is initialized to be 0.001 and decayed to zero within 300 epochs following the cosine strategy. We use a linear warm-up in the first five epochs and the same regularization setting as in [2]. Note that we do not utilize extra tricks in [26, 28] to make fair comparisons although it may further improve the performance of our method. We use increasing stochastic depth [38] augmentation of 0.2, 0.3, 0.5 for small, base and large model respectively. Following Swin [4], we use gradient clipping with a max norm of 5.0 to stabilize the training process, which is especially important for the training of large models.
92
+
93
+ We report the classification results on ImageNet-1K [39] in Table 1. Twins-PCPVT-S outperforms PVT-small by $1 . 4 \%$ and obtains similar result as Swin-T with $18 \%$ fewer FLOPs. Twins-SVT-S is better than Swin-T with about $3 5 \%$ fewer FLOPs. Other models demonstrate similar advantages.
94
+
95
+ It is interesting to see that, without bells and whistles, Twins-PCPVT performs on par with the recent state-of-the-art Swin, which is based on much more sophisticated designs as mentioned above. Moreover, Twins-SVT also achieves similar or better results, compared to Swin, indicating that the spatial separable-like design is an effective and promising paradigm.
96
+
97
+ One may challenge our improvements are due to the use of the better positional encoding PEG. Thus, we also replace the relative PE in Swin-T with PEG [9], but the Swin-T’s performance cannot be improved (being $8 1 . 2 \%$ ).
98
+
99
+ # 4.2 Semantic Segmentation on ADE20K
100
+
101
+ We further evaluate the performance on segmentation tasks. We test on the ADE20K dataset [42], a challenging scene parsing task for semantic segmentation, which is popularly evaluated by recent Transformer-based methods. This dataset contains 20K images for training and 2K images for validation. Following the common practices, we use the training set to train our models and report the mIoU on the validation set. All models are pretrained on the ImageNet-1k dataset.
102
+
103
+ Twins-PCPVT vs. PVT. We compare our Twins-PCPVT with PVT [8] because they have similar design and computational complexity. To make fair comparisons, we use the Semantic FPN framework [43] and exactly the same training settings as in PVT. Specifically, we train 80K steps with a batch size of 16 using AdamW [37]. The learning rate is initialized as $1 \times 1 0 ^ { - 4 }$ and scheduled by the ‘poly’ strategy with the power coefficient of 0.9. We apply the drop-path regularization of 0.2 for the backbone and weight decay 0.0005 for the whole network. Note that we use a stronger drop-path regularization of 0.4 for the large model to avoid over-fitting. For Swin, we use their official code and trained models. We report the results in Table 2. With comparable FLOPs, Twins-PCPVT-S outperforms PVT-Small with a large margin $( + 4 . 5 \%$ mIoU), which also surpasses ResNet-50 by $7 . 6 \%$ mIoU. It also outperforms Swin-T with a clear margin. Besides, Twins-PCPVT-B also achieves $3 . 3 \%$ higher mIoU than PVT-Medium, and Twins-PCPVT-L surpasses PVT-Large with $4 . 3 \%$ higher mIoU.
104
+
105
+ Twins-SVT vs. Swin. We also compare our Twins-SVT with the recent state-of-the-art model Swin [4]. With the Semantic FPN framework and the above settings, Twins-SVT-S achieves better performance $( + 1 . 7 \% )$ than Swin-T. Twins-SVT-B obtains comparable performance with Swin-S and Twins-SVT-L outperforms Swin-B by $0 . 7 \%$ mIoU (left columns in Table 2). In addition, Swin evaluates its performance using the UperNet framework [44]. We transfer our method to this framework and use exactly the same training settings as [4]. To be specific, we use the AdamW optimizer to train all models for $1 6 0 \mathrm { k }$ iterations with a global batch size of 16. The initial learning rate is $6 \times 1 0 ^ { - 5 }$ and linearly decayed to zero. We also utilize warm-up during the first 1500 iterations. Moreover, we apply the drop-path regularization of 0.2 for the backbone and weight decay 0.01 for the whole network. We report the mIoU of both single scale and multi-scale testing (we use scales from 0.5 to 1.75 with step 0.25) in the right columns of Table 2. Both with multi-scale testing, Twins-SVT-S outperforms Swin-T by $1 . 3 \%$ mIoU. Moreover, Twins-SVT-L achieves new state of the art result $5 0 . 2 \%$ mIoU under comparable FLOPs and outperforms Swin-B by $0 . 5 \%$ mIoU. Twins-PCPVT also achieves comparable performance to Swin [4].
106
+
107
+ # 4.3 Object Detection and Segmentation on COCO
108
+
109
+ We evaluate the performance of our method using two representative frameworks: RetinaNet [46] and Mask RCNN [47]. Specifically, we use our transformer models to build the backbones of these detectors. All the models are trained under the same setting as in [8]. Since PVT and Swin report their results using different frameworks, we try to make fair comparison and build consistent settings for future methods. Specifically, we report standard $1 \times$ -schedule (12 epochs) detection results on the COCO 2017 dataset [48] in Tables 3 and 4. As for the evaluation based on RetinaNet, we train all the models using AdamW [37] optimizer for 12 epochs with a batch size of 16. The initial learning rate is $1 \times 1 \bar { 0 } ^ { - 4 }$ , started with 500-iteration warmup and decayed by $1 0 \times$ at the 8th and 11th epoch, respectively. We use stochastic drop path regularization of 0.2 and weight decay 0.0001. The implementation is based on MMDetection [49]. For the Mask R-CNN framework, we use the initial learning rate of $2 \times 1 0 ^ { - 4 }$ as in [8]. All other hyper-parameters follow the default settings in MMDetection. As for $3 \times$ experiments, we follow the common multi-scale training in [3, 4], i.e., randomly resizing the input image so that its shorter side is between 480 and 800 while keeping longer one less than 1333. Moreover, for $3 \times$ training of Mask R-CNN, we use an initial learning rate of 0.0001 and weight decay of 0.05 for the whole network as [4].
110
+
111
+ Table 1 – Comparisons with state-of-the-art methods for ImageNet-1K classification. Throughput is tested on the batch size of 192 on a single V100 GPU. All models are trained and evaluated on $2 2 4 \times 2 2 4$ resolution on ImageNet-1K dataset. †: w/ CPVT’s position encodings [9].
112
+
113
+ <table><tr><td>Method</td><td>Param (M)</td><td>FLOPs (G)</td><td>Throughput (Images/s)</td><td>Top-1 (%)</td></tr><tr><td colspan="5">ConvNet</td></tr><tr><td>RegNetY-4G [40]</td><td>21</td><td>4.0</td><td>1157</td><td>80.0</td></tr><tr><td>RegNetY-8G [40]</td><td>39</td><td>8.0</td><td>592</td><td>81.7</td></tr><tr><td>RegNetY-16G [40]</td><td>84</td><td>16.0</td><td>335</td><td>82.9</td></tr><tr><td colspan="5">Transformer</td></tr><tr><td>DeiT-Small/16 [2]</td><td>22.1</td><td>4.6</td><td>437</td><td>79.9</td></tr><tr><td>CrossViT-S [30]</td><td>26.7</td><td>5.6</td><td>-</td><td>81.0</td></tr><tr><td>T2T-ViT-14 [27]</td><td>22</td><td>5.2</td><td></td><td>81.5</td></tr><tr><td>TNT-S [15]</td><td>23.8</td><td>5.2</td><td>=</td><td>81.3</td></tr><tr><td>CoaTMini [17]</td><td>10</td><td>6.8</td><td></td><td>80.8</td></tr><tr><td>CoaT-Lite Small [17]</td><td>20</td><td>4.0</td><td>-</td><td>81.9</td></tr><tr><td>PVT-Small [8]</td><td>24.5</td><td>3.8</td><td>820</td><td>79.8</td></tr><tr><td>CPVT-Small-GAP [9]</td><td>23</td><td>4.6</td><td>817</td><td>81.5</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>24.1</td><td>3.8</td><td>815</td><td>81.2 (+1.3)</td></tr><tr><td>Swin-T[4]</td><td>29</td><td>4.5</td><td>766</td><td>81.3</td></tr><tr><td>Swin-T + CPVT†</td><td>28</td><td>4.4</td><td>766</td><td>81.2</td></tr><tr><td>Twins-SVT-S (ours)</td><td>24</td><td>2.9</td><td>1059</td><td>81.7 (+1.8)</td></tr><tr><td>T2T-ViT-19 [27]</td><td>39.2</td><td>8.9</td><td>1</td><td>81.9</td></tr><tr><td>PVT-Medium [8]</td><td>44.2</td><td>6.7</td><td>526</td><td>81.2</td></tr><tr><td>Twins-PCPVT-B(ours)</td><td>43.8</td><td>6.7</td><td>525</td><td>82.7 (+0.8)</td></tr><tr><td>Swin-S [4]</td><td>50</td><td>8.7</td><td>444</td><td>83.0</td></tr><tr><td>Twins-SVT-B (ours)</td><td>56</td><td>8.6</td><td>469</td><td>83.2 (+1.3)</td></tr><tr><td>ViT-Base/16 [1]</td><td>86.6</td><td>17.6</td><td>86</td><td>77.9</td></tr><tr><td>DeiT-Base/16 [2]</td><td>86.6</td><td>17.6</td><td>292</td><td>81.8</td></tr><tr><td>T2T-ViT-24[27]</td><td>64.1</td><td>14.1</td><td>1</td><td>82.3</td></tr><tr><td>Cross ViT-B [30]</td><td>104.7</td><td>21.2</td><td>1</td><td>82.2</td></tr><tr><td>TNT-B [15]</td><td>66</td><td>14.1</td><td>=</td><td>82.8</td></tr><tr><td>CPVT-B [9]</td><td>88</td><td>17.6</td><td>292</td><td>82.3</td></tr><tr><td>PVT-Large [8]</td><td>61.4</td><td>9.8</td><td>367</td><td>81.7</td></tr><tr><td>Twins-PCPVT-L(ours)</td><td>60.9</td><td>9.8</td><td>367</td><td>83.1 (+5.2)</td></tr><tr><td>Swin-B [4]</td><td>88</td><td>15.4</td><td>275</td><td>83.3</td></tr><tr><td>Twins-SVT-L (ours)</td><td>99.2</td><td>15.1</td><td>288</td><td>83.7( (+5.8)</td></tr><tr><td colspan="5">Hybrid</td></tr><tr><td>BoTNet-S1-59 [29]</td><td>33.5</td><td>7.3</td><td></td><td>81.7</td></tr><tr><td>BossNet-T1 [41]</td><td>1</td><td>7.9</td><td></td><td>81.9</td></tr><tr><td>CvT-13 [31]</td><td>20</td><td>4.5</td><td></td><td>81.6</td></tr><tr><td>BoTNet-S1-110 [29]</td><td>54.7</td><td>10.9</td><td></td><td>82.8</td></tr><tr><td>CvT-21 [31]</td><td>32</td><td>7.1</td><td>=</td><td>82.5</td></tr></table>
114
+
115
+ For $1 \times$ schedule object detection with RetinaNet, Twins-PCPVT-S surpasses PVT-Small with $2 . 6 \%$ mAP and Twins-PCPVT-B exceeds PVT-Medium by $2 . 4 \%$ mAP on the COCO val2017 split. Twins-SVT-S outperforms Swin-T with $1 . 5 \%$ mAP while using $12 \%$ fewer FLOPs. Our method outperform the others with similar advantage in $3 \times$ experiments.
116
+
117
+ Table 2 – Performance comparisons with different backbones on ADE20K validation dataset. FLOPs are tested on $5 1 2 \times 5 1 2$ resolution. All backbones are pretrained on ImageNet-1k except SETR [45], which is pretrained on ImageNet-21k dataset.
118
+
119
+ <table><tr><td rowspan="2">Backbone</td><td colspan="3">Semantic FPN 80k (PVT [8] setting)</td><td colspan="3">Upernet 160k (Swin [4] setting)</td></tr><tr><td>FLOPs (G)</td><td>Param (M)</td><td>mIoU (%)</td><td>FLOPs (G)</td><td>Param (M)</td><td>mIoU/MS mIoU (%)</td></tr><tr><td>ResNet50 [10]</td><td>45</td><td>28.5</td><td>36.7</td><td></td><td>1</td><td></td></tr><tr><td>PVT-Small [8]</td><td>40</td><td>28.2</td><td>39.8</td><td>1</td><td>-</td><td>=</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>40</td><td>28.4</td><td>44.3 (+7.6)</td><td>234</td><td>54.6</td><td>46.2/47.5</td></tr><tr><td>Swin-T[4]</td><td>46</td><td>31.9</td><td>41.5</td><td>237</td><td>59.9</td><td>44.5/45.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>37</td><td>28.3</td><td>43.2( (+6.5)</td><td>228</td><td>54.4</td><td>46.2/47.1</td></tr><tr><td>ResNet101 [10]</td><td>66</td><td>47.5</td><td>38.8</td><td>258</td><td>86</td><td>-/44.9</td></tr><tr><td>PVT-Medium [8]</td><td>55</td><td>48.0</td><td>41.6</td><td>=</td><td>1</td><td></td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>55</td><td>48.1</td><td>44.9 (+6.1)</td><td>250</td><td>74.3</td><td>47.1/48.4</td></tr><tr><td>Swin-S [4]</td><td>70</td><td>53.2</td><td>45.2</td><td>261</td><td>81.3</td><td>47.6/49.5</td></tr><tr><td>Twins-SVT-B (ours)</td><td>67</td><td>60.4</td><td>45.3 (+6.5)</td><td>261</td><td>88.5</td><td>47.7/48.9</td></tr><tr><td>ResNetXt101-64×4d [13]</td><td>1</td><td>86.4</td><td>40.2</td><td>1</td><td>1</td><td>=</td></tr><tr><td>PVT-Large [8]</td><td>71</td><td>65.1</td><td>42.1</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Twins-PCPVT-L (ours)</td><td>71</td><td>65.3</td><td>46.4 (+6.2)</td><td>269</td><td>91.5</td><td>48.6/49.8</td></tr><tr><td>Swin-B [4]</td><td>107</td><td>91.2</td><td>46.0</td><td>299</td><td>121</td><td>48.1/49.7</td></tr><tr><td>Twins-SVT-L (ours)</td><td>102</td><td>103.7</td><td>46.7 (+6.5)</td><td>297</td><td>133</td><td>48.8/50.2</td></tr><tr><td>Backbone</td><td></td><td></td><td>PUP (SETR [45] setting)</td><td colspan="3">MLA (SETR [45] setting)</td></tr><tr><td>T-Large (SETR) [45]</td><td>-</td><td>310</td><td>50.1</td><td>1</td><td>308</td><td>48.6/50.3</td></tr></table>
120
+
121
+ For $1 \times$ object segmentation with the Mask R-CNN framework, Twins-PCPVT-S brings similar improvements $( + 2 . 5 \%$ mAP) over PVT-Small. Compared with PVT-Medium, Twins-PCPVT-B obtains $2 . 6 \%$ higher mAP, which is also on par with that of Swin. Both Twins-SVT-S and Twins-SVTB achieve better or slightly better performance compared to the counterparts of Swin. As for large models, our results are shown in Table 1 (in supplementary) and we also achieve better performance with comparable FLOPs.
122
+
123
+ Table 3 – Object detection performance on the COCO val2017 split using the RetinaNet framework. $1 \times$ is 12 epochs and $3 \times$ is 36 epochs. “MS”: Multi-scale training. FLOPs are evaluated on $8 0 0 \times 6 0 0$ resolution.
124
+
125
+ <table><tr><td rowspan="2">Backbone</td><td rowspan="2">FLOPsParaml (G)</td><td rowspan="2">(M)</td><td>RetinaNet1×</td><td>RetinaNet 3× +MS</td></tr><tr><td>|AP</td><td>AP50 AP75 APs APm APL|AP AP50 AP75APs APm APL</td></tr><tr><td>ResNet50 [10]</td><td>111</td><td>37.7 36.3</td><td>55.3 38.6 19.3 40.0 48.8|39.0</td><td>58.4 41.8 22.4 42.8 51.6</td></tr><tr><td>PVT-Small [8]</td><td>118</td><td>34.2</td><td>61.3 43.0 25.0 42.9 55.7</td><td>62.7 45.0 26.2 45.2 57.2</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>118</td><td>34.4</td><td>43.0(+6.7) 64.1 46.0 27.5 46.3 57.3</td><td>45.2(+6.2) 66.5 48.6 30.0 48.8 58.9</td></tr><tr><td>Swin-T[4]</td><td>118</td><td>38.5</td><td>62.1 44.2 25.1 44.9 55.5</td><td>43.9 64.8 47.1 28.4 47.2 57.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>104</td><td>34.3</td><td>43.0(+6.7) 64.2 46.3 28.0 46.4 57.5</td><td>45.6(+6.6) 67.1 48.6 29.8 49.3 60.0</td></tr><tr><td>ResNet101[10]</td><td>149</td><td>56.7</td><td>57.8 41.2 21.4 42.6 51.1</td><td>60.1 44.0 23.7 45.0 53.8</td></tr><tr><td>ResNeXt101-32×4d[13]</td><td>151</td><td>56.4</td><td>59.642.7 22.344.2 52.5</td><td>61.0 44.3 23.9 45.5 53.7</td></tr><tr><td>PVT-Medium [8]</td><td>151</td><td>53.9</td><td>63.1 44.3 25.0 44.9 57.64</td><td>63.8 46.1 27.3 46.3 58.9</td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>151</td><td>54.1</td><td>41.9 44.3(+5.8) ) 65.6 47.3 27.9 47.9 59.64</td><td>43.2 46.4(+5.5) 67.7 49.8 31.3 50.2 61.4 46.3</td></tr><tr><td>Swin-S [4]</td><td>162</td><td>59.8</td><td>44.5 65.7 47.5 27.4 48.0 59.9</td><td>67.4 49.8 31.1 50.3 60.9</td></tr><tr><td>Twins-SVT-B (ours)</td><td>163</td><td>67.0</td><td>45.3(+6.8) 66.7 48.1 28.5 48.9 60.646.9(+6.0)</td><td>68.0 50.2 31.7 50.3 61.8</td></tr></table>
126
+
127
+ # 4.4 Ablation Studies
128
+
129
+ Configurations of LSA and GSA blocks. We evaluate different combinations of LSA and GSA based on our small model and present the ablation results in Table 5. The models with only locally-grouped attention fail to obtain good performance $( 7 6 . 9 \% )$
130
+
131
+ Table 5 – Classification performance for different combinations of LSA (L) and GSA (G) blocks based on the small model.
132
+
133
+ <table><tr><td>Function Type</td><td>Params (M)</td><td>FLOPs (G)</td><td>Top-1 (%)</td></tr><tr><td>(L,L,L)</td><td>8.8</td><td>2.2</td><td>76.9</td></tr><tr><td>(L, LLG, LLG, G)</td><td>23.5</td><td>2.8</td><td>81.5</td></tr><tr><td>(L, LG, LG, G)</td><td>24.1</td><td>2.8</td><td>81.7</td></tr><tr><td>(L,L,L, G)</td><td>22.2</td><td>2.9</td><td>80.5</td></tr><tr><td>PVT-small(G, G, G, G) [8]</td><td>24.5</td><td>3.8</td><td>79.8</td></tr></table>
134
+
135
+ Table 4 – Object detection and instance segmentation performance on the COCO val2017 dataset using the Mask R-CNN framework. FLOPs are evaluated on a $8 0 0 \times 6 0 0$ image.
136
+
137
+ <table><tr><td rowspan="2">Backbone</td><td rowspan="2">FLOPsParaml (G)</td><td rowspan="2">(M)</td><td colspan="3">Mask R-CNN 1×</td><td colspan="3">Mask R-CNN3× +MS</td></tr><tr><td>|APb</td><td>AP0APAPm</td><td>APAP|APb</td><td></td><td></td><td>AP0APP APm APAPP</td></tr><tr><td>ResNet50 [10]</td><td>174</td><td>44.2</td><td>38.0</td><td>58.6 41.4 34.4</td><td>55.1 36.741.0</td><td></td><td></td><td>61.7 44.9 37.1 58.4 40.1</td></tr><tr><td>PVT-Small [8]</td><td>178</td><td>44.1</td><td>40.4</td><td>62.9 43.8 37.8</td><td>60.1 40.343.0</td><td></td><td></td><td>65.3 46.9 39.9 62.5 42.8</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>178</td><td>44.3</td><td>42.9(+4.9)</td><td>65.8 47.1 40.0(+5.6)</td><td>62.742.9</td><td></td><td>46.8(+5.8)</td><td>69.3 51.8 42.6 66.3 46.0</td></tr><tr><td>Swin-T[4]</td><td>177</td><td>47.8</td><td>42.2</td><td>64.6 46.2 39.1</td><td></td><td>61.6 42.0 46.0</td><td></td><td>68.2 50.2 41.6 65.1 44.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>164</td><td>44.0</td><td>43.4(+5.4)</td><td>66.0 47.3 40.3(+5.9)</td><td>63.243.4</td><td></td><td>46.8(+5.8)</td><td>69.2 51.2 42.6 66.3 45.8</td></tr><tr><td>ResNet101[10]</td><td>210</td><td>63.2</td><td>40.4</td><td>61.1 44.2 36.4</td><td></td><td>57.7 38.842.8</td><td></td><td>63.2 47.1 38.5 60.1 41.3</td></tr><tr><td>ResNeXt101-32×4d[13]</td><td>212</td><td>62.8</td><td>41.9</td><td>62.5 45.9 37.5</td><td></td><td>59.4 40.2 44.0</td><td></td><td>64.4 48.0 39.2 61.4 41.9</td></tr><tr><td>PVT-Medium [8]</td><td>211</td><td>63.9</td><td>42.0</td><td>64.4 45.6 39.0</td><td>61.6 42.1</td><td>44.2</td><td></td><td>66.0 48.2 40.5 63.1 43.5</td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>211</td><td>64.0</td><td>44.6(+4.2)</td><td>66.7 48.9 40.9(+4.5)</td><td></td><td>63.844.2</td><td>47.9(+5.1) 70.1</td><td>52.5 43.2 67.2 46.3</td></tr><tr><td>Swin-S [4]</td><td>222</td><td>69.1</td><td>44.8</td><td>66.6 48.9 40.9</td><td></td><td>63.4 44.2 47.6</td><td></td><td>69.4 52.5 42.8 66.5 46.4</td></tr><tr><td>Twins-SVT-B (ours)</td><td>224</td><td>76.3</td><td>45.2(+4.8)</td><td>67.6 49.3 41.5(+5.1) </td><td>64.5 44.8</td><td></td><td>48.0(+5.2)</td><td>69.5 52.7 43.0 66.8 46.6</td></tr></table>
138
+
139
+ because this setting has a limited and small receptive field. An extra global attention layer in the last stage can improve the classification performance by $3 . 6 \%$ . Local-Local-Global (abbr. LLG) also achieves good performance $( 8 1 . 5 \% )$ , but we do not use this design in this work.
140
+
141
+ Sub-sampling functions. We further study how the different sub-sampling functions affect the performance. Specifically, we compare the regular strided convolutions, separable convolutions and average pooling based on the ‘small’ model and present the results in Table 6. The first option performs best and therefore we choose it as our default implementation.
142
+
143
+ Table 6 – ImageNet classification performance of different forms of sub-sampled functions for the global sub-sampled attention (GSA).
144
+
145
+ <table><tr><td>Function Type</td><td>Top-1(%)</td></tr><tr><td>2D Conv.</td><td>81.7</td></tr><tr><td>2D Separable Conv.</td><td>81.2</td></tr><tr><td>Average Pooling</td><td>81.2</td></tr></table>
146
+
147
+ sitional Encodings. We replace the relative positional encoding with CPVT for Swin-T and report the detection performance on COCO with RetinaNet and Mask R-CNN in Table 7. The CPVT-based Swin cannot achieve improved performance with both frameworks, which indicates that our performance improvements should be owing to the paradigm of Twins-SVT instead of the positional encodings.
148
+
149
+ Table 7 – Object detection performance on the COCO using different positional encoding strategies.
150
+
151
+ <table><tr><td rowspan="2">Backbone</td><td colspan="4">RetinaNet</td><td colspan="6">Mask RCNN</td></tr><tr><td>FLOPs(G)</td><td>Param(M) AP</td><td></td><td>AP50</td><td>AP75</td><td>FLOPs(G)</td><td>Param(M)</td><td>AP</td><td>AP50</td><td>AP75</td></tr><tr><td>Swin-T[4]]</td><td>245</td><td>38.5</td><td>41.5</td><td>62.1</td><td>44.2</td><td>264</td><td>47.8</td><td>42.2</td><td>64.6</td><td>46.2</td></tr><tr><td>Swin-T+CPVT</td><td>245</td><td>38.5</td><td>41.3</td><td>62.4</td><td>44.1</td><td>263</td><td>47.8</td><td>42.0</td><td>64.5</td><td>45.9</td></tr></table>
152
+
153
+ # 5 Conclusion
154
+
155
+ In this paper, we have presented two powerful vision transformer backbones for both image-level classification and a few downstream dense prediction tasks. We dub them as twin transformers: Twins-PCPVT and Twins-SVT. The former variant explores the applicability of conditional positional encodings [9] in pyramid vision transformer [8], confirming its potential for improving backbones in many vision tasks. In the latter variant we revisit current attention design to proffer a more efficient attention paradigm. We find that interleaving local and global attention can produce impressive results, yet it comes with higher throughputs. Both transformer models set a new state of the art in image classification, objection detection and semantic/instance segmentation.
156
+
157
+ # References
158
+
159
+ [1] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In Proc. Int. Conf. Learn. Representations, 2021.
160
+ [2] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. [3] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Proc. Eur. Conf. Comp. Vis., pages 213–229. Springer, 2020.
161
+ [4] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proc. IEEE Int. Conf. Comp. Vis., pages 10012–10022, 2021. [5] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Trans. Pattern Anal. Mach. Intell., 40(4):834–848, 2017. [6] Chao Peng, Xiangyu Zhang, Gang Yu, Guiming Luo, and Jian Sun. Large kernel matters– improve semantic segmentation by global convolutional network. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4353–4361, 2017.
162
+ [7] Wei Liu, Andrew Rabinovich, and Alexander C Berg. Parsenet: Looking wider to see better. arXiv preprint arXiv:1506.04579, 2015. [8] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. [9] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021.
163
+ [10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 770–778, 2016.
164
+ [11] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In Proc. Int. Conf. Mach. Learn., pages 6105–6114. PMLR, 2019.
165
+ [12] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1251–1258, 2017.
166
+ [13] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1492–1500, 2017.
167
+ [14] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proc. Advances in Neural Inf. Process. Syst., pages 6000–6010, 2017.
168
+ [15] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021.
169
+ [16] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In Proc. Advances in Neural Inf. Process. Syst., volume 32, pages 68–80, 2019.
170
+ [17] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers, 2021.
171
+ [18] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2021.
172
+ [19] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. arXiv preprint arXiv:2012.00364, 2020.
173
+ [20] Fuzhi Yang, Huan Yang, Jianlong Fu, Hongtao Lu, and Baining Guo. Learning texture transformer network for image super-resolution. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5791–5800, 2020.
174
+ [21] Yanhong Zeng, Jianlong Fu, and Hongyang Chao. Learning joint spatial-temporal transformations for video inpainting. In Proc. Eur. Conf. Comp. Vis., pages 528–543. Springer, 2020.
175
+ [22] Zhigang Dai, Bolun Cai, Yugeng Lin, and Junying Chen. UP-DETR: Unsupervised pre-training for object detection with transformers. arXiv preprint arXiv:2011.09094, 2020.
176
+ [23] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv: Comp. Res. Repository, 2021.
177
+ [24] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. arXiv preprint arXiv:2012.15840, 2020.
178
+ [25] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In Proc. Int. Conf. Mach. Learn., volume 80, pages 4055–4064, 2018.
179
+ [26] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint arXiv:2103.17239, 2021.
180
+ [27] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token ViT: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021.
181
+ [28] Zihang Jiang, Qibin Hou, Li Yuan, Daquan Zhou, Xiaojie Jin, Anran Wang, and Jiashi Feng. Token labeling: Training an $8 5 . 4 \%$ top-1 accuracy vision transformer with 56M parameters on ImageNet. arXiv: Comp. Res. Repository, 2021.
182
+ [29] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021.
183
+ [30] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. CrossViT: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021.
184
+ [31] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. CvT: Introducing convolutions to vision transformers. arXiv: Comp. Res. Repository, 2021.
185
+ [32] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In Proc. Int. Conf. Learn. Representations, 2021.
186
+ [33] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2117–2125, 2017.
187
+ [34] Yuhui Yuan, Lang Huang, Jianyuan Guo, Chao Zhang, Xilin Chen, and Jingdong Wang. OCNet: Object context network for scene parsing. arXiv: Comp. Res. Repository, 2021.
188
+ [35] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. In Proc. Advances in Neural Inf. Process. Syst., volume 25, pages 1097–1105, 2012.
189
+ [36] Laurent Sifre and Stéphane Mallat. Rigid-motion scattering for texture classification. arXiv preprint arXiv:1403.1687, 2014.
190
+ [37] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In Proc. Int. Conf. Learn. Representations, 2019.
191
+ [38] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Weinberger. Deep networks with stochastic depth. In Proc. Eur. Conf. Comp. Vis., pages 646–661. Springer, 2016.
192
+ [39] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015.
193
+ [40] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428–10436, 2020.
194
+ [41] Changlin Li, Tao Tang, Guangrun Wang, Jiefeng Peng, Bing Wang, Xiaodan Liang, and Xiaojun Chang. Bossnas: Exploring hybrid cnn-transformers with block-wisely self-supervised neural architecture search. arXiv preprint arXiv:2103.12424, 2021.
195
+ [42] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ADE20k dataset. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 633–641, 2017.
196
+ [43] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 6399–6408, 2019.
197
+ [44] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418–434, 2018.
198
+ [45] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip H.S. Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021.
199
+ [46] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In Proc. IEEE Int. Conf. Comp. Vis., pages 2980–2988, 2017.
200
+ [47] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. In Proc. IEEE Int. Conf. Comp. Vis., pages 2961–2969, 2017.
201
+ [48] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Proc. Eur. Conf. Comp. Vis., pages 740–755, 2014.
202
+ [49] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open MMLab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019.
parse/train/5kTlVBkzSRx/5kTlVBkzSRx_content_list.json ADDED
@@ -0,0 +1,930 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Twins: Revisiting the Design of Spatial Attention in Vision Transformers ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 189,
8
+ 122,
9
+ 810,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Xiangxiang $\\mathbf { C h u ^ { 1 } }$ , Zhi Tian1,2, Yuqing Wang1, Bo Zhang1 Haibing Ren1, Xiaolin Wei1, Huaxia Xia1, Chunhua Shen2∗ ",
17
+ "bbox": [
18
+ 290,
19
+ 219,
20
+ 740,
21
+ 255
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1 Meituan Inc. 2 The University of Adelaide, Australia 1 {chuxiangxiang,wangyuqing06,zhangbo97,renhaibing,weixiaolin02,xiahuaxia}@meituan.com 2 zhi.tian@outlook.com, chunhua@me.com ",
28
+ "bbox": [
29
+ 184,
30
+ 262,
31
+ 843,
32
+ 309
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 344,
43
+ 535,
44
+ 362
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Very recently, a variety of vision transformer architectures for dense prediction tasks have been proposed and they show that the design of spatial attention is critical to their success in these tasks. In this work, we revisit the design of the spatial attention and demonstrate that a carefully devised yet simple spatial attention mechanism performs favorably against the state-of-the-art schemes. As a result, we propose two vision transformer architectures, namely, Twins-PCPVT and TwinsSVT. Our proposed architectures are highly efficient and easy to implement, only involving matrix multiplications that are highly optimized in modern deep learning frameworks. More importantly, the proposed architectures achieve excellent performance on a wide range of visual tasks including image-level classification as well as dense detection and segmentation. The simplicity and strong performance suggest that our proposed architectures may serve as stronger backbones for many vision tasks. Our code is available at: https://git.io/Twins. ",
51
+ "bbox": [
52
+ 233,
53
+ 376,
54
+ 766,
55
+ 555
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 579,
66
+ 310,
67
+ 597
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recently, Vision Transformers [1–3] have received increasing research interest. Compared to the widely-used convolutional neural networks (CNNs) in visual perception, Vision Transformers enjoy great flexibility in modeling long-range dependencies in vision tasks, introduce less inductive bias, and can naturally process multi-modality input data including images, videos, texts, speech signals, and point clouds. Thus, they have been considered to be a strong alternative to CNNs. It is expected that vision transformers are likely to replace CNNs and serve as the most basic component in the next-generation visual perception systems. ",
74
+ "bbox": [
75
+ 174,
76
+ 611,
77
+ 825,
78
+ 708
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "One of the prominent problems when applying transformers to vision tasks is the heavy computational complexity incurred by the spatial self-attention operation in transformers, which grows quadratically in the number of pixels of the input image. A workaround is the locally-grouped self-attention (or self-attention in non-overlapped windows as in the recent Swin Transformer [4]), where the input is spatially grouped into non-overlapped windows and the standard self-attention is computed only within each sub-window. Although it can significantly reduce the complexity, it lacks the connections between different windows and thus results in a limited receptive field. As pointed out by many previous works [5–7], a sufficiently large receptive field is crucial to the performance, particularly for dense prediction tasks such as image segmentation and object detection. Swin [4] proposes a shifted window operation to tackle the issue, where the boundaries of these local windows are gradually moved as the network proceeds. Despite being effective, the shifted windows may have uneven sizes. The uneven windows result in difficulties when the models are deployed with ONNX or TensorRT, which prefers the windows of equal sizes. Another solution is proposed in PVT [8]. Unlike the standard self-attention operation, where each query computes the attention weights with all the input tokens, in PVT, each query only computes the attention with a sub-sampled version of the input tokens. Although its computational complexity in theory is still quadratic, it is already manageable in practice. ",
85
+ "bbox": [
86
+ 174,
87
+ 714,
88
+ 825,
89
+ 878
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 92,
99
+ 825,
100
+ 160
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "From a unified perspective, the core in the aforementioned vision transformers is how the spatial attention is designed. Thus, in this work, we revisit the design of the spatial attention in vision transformers. Our first finding is that the global sub-sampled attention in PVT is highly effective, and with the applicable positional encodings [9], its performance can be on par or even better than state-of-the-art vision transformers (e.g., Swin). This results in our first proposed architecture, termed Twins-PCPVT. On top of that, we further propose a carefully-designed yet simple spatial attention mechanism, making our architectures more efficient than PVT. Our attention mechanism is inspired by the widely-used separable depthwise convolutions and thus we name it spatially separable self-attention (SSSA). Our proposed SSSA is composed of two types of attention operations—(i) locally-grouped self-attention (LSA), and (ii) global sub-sampled attention (GSA), where LSA captures the fine-grained and short-distance information and GSA deals with the long-distance and global information. This leads to the second proposed vision transformer architecture, termed Twins-SVT. It is worth noting that both attention operations in the architecture are efficient and easy-to-implement with matrix multiplications in a few lines of code. Thus, all of our architectures here have great applicability and can be easily deployed. ",
107
+ "bbox": [
108
+ 174,
109
+ 166,
110
+ 825,
111
+ 375
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "We benchmark our proposed architectures on a number of visual tasks, ranging from image-level classification to pixel-level semantic/instance segmentation and object detection. Extensive experiments show that both of our proposed architectures perform favorably against other state-of-the-art vision transformers with similar or even reduced computational complexity. ",
118
+ "bbox": [
119
+ 174,
120
+ 381,
121
+ 825,
122
+ 436
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 Related Work ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 462,
133
+ 321,
134
+ 478
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Convolutional neural networks. Characterized by local connectivity, weight sharing, shiftinvariance and pooling, CNNs have been the de facto standard model for computer vision tasks. The top-performing models [10–13] in image classification also serve as the strong backbones for downstream detection and segmentation tasks. ",
141
+ "bbox": [
142
+ 174,
143
+ 497,
144
+ 825,
145
+ 553
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Vision Transformers. Transformer was firstly proposed by [14] for machine translation tasks, and since then they have become the state-of-the-art models for NLP tasks, overtaking the sequence-tosequence approach built on LSTM. Its core component is multi-head self-attention which models the relationship between input tokens and shows great flexibility. ",
152
+ "bbox": [
153
+ 174,
154
+ 559,
155
+ 825,
156
+ 614
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "In 2020, Transformer was introduced to computer vision for image and video processing [1–3, 9, 15– 17, 17–32]. In the image classification task, ViT [1] and DeiT [2] divide the images into patch embedding sequences and feed them into the standard transformers. Although vision transformers have been proved compelling in image classification compared with CNNs, a challenge remains when it is applied to dense prediction tasks such as object detection and segmentation. These tasks often require feature pyramids for better processing objects of different scales, and take as inputs the highresolution images, which significantly increase the computational complexity of the self-attention operations. ",
163
+ "bbox": [
164
+ 173,
165
+ 621,
166
+ 825,
167
+ 732
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Recently, Pyramid Vision Transformer (PVT) [8] is proposed and can output the feature pyramid [33] as in CNNs. PVT has demonstrated good performance in a number of dense prediction tasks. The recent Swin Transformer [4] introduces non-overlapping window partitions and restricts self-attention within each local window, resulting in linear computational complexity in the number of input tokens. To interchange information among different local areas, its window partitions are particularly designed to shift between two adjacent self-attention layers. The semantic segmentation framework OCNet [34] shares some similarities with us and they also interleave the local and global attention. Here, we demonstrate this is a general design paradigm in vision transformer backbones rather than merely an incremental module in semantic segmentation. ",
174
+ "bbox": [
175
+ 174,
176
+ 738,
177
+ 825,
178
+ 863
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Grouped and Separable Convolutions. Grouped convolutions are originally proposed in AlexNet [35] for distributed computing. They were proved both efficient and effective in speeding up the networks. As an extreme case, depthwise convolutions [12, 36] use the number of groups that is equal to the input or output channels, which is followed by point-wise convolutions to aggregate the information across different channels. Here, the proposed spatially separable self-attention shares some similarities with them. ",
185
+ "bbox": [
186
+ 176,
187
+ 869,
188
+ 825,
189
+ 911
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "",
196
+ "bbox": [
197
+ 174,
198
+ 90,
199
+ 823,
200
+ 132
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Positional Encodings. Most vision transformers use absolute/relative positional encodings, depending on downstream tasks, which are based on sinusoidal functions [14] or learnable [1, 2]. In CPVT [9], the authors propose the conditional positional encodings, which are dynamically conditioned on the inputs and show better performance than the absolute and relative ones. ",
207
+ "bbox": [
208
+ 174,
209
+ 140,
210
+ 825,
211
+ 195
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "3 Our Method: Twins ",
218
+ "text_level": 1,
219
+ "bbox": [
220
+ 176,
221
+ 214,
222
+ 372,
223
+ 231
224
+ ],
225
+ "page_idx": 2
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "We present two simple yet powerful spatial designs for vision transformers. The first method is built upon PVT [8] and CPVT [9], which only uses the global attention. The architecture is thus termed Twins-PCPVT. The second one, termed Twins-SVT, is based on the proposed SSSA which interleaves local and global attention. ",
230
+ "bbox": [
231
+ 174,
232
+ 246,
233
+ 825,
234
+ 303
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "3.1 Twins-PCPVT ",
241
+ "text_level": 1,
242
+ "bbox": [
243
+ 174,
244
+ 318,
245
+ 313,
246
+ 333
247
+ ],
248
+ "page_idx": 2
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "PVT [8] introduces the pyramid multi-stage design to better tackle dense prediction tasks such as object detection and semantic segmentation. It inherits the absolute positional encoding designed in ViT [1] and DeiT [2]. All layers utilize the global attention mechanism and rely on spatial reduction to cut down the computation cost of processing the whole sequence. It is surprising to see that the recently-proposed Swin transformer [4], which is based on shifted local windows, can perform considerably better than PVT, even on dense prediction tasks where a sufficiently large receptive field is even more crucial to good performance. ",
253
+ "bbox": [
254
+ 174,
255
+ 344,
256
+ 825,
257
+ 441
258
+ ],
259
+ "page_idx": 2
260
+ },
261
+ {
262
+ "type": "text",
263
+ "text": "In this work, we surprisingly found that the less favored performance of PVT is mainly due to the absolute positional encodings employed in PVT [8]. As shown in CPVT [9], the absolute positional encoding encounter difficulties in processing the inputs with varying sizes (which are common in dense prediction tasks). Moreover, this positional encoding also breaks the translation invariance. On the contrary, Swin transformer makes use of the relative positional encodings, which bypasses the above issues. Here, we demonstrate that this is the main cause why Swin outperforms PVT, and we show that if the appropriate positional encodings are used, PVT can actually achieve on par or even better performance than the Swin transformer. ",
264
+ "bbox": [
265
+ 174,
266
+ 446,
267
+ 825,
268
+ 558
269
+ ],
270
+ "page_idx": 2
271
+ },
272
+ {
273
+ "type": "text",
274
+ "text": "Here, we use the conditional position encoding (CPE) proposed in CPVT [9] to replace the absolute PE in PVT. CPE is conditioned on the inputs and can naturally avoid the above issues of the absolute encodings. The position encoding generator (PEG) [9], which generates the CPE, is placed after the first encoder block of each stage. We use the simplest form of PEG, i.e., a 2D depth-wise convolution without batch normalization. For image-level classification, following CPVT, we remove the class token and use global average pooling (GAP) at the end of the stage [9]. For other vision tasks, we follow the design of PVT. Twins-PCPVT inherits the advantages of both PVT and CPVT, which makes it easy to be implemented efficiently. Our extensive experimental results show that this simple design can match the performance of the recent state-of-the-art Swin transformer. We have also attempted to replace the relative PE with CPE in Swin, which however does not result in noticeable performance gains, as shown in our experiments. We conjecture that this maybe due to the use of shifted windows in Swin, which might not work well with CPE. ",
275
+ "bbox": [
276
+ 174,
277
+ 564,
278
+ 825,
279
+ 731
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "Architecture settings We report the detailed settings of Twins-PCPVT in Table 2 (in supplementary), which are similar to PVT [8]. Therefore, Twins-PCPVT has similar FLOPs and number of parameters to [8]. ",
286
+ "bbox": [
287
+ 176,
288
+ 746,
289
+ 825,
290
+ 787
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "text",
296
+ "text": "3.2 Twins-SVT ",
297
+ "text_level": 1,
298
+ "bbox": [
299
+ 174,
300
+ 804,
301
+ 290,
302
+ 819
303
+ ],
304
+ "page_idx": 2
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "Vision transformers suffer severely from the heavy computational complexity in dense prediction tasks due to high-resolution inputs. Given an input of $H \\times W$ resolution, the complexity of selfattention with dimension $d$ is $\\mathcal { O } ( H ^ { 2 } W ^ { 2 } d )$ . Here, we propose the spatially separable self-attention (SSSA) to alleviate this challenge. SSSA is composed of locally-grouped self-attention (LSA) and global sub-sampled attention (GSA). ",
309
+ "bbox": [
310
+ 174,
311
+ 829,
312
+ 825,
313
+ 900
314
+ ],
315
+ "page_idx": 2
316
+ },
317
+ {
318
+ "type": "image",
319
+ "img_path": "images/fec150010c9fe25574fcd045b5d0727df84edd7d8819dfbc9908baa560445e02.jpg",
320
+ "image_caption": [
321
+ "Figure 1 – Architecture of Twins-SVT-S. “PEG\" is the positional encoding generator from CPVT [9]. "
322
+ ],
323
+ "image_footnote": [],
324
+ "bbox": [
325
+ 174,
326
+ 92,
327
+ 820,
328
+ 202
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "Locally-grouped self-attention (LSA). Motivated by the group design in depthwise convolutions for efficient inference, we first equally divide the 2D feature maps into sub-windows, making self-attention communications only happen within each sub-window. This design also resonates with the multi-head design in selfattention, where the communications only occur within the channels of the same head. To be specific, the feature maps are divided into $m \\times n$ sub-windows. Without loss of generality, we assume $H \\% m = 0$ and $W \\% n = 0$ . Each group contains $\\textstyle { \\frac { H W } { m n _ { * } } }$ elements, and thus the computation cost of the self-attention in this window is $\\begin{array} { r } { \\mathcal { O } \\big ( \\frac { H ^ { 2 } W ^ { 2 } } { m ^ { 2 } n ^ { 2 } } d \\big ) } \\end{array}$ , and the total cost is $\\begin{array} { r } { \\mathcal { O } ( \\frac { H ^ { 2 } W ^ { 2 } } { m n } d ) } \\end{array}$ . If we let $\\begin{array} { r } { \\dot { k } _ { 1 } = \\frac { H } { m } } \\end{array}$ and $\\textstyle k _ { 2 } \\ = \\ { \\frac { W } { n } }$ , the cost can be ",
335
+ "bbox": [
336
+ 174,
337
+ 271,
338
+ 485,
339
+ 496
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "image",
345
+ "img_path": "images/12ea80c3e81cb7eced3ec463d4e28c76d5d0784a7607a8261852efa72d93e84d.jpg",
346
+ "image_caption": [
347
+ "Figure 2 – (a) Twins-SVT interleaves locally-grouped attention (LSA) and global sub-sampled attention (GSA). (b) Schematic view of the locally-grouped attention (LSA) and global sub-sampled attention (GSA). "
348
+ ],
349
+ "image_footnote": [],
350
+ "bbox": [
351
+ 522,
352
+ 272,
353
+ 799,
354
+ 428
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "computed as $\\mathcal { O } ( k _ { 1 } k _ { 2 } H W d )$ , which is significantly more efficient when $k _ { 1 } \\ll H$ and $k _ { 2 } \\ll W$ and grows linearly with $H W$ if $k _ { 1 }$ and $k _ { 2 }$ are fixed. ",
361
+ "bbox": [
362
+ 176,
363
+ 494,
364
+ 825,
365
+ 522
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "Although the locally-grouped self-attention mechanism is computation friendly, the image is divided into non-overlapping sub-windows. Thus, we need a mechanism to communicate between different sub-windows, as in Swin. Otherwise, the information would be limited to be processed locally, which makes the receptive field small and significantly degrades the performance as shown in our experiments. This resembles the fact that we cannot replace all standard convolutions by depth-wise convolutions in CNNs. ",
372
+ "bbox": [
373
+ 174,
374
+ 529,
375
+ 825,
376
+ 611
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "Global sub-sampled attention (GSA). A simple solution is to add extra standard global selfattention layers after each local attention block, which can enable cross-group information exchange. However, this approach would come with the computation complexity of $\\mathcal { O } ( H ^ { 2 } W ^ { 2 } d )$ . ",
383
+ "bbox": [
384
+ 174,
385
+ 641,
386
+ 825,
387
+ 684
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "Here, we use a single representative to summarize the important information for each of $m \\times n$ sub-windows and the representative is used to communicate with other sub-windows (serving as the key in self-attention), which can dramatically reduce the cost to $\\begin{array} { r } { \\mathcal { O } ( m n H W d ) = \\mathcal { O } ( \\frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } ) } \\end{array}$ . This is essentially equivalent to using the sub-sampled feature maps as the key in attention operations, and thus we term it global sub-sampled attention (GSA). If we alternatively use the aforementioned LSA and GSA like separable convolutions (depth-wise $^ +$ point-wise). The total computation cost√ is $\\begin{array} { r } { \\mathcal { O } ( \\frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } + k _ { 1 } k _ { 2 } \\bar { H } W d ) } \\end{array}$ . We have $\\begin{array} { r } { \\frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } + k _ { 1 } k _ { 2 } H W d \\geq 2 H W d \\sqrt { H W } } \\end{array}$ . The minimum is obtained when $\\boldsymbol { k } _ { 1 } \\cdot \\boldsymbol { k } _ { 2 } = \\sqrt { H W }$ . We note that $H = W = 2 2 4$ is popular in classification. Without loss of generality, we use square sub-windows, i.e., $k _ { 1 } = k _ { 2 }$ . Therefore, $k _ { 1 } = k _ { 2 } = 1 5$ is close to the global minimum for $H = W = 2 2 4$ . However, our network is designed to include several stages with variable resolutions. Stage 1 has feature maps of $5 6 \\times 5 6$ , the minimum is obtained when $k _ { 1 } \\stackrel { \\cdot } { = } k _ { 2 } = \\sqrt { 5 6 } \\approx 7 .$ Theoretically, we can calibrate optimal $k _ { 1 }$ and $k _ { 2 }$ for each of the stages. For simplicity, we use $k _ { 1 } = k _ { 2 } = 7$ everywhere. As for stages with lower resolutions, we control the summarizing window-size of GSA to avoid too small amount of generated keys. Specifically, we use the size of 4, 2 and 1 for the last three stages respectively. ",
394
+ "bbox": [
395
+ 173,
396
+ 690,
397
+ 826,
398
+ 911
399
+ ],
400
+ "page_idx": 3
401
+ },
402
+ {
403
+ "type": "text",
404
+ "text": "As for the sub-sampling function, we investigate several options including average pooling, depthwise strided convolutions, and regular strided convolutions. Empirical results show that regular strided convolutions perform best here. Formally, our spatially separable self-attention (SSSA) can be written as ",
405
+ "bbox": [
406
+ 178,
407
+ 90,
408
+ 823,
409
+ 147
410
+ ],
411
+ "page_idx": 4
412
+ },
413
+ {
414
+ "type": "equation",
415
+ "img_path": "images/bddfa318edf97b22ee268dd2b1545378d8b37ce65697eafa1680774021feac8e.jpg",
416
+ "text": "$$\n\\begin{array} { r l } & { \\hat { \\mathbf { z } } _ { i j } ^ { l } = \\mathrm { L S A } \\left( \\mathrm { L a y e r N o r m } \\left( \\mathbf { z } _ { i j } ^ { l - 1 } \\right) \\right) + \\mathbf { z } _ { i j } ^ { l - 1 } , } \\\\ & { \\mathbf { z } _ { i j } ^ { l } = \\mathrm { F F N } \\left( \\mathrm { L a y e r N o r m } \\left( \\hat { \\mathbf { z } } _ { i j } ^ { l } \\right) \\right) + \\hat { \\mathbf { z } } _ { i j } ^ { l } , } \\\\ & { \\hat { \\mathbf { z } } ^ { l + 1 } = \\mathrm { G S A } \\left( \\mathrm { L a y e r N o r m } \\left( \\mathbf { z } ^ { l } \\right) \\right) + \\mathbf { z } ^ { l } , } \\\\ & { \\mathbf { z } ^ { l + 1 } = \\mathrm { F F N } \\left( \\mathrm { L a y e r N o r m } \\left( \\hat { \\mathbf { z } } ^ { l + 1 } \\right) \\right) + \\hat { \\mathbf { z } } ^ { l + 1 } , } \\\\ & { i \\in \\{ 1 , 2 , . . . . , m \\} , j \\in \\{ 1 , 2 , . . . . , n \\} } \\end{array}\n$$",
417
+ "text_format": "latex",
418
+ "bbox": [
419
+ 356,
420
+ 148,
421
+ 640,
422
+ 253
423
+ ],
424
+ "page_idx": 4
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "where LSA means locally-grouped self-attention within a sub-window; GSA is the global sub-sampled attention by interacting with the representative keys (generated by the sub-sampling functions) from each sub-window $\\hat { \\mathbf { z } } _ { i j } \\mathbf { \\bar { \\Psi } } \\in \\mathcal { R } ^ { k _ { 1 } \\times k _ { 2 } \\times \\mathbf { \\bar { C } } }$ . Both LSA and GSA have multiple heads as in the standard self-attention.The PyTorch code of LSA is given in Algorithm 1 (in supplementary). ",
429
+ "bbox": [
430
+ 174,
431
+ 276,
432
+ 825,
433
+ 333
434
+ ],
435
+ "page_idx": 4
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "Again, we use the PEG of CPVT [9] to encode position information and process variable-length inputs on the fly. It is inserted after the first block in each stage. ",
440
+ "bbox": [
441
+ 171,
442
+ 338,
443
+ 823,
444
+ 366
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "Model variants. The detailed configure of Twins-SVT is shown in Table 3 (in supplementary). We try our best to use the similar settings as in Swin [4] to make sure that the good performance is due to the new design paradigm. ",
451
+ "bbox": [
452
+ 174,
453
+ 372,
454
+ 825,
455
+ 415
456
+ ],
457
+ "page_idx": 4
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "Comparison with PVT. PVT entirely utilizes global attentions as DeiT does while our method makes use of spatial separable-like design with LSA and GSA, which is more efficient. ",
462
+ "bbox": [
463
+ 176,
464
+ 420,
465
+ 821,
466
+ 449
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "Comparison with Swin. Swin utilizes the alternation of local window based attention where the window partitions in successive layers are shifted. This is used to introduce communication among different patches and to increase the receptive field. However, this procedure is relatively complicated and may not be optimized for speed on devices such as mobile devices. Swin Transformer depends on torch.roll() to perform cyclic shift and its reverse on features. This operation is memory unfriendly and rarely supported by popular inference frameworks such as NVIDIA TensorRT, Google TensorflowLite, and Snapdragon Neural Processing Engine SDK (SNPE), etc. This hinders the deployment of Swin either on the server-side or on end devices in a production environment. In contrast, Twins models don’t require such an operation and only involve matrix multiplications that are already optimized well in modern deep learning frameworks. Therefore, it can further benefit from the optimization in a production environment. For example, we converted Twins-SVT-S from PyTorch to TensorRT , and its throughput is boosted by $1 . 7 \\times$ . Moreover, our local-global design can better exploit the global context, which is known to play an important role in many vision tasks. ",
473
+ "bbox": [
474
+ 174,
475
+ 455,
476
+ 825,
477
+ 636
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "Finally, one may note that the network configures (e.g., such as depths, hidden dimensions, number of heads, and the expansion ratio of MLP) of our two variants are sightly different. This is intended because we want to make fair comparisons to the two recent well-known transformers PVT and Swin. PVT prefers a slimmer and deeper design while Swin is wider and shallower. This difference makes PVT have slower training than Swin. Twins-PCPVT is designed to compare with PVT and shows that a proper positional encoding design can greatly boost the performance and make it on par with recent state-of-the-art models like Swin. On the other hand, Twins-SVT demonstrates the potential of a new paradigm as to spatially separable self-attention is highly competitive to recent transformers. ",
484
+ "bbox": [
485
+ 174,
486
+ 641,
487
+ 825,
488
+ 752
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "4 Experiments ",
495
+ "text_level": 1,
496
+ "bbox": [
497
+ 174,
498
+ 771,
499
+ 312,
500
+ 789
501
+ ],
502
+ "page_idx": 4
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "4.1 Classification on ImageNet-1K ",
507
+ "text_level": 1,
508
+ "bbox": [
509
+ 176,
510
+ 803,
511
+ 424,
512
+ 818
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "We first present the ImageNet classification results with our proposed models. We carefully control the experiment settings to make fair comparisons against recent works [2, 8, 9]. All our models are trained for 300 epochs with a batch size of 1024 using the AdamW optimizer [37]. The learning rate is initialized to be 0.001 and decayed to zero within 300 epochs following the cosine strategy. We use a linear warm-up in the first five epochs and the same regularization setting as in [2]. Note that we do not utilize extra tricks in [26, 28] to make fair comparisons although it may further improve the performance of our method. We use increasing stochastic depth [38] augmentation of 0.2, 0.3, 0.5 for small, base and large model respectively. Following Swin [4], we use gradient clipping with a max norm of 5.0 to stabilize the training process, which is especially important for the training of large models. ",
519
+ "bbox": [
520
+ 174,
521
+ 827,
522
+ 823,
523
+ 911
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "",
530
+ "bbox": [
531
+ 174,
532
+ 90,
533
+ 825,
534
+ 147
535
+ ],
536
+ "page_idx": 5
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "We report the classification results on ImageNet-1K [39] in Table 1. Twins-PCPVT-S outperforms PVT-small by $1 . 4 \\%$ and obtains similar result as Swin-T with $18 \\%$ fewer FLOPs. Twins-SVT-S is better than Swin-T with about $3 5 \\%$ fewer FLOPs. Other models demonstrate similar advantages. ",
541
+ "bbox": [
542
+ 174,
543
+ 154,
544
+ 823,
545
+ 195
546
+ ],
547
+ "page_idx": 5
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "It is interesting to see that, without bells and whistles, Twins-PCPVT performs on par with the recent state-of-the-art Swin, which is based on much more sophisticated designs as mentioned above. Moreover, Twins-SVT also achieves similar or better results, compared to Swin, indicating that the spatial separable-like design is an effective and promising paradigm. ",
552
+ "bbox": [
553
+ 174,
554
+ 200,
555
+ 825,
556
+ 257
557
+ ],
558
+ "page_idx": 5
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "One may challenge our improvements are due to the use of the better positional encoding PEG. Thus, we also replace the relative PE in Swin-T with PEG [9], but the Swin-T’s performance cannot be improved (being $8 1 . 2 \\%$ ). ",
563
+ "bbox": [
564
+ 176,
565
+ 263,
566
+ 823,
567
+ 305
568
+ ],
569
+ "page_idx": 5
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "4.2 Semantic Segmentation on ADE20K ",
574
+ "text_level": 1,
575
+ "bbox": [
576
+ 178,
577
+ 325,
578
+ 464,
579
+ 340
580
+ ],
581
+ "page_idx": 5
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "We further evaluate the performance on segmentation tasks. We test on the ADE20K dataset [42], a challenging scene parsing task for semantic segmentation, which is popularly evaluated by recent Transformer-based methods. This dataset contains 20K images for training and 2K images for validation. Following the common practices, we use the training set to train our models and report the mIoU on the validation set. All models are pretrained on the ImageNet-1k dataset. ",
586
+ "bbox": [
587
+ 173,
588
+ 353,
589
+ 825,
590
+ 421
591
+ ],
592
+ "page_idx": 5
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "Twins-PCPVT vs. PVT. We compare our Twins-PCPVT with PVT [8] because they have similar design and computational complexity. To make fair comparisons, we use the Semantic FPN framework [43] and exactly the same training settings as in PVT. Specifically, we train 80K steps with a batch size of 16 using AdamW [37]. The learning rate is initialized as $1 \\times 1 0 ^ { - 4 }$ and scheduled by the ‘poly’ strategy with the power coefficient of 0.9. We apply the drop-path regularization of 0.2 for the backbone and weight decay 0.0005 for the whole network. Note that we use a stronger drop-path regularization of 0.4 for the large model to avoid over-fitting. For Swin, we use their official code and trained models. We report the results in Table 2. With comparable FLOPs, Twins-PCPVT-S outperforms PVT-Small with a large margin $( + 4 . 5 \\%$ mIoU), which also surpasses ResNet-50 by $7 . 6 \\%$ mIoU. It also outperforms Swin-T with a clear margin. Besides, Twins-PCPVT-B also achieves $3 . 3 \\%$ higher mIoU than PVT-Medium, and Twins-PCPVT-L surpasses PVT-Large with $4 . 3 \\%$ higher mIoU. ",
597
+ "bbox": [
598
+ 173,
599
+ 429,
600
+ 825,
601
+ 580
602
+ ],
603
+ "page_idx": 5
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "Twins-SVT vs. Swin. We also compare our Twins-SVT with the recent state-of-the-art model Swin [4]. With the Semantic FPN framework and the above settings, Twins-SVT-S achieves better performance $( + 1 . 7 \\% )$ than Swin-T. Twins-SVT-B obtains comparable performance with Swin-S and Twins-SVT-L outperforms Swin-B by $0 . 7 \\%$ mIoU (left columns in Table 2). In addition, Swin evaluates its performance using the UperNet framework [44]. We transfer our method to this framework and use exactly the same training settings as [4]. To be specific, we use the AdamW optimizer to train all models for $1 6 0 \\mathrm { k }$ iterations with a global batch size of 16. The initial learning rate is $6 \\times 1 0 ^ { - 5 }$ and linearly decayed to zero. We also utilize warm-up during the first 1500 iterations. Moreover, we apply the drop-path regularization of 0.2 for the backbone and weight decay 0.01 for the whole network. We report the mIoU of both single scale and multi-scale testing (we use scales from 0.5 to 1.75 with step 0.25) in the right columns of Table 2. Both with multi-scale testing, Twins-SVT-S outperforms Swin-T by $1 . 3 \\%$ mIoU. Moreover, Twins-SVT-L achieves new state of the art result $5 0 . 2 \\%$ mIoU under comparable FLOPs and outperforms Swin-B by $0 . 5 \\%$ mIoU. Twins-PCPVT also achieves comparable performance to Swin [4]. ",
608
+ "bbox": [
609
+ 174,
610
+ 587,
611
+ 825,
612
+ 780
613
+ ],
614
+ "page_idx": 5
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "4.3 Object Detection and Segmentation on COCO ",
619
+ "text_level": 1,
620
+ "bbox": [
621
+ 174,
622
+ 800,
623
+ 534,
624
+ 815
625
+ ],
626
+ "page_idx": 5
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "We evaluate the performance of our method using two representative frameworks: RetinaNet [46] and Mask RCNN [47]. Specifically, we use our transformer models to build the backbones of these detectors. All the models are trained under the same setting as in [8]. Since PVT and Swin report their results using different frameworks, we try to make fair comparison and build consistent settings for future methods. Specifically, we report standard $1 \\times$ -schedule (12 epochs) detection results on the COCO 2017 dataset [48] in Tables 3 and 4. As for the evaluation based on RetinaNet, we train all the models using AdamW [37] optimizer for 12 epochs with a batch size of 16. The initial learning rate is $1 \\times 1 \\bar { 0 } ^ { - 4 }$ , started with 500-iteration warmup and decayed by $1 0 \\times$ at the 8th and 11th epoch, respectively. We use stochastic drop path regularization of 0.2 and weight decay 0.0001. The implementation is based on MMDetection [49]. For the Mask R-CNN framework, we use the initial learning rate of $2 \\times 1 0 ^ { - 4 }$ as in [8]. All other hyper-parameters follow the default settings in MMDetection. As for $3 \\times$ experiments, we follow the common multi-scale training in [3, 4], i.e., randomly resizing the input image so that its shorter side is between 480 and 800 while keeping longer one less than 1333. Moreover, for $3 \\times$ training of Mask R-CNN, we use an initial learning rate of 0.0001 and weight decay of 0.05 for the whole network as [4]. ",
631
+ "bbox": [
632
+ 174,
633
+ 828,
634
+ 823,
635
+ 911
636
+ ],
637
+ "page_idx": 5
638
+ },
639
+ {
640
+ "type": "table",
641
+ "img_path": "images/d92a15b541421f68899831ff43016e6fd755bbea91818794de3f6a74170c3103.jpg",
642
+ "table_caption": [
643
+ "Table 1 – Comparisons with state-of-the-art methods for ImageNet-1K classification. Throughput is tested on the batch size of 192 on a single V100 GPU. All models are trained and evaluated on $2 2 4 \\times 2 2 4$ resolution on ImageNet-1K dataset. †: w/ CPVT’s position encodings [9]. "
644
+ ],
645
+ "table_footnote": [],
646
+ "table_body": "<table><tr><td>Method</td><td>Param (M)</td><td>FLOPs (G)</td><td>Throughput (Images/s)</td><td>Top-1 (%)</td></tr><tr><td colspan=\"5\">ConvNet</td></tr><tr><td>RegNetY-4G [40]</td><td>21</td><td>4.0</td><td>1157</td><td>80.0</td></tr><tr><td>RegNetY-8G [40]</td><td>39</td><td>8.0</td><td>592</td><td>81.7</td></tr><tr><td>RegNetY-16G [40]</td><td>84</td><td>16.0</td><td>335</td><td>82.9</td></tr><tr><td colspan=\"5\">Transformer</td></tr><tr><td>DeiT-Small/16 [2]</td><td>22.1</td><td>4.6</td><td>437</td><td>79.9</td></tr><tr><td>CrossViT-S [30]</td><td>26.7</td><td>5.6</td><td>-</td><td>81.0</td></tr><tr><td>T2T-ViT-14 [27]</td><td>22</td><td>5.2</td><td></td><td>81.5</td></tr><tr><td>TNT-S [15]</td><td>23.8</td><td>5.2</td><td>=</td><td>81.3</td></tr><tr><td>CoaTMini [17]</td><td>10</td><td>6.8</td><td></td><td>80.8</td></tr><tr><td>CoaT-Lite Small [17]</td><td>20</td><td>4.0</td><td>-</td><td>81.9</td></tr><tr><td>PVT-Small [8]</td><td>24.5</td><td>3.8</td><td>820</td><td>79.8</td></tr><tr><td>CPVT-Small-GAP [9]</td><td>23</td><td>4.6</td><td>817</td><td>81.5</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>24.1</td><td>3.8</td><td>815</td><td>81.2 (+1.3)</td></tr><tr><td>Swin-T[4]</td><td>29</td><td>4.5</td><td>766</td><td>81.3</td></tr><tr><td>Swin-T + CPVT†</td><td>28</td><td>4.4</td><td>766</td><td>81.2</td></tr><tr><td>Twins-SVT-S (ours)</td><td>24</td><td>2.9</td><td>1059</td><td>81.7 (+1.8)</td></tr><tr><td>T2T-ViT-19 [27]</td><td>39.2</td><td>8.9</td><td>1</td><td>81.9</td></tr><tr><td>PVT-Medium [8]</td><td>44.2</td><td>6.7</td><td>526</td><td>81.2</td></tr><tr><td>Twins-PCPVT-B(ours)</td><td>43.8</td><td>6.7</td><td>525</td><td>82.7 (+0.8)</td></tr><tr><td>Swin-S [4]</td><td>50</td><td>8.7</td><td>444</td><td>83.0</td></tr><tr><td>Twins-SVT-B (ours)</td><td>56</td><td>8.6</td><td>469</td><td>83.2 (+1.3)</td></tr><tr><td>ViT-Base/16 [1]</td><td>86.6</td><td>17.6</td><td>86</td><td>77.9</td></tr><tr><td>DeiT-Base/16 [2]</td><td>86.6</td><td>17.6</td><td>292</td><td>81.8</td></tr><tr><td>T2T-ViT-24[27]</td><td>64.1</td><td>14.1</td><td>1</td><td>82.3</td></tr><tr><td>Cross ViT-B [30]</td><td>104.7</td><td>21.2</td><td>1</td><td>82.2</td></tr><tr><td>TNT-B [15]</td><td>66</td><td>14.1</td><td>=</td><td>82.8</td></tr><tr><td>CPVT-B [9]</td><td>88</td><td>17.6</td><td>292</td><td>82.3</td></tr><tr><td>PVT-Large [8]</td><td>61.4</td><td>9.8</td><td>367</td><td>81.7</td></tr><tr><td>Twins-PCPVT-L(ours)</td><td>60.9</td><td>9.8</td><td>367</td><td>83.1 (+5.2)</td></tr><tr><td>Swin-B [4]</td><td>88</td><td>15.4</td><td>275</td><td>83.3</td></tr><tr><td>Twins-SVT-L (ours)</td><td>99.2</td><td>15.1</td><td>288</td><td>83.7( (+5.8)</td></tr><tr><td colspan=\"5\">Hybrid</td></tr><tr><td>BoTNet-S1-59 [29]</td><td>33.5</td><td>7.3</td><td></td><td>81.7</td></tr><tr><td>BossNet-T1 [41]</td><td>1</td><td>7.9</td><td></td><td>81.9</td></tr><tr><td>CvT-13 [31]</td><td>20</td><td>4.5</td><td></td><td>81.6</td></tr><tr><td>BoTNet-S1-110 [29]</td><td>54.7</td><td>10.9</td><td></td><td>82.8</td></tr><tr><td>CvT-21 [31]</td><td>32</td><td>7.1</td><td>=</td><td>82.5</td></tr></table>",
647
+ "bbox": [
648
+ 210,
649
+ 131,
650
+ 787,
651
+ 696
652
+ ],
653
+ "page_idx": 6
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "",
658
+ "bbox": [
659
+ 173,
660
+ 723,
661
+ 825,
662
+ 849
663
+ ],
664
+ "page_idx": 6
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "For $1 \\times$ schedule object detection with RetinaNet, Twins-PCPVT-S surpasses PVT-Small with $2 . 6 \\%$ mAP and Twins-PCPVT-B exceeds PVT-Medium by $2 . 4 \\%$ mAP on the COCO val2017 split. Twins-SVT-S outperforms Swin-T with $1 . 5 \\%$ mAP while using $12 \\%$ fewer FLOPs. Our method outperform the others with similar advantage in $3 \\times$ experiments. ",
669
+ "bbox": [
670
+ 174,
671
+ 856,
672
+ 825,
673
+ 911
674
+ ],
675
+ "page_idx": 6
676
+ },
677
+ {
678
+ "type": "table",
679
+ "img_path": "images/2090e3b08689b3dbb0e79e4396b2b0d0a3196a1511e7397d8691b778b1a46777.jpg",
680
+ "table_caption": [
681
+ "Table 2 – Performance comparisons with different backbones on ADE20K validation dataset. FLOPs are tested on $5 1 2 \\times 5 1 2$ resolution. All backbones are pretrained on ImageNet-1k except SETR [45], which is pretrained on ImageNet-21k dataset. "
682
+ ],
683
+ "table_footnote": [],
684
+ "table_body": "<table><tr><td rowspan=\"2\">Backbone</td><td colspan=\"3\">Semantic FPN 80k (PVT [8] setting)</td><td colspan=\"3\">Upernet 160k (Swin [4] setting)</td></tr><tr><td>FLOPs (G)</td><td>Param (M)</td><td>mIoU (%)</td><td>FLOPs (G)</td><td>Param (M)</td><td>mIoU/MS mIoU (%)</td></tr><tr><td>ResNet50 [10]</td><td>45</td><td>28.5</td><td>36.7</td><td></td><td>1</td><td></td></tr><tr><td>PVT-Small [8]</td><td>40</td><td>28.2</td><td>39.8</td><td>1</td><td>-</td><td>=</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>40</td><td>28.4</td><td>44.3 (+7.6)</td><td>234</td><td>54.6</td><td>46.2/47.5</td></tr><tr><td>Swin-T[4]</td><td>46</td><td>31.9</td><td>41.5</td><td>237</td><td>59.9</td><td>44.5/45.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>37</td><td>28.3</td><td>43.2( (+6.5)</td><td>228</td><td>54.4</td><td>46.2/47.1</td></tr><tr><td>ResNet101 [10]</td><td>66</td><td>47.5</td><td>38.8</td><td>258</td><td>86</td><td>-/44.9</td></tr><tr><td>PVT-Medium [8]</td><td>55</td><td>48.0</td><td>41.6</td><td>=</td><td>1</td><td></td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>55</td><td>48.1</td><td>44.9 (+6.1)</td><td>250</td><td>74.3</td><td>47.1/48.4</td></tr><tr><td>Swin-S [4]</td><td>70</td><td>53.2</td><td>45.2</td><td>261</td><td>81.3</td><td>47.6/49.5</td></tr><tr><td>Twins-SVT-B (ours)</td><td>67</td><td>60.4</td><td>45.3 (+6.5)</td><td>261</td><td>88.5</td><td>47.7/48.9</td></tr><tr><td>ResNetXt101-64×4d [13]</td><td>1</td><td>86.4</td><td>40.2</td><td>1</td><td>1</td><td>=</td></tr><tr><td>PVT-Large [8]</td><td>71</td><td>65.1</td><td>42.1</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Twins-PCPVT-L (ours)</td><td>71</td><td>65.3</td><td>46.4 (+6.2)</td><td>269</td><td>91.5</td><td>48.6/49.8</td></tr><tr><td>Swin-B [4]</td><td>107</td><td>91.2</td><td>46.0</td><td>299</td><td>121</td><td>48.1/49.7</td></tr><tr><td>Twins-SVT-L (ours)</td><td>102</td><td>103.7</td><td>46.7 (+6.5)</td><td>297</td><td>133</td><td>48.8/50.2</td></tr><tr><td>Backbone</td><td></td><td></td><td>PUP (SETR [45] setting)</td><td colspan=\"3\">MLA (SETR [45] setting)</td></tr><tr><td>T-Large (SETR) [45]</td><td>-</td><td>310</td><td>50.1</td><td>1</td><td>308</td><td>48.6/50.3</td></tr></table>",
685
+ "bbox": [
686
+ 183,
687
+ 113,
688
+ 816,
689
+ 409
690
+ ],
691
+ "page_idx": 7
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "For $1 \\times$ object segmentation with the Mask R-CNN framework, Twins-PCPVT-S brings similar improvements $( + 2 . 5 \\%$ mAP) over PVT-Small. Compared with PVT-Medium, Twins-PCPVT-B obtains $2 . 6 \\%$ higher mAP, which is also on par with that of Swin. Both Twins-SVT-S and Twins-SVTB achieve better or slightly better performance compared to the counterparts of Swin. As for large models, our results are shown in Table 1 (in supplementary) and we also achieve better performance with comparable FLOPs. ",
696
+ "bbox": [
697
+ 174,
698
+ 434,
699
+ 825,
700
+ 518
701
+ ],
702
+ "page_idx": 7
703
+ },
704
+ {
705
+ "type": "table",
706
+ "img_path": "images/1693844a418953357be1c2a663ddc5b919a3ef3b16aaa01c0dff462d187c3424.jpg",
707
+ "table_caption": [
708
+ "Table 3 – Object detection performance on the COCO val2017 split using the RetinaNet framework. $1 \\times$ is 12 epochs and $3 \\times$ is 36 epochs. “MS”: Multi-scale training. FLOPs are evaluated on $8 0 0 \\times 6 0 0$ resolution. "
709
+ ],
710
+ "table_footnote": [],
711
+ "table_body": "<table><tr><td rowspan=\"2\">Backbone</td><td rowspan=\"2\">FLOPsParaml (G)</td><td rowspan=\"2\">(M)</td><td>RetinaNet1×</td><td>RetinaNet 3× +MS</td></tr><tr><td>|AP</td><td>AP50 AP75 APs APm APL|AP AP50 AP75APs APm APL</td></tr><tr><td>ResNet50 [10]</td><td>111</td><td>37.7 36.3</td><td>55.3 38.6 19.3 40.0 48.8|39.0</td><td>58.4 41.8 22.4 42.8 51.6</td></tr><tr><td>PVT-Small [8]</td><td>118</td><td>34.2</td><td>61.3 43.0 25.0 42.9 55.7</td><td>62.7 45.0 26.2 45.2 57.2</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>118</td><td>34.4</td><td>43.0(+6.7) 64.1 46.0 27.5 46.3 57.3</td><td>45.2(+6.2) 66.5 48.6 30.0 48.8 58.9</td></tr><tr><td>Swin-T[4]</td><td>118</td><td>38.5</td><td>62.1 44.2 25.1 44.9 55.5</td><td>43.9 64.8 47.1 28.4 47.2 57.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>104</td><td>34.3</td><td>43.0(+6.7) 64.2 46.3 28.0 46.4 57.5</td><td>45.6(+6.6) 67.1 48.6 29.8 49.3 60.0</td></tr><tr><td>ResNet101[10]</td><td>149</td><td>56.7</td><td>57.8 41.2 21.4 42.6 51.1</td><td>60.1 44.0 23.7 45.0 53.8</td></tr><tr><td>ResNeXt101-32×4d[13]</td><td>151</td><td>56.4</td><td>59.642.7 22.344.2 52.5</td><td>61.0 44.3 23.9 45.5 53.7</td></tr><tr><td>PVT-Medium [8]</td><td>151</td><td>53.9</td><td>63.1 44.3 25.0 44.9 57.64</td><td>63.8 46.1 27.3 46.3 58.9</td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>151</td><td>54.1</td><td>41.9 44.3(+5.8) ) 65.6 47.3 27.9 47.9 59.64</td><td>43.2 46.4(+5.5) 67.7 49.8 31.3 50.2 61.4 46.3</td></tr><tr><td>Swin-S [4]</td><td>162</td><td>59.8</td><td>44.5 65.7 47.5 27.4 48.0 59.9</td><td>67.4 49.8 31.1 50.3 60.9</td></tr><tr><td>Twins-SVT-B (ours)</td><td>163</td><td>67.0</td><td>45.3(+6.8) 66.7 48.1 28.5 48.9 60.646.9(+6.0)</td><td>68.0 50.2 31.7 50.3 61.8</td></tr></table>",
712
+ "bbox": [
713
+ 173,
714
+ 568,
715
+ 841,
716
+ 761
717
+ ],
718
+ "page_idx": 7
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "4.4 Ablation Studies ",
723
+ "text_level": 1,
724
+ "bbox": [
725
+ 174,
726
+ 787,
727
+ 328,
728
+ 803
729
+ ],
730
+ "page_idx": 7
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Configurations of LSA and GSA blocks. We evaluate different combinations of LSA and GSA based on our small model and present the ablation results in Table 5. The models with only locally-grouped attention fail to obtain good performance $( 7 6 . 9 \\% )$ ",
735
+ "bbox": [
736
+ 173,
737
+ 814,
738
+ 390,
739
+ 911
740
+ ],
741
+ "page_idx": 7
742
+ },
743
+ {
744
+ "type": "table",
745
+ "img_path": "images/c4e824e4289539c1e56a37c1b1ca1423bcc62c4601b2f76cb8ae6ec3b41e8364.jpg",
746
+ "table_caption": [
747
+ "Table 5 – Classification performance for different combinations of LSA (L) and GSA (G) blocks based on the small model. "
748
+ ],
749
+ "table_footnote": [],
750
+ "table_body": "<table><tr><td>Function Type</td><td>Params (M)</td><td>FLOPs (G)</td><td>Top-1 (%)</td></tr><tr><td>(L,L,L)</td><td>8.8</td><td>2.2</td><td>76.9</td></tr><tr><td>(L, LLG, LLG, G)</td><td>23.5</td><td>2.8</td><td>81.5</td></tr><tr><td>(L, LG, LG, G)</td><td>24.1</td><td>2.8</td><td>81.7</td></tr><tr><td>(L,L,L, G)</td><td>22.2</td><td>2.9</td><td>80.5</td></tr><tr><td>PVT-small(G, G, G, G) [8]</td><td>24.5</td><td>3.8</td><td>79.8</td></tr></table>",
751
+ "bbox": [
752
+ 433,
753
+ 815,
754
+ 795,
755
+ 928
756
+ ],
757
+ "page_idx": 7
758
+ },
759
+ {
760
+ "type": "table",
761
+ "img_path": "images/57c11d3f2cf446a597480002b652bb8f5133ba64f601529b7b505cd14be40327.jpg",
762
+ "table_caption": [
763
+ "Table 4 – Object detection and instance segmentation performance on the COCO val2017 dataset using the Mask R-CNN framework. FLOPs are evaluated on a $8 0 0 \\times 6 0 0$ image. "
764
+ ],
765
+ "table_footnote": [],
766
+ "table_body": "<table><tr><td rowspan=\"2\">Backbone</td><td rowspan=\"2\">FLOPsParaml (G)</td><td rowspan=\"2\">(M)</td><td colspan=\"3\">Mask R-CNN 1×</td><td colspan=\"3\">Mask R-CNN3× +MS</td></tr><tr><td>|APb</td><td>AP0APAPm</td><td>APAP|APb</td><td></td><td></td><td>AP0APP APm APAPP</td></tr><tr><td>ResNet50 [10]</td><td>174</td><td>44.2</td><td>38.0</td><td>58.6 41.4 34.4</td><td>55.1 36.741.0</td><td></td><td></td><td>61.7 44.9 37.1 58.4 40.1</td></tr><tr><td>PVT-Small [8]</td><td>178</td><td>44.1</td><td>40.4</td><td>62.9 43.8 37.8</td><td>60.1 40.343.0</td><td></td><td></td><td>65.3 46.9 39.9 62.5 42.8</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>178</td><td>44.3</td><td>42.9(+4.9)</td><td>65.8 47.1 40.0(+5.6)</td><td>62.742.9</td><td></td><td>46.8(+5.8)</td><td>69.3 51.8 42.6 66.3 46.0</td></tr><tr><td>Swin-T[4]</td><td>177</td><td>47.8</td><td>42.2</td><td>64.6 46.2 39.1</td><td></td><td>61.6 42.0 46.0</td><td></td><td>68.2 50.2 41.6 65.1 44.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>164</td><td>44.0</td><td>43.4(+5.4)</td><td>66.0 47.3 40.3(+5.9)</td><td>63.243.4</td><td></td><td>46.8(+5.8)</td><td>69.2 51.2 42.6 66.3 45.8</td></tr><tr><td>ResNet101[10]</td><td>210</td><td>63.2</td><td>40.4</td><td>61.1 44.2 36.4</td><td></td><td>57.7 38.842.8</td><td></td><td>63.2 47.1 38.5 60.1 41.3</td></tr><tr><td>ResNeXt101-32×4d[13]</td><td>212</td><td>62.8</td><td>41.9</td><td>62.5 45.9 37.5</td><td></td><td>59.4 40.2 44.0</td><td></td><td>64.4 48.0 39.2 61.4 41.9</td></tr><tr><td>PVT-Medium [8]</td><td>211</td><td>63.9</td><td>42.0</td><td>64.4 45.6 39.0</td><td>61.6 42.1</td><td>44.2</td><td></td><td>66.0 48.2 40.5 63.1 43.5</td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>211</td><td>64.0</td><td>44.6(+4.2)</td><td>66.7 48.9 40.9(+4.5)</td><td></td><td>63.844.2</td><td>47.9(+5.1) 70.1</td><td>52.5 43.2 67.2 46.3</td></tr><tr><td>Swin-S [4]</td><td>222</td><td>69.1</td><td>44.8</td><td>66.6 48.9 40.9</td><td></td><td>63.4 44.2 47.6</td><td></td><td>69.4 52.5 42.8 66.5 46.4</td></tr><tr><td>Twins-SVT-B (ours)</td><td>224</td><td>76.3</td><td>45.2(+4.8)</td><td>67.6 49.3 41.5(+5.1) </td><td>64.5 44.8</td><td></td><td>48.0(+5.2)</td><td>69.5 52.7 43.0 66.8 46.6</td></tr></table>",
767
+ "bbox": [
768
+ 173,
769
+ 123,
770
+ 846,
771
+ 318
772
+ ],
773
+ "page_idx": 8
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "",
778
+ "bbox": [
779
+ 174,
780
+ 349,
781
+ 393,
782
+ 363
783
+ ],
784
+ "page_idx": 8
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "because this setting has a limited and small receptive field. An extra global attention layer in the last stage can improve the classification performance by $3 . 6 \\%$ . Local-Local-Global (abbr. LLG) also achieves good performance $( 8 1 . 5 \\% )$ , but we do not use this design in this work. ",
789
+ "bbox": [
790
+ 176,
791
+ 363,
792
+ 826,
793
+ 405
794
+ ],
795
+ "page_idx": 8
796
+ },
797
+ {
798
+ "type": "text",
799
+ "text": "Sub-sampling functions. We further study how the different sub-sampling functions affect the performance. Specifically, we compare the regular strided convolutions, separable convolutions and average pooling based on the ‘small’ model and present the results in Table 6. The first option performs best and therefore we choose it as our default implementation. ",
800
+ "bbox": [
801
+ 174,
802
+ 425,
803
+ 553,
804
+ 522
805
+ ],
806
+ "page_idx": 8
807
+ },
808
+ {
809
+ "type": "table",
810
+ "img_path": "images/6baf89f8d8a23480dbb0e937131d892766bb5d0aa680dc97cf0bcf8d389b9fbc.jpg",
811
+ "table_caption": [
812
+ "Table 6 – ImageNet classification performance of different forms of sub-sampled functions for the global sub-sampled attention (GSA). "
813
+ ],
814
+ "table_footnote": [],
815
+ "table_body": "<table><tr><td>Function Type</td><td>Top-1(%)</td></tr><tr><td>2D Conv.</td><td>81.7</td></tr><tr><td>2D Separable Conv.</td><td>81.2</td></tr><tr><td>Average Pooling</td><td>81.2</td></tr></table>",
816
+ "bbox": [
817
+ 584,
818
+ 469,
819
+ 803,
820
+ 537
821
+ ],
822
+ "page_idx": 8
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "sitional Encodings. We replace the relative positional encoding with CPVT for Swin-T and report the detection performance on COCO with RetinaNet and Mask R-CNN in Table 7. The CPVT-based Swin cannot achieve improved performance with both frameworks, which indicates that our performance improvements should be owing to the paradigm of Twins-SVT instead of the positional encodings. ",
827
+ "bbox": [
828
+ 196,
829
+ 542,
830
+ 549,
831
+ 558
832
+ ],
833
+ "page_idx": 8
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "",
838
+ "bbox": [
839
+ 176,
840
+ 559,
841
+ 825,
842
+ 613
843
+ ],
844
+ "page_idx": 8
845
+ },
846
+ {
847
+ "type": "table",
848
+ "img_path": "images/6f7f8635eea638011e731cacbb93cf34dd334d44c038c5b076b783c3488f4d08.jpg",
849
+ "table_caption": [
850
+ "Table 7 – Object detection performance on the COCO using different positional encoding strategies. "
851
+ ],
852
+ "table_footnote": [],
853
+ "table_body": "<table><tr><td rowspan=\"2\">Backbone</td><td colspan=\"4\">RetinaNet</td><td colspan=\"6\">Mask RCNN</td></tr><tr><td>FLOPs(G)</td><td>Param(M) AP</td><td></td><td>AP50</td><td>AP75</td><td>FLOPs(G)</td><td>Param(M)</td><td>AP</td><td>AP50</td><td>AP75</td></tr><tr><td>Swin-T[4]]</td><td>245</td><td>38.5</td><td>41.5</td><td>62.1</td><td>44.2</td><td>264</td><td>47.8</td><td>42.2</td><td>64.6</td><td>46.2</td></tr><tr><td>Swin-T+CPVT</td><td>245</td><td>38.5</td><td>41.3</td><td>62.4</td><td>44.1</td><td>263</td><td>47.8</td><td>42.0</td><td>64.5</td><td>45.9</td></tr></table>",
854
+ "bbox": [
855
+ 205,
856
+ 652,
857
+ 794,
858
+ 720
859
+ ],
860
+ "page_idx": 8
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "5 Conclusion ",
865
+ "text_level": 1,
866
+ "bbox": [
867
+ 173,
868
+ 765,
869
+ 299,
870
+ 782
871
+ ],
872
+ "page_idx": 8
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "In this paper, we have presented two powerful vision transformer backbones for both image-level classification and a few downstream dense prediction tasks. We dub them as twin transformers: Twins-PCPVT and Twins-SVT. The former variant explores the applicability of conditional positional encodings [9] in pyramid vision transformer [8], confirming its potential for improving backbones in many vision tasks. In the latter variant we revisit current attention design to proffer a more efficient attention paradigm. We find that interleaving local and global attention can produce impressive results, yet it comes with higher throughputs. Both transformer models set a new state of the art in image classification, objection detection and semantic/instance segmentation. ",
877
+ "bbox": [
878
+ 173,
879
+ 800,
880
+ 825,
881
+ 911
882
+ ],
883
+ "page_idx": 8
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "References ",
888
+ "text_level": 1,
889
+ "bbox": [
890
+ 174,
891
+ 89,
892
+ 266,
893
+ 106
894
+ ],
895
+ "page_idx": 9
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "[1] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In Proc. Int. Conf. Learn. Representations, 2021. \n[2] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. [3] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Proc. Eur. Conf. Comp. Vis., pages 213–229. Springer, 2020. \n[4] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proc. IEEE Int. Conf. Comp. Vis., pages 10012–10022, 2021. [5] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Trans. Pattern Anal. Mach. Intell., 40(4):834–848, 2017. [6] Chao Peng, Xiangyu Zhang, Gang Yu, Guiming Luo, and Jian Sun. Large kernel matters– improve semantic segmentation by global convolutional network. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4353–4361, 2017. \n[7] Wei Liu, Andrew Rabinovich, and Alexander C Berg. Parsenet: Looking wider to see better. arXiv preprint arXiv:1506.04579, 2015. [8] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. [9] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021. \n[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 770–778, 2016. \n[11] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In Proc. Int. Conf. Mach. Learn., pages 6105–6114. PMLR, 2019. \n[12] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1251–1258, 2017. \n[13] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1492–1500, 2017. \n[14] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proc. Advances in Neural Inf. Process. Syst., pages 6000–6010, 2017. \n[15] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021. \n[16] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In Proc. Advances in Neural Inf. Process. Syst., volume 32, pages 68–80, 2019. \n[17] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers, 2021. \n[18] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2021. \n[19] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. arXiv preprint arXiv:2012.00364, 2020. \n[20] Fuzhi Yang, Huan Yang, Jianlong Fu, Hongtao Lu, and Baining Guo. Learning texture transformer network for image super-resolution. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5791–5800, 2020. \n[21] Yanhong Zeng, Jianlong Fu, and Hongyang Chao. Learning joint spatial-temporal transformations for video inpainting. In Proc. Eur. Conf. Comp. Vis., pages 528–543. Springer, 2020. \n[22] Zhigang Dai, Bolun Cai, Yugeng Lin, and Junying Chen. UP-DETR: Unsupervised pre-training for object detection with transformers. arXiv preprint arXiv:2011.09094, 2020. \n[23] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv: Comp. Res. Repository, 2021. \n[24] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. arXiv preprint arXiv:2012.15840, 2020. \n[25] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In Proc. Int. Conf. Mach. Learn., volume 80, pages 4055–4064, 2018. \n[26] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint arXiv:2103.17239, 2021. \n[27] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token ViT: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021. \n[28] Zihang Jiang, Qibin Hou, Li Yuan, Daquan Zhou, Xiaojie Jin, Anran Wang, and Jiashi Feng. Token labeling: Training an $8 5 . 4 \\%$ top-1 accuracy vision transformer with 56M parameters on ImageNet. arXiv: Comp. Res. Repository, 2021. \n[29] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021. \n[30] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. CrossViT: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021. \n[31] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. CvT: Introducing convolutions to vision transformers. arXiv: Comp. Res. Repository, 2021. \n[32] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In Proc. Int. Conf. Learn. Representations, 2021. \n[33] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2117–2125, 2017. \n[34] Yuhui Yuan, Lang Huang, Jianyuan Guo, Chao Zhang, Xilin Chen, and Jingdong Wang. OCNet: Object context network for scene parsing. arXiv: Comp. Res. Repository, 2021. \n[35] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. In Proc. Advances in Neural Inf. Process. Syst., volume 25, pages 1097–1105, 2012. \n[36] Laurent Sifre and Stéphane Mallat. Rigid-motion scattering for texture classification. arXiv preprint arXiv:1403.1687, 2014. \n[37] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In Proc. Int. Conf. Learn. Representations, 2019. \n[38] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Weinberger. Deep networks with stochastic depth. In Proc. Eur. Conf. Comp. Vis., pages 646–661. Springer, 2016. \n[39] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015. \n[40] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428–10436, 2020. \n[41] Changlin Li, Tao Tang, Guangrun Wang, Jiefeng Peng, Bing Wang, Xiaodan Liang, and Xiaojun Chang. Bossnas: Exploring hybrid cnn-transformers with block-wisely self-supervised neural architecture search. arXiv preprint arXiv:2103.12424, 2021. \n[42] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ADE20k dataset. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 633–641, 2017. \n[43] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 6399–6408, 2019. \n[44] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418–434, 2018. \n[45] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip H.S. Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. \n[46] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In Proc. IEEE Int. Conf. Comp. Vis., pages 2980–2988, 2017. \n[47] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. In Proc. IEEE Int. Conf. Comp. Vis., pages 2961–2969, 2017. \n[48] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Proc. Eur. Conf. Comp. Vis., pages 740–755, 2014. \n[49] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open MMLab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. ",
900
+ "bbox": [
901
+ 173,
902
+ 136,
903
+ 828,
904
+ 909
905
+ ],
906
+ "page_idx": 9
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "",
911
+ "bbox": [
912
+ 171,
913
+ 97,
914
+ 828,
915
+ 888
916
+ ],
917
+ "page_idx": 10
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "",
922
+ "bbox": [
923
+ 171,
924
+ 90,
925
+ 826,
926
+ 376
927
+ ],
928
+ "page_idx": 11
929
+ }
930
+ ]
parse/train/5kTlVBkzSRx/5kTlVBkzSRx_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/5kTlVBkzSRx/5kTlVBkzSRx_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7aogOj_VYO0/7aogOj_VYO0.md ADDED
@@ -0,0 +1,475 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DO NOT LET PRIVACY OVERBILL UTILITY: GRADIENT EMBEDDING PERTURBATION FOR PRIVATE LEARNING
2
+
3
+ Da $\mathbf { V } \mathbf { u } ^ { 1 , 2 , * }$ , Huishuai Zhang2,∗, Wei Chen2, Tie-Yan Liu2
4
+ 1School of Computer Science and Engineering, Sun Yat-sen University
5
+ 2Microsoft Research Asia
6
+ 1yuda3@mail2.sysu.edu.cn
7
+ 2{huzhang,wche,tyliu}@microsoft.com
8
+
9
+ # ABSTRACT
10
+
11
+ The privacy leakage of the model about the training data can be bounded in the differential privacy mechanism. However, for meaningful privacy parameters, a differentially private model degrades the utility drastically when the model comprises a large number of trainable parameters. In this paper, we propose an algorithm Gradient Embedding Perturbation (GEP) towards training differentially private deep models with decent accuracy. Specifically, in each gradient descent step, GEP first projects individual private gradient into a non-sensitive anchor subspace, producing a low-dimensional gradient embedding and a small-norm residual gradient. Then, GEP perturbs the low-dimensional embedding and the residual gradient separately according to the privacy budget. Such a decomposition permits a small perturbation variance, which greatly helps to break the dimensional barrier of private learning. With GEP, we achieve decent accuracy with reasonable computational cost and modest privacy guarantee for deep models. Especially, with privacy bound $\epsilon = 8$ , we achieve $7 4 . 9 \%$ test accuracy on CIFAR10 and $9 5 . 1 \%$ test accuracy on SVHN, significantly improving over existing results.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Recent works have shown that the trained model may leak/memorize the information of its training set (Fredrikson et al., 2015; Wu et al., 2016; Shokri et al., 2017; Hitaj et al., 2017), which raises privacy issue when the models are trained with sensitive data. Differential privacy (DP) mechanism provides a way to quantitatively measure and upper bound such information leakage. It theoretically ensures that the influence of any individual sample is negligible with the DP parameter $\epsilon$ or $( \epsilon , \delta )$ . Moreover, it has been observed that differentially private models can also resist model inversion attack (Carlini et al., 2019), membership inference attack (Rahman et al., 2018; Bernau et al., 2019; Sablayrolles et al., 2019; Yu et al., 2021), gradient matching attack (Zhu et al., 2019), and data poisoning attack (Ma et al., 2019).
16
+
17
+ One popular way to achieve differentially private machine learning is to perturb the training process with noise (Song et al., 2013; Bassily et al., 2014; Shokri & Shmatikov, 2015; Wu et al., 2017; Fukuchi et al., 2017; Iyengar et al., 2019; Phan et al., 2020). Specifically, gradient perturbation perturbs the gradient at each iteration of (stochastic) gradient descent algorithm and guarantees the privacy of the final model via composition property of DP. It is worthy to note that gradient perturbation does not assume (strongly) convex objective and hence is applicable to various settings (Abadi et al., 2016; Wang et al., 2017; Lee & Kifer, 2018; Jayaraman et al., 2018; Wang & Gu, 2019; Yu et al., 2020). Specifically, for given gradient sensitivity $S$ , a general form of gradient perturbation is to add an isotropic Gaussian noise $_ z$ to the gradient $\pmb { g } \in \mathbb { R } ^ { p }$ independently for each step,
18
+
19
+ $$
20
+ \tilde { \pmb g } = \pmb g + \pmb z , \mathrm { w h e r e } \ z \sim \mathcal N ( 0 , \sigma ^ { 2 } S ^ { 2 } \pmb { I } _ { p \times p } ) .
21
+ $$
22
+
23
+ One can set proper variance $\sigma ^ { 2 }$ to make each update differentially private with parameter $( \epsilon , \delta )$ . It is easy to see that the intensity of the added noise $\mathbb { E } [ \| z \| ^ { 2 } ]$ scales linearly with the model dimension $p$
24
+
25
+ ![](images/2328dd1acaacf1d6d310601a05b8693111b94ade2562eb88887a4f66dd786d46.jpg)
26
+ Figure 1: Noise norm vs gradient norm of ResNet20 at initialization. The noise variance is chosen such that SGD satisfies $( 5 , 1 0 ^ { - 5 } )$ -DP after 90 epochs in Abadi et al. (2016).
27
+
28
+ ![](images/f29d64dfab5e9fa6de07c1a19f11f4a844d9260e860a0226687d143addd4c6e9.jpg)
29
+ Figure 2: Stable rank $\| \cdot \| _ { F } ^ { 2 } / \| \cdot \| ^ { 2 }$ (Tropp et al., 2015) of batch gradient matrix of given groups (with $p$ parameters). The setting is ResNet20 on CIFAR-10. The stable rank is small throughout training.
30
+
31
+ This indicates that as the model becomes larger, the useful signal, i.e., gradient, would be submerged in the added noise (see Figure 1). This dimensional barrier restricts the utility of deep learning models trained with gradient perturbation.
32
+
33
+ The dimensional barrier is attributed to the fact that the added noise is isotropic while the gradients live on a very low dimensional manifold, which has been observed in (Gur-Ari et al., 2018; Vogels et al., 2019; Gooneratne et al., 2020; Li et al., 2020) and is also verified in Figure 2 for the gradients of a 20-layer ResNet (He et al., 2016). Hence to limit the noise energy, it is natural to think
34
+
35
+ “Can we reduce the dimension of gradients first and then add the isotropic noise onto a low-dimensional gradient embedding?"
36
+
37
+ The answer is affirmative. We propose a new algorithm Gradient Embedding Perturbation (GEP), illustrated in Figure 3. Specifically, we first compute anchor gradients on some non-sensitive auxiliary data, and identify an anchor subspace that is spanned by several top principal components of the anchor gradient matrix. Then we project the private gradients into the anchor subspace and obtain low-dimensional gradient embeddings and small-norm residual gradients. Finally, we perturb the gradient embedding and residual gradient separately according to the sensitivities and privacy budget.
38
+
39
+ We intuitively argue why GEP could reduce the perturbation variance and achieve good utility for large models. First, because the gradient embedding has a very low dimension, the added isotropic noise on embedding has small energy that scales linearly only with the subspace dimension. Second, if the anchor subspace can cover most of the gradient information, the residual gradient, though high dimensional, should have small magnitude, which permits smaller added noise to guarantee the same level privacy because of the reduced sensitivity. Overall, we can use a much lower perturbation compared with the original gradient perturbation to guarantee the same level of privacy.
40
+
41
+ We emphasize several properties of GEP. First, the non-sensitive auxiliary data assumption is weak. In fact, GEP only requires a small number of non-sensitive unlabeled data following a similar feature distribution as the private data, which often exist even for learning on sensitive data. In our experiments, we use a few unlabeled samples from ImageNet to serve as auxiliary data for MNIST, SVHN, and CIFAR-10. This assumption is much weaker than the public data assumption in previous works (Papernot et al., 2017; 2018; Alon et al., 2019; Wang & Zhou, 2020), where the public data should follow exactly the same distribution as the private data. Second, GEP produces an unbiased estimator of the target gradient because of releasing both the perturbed gradient embedding and the perturbed residual gradient, which turns out to be critical for good utility. Third, we use power method to estimate the principal components of anchor gradients, achievable with a few matrix multiplications. The fact that GEP is not sensitive to the choices of subspace dimension further allows a very efficient implementation.
42
+
43
+ Compared with existing works of differentially private machine learning, our contribution can be summarized as follows: (1) we propose a novel algorithm GEP that achieves good utility for large models with modest differential privacy guarantee; (2) we show that GEP returns an unbiased estimator of target private gradient with much lower perturbation variance than original gradient perturbation; (3) we demonstrate that GEP achieves state-of-the-art utility in differentially private learning with three benchmark datasets. Specifically, for $\epsilon = 8$ , GEP achieves $7 4 . 9 \%$ test accuracy on CIFAR-10 with a ResNet20 model. To the best of our knowledge, GEP is the first algorithm that can achieve such utility with training deep models from scratch for a “single-digit" privacy budget1.
44
+
45
+ ![](images/3bef0fb092363e24757fc5e7749b7b0d21880e7f800df950d684090df99c907d.jpg)
46
+ Figure 3: Overview of the proposed GEP approach. 1) We estimate an anchor subspace on some non-sensitive data; 2) We project the private gradients into the anchor subspace, producing lowdimensional embeddings and residual gradients; 3) We perturb the gradient embedding and residual gradient separately to guarantee differential privacy. The auxiliary data are only required to share similar features as the private data. In our experiments, we use 2000 images from ImageNet as auxiliary data for MNIST, SVHN, and CIFAR-10 datasets.
47
+
48
+ # 1.1 RELATED WORK
49
+
50
+ Existing works studying differentially private machine learning in high-dimensional setting can be roughly categorized into two sets. One is treating the optimization of the machine learning objective as a whole mechanism and adding noise into this process. The other one is based on the knowledge transfer of machine learning models, which trains a differentially private publishable student model with private signals from teacher models. We review them one by one.
51
+
52
+ Differentially private convex optimization in high-dimensional setting has been studied extensively over the years (Kifer et al., 2012; Thakurta & Smith, 2013; Talwar et al., 2015; Wang & Xu, 2019; Wang & Gu, 2019). Although these methods demonstrate good utility on some convex settings, their analyses can not be directly applied to non-convex setting. Right before the submission, we note two independent and concurrent works (Zhou et al., 2020; Kairouz et al., 2020) that also leverage the gradient redundancy to reduce the added noise. Specifically, Kairouz et al. (2020) track historical gradients to do dimension reduction for private AdaGrad. Zhou et al. (2020) requires gradients on some public data and then project the noisy gradients into a public subspace at each update. One core difference between these two works and GEP is that we introduce residual gradient perturbation and GEP produces an unbiased estimator of the private gradients, which is essential for achieving the superior utility. Moreover, we weaken the auxiliary data assumption and introduce several designs that significantly boost the efficiency and applicability of GEP.
53
+
54
+ One recent progress towards training arbitrary models with differential privacy is Private Aggregation of Teacher Ensembles (PATE) (Papernot et al., 2017; 2018; Jordon et al., 2019). PATE first trains independent teacher models on disjoint shards of private data. Then it trains a student model with privacy guarantee by distilling noisy predictions of teacher models on some public samples. In comparison, GEP only requires some non-sensitive data that have similar natural features as the private data while PATE requires the public data follow exactly the same distribution as the private data and in practice it uses a portion of the test data to serve as public data. Moreover, GEP demonstrates better performance than PATE especially for complex datasets, e.g., CIFAR-10, because GEP can train the model with the whole private data rather than a small shard of data.
55
+
56
+ # 2 PRELIMINARIES
57
+
58
+ We introduce some notations and definitions. We use bold lowercase letters, e.g., $\textbf { { v } }$ , and bold capital letters, e.g., $M$ , to denote vectors and matrices, respectively. The $L ^ { 2 }$ norm of a vector $\textbf { { v } }$ is denoted by $\| \pmb { v } \|$ . The spectral norm and the Frobenius norm of a matrix $M$ are denoted by $\lVert M \rVert$ and $\| M \| _ { F }$ respectively. A sample $d = ( \pmb { x } , y )$ consists of feature $_ { \textbf { \em x } }$ and label $y$ . A dataset $\mathbb { D }$ is a collection of individual samples. A dataset $\mathbb { D } ^ { \prime }$ is said to be a neighboring dataset of $\mathbb { D }$ if they differ in a single sample, denoted as $\mathbb { D } \sim \mathbb { D } ^ { \prime }$ . Differential privacy ensures that the outputs of an algorithm on neighboring datasets have approximately indistinguishable distributions.
59
+
60
+ Definition 1 $( \epsilon , \delta )$ -DP (Dwork et al., 2006a;b)). A randomized mechanism $\mathcal { M }$ guarantees $( \epsilon , \delta )$ - differential privacy if for any two neighboring input datasets $\mathbb { D } \sim \mathbb { D } ^ { \prime }$ and for any subset of outputs $S$ it holds that $P r [ \mathcal { M } ( \mathbb { D } ) \in S ] \leq e ^ { \epsilon } P r [ \mathcal { M } ( \mathbb { D } ^ { ' } ) \in S ] + \delta$ .
61
+
62
+ By its definition, $( \epsilon , \delta )$ -DP controls the maximum influence that any individual sample can produce. One can adjust the privacy parameters to trade off between privacy and utility. Differential privacy is immune to post-processing (Dwork et al., 2014), i.e., any function applied on the output of a differentially private algorithm would not increase the privacy loss as long as it does not have new interaction with the private dataset. Differential privacy also allows composition, i.e., the composition of a series of differentially private mechanisms is also differentially private but with different parameters. Several variants of $( \epsilon , \delta )$ -DP have been proposed (Bun & Steinke, 2016; Dong et al., 2019) to address certain weakness of $( \epsilon , \delta )$ -DP, e.g., they achieve better composition property. In this work, we use Rényi differential privacy (Mironov, 2017) to track the privacy loss and then convert it to $( \epsilon , \delta )$ -DP.
63
+
64
+ Suppose that there is a private dataset $\mathbb { D } = \{ ( \boldsymbol { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ with $n$ samples. We want to train a model $f$ to learn the mapping in $\mathbb { D }$ . Specifically, $f$ takes $_ { \textbf { \em x } }$ as input and outputs a label $y$ , and $f$ has parameter $\theta \in \mathbb { R } ^ { p }$ . The training objective is to minimize an empirical risk $\begin{array} { r } { \dot { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } \ell ( \dot { f } ( \pmb { x } _ { i } ) , \dot { y } _ { i } ) , } \end{array}$ , where $\ell ( \cdot , \cdot )$ is a loss function. We further assume that there is an auxiliary dataset $\mathbb { D } ^ { ( a ) } = \{ ( \tilde { \pmb { x } } _ { j } , \tilde { \pmb { y } } _ { j } ) \} _ { j = 1 } ^ { m }$ that $\tilde { \pmb x }$ shares similar features as $_ { \textbf { \em x } }$ in $\mathbb { D }$ while $\tilde { y }$ could be random.
65
+
66
+ # 3 GRADIENT EMBEDDING PERTURBATION
67
+
68
+ An overview of GEP is given in Figure 3. GEP has three major ingredients: 1) first, estimate an anchor subspace that contains the principal components of some non-sensitive anchor gradients via power method; 2) then, project private gradients into the anchor subspace and produce low-dimensional embeddings of private gradients and residual gradients; 3) finally, perturb gradient embedding and residual gradient separately to establish differential privacy guarantee. In Section 3.1, we present the GEP algorithm in detail. In Section 3.2, we given an analysis on the residual gradients. In Section 3.3, we give a differentially private learning algorithm that updates the model with the output of GEP.
69
+
70
+ # 3.1 THE GEP ALGORITHM AND ITS PRIVACY ANALYSIS
71
+
72
+ The pseudocode of GEP is presented in Algorithm 1. For convenience, we write a set of gradients and a set of basis vectors as matrices with each row being one gradient/basis vector.
73
+
74
+ The anchor subspace is constructed as follows. We first compute the gradients of the model on an auxiliary dataset $\mathbb { D } ^ { ( a ) }$ with $m$ samples, which is referred to as the anchor gradients $G ^ { ( a ) } \in \mathbb { R } ^ { m \times p }$ We then use the power method to estimate the principal components of $G ^ { ( a ) }$ to construct a subspace basis $\boldsymbol { B } \in \mathbb { R } ^ { k \times \hat { p } }$ , which is referred to as the anchor subspace. All these matrices are publishable because $\mathbb { D } ^ { ( a ) }$ is non-sensitive. We expect that the anchor subspace $\textbf { { B } }$ can cover most energy of private gradients when the auxiliary data are not far from private data and $m , k$ are reasonably large.
75
+
76
+ Suppose that the private gradients are $G \in \mathbb { R } ^ { n \times p }$ . Then, we project the private gradients into the anchor subspace $\textbf { { B } }$ . The projection produces low-dimensional embeddings $\mathbf { \check { \boldsymbol { W } } } = \check { G } \mathbf { \boldsymbol { B } } ^ { T }$ and residual gradients $\bar { \pmb { R } } = \pmb { G } - \pmb { G } \bar { \pmb { B } } ^ { T } \bar { \pmb { B } }$ . The magnitude of residual gradients is usually much smaller than original gradient even when $k$ is small because of the gradient redundancy.
77
+
78
+ Then, we aggregate the gradient embeddings and the residual gradients, respectively. We perturb the aggregated embedding and the aggregated residual gradient respectively to guarantee certain differential privacy. Finally, we release the perturbed embedding and the perturbed residual gradient and construct an unbiased estimator of the private gradient: $\widetilde { \pmb { v } } : = ( \widetilde { \pmb { w } } ^ { T } \pmb { B } ^ { \top } + \widetilde { \pmb { r } } ) / n$ . This construction process does not resulting in additional privacy loss because of DP’s post-processing property. The privacy analysis of the whole process of GEP is given in Theorem 3.1.
79
+
80
+ Theorem 3.1. Let $S _ { 1 }$ and $S _ { 2 }$ be the sensitivity of $\pmb { w }$ and $\pmb { r }$ , respectively, the output of Algorithm $^ { l }$ satisfies $( \epsilon , \delta )$ -DP for any $\delta \in ( 0 , 1 )$ and $\epsilon \leq 2 \log ( 1 / \delta )$ if we choose $\sigma _ { 1 } \geq 2 S _ { 1 } \sqrt { 2 \log ( 1 / \delta ) } / \epsilon$ and $\sigma _ { 2 } \geq 2 S _ { 2 } \sqrt { 2 \log ( 1 / \delta ) } / \epsilon$ .
81
+
82
+ 1: Input: anchor gradients $G ^ { ( a ) } \in \mathbb { R } ^ { m \times p }$ ; number of basis vectors $k$ ; private gradients $G \in \mathbb { R } ^ { n \times p }$
83
+ clipping thresholds $S _ { 1 } , S _ { 2 }$ ; standard deviations $\sigma _ { 1 } , \sigma _ { 2 }$ ; number of power iterations $t$ .
84
+ 2: //First stage: Compute an orthonormal basis for the anchor subspace.
85
+ 3: Initialize $\mathbf { \bar { \boldsymbol { B } } } \in \mathbb { R } ^ { k \times p }$ randomly.
86
+ 4: for $i = 1$ to $t$ do
87
+ 5: Compute $\pmb { A } = \pmb { G } ^ { ( a ) } \pmb { B } ^ { T }$ and $B = A ^ { T } G ^ { ( a ) }$ .
88
+ 6: Orthogonalize $\textbf { { B } }$ and normalize row vectors.
89
+ 7: end for
90
+ 8: Delete $G ^ { ( a ) }$ to free memory.
91
+ 9: //Second stage: project the private gradients $G$ into anchor subspace $\textbf { { B } }$
92
+ 10: Compute gradient embeddings $\pmb { W } = \pmb { G } \pmb { B } ^ { T }$ and clip its rows with $S _ { 1 }$ to obtain $\hat { W }$ .
93
+ 11: Compute residual gradients $R = G - W B$ and clip its rows with $S _ { 2 }$ to obtain $\hat { R }$ .
94
+ 12: //Third stage: perturb gradient embedding and residual gradient separately
95
+ 13: Perturb embedding with noise $\boldsymbol { z } ^ { ( 1 ) } \sim \mathcal { N } ( 0 , \sigma _ { 1 } ^ { 2 } \boldsymbol { I } _ { k \times k } )$ : $\begin{array} { r } { \pmb { w } : = \sum _ { i } \hat { W } _ { i , : } , \tilde { \pmb { w } } : = \pmb { w } + \pmb { z } ^ { ( 1 ) } . } \end{array}$
96
+ 14: Perturb residual gradient with noise $\boldsymbol { z } ^ { ( 2 ) } \sim \mathcal { N } ( 0 , \sigma _ { 2 } ^ { 2 } \boldsymbol { I } _ { p \times p } )$ : $\begin{array} { r } { \pmb { r } : = \sum _ { i } \hat { \pmb { R } } _ { i , : } , \ \tilde { \pmb { r } } : = \pmb { r } + \boldsymbol { z } ^ { ( 2 ) } . } \end{array}$
97
+ 15: Return $\tilde { v } : = ( \tilde { w } ^ { T } B + \tilde { r } ) / n$ .
98
+
99
+ A common practice to control sensitivity is to clip the output with a pre-defined threshold. In our experiments, we use different thresholds $S _ { 1 }$ and $S _ { 2 }$ to clip the gradient embeddings and residual gradients, respectively. The privacy loss of GEP consists of two parts: the privacy loss incurred by releasing the perturbed embedding and the privacy loss incurred by releasing the perturbed residual gradient. We compose these two parts via the Rényi differential privacy and convert it to $( \epsilon , \delta )$ -DP.
100
+
101
+ We highlight several implementation techniques that make GEP widely applicable and implementable with reasonable computational cost. Firstly, auxiliary non-sensitive data do not have to be the same source as the private data and the auxiliary data can be randomly labeled. This non-sensitive data assumption is very weak and easy to satisfy in practical scenarios. To understand why random label works, a quick example is that for the least squares regression problem the individual gradient is aligned with the feature vector while the label only scales the length but does not change the direction. This auxiliary data assumption avoids conducting principal component analysis (PCA) on private gradients, which requires releasing private high-dimensional basis vectors and hence introduces large privacy loss. Secondly, we use power method (Panju, 2011; Vogels et al., 2019) to approximately estimate the principal components. The new operation we introduce is standard matrix multiplication that enjoys efficient implementation on GPU. The computational complexity of each power iteration is $2 m k p$ , where $p$ is the number of model parameters, $m$ is the number of anchor gradients and $k$ is the number of subspace basis vectors. Thirdly, we divide the parameters into different groups and compute one orthonormal basis for each group. This further reduces the computational cost. For example, suppose the parameters are divided into two groups with size $p _ { 1 } , p _ { 2 }$ and the numbers of basis vectors are $k _ { 1 } , k _ { 2 }$ , the computational complexity of each power iteration is $2 m ( k _ { 1 } p _ { 1 } + k _ { 2 } p _ { 2 } )$ , which is smaller than $2 m ( k _ { 1 } + k _ { 2 } ) ( p _ { 1 } + p _ { 2 } )$ . In Appendix B, we analyze the additional computational and memory costs of GEP compared to standard gradient perturbation.
102
+
103
+ Curious readers may wonder if we can use random projection to reduce the dimensionality as Johnson–Lindenstrauss Lemma (Dasgupta & Gupta, 2003) guarantees that one can preserve the pairwise distance between any two points after projecting into a random subspace of much lower dimension. However, preserving the pairwise distance is not sufficient for high quality gradient reconstruction, which is verified by the empirical observation in Appendix C.
104
+
105
+ # 3.2 AN ANALYSIS ON THE RESIDUAL GRADIENTS OF GEP
106
+
107
+ Let $\begin{array} { r } { \pmb { g } : = \frac { 1 } { n } \sum _ { i } \pmb { G } _ { i } , } \end{array}$ : be the target private gradient. For a given anchor subspace $\textbf { { B } }$ , the residual gradients are defined as $\pmb { R } : = \pmb { G } - \pmb { G } \pmb { B } ^ { T } \pmb { B }$ . We then analyze how large the residual gradients could be. The following argument holds for all time steps and we ignore the time step index for simplicity.
108
+
109
+ For the ease of discussion, we introduce $\pmb { \xi } _ { i } : = ( G _ { i , : } ) ^ { T }$ for $i \in [ n ]$ to denote the the private gradients and the $\hat { \pmb { \xi } } _ { j } : = ( { \pmb { G } } _ { j , : } ^ { ( a ) } ) ^ { T }$ for $j \in [ m ]$ to denote the anchor gradients. We use $\lambda _ { k } ( \cdot )$ to denote the $k _ { t h }$ largest eigenvalue of a given matrix. We assume that the private gradients $\xi _ { 1 } , . . . , \xi _ { n }$ and the anchor gradients $\hat { \xi } _ { 1 } , . . . , \hat { \xi } _ { m }$ are sampled independently from a distribution $\mathcal { P }$ . We assume $\Sigma : = \mathbb { E } _ { \pmb { \xi } \sim \mathcal { P } } \pmb { \xi } \pmb { \xi } ^ { \bar { T } } \in \mathbb { R } ^ { p \times p }$ to be the population gradient (uncentered) covariance matrix. We also consider the (uncentered) empirical gradient covariance matrix $\begin{array} { r } { \hat { \pmb { S } } : = \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \hat { \pmb { \xi } } _ { i } \hat { \pmb { \xi } } _ { i } ^ { T } } \end{array}$ .
110
+
111
+ One case is that the population gradient covariance matrix $\pmb { \Sigma }$ is low-rank $k$ . In this case we can argue that the residual gradients are 0 once the number of anchor gradients $m > k$ .
112
+
113
+ Lemma 3.1. Assume that the population covariance matrix $\pmb { \Sigma }$ is with rank $k$ and the distribution $\mathcal { P }$ satisfies $\mathbb { P } ( \pmb { \xi } \in \mathbb { F } _ { s } ) = 0$ for all $s$ -flats $\mathbb { F } _ { s }$ in $\mathbb { R } ^ { p }$ with $0 \leq s < k$ . Let $\pmb { \Sigma } = \pmb { V _ { k } } \pmb { \Lambda } \pmb { V } _ { k } ^ { T }$ and $\hat { \pmb { S } } = \hat { V } _ { k ^ { \prime } } \hat { \pmb { \Lambda } } \hat { V } _ { k ^ { \prime } } ^ { T }$ be the eigendecompositions of $\pmb { \Sigma }$ and the empirical covariance matrix $\hat { S }$ , respectively, such that $\lambda _ { k ^ { \prime } } ( \hat { S } ) > 0$ and $\bar { \lambda _ { k ^ { \prime } + 1 } } ( \hat { S } ) = \bar { 0 }$ . Then if $m \geq k$ , we have with probability $^ { l }$ ,
114
+
115
+ $$
116
+ k ^ { \prime } = k \quad a n d \quad \| V _ { k } V _ { k } ^ { T } - \hat { V } _ { k } \hat { V } _ { k } ^ { T } \| _ { 2 } = 0 .
117
+ $$
118
+
119
+ Proof. The proof is based on the non-singularity of covariance matrix. See Appendix D.
120
+
121
+ We note that $s$ -flat is the translate $\mathbb { F } _ { s } = \pmb { x } + \mathbb { F } _ { s ( 0 ) }$ of an $s$ -dimensional linear subspace $\mathbb { F } _ { s ( 0 ) }$ in $\mathbb { R } ^ { p }$ and the normal distribution satisfies such condition (Eaton & Perlman, 1973; Muirhead, 2009). Therefore, we have seen that for low-rank case of population covariance matrix, the residual gradients are 0 once $m > k$ . In the general case, we measure the expected norm of the residual gradients.
122
+
123
+ Lemma 3.2. Assume that $\xi \sim \mathcal { P }$ and $\| \pmb { \xi } \| ^ { 2 } < T$ almost surely. Let $\pmb { \Sigma } = \pmb { V } \pmb { \Lambda } \pmb { V } ^ { T }$ be the eigendecomposition of the population covariance matrix $\pmb { \Sigma }$ . Let $\hat { \pmb { S } } = \hat { V } _ { k } \hat { \Lambda } \hat { V } _ { k } ^ { T }$ be the eigendecomposition of the empirical covariance matrix $\hat { S } .$ . Then we have with probability $1 - 2 \exp ( - \delta )$ ,
124
+
125
+ $$
126
+ \mathbb { E } \| \pmb { \xi } - \Pi _ { \hat { V } _ { k } } ( \pmb { \xi } ) \| _ { 2 } ^ { 2 } \leq \sum _ { k ^ { \prime } > k } \lambda _ { k ^ { \prime } } ( \pmb { \Sigma } ) + \sqrt { k C / m } + T \sqrt { 2 \delta / m } ,
127
+ $$
128
+
129
+ where $\begin{array} { r } { C = \big [ \mathbb { E } \| \pmb { \xi } \| ^ { 4 } - \sum _ { i } \lambda _ { i } ^ { 2 } ( \pmb { \Sigma } ) \big ] + \Big [ \frac { 1 } { m } \sum _ { j = 1 } ^ { m } \| \hat { \pmb { \xi } } _ { j } \| ^ { 4 } - \sum _ { i } \lambda _ { i } ^ { 2 } ( \pmb { \hat { S } } ) \Big ] } \end{array}$ , $\Pi _ { \hat { V } _ { k } }$ is a projection operator onto the subspace $\hat { V } _ { k }$ and the E is taken over the randomness of $\xi \sim \mathcal { P }$ .
130
+
131
+ Proof. The proof is an adaptation of Theorem 3.1 in Blanchard et al. (2007).
132
+
133
+ From Lemma 3.2, we can see the larger the number of anchor gradients and the dimension of the anchor subspace $k$ , the smaller the residual gradients. We can choose $m , k$ properly such that the upper bound on the expected residual gradient norm is small. This indicates that we may use a smaller clipping threshold and consequently apply smaller noises with achieving the same privacy guarantee.
134
+
135
+ We next empirically examine the projection error $\begin{array} { r } { \pmb { r } = \sum _ { i } \pmb { R } _ { i } , } \end{array}$ ,: by training a 20-layer ResNet on CIFAR10 dataset. We try two different types of auxiliary data to compute the anchor gradients: 1) samples from the same source as private data with correct labels, i.e., 2000 random samples from the test data; 2) samples from different source with random labels, i.e., 2000 random samples from ImageNet. The relation between the dimension of anchor subspace $k$ and the projection error rate $( \left\| { \frac { 1 } { n } } { \overline { { r } } } \right\| / \left\| g \right\| )$ is presented in Figure 4. We can see that the project error is small and decreases with $k$ , and the benefit of increasing $k$ diminishes when $k$ is large, which is implied by Lemma 3.2. In practice one can only use small or moderate $k$ because of the memory constraint. GEP needs to store at least $k$ individual gradients and each individual gradient consumes the same amount of memory as the model itself. Moreover, we can see that the projection into anchor subspace of random labeled auxiliary data yields comparable projection error, corroborating our argument that unlabeled auxiliary data are sufficient for finding the anchor subspace.
136
+
137
+ We also verify that the redundancy of residual gradients is small, by plotting the stable rank of residual gradient matrix in Figure 5. The stable rank of residual gradient matrix is an order of magnitude higher than the stable rank of original gradient matrix. This implies that it could be hard to further approximate $\pmb { R }$ with low-dimensional embeddings.
138
+
139
+ We next compare the GEP with a scheme that simply discards the residual gradients and only outputs the perturbed gradient embedding, i.e., the output is $\tilde { \mathbf { u } } : = \tilde { \mathbf { w } } ^ { T } \mathbf { B } / n$ .
140
+
141
+ ![](images/7345a3e82a46645b6d902e73473fed756d4004f557e77e9cb79b0e1a089ad382.jpg)
142
+ Figure 4: Relative projection error $( \left\| { \frac { 1 } { n } } \pmb { r } \right\| / \left\| \pmb { g } \right\| )$ of the second stage in ResNet20. The number of anchor gradients is 2000. The dimension of anchor subspace is $k$ . The learning rate is decayed by 10 at epoch 30. The left plot uses random samples from ImageNet. The right plot uses random samples from test data. The benefit of increasing $k$ becomes smaller when $k$ is larger.
143
+
144
+ ![](images/fb17dd406c7e4b4486261ff36f80c3a8f963fa4a24c5825b9e573abb26d2881f.jpg)
145
+ Figure 5: Stable rank of the residual gradient matrix versus original gradient matrix. The gradients are computed on full batch data for the first stage in ResNet20. The dimension of anchor subspace is $k = 1 0 0 0$ .
146
+
147
+ Remark 1. Let $\tilde { \mathbf { u } } : = \tilde { \mathbf { w } } ^ { T } \mathbf { B } / n$ be the reconstructed gradient from noisy gradient embedding and $\tilde { v }$ be the output of GEP. If ignoring the effect of gradient clipping, we have
148
+
149
+ $$
150
+ \mathbb { E } [ \tilde { \pmb { u } } ] = \pmb { g } - \pmb { r } / n , \quad \mathbb { E } [ \tilde { \pmb { v } } ] = \pmb { g } .
151
+ $$
152
+
153
+ where $\begin{array} { r } { { \pmb r } = \sum _ { i } { \pmb R } _ { i } , } \end{array}$ : is the aggregated residual gradients, $\tilde { \pmb { w } } , \pmb { B }$ are given in Algorithm 1 and the expectation is over the added random noises.
154
+
155
+ This indicates that $\tilde { \mathbf { \pmb { u } } }$ contains a systematic error that makes $\tilde { \mathbf { \pmb { u } } }$ always deviate from $\textbf { { g } }$ by the residual gradient. This systematic error is the projection error, which is plotted in Figure 4. The systematic error cannot be mitigated by reducing the noise magnitude (e.g., increasing the privacy budget or collecting more private data). We refer to the algorithm releasing $\tilde { \mathbf { \pmb { u } } }$ directly as Biased-GEP or $B$ -GEP for short, which can be viewed as an efficient implementation of the algorithm in (Zhou et al., 2020). In our experiments, B-GEP can outperform standard gradient perturbation when $k$ is large but is inferior to GEP. We note that the above remark is made with ignoring the clipping effect (or set a large clipping threshold). In practice, we do apply clipping for the individual gradients at each time step, which makes the expectations in Remark 1 obscure (Chen et al., 2020b). We note that the claim that $\tilde { v }$ is an unbiased estimator of $\textbf { { g } }$ is not that precise when applying gradient clipping.
156
+
157
+ # 3.3 PRIVATE LEARNING WITH GRADIENT EMBEDDING PERTURBATION
158
+
159
+ GEP (Algorithm 1) describes how to release one-step gradient with privacy guarantee. In this section, we compose the privacy losses at each step to establish the privacy guarantee for the whole learning process. The differentially private learning process with GEP is given in Algorithm 2 and the privacy analysis is presented in Theorem 3.2.
160
+
161
+ Algorithm 2: Differentially private gradient descent with GEP.
162
+
163
+ <table><tr><td>configuration of GEP C; loss function l;</td><td>1: Input: private dataset D; auxiliary dataset D(@); number of updates T; learning rate n;</td></tr><tr><td>2: Output: Differentially private model 0T.</td><td></td></tr><tr><td>3: fort=OtoT-1do</td><td></td></tr><tr><td>4:</td><td>Compute the private gradients Gt and anchor gradients G(@) of loss with respect to 0t.</td></tr><tr><td>5:</td><td> and configuration C to get Ut.</td></tr><tr><td>6: 7: end for</td><td>Update model 0t+1 = 0t - nUt.</td></tr></table>
164
+
165
+ Theorem 3.2. For any $\epsilon < 2 \log ( 1 / \delta )$ and $\delta \in ( 0 , 1 )$ , the output of Algorithm 2 satisfies $( \epsilon , \delta )$ -DP if we set $\sigma \geq 2 \sqrt { 2 T \log ( 1 / \delta ) } / \epsilon$ .
166
+
167
+ If the private gradients are randomly sampled from the full batch gradients, the privacy guarantee can be strengthened via the privacy amplification by subsampling theorem of DP (Balle et al., 2018; Wang et al., 2019; Zhu & Wang, 2019; Mironov et al., 2019). Theorem 3.3 gives the expected excess error of Algorithm 2. Expected excess error measures the distance between the algorithm’s output and the optimal solution in expectation.
168
+
169
+ Theorem 3.3. Suppose the loss $\begin{array} { r } { L ( \pmb \theta ) = \frac { 1 } { n } \sum _ { ( \pmb x , y ) \in \mathbb { D } } \ell ( f _ { \pmb \theta } ( \pmb x ) , y ) } \end{array}$ is $I$ -Lipschitz, convex, and $\beta$ - smooth. If $\begin{array} { r l r } { \eta } & { { } = } & { \frac { 1 } { \beta } } \end{array}$ , $\begin{array} { l } { T \ = \ { \frac { n \beta \epsilon } { \sqrt { p } } } } \end{array}$ and $\begin{array} { r c l } { \overline { { \pmb { \theta } } } } & { = } & { \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \pmb { \theta } _ { t } } \end{array}$ , then we have $\begin{array} { r } { \mathbb { E } [ L ( \bar { \pmb \theta } ) ] ~ - ~ L ( \pmb \theta _ { * } ) ~ \leq } \end{array}$ $\begin{array} { r } { \mathcal { O } \left( \frac { \sqrt { k \log ( 1 / \delta ) } } { n \epsilon } + \frac { \bar { r } \sqrt { p \log ( 1 / \delta ) } } { n \epsilon } \right) } \end{array}$ , where $\begin{array} { r } { \bar { r } = \frac { 1 } { T } \sum _ { t = 0 } ^ { T - 1 } r _ { t } ^ { 2 } } \end{array}$ and $r _ { t } = \operatorname* { m a x } _ { i } \| ( \pmb { R } _ { t } ) _ { i , : } \|$ is the sensitivity of residual gradient at step $t$ .
170
+
171
+ The $\bar { r }$ term represents the average projection error over the training process. The previous best expected excess error for gradient perturbation is $\mathcal { O } ( \sqrt { p \log ( 1 / \delta ) } / ( n \epsilon ) )$ (Wang et al., 2017). As shown in Lemma 3.1, if the gradients locate in a $k$ -dimensional subspace over the training process, $\bar { r } = 0$ and the excess error is $\mathcal { O } ( \sqrt { k \log ( 1 / \delta ) } / ( n \epsilon ) )$ , independent of the problem ambient dimension $p$ . When the gradients are in general position, i.e., gradient matrix is not exact low-rank, Lemma 3.2 and the empirical result give a hint on how small the residual gradients could be. However, it is hard to get a good bound on $\operatorname { m a x } _ { i } \| ( \pmb { R } _ { t } ) _ { i , : } \|$ and the bound in Theorem 3.3 does not explicitly improve over previous result. One possible solution is to use a clipping threshold based on the expected residual gradient norm. Then the output gradient becomes biased because of clipping and the utility/privacy guarantees in Theorem $3 . 3 / 3 . 2$ require new elaborate derivation. We leave this for future work.
172
+
173
+ # 4 EXPERIMENTS
174
+
175
+ We conduct experiments on MNIST, extended SVHN, and CIFAR-10 datasets. Our implementation is publicly available2. The model for MNIST has two convolutional layers with max-pooling and one fully connected layer. The model for SVHN and CIFAR-10 is ResNet20 in He et al. (2016). We replace all batch normalization (Ioffe & Szegedy, 2015) layers with group normalization (Wu & He, 2018) layers because batch normalization mixes the representations of different samples and makes the privacy loss cannot be analyzed accurately. The non-private accuracy for MNIST, SVHN, and CIFAR-10 is $9 9 . 1 \%$ , $9 5 . 9 \%$ , and $9 0 . 4 \%$ , respectively.
176
+
177
+ We also provide experiments with pre-trained models in Appendix A. Tramèr & Boneh (2020) show that differentially private linear classifier can achieve high accuracy using the features produced by pre-trained models. We examine whether GEP can improve the performance of such private linear classifiers. Notably, using the features produced by a model pre-trained on unlabeled ImageNet, GEP achieves $9 4 . 8 \%$ validation accuracy on CIFAR10 with $\epsilon = 2$ .
178
+
179
+ Evaluated algorithms We use the algorithm in Abadi et al. (2016) as benchmark gradient perturbation approach, referred to as “GP”. We also compare GEP with PATE (Papernot et al., 2017). We run the experiments for PATE using the official implementation. The privacy parameter $\epsilon$ of PATE is data-dependent and hence cannot be released directly (see Section 3.3 in Papernot et al. (2017)). Nonetheless, we report the results of PATE anyway.
180
+
181
+ Implementation details At each step, GEP needs to release two vectors: the noisy gradient embedding and the noisy residual gradient. The gradient embeddings have a sensitivity of $S _ { 1 }$ and the residual gradients have a sensitivity of $S _ { 2 }$ because of the clipping. The output of GEP can be constructed as follows: (1) normalize the gradient embeddings and residual gradients by $1 / S _ { 1 }$ and $1 / S _ { 2 }$ , respectively, (2) concatenate the rescaled vectors, (3) release the concatenated vector via√ gaussian mechanism with sensitivity $\sqrt { 2 }$ , (4) rescale the two components by $S _ { 1 }$ and $S _ { 2 }$ . B-GEP only needs to release the normalized noisy gradient embedding. We use the numerical tool in Mironov et al. (2019) to compute the privacy loss. For given privacy budget and sampling probability, $\sigma$ is set to be the smallest value such that the privacy budget is allowable to run desired epochs.
182
+
183
+ All experiments are run on a single Tesla V100 GPU with 16G memory. For ResNet20, the parameters are divided into five groups: input layer, output layer, and three intermediate stages. For a given quota of basis vectors, we allocate it to each group according to the square root of the number of parameters in each group. We compute an orthonormal subspace basis on each group separately.
184
+
185
+ Table 1: Test accuracy (in $\%$ ) with varying choices of privacy bound $\epsilon$ . The numbers under symbol $\Delta$ denote the improvement over GP baseline.
186
+
187
+ <table><tr><td rowspan=1 colspan=2>Dataset Algorithm</td><td rowspan=1 colspan=1>e=2</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=1>e=5</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=1>e=8</td><td rowspan=1 colspan=1>A</td></tr><tr><td rowspan=4 colspan=2>GPPATEMNISTB-GEPGEP</td><td rowspan=1 colspan=1>94.7</td><td rowspan=1 colspan=1>+0.0</td><td rowspan=1 colspan=1>96.8</td><td rowspan=1 colspan=1>+0.0</td><td rowspan=1 colspan=1>97.2</td><td rowspan=1 colspan=1>+0.0</td></tr><tr><td rowspan=1 colspan=1>PATE</td><td rowspan=1 colspan=1>98.5</td><td rowspan=1 colspan=1>+3.8</td><td rowspan=1 colspan=1>98.5</td><td rowspan=1 colspan=1>+1.7</td><td rowspan=1 colspan=1>98.6</td><td rowspan=1 colspan=1>+1.4</td></tr><tr><td rowspan=1 colspan=1>B-GEP</td><td rowspan=1 colspan=1>93.1</td><td rowspan=1 colspan=1>-1.6</td><td rowspan=1 colspan=1>94.5</td><td rowspan=1 colspan=1>-2.3</td><td rowspan=1 colspan=1>95.9</td><td rowspan=1 colspan=1>-1.3</td></tr><tr><td rowspan=1 colspan=1>96.3</td><td rowspan=1 colspan=1>+1.6</td><td rowspan=1 colspan=1>97.9</td><td rowspan=1 colspan=1>+1.1</td><td rowspan=1 colspan=1>98.4</td><td rowspan=1 colspan=1>+1.2</td></tr><tr><td rowspan=4 colspan=1>SVHN</td><td rowspan=1 colspan=1>GP</td><td rowspan=1 colspan=1>87.1</td><td rowspan=1 colspan=1>+0.0</td><td rowspan=1 colspan=1>91.3</td><td rowspan=1 colspan=1>+0.0</td><td rowspan=1 colspan=1>91.6</td><td rowspan=1 colspan=1>+0.0</td></tr><tr><td rowspan=1 colspan=1>PATE</td><td rowspan=1 colspan=1>80.7</td><td rowspan=1 colspan=1>-6.4</td><td rowspan=1 colspan=1>91.6</td><td rowspan=1 colspan=1>+0.3</td><td rowspan=1 colspan=1>91.6</td><td rowspan=1 colspan=1>+0.0</td></tr><tr><td rowspan=1 colspan=1>B-GEP</td><td rowspan=1 colspan=1>88.5</td><td rowspan=1 colspan=1>+1.4</td><td rowspan=1 colspan=1>91.8</td><td rowspan=1 colspan=1>+0.5</td><td rowspan=1 colspan=1>92.3</td><td rowspan=1 colspan=1>+0.7</td></tr><tr><td rowspan=1 colspan=1>GEP</td><td rowspan=1 colspan=1>92.3</td><td rowspan=1 colspan=1>+5.2</td><td rowspan=1 colspan=1>94.7</td><td rowspan=1 colspan=1>+3.4</td><td rowspan=1 colspan=1>95.1</td><td rowspan=1 colspan=1>+3.5</td></tr><tr><td rowspan=2 colspan=1>CIFAR-10</td><td rowspan=1 colspan=1>GP</td><td rowspan=1 colspan=1>43.6</td><td rowspan=1 colspan=1>+0.0</td><td rowspan=1 colspan=1>52.2</td><td rowspan=1 colspan=1>+0.0</td><td rowspan=1 colspan=1>56.4</td><td rowspan=1 colspan=1>+0.0</td></tr><tr><td rowspan=1 colspan=1>PATE</td><td rowspan=1 colspan=1>34.2</td><td rowspan=1 colspan=1>-9.4</td><td rowspan=1 colspan=1>41.9</td><td rowspan=1 colspan=1>-10.3</td><td rowspan=1 colspan=1>43.6</td><td rowspan=1 colspan=1>-12.8</td></tr><tr><td rowspan=2 colspan=1></td><td rowspan=1 colspan=1>B-GEP</td><td rowspan=1 colspan=1>50.3</td><td rowspan=1 colspan=1>+6.7</td><td rowspan=1 colspan=1>59.5</td><td rowspan=1 colspan=1>+7.3</td><td rowspan=1 colspan=1>63.0</td><td rowspan=1 colspan=1>+6.6</td></tr><tr><td rowspan=1 colspan=1>GEP</td><td rowspan=1 colspan=1>59.7</td><td rowspan=1 colspan=1>+16.1</td><td rowspan=1 colspan=1>70.1</td><td rowspan=1 colspan=1>+17.9</td><td rowspan=1 colspan=1>74.9</td><td rowspan=1 colspan=1>+18.5</td></tr></table>
188
+
189
+ ![](images/fa6a5f6d7a35fa34dec7a6cf45765314549eb5a963274140f2a890e59cd1e7d0.jpg)
190
+ Figure 6: Test accuracy when varying the dimension of anchor subspace. GEP significantly outperforms B-GEP for all $k$ . Moreover, the performance of GEP is not that sensitive to $k$ .
191
+
192
+ Then we concatenate the projections of all groups to construct gradient embeddings. The number of power iterations $t$ is set as 1 as empirical evaluations suggest more iterations do not improve the performance for GEP and B-GEP.
193
+
194
+ For all datasets, the anchor gradients are computed on 2000 random samples from ImageNet. In Appendix C, we examine the influence of choosing different numbers of anchor gradients and different sources of auxiliary data. The selected images are downsampled into size of $3 2 \times 3 2$ ( $2 8 \times 2 8$ for MNIST) and we label them randomly at each update. For SVHN and CIFAR-10, $k$ is chosen from [500, 1000, 1500, 2000]. For MNIST, we halve the size of $k$ . We use SGD with momentum 0.9 as the optimizer. Initial learning rate and batchsize are 0.1 and 1000, respectively. The learning rate is divided by 10 at middle of training. Weight decay is set as $1 \times 1 0 ^ { - 4 }$ . The clipping threshold for is 10 for original gradients and 2 for residual gradients. The number of training epochs for CIFAR-10 and MNIST is 50, 100, 200 for privacy parameter $\epsilon = 2 , 5 , 8$ , respectively. The number of training epochs for SVHN is 5, 10, 20 for privacy parameter $\epsilon = 2 , 5 , 8$ , respectively. Privacy parameter $\delta$ is $1 ^ { \cdot } \times 1 0 ^ { - 6 }$ for SVHN and $\mathrm { i } \times \mathrm { 1 0 ^ { - 5 } }$ for CIFAR-10 and MNIST.
195
+
196
+ Results The best accuracy with given $\epsilon$ is in Table 4. For all datasets, GEP achieves considerable improvement over GP in Abadi et al. (2016). Specifically, GEP achieves $7 4 . 9 \%$ test accuracy on CIFAR-10 with $( 8 , 1 0 ^ { - 5 } )$ -DP, outperforming GP by $1 8 . 5 \%$ . PATE achieves best accuracy on MNIST but its performance drops as the dataset becomes more complex.
197
+
198
+ We also plot the relation between accuracy and $k$ in Figure 6. GEP is less sensitive to the choice of $k$ and outperforms B-GEP for all choices of $k$ . The improvement of increasing $k$ becomes smaller as $k$ becomes larger. We note that the memory cost of choosing large $k$ is high because we need to store at least $k$ individual gradients to compute anchor subspace.
199
+
200
+ # 5 CONCLUSION
201
+
202
+ In this paper, we propose Gradient Embedding Perturbation (GEP) for learning with differential privacy. GEP leverages the gradient redundancy to reduce the added noise and outputs an unbiased estimator of target gradient. The several key designs of GEP significantly boost the applicability of GEP. Extensive experiments on real world datasets demonstrate the superior utility of GEP.
203
+
204
+ # REFERENCES
205
+
206
+ Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. Deep learning with differential privacy. In ACM SIGSAC Conference on Computer and Communications Security, 2016.
207
+
208
+ Noga Alon, Raef Bassily, and Shay Moran. Limits of private learning with access to public data. In Advances in Neural Information Processing Systems, 2019.
209
+
210
+ Borja Balle, Gilles Barthe, and Marco Gaboardi. Privacy amplification by subsampling: Tight analyses via couplings and divergences. In Advances in Neural Information Processing Systems, 2018.
211
+
212
+ Raef Bassily, Adam Smith, and Abhradeep Thakurta. Differentially private empirical risk minimization: Efficient algorithms and tight error bounds. Annual Symposium on Foundations of Computer Science, 2014.
213
+
214
+ Daniel Bernau, Philip-William Grassal, Jonas Robl, and Florian Kerschbaum. Assessing differentially private deep learning with membership inference. arXiv preprint arXiv:1912.11328, 2019.
215
+
216
+ Gilles Blanchard, Olivier Bousquet, and Laurent Zwald. Statistical properties of kernel principal component analysis. Machine Learning, 66(2-3):259–294, 2007.
217
+
218
+ Mark Bun and Thomas Steinke. Concentrated differential privacy: Simplifications, extensions, and lower bounds. In Theory of Cryptography Conference, 2016.
219
+
220
+ Nicholas Carlini, Chang Liu, Úlfar Erlingsson, Jernej Kos, and Dawn Song. The secret sharer: Evaluating and testing unintended memorization in neural networks. In USENIX Security Symposium, 2019.
221
+
222
+ Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big self-supervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020a.
223
+
224
+ Xiangyi Chen, Steven Z Wu, and Mingyi Hong. Understanding gradient clipping in private sgd: A geometric perspective. Advances in Neural Information Processing Systems, 33, 2020b.
225
+
226
+ Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of johnson and lindenstrauss. Random Structures & Algorithms, 2003.
227
+
228
+ Jinshuo Dong, Aaron Roth, and Weijie J Su. Gaussian differential privacy. arXiv preprint arXiv:1905.02383, 2019.
229
+
230
+ Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, 2006a.
231
+
232
+ Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of cryptography conference, 2006b.
233
+
234
+ Cynthia Dwork, Aaron Roth, et al. The algorithmic foundations of differential privacy. Foundations and Trends® in Theoretical Computer Science, 2014.
235
+
236
+ Morris L Eaton and Michael D Perlman. The non-singularity of generalized sample covariance matrices. The Annals of Statistics, pp. 710–717, 1973.
237
+
238
+ Matt Fredrikson, Somesh Jha, and Thomas Ristenpart. Model inversion attacks that exploit confidence information and basic countermeasures. In ACM SIGSAC Conference on Computer and Communications Security, 2015.
239
+
240
+ Kazuto Fukuchi, Quang Khai Tran, and Jun Sakuma. Differentially private empirical risk minimization with input perturbation. In International Conference on Discovery Science, 2017.
241
+
242
+ Mary Gooneratne, Khe Chai Sim, Petr Zadrazil, Andreas Kabel, Françoise Beaufays, and Giovanni Motta. Low-rank gradient approximation for memory-efficient on-device training of deep neural network. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2020.
243
+
244
+ Guy Gur-Ari, Daniel A Roberts, and Ethan Dyer. Gradient descent happens in a tiny subspace. arXiv preprint arXiv:1812.04754, 2018.
245
+
246
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2016.
247
+
248
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Conference on Computer Vision and Pattern Recognition, 2020.
249
+
250
+ Briland Hitaj, Giuseppe Ateniese, and Fernando Pérez-Cruz. Deep models under the gan: information leakage from collaborative deep learning. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, 2017.
251
+
252
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, 2015.
253
+
254
+ Roger Iyengar, Joseph P Near, Dawn Song, Om Thakkar, Abhradeep Thakurta, and Lun Wang. Towards practical differentially private convex optimization. In IEEE Symposium on Security and Privacy, 2019.
255
+
256
+ Bargav Jayaraman, Lingxiao Wang, David Evans, and Quanquan Gu. Distributed learning without distress: Privacy-preserving empirical risk minimization. In Advances in Neural Information Processing Systems, 2018.
257
+
258
+ James Jordon, Jinsung Yoon, and Mihaela van der Schaar. Pate-gan: Generating synthetic data with differential privacy guarantees. In International Conference on Learning Representations, 2019.
259
+
260
+ Peter Kairouz, Mónica Ribero, Keith Rush, and Abhradeep Thakurta. Dimension independence in unconstrained private erm via adaptive preconditioning. arXiv preprint arXiv:2008.06570, 2020.
261
+
262
+ Daniel Kifer, Adam Smith, and Abhradeep Thakurta. Private convex empirical risk minimization and high-dimensional regression. In Conference on Learning Theory, 2012.
263
+
264
+ Jaewoo Lee and Daniel Kifer. Concentrated differentially private gradient descent with adaptive per-iteration privacy budget. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2018.
265
+
266
+ Xinyan Li, Qilong Gu, Yingxue Zhou, Tiancong Chen, and Arindam Banerjee. Hessian based analysis of sgd for deep nets: Dynamics and generalization. In SIAM International Conference on Data Mining, 2020.
267
+
268
+ Yuzhe Ma, Xiaojin Zhu, and Justin Hsu. Data poisoning against differentially-private learners: attacks and defenses. In Proceedings of the 28th International Joint Conference on Artificial Intelligence, pp. 4732–4738. AAAI Press, 2019.
269
+
270
+ Ilya Mironov. Rényi differential privacy. In IEEE Computer Security Foundations Symposium, 2017.
271
+
272
+ Ilya Mironov, Kunal Talwar, and Li Zhang. Rényi differential privacy of the sampled gaussian mechanism. arXiv, 2019.
273
+
274
+ Robb J Muirhead. Aspects of multivariate statistical theory, volume 197. John Wiley & Sons, 2009.
275
+
276
+ Maysum Panju. Iterative methods for computing eigenvalues and eigenvectors. arXiv preprint arXiv:1105.1185, 2011.
277
+
278
+ Nicolas Papernot, Martín Abadi, Ulfar Erlingsson, Ian Goodfellow, and Kunal Talwar. Semisupervised knowledge transfer for deep learning from private training data. In International Conference on Learning Representations, 2017.
279
+
280
+ Nicolas Papernot, Shuang Song, Ilya Mironov, Ananth Raghunathan, Kunal Talwar, and Úlfar Erlingsson. Scalable private learning with pate. In International Conference on Learning Representations, 2018.
281
+
282
+ NhatHai Phan, My T Thai, Han Hu, Ruoming Jin, Tong Sun, and Dejing Dou. Scalable differential privacy with certified robustness in adversarial learning. International Conference on Machine Learning, 2020.
283
+
284
+ Md Atiqur Rahman, Tanzila Rahman, Robert Laganiere, Noman Mohammed, and Yang Wang. Membership inference attack against differentially private deep learning model. Transactions on Data Privacy, 2018.
285
+
286
+ Alexandre Sablayrolles, Matthijs Douze, Yann Ollivier, Cordelia Schmid, and Hervé Jégou. Whitebox vs black-box: Bayes optimal strategies for membership inference. International Conference on Machine Learning, 2019.
287
+
288
+ Reza Shokri and Vitaly Shmatikov. Privacy-preserving deep learning. In ACM SIGSAC conference on computer and communications security, 2015.
289
+
290
+ Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. Membership inference attacks against machine learning models. In IEEE Symposium on Security and Privacy (SP), 2017.
291
+
292
+ Shuang Song, Kamalika Chaudhuri, and Anand D Sarwate. Stochastic gradient descent with differentially private updates. In Global Conference on Signal and Information Processing (GlobalSIP), 2013.
293
+
294
+ Kunal Talwar, Abhradeep Guha Thakurta, and Li Zhang. Nearly optimal private lasso. In Advances in Neural Information Processing Systems, 2015.
295
+
296
+ Abhradeep Guha Thakurta and Adam Smith. Differentially private feature selection via stability arguments, and the robustness of the lasso. In Conference on Learning Theory, 2013.
297
+
298
+ Florian Tramèr and Dan Boneh. Differentially private learning needs better features (or much more data). arXiv preprint arXiv:2011.11660, 2020.
299
+
300
+ Joel A Tropp et al. An introduction to matrix concentration inequalities. Foundations and Trends® in Machine Learning, 8(1-2):1–230, 2015.
301
+
302
+ Thijs Vogels, Sai Praneeth Karimireddy, and Martin Jaggi. Powersgd: Practical low-rank gradient compression for distributed optimization. In Advances in Neural Information Processing Systems, 2019.
303
+
304
+ Di Wang and Jinhui Xu. On sparse linear regression in the local differential privacy model. In International Conference on Machine Learning, 2019.
305
+
306
+ Di Wang, Minwei Ye, and Jinhui Xu. Differentially private empirical risk minimization revisited: Faster and more general. In Advances in Neural Information Processing Systems, 2017.
307
+
308
+ Jun Wang and Zhi-Hua Zhou. Differentially private learning with small public data. In AAAI, 2020.
309
+
310
+ Lingxiao Wang and Quanquan Gu. Differentially private iterative gradient hard thresholding for sparse learning. In International Joint Conference on Artificial Intelligence, 2019.
311
+
312
+ Yu-Xiang Wang, Borja Balle, and Shiva Prasad Kasiviswanathan. Subsampled rényi differential privacy and analytical moments accountant. In International Conference on Artificial Intelligence and Statistics, 2019.
313
+
314
+ Xi Wu, Matthew Fredrikson, Somesh Jha, and Jeffrey F Naughton. A methodology for formalizing model-inversion attacks. In IEEE Computer Security Foundations Symposium, 2016.
315
+
316
+ Xi Wu, Fengan Li, Arun Kumar, Kamalika Chaudhuri, Somesh Jha, and Jeffrey Naughton. Bolt-on differential privacy for scalable stochastic gradient descent-based analytics. In ACM International Conference on Management of Data, 2017.
317
+
318
+ Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European conference on computer vision (ECCV), 2018.
319
+
320
+ Da Yu, Huishuai Zhang, Wei Chen, Jian Yin, and Tie-Yan Liu. Gradient perturbation is underrated for differentially private convex optimization. In Proc. of 29th Int. Joint Conf. Artificial Intelligence, 2020.
321
+
322
+ Da Yu, Huishuai Zhang, Wei Chen, Jian Yin, and Tie-Yan Liu. How does data augmentation affect privacy in machine learning? In Proc. of the AAAI Conference on Artificial Intelligence, 2021.
323
+
324
+ Yingxue Zhou, Zhiwei Steven Wu, and Arindam Banerjee. Bypassing the ambient dimension: Private sgd with gradient subspace identification. arXiv preprint arXiv:2007.03813, 2020.
325
+
326
+ Ligeng Zhu, Zhijian Liu, and Song Han. Deep leakage from gradients. In Advances in Neural Information Processing Systems, 2019.
327
+
328
+ Yuqing Zhu and Yu-Xiang Wang. Poission subsampled rényi differential privacy. In International Conference on Machine Learning, 2019.
329
+
330
+ # A EXPERIMENTS WITH PRE-TRAINED MODELS
331
+
332
+ Recent works have shown that pre-training the models on unlabeled data can be beneficial for subsequent learning tasks (Chen et al., 2020a; He et al., 2020). Tramèr & Boneh (2020) demonstrate that differentially private linear classifier can achieve high accuracy using the features produced by those per-trained models. We show that GEP can also benefit from such pre-trained models.
333
+
334
+ Inspired by Tramèr & Boneh (2020), we use the output of the penultimate layer of a pre-trained ResNet152 model as feature to train a private linear classifier. The ResNet152 model is pre-trained on unlabeled ImageNet using SimCLR (Chen et al., 2020a). The feature dimension is 4096.
335
+
336
+ Implementation Details We choose the privacy parameter $\epsilon$ from [0.1, 0.5, 1, 2]. The privacy parameter $\delta$ is $1 \times 1 0 ^ { - 5 }$ . We run all experiments for 5 times and report the average accuracy. The clipping threshold of residual gradients is still one-fifth of the clipping threshold of the original gradients. The√ dimension of anchor subspace is set as $2 0 0 \simeq { \sqrt { p } }$ where $p = 4 0 9 6 0$ is the model dimension. We randomly sample 500 samples from the test set as auxiliary data and evaluate performance on the rest test samples. The optimizer is Adam with default momentum coefficients. Other hyper-parameters are listed in Table 2.
337
+
338
+ Table 2: Hyperparameter values used in Appendix A.
339
+
340
+ <table><tr><td rowspan=1 colspan=1>Hyperparameter</td><td rowspan=1 colspan=1>Values</td></tr><tr><td rowspan=1 colspan=1>Learning rate</td><td rowspan=1 colspan=1>0.01,0.05,0.1</td></tr><tr><td rowspan=1 colspan=1>Running steps</td><td rowspan=1 colspan=1>50,100,400</td></tr><tr><td rowspan=1 colspan=1>Clipping threshold</td><td rowspan=1 colspan=1>0.01,0.1,1</td></tr></table>
341
+
342
+ Results The experiment results are shown in Table 3. GEP outperforms GP on all values of $\epsilon$ . With privacy bound $\epsilon = 2$ , GEP achieves $9 4 . 8 \%$ validation accuracy on CIFAR10 dataset, improving over the GP baseline by $1 . 4 \%$ . For very strong privacy guarantee $\epsilon = 0 . 1$ ), B-GEP performs on par with GEP because strong privacy guarantee requires large noise and the useful signal in residual gradient is submerged in the added noise. B-GEP benefits less from larger $\epsilon$ compared to GP or GEP. For $\epsilon = 1$ and 2, the performance of B-GEP is worse than the performance of GP. This is because larger $\epsilon$ can not reduce the systematic error of B-GEP (see Remark 1 in Section 3.2).
343
+
344
+ Table 3: Validation accuracy $( \mathrm { i n } \% )$ ) on CIFAR10 with varying choices of $\epsilon$ . We train a private linear model on top of the features from a ResNet152 model, which is pre-trained on unlabeled ImageNet.
345
+
346
+ <table><tr><td></td><td>e=0.1</td><td>e=0.5</td><td>e=1</td><td>e=2</td></tr><tr><td>Non private</td><td>96.3</td><td>96.3</td><td>96.3</td><td>96.3</td></tr><tr><td>GP</td><td>88.2 (±0.16)</td><td>91.1 (±0.17)</td><td>93.2 (±0.19)</td><td>93.4 (±0.12)</td></tr><tr><td>B-GEP</td><td>91.0 (±0.07)</td><td>92.9 (±0.03)</td><td>93.1 (±0.10)</td><td>93.2 (±0.08)</td></tr><tr><td>GEP</td><td>90.9 (±0.19)</td><td>93.5 (±0.06)</td><td>94.3 (±0.09)</td><td>94.8 (±0.06)</td></tr></table>
347
+
348
+ # B COMPLEXITY ANALYSIS
349
+
350
+ We provide an analysis of the computational and memory costs of the construction of anchor subspace. The computation of the anchor subspace is the dominant additional cost of GEP compared to conventional gradient perturbation. Notations: $k , m , n$ , and $p$ are the dimension of anchor subspace, number of anchor gradients, number of private gradients, and the model dimension, respectively. In order to reduce the computational and memory costs, we divide the parameters into $g$ groups and compute one orthonormal basis for each group. We refer to this approach as ‘parameter grouping’. In this section, we assume the parameters and the dimension of the anchor subspace are both divided evenly. Table 4 summarizes the additional costs of GEP with/without parameter grouping. Using parameter grouping can reduce the computational/memory cost significantly.
351
+
352
+ Table 4: Computational and memory costs of a single power iteration in Algorithm 1. The computation cost is measured by the number of floating point operations. The memory cost is measured by the number of floating-point numbers we need to store. $\cdot _ { \mathrm { G E P + P G } } ,$ denotes GEP with parameter grouping and $g$ denotes the number of groups. Notations: $k$ , $m$ , $n$ , and $p$ are the dimension of anchor subspace, number of anchor gradients, number of private gradients, and the model dimension, respectively.
353
+
354
+ <table><tr><td></td><td>Computational Cost</td><td>Memory Cost</td></tr><tr><td>GEP</td><td>2mkp+pk²</td><td>max(0,(m-n+k)p+mk)</td></tr><tr><td>GEP+PG</td><td>2mkp/g+pk²/g²</td><td>max (0,(m-n+)p+mk)</td></tr></table>
355
+
356
+ # C ABLATION STUDY
357
+
358
+ The influence of choosing different auxiliary datasets. We conduct experiments with different choices of auxiliary datasets. For CIFAR10, we try 2000 random test samples from CIFAR10, 2000 random samples from CIFAR100, and 2000 random samples from ImageNet. When the auxiliary dataset is CIFAR10, we try both correct labels and random labels. For all choices of auxiliary datasets, the test accuracy is evaluated on 8000 test samples of CIFAR10 that are not used as auxiliary data. Other implementation details are the same as in Section 4. The results are shown in Table 5. Surprisingly, using samples from CIFAR10 with correct labels yields the worst accuracy. This may because the model ‘overfits’ the auxiliary data when it has access to correct labels, which makes the anchor subspace contains less information about the private gradients. The best accuracy is achieved using samples from CIFAR10 with random labels, this makes sense because in this case the features of auxiliary data and private data have the same distribution. Using samples from CIFAR100 or ImageNet as auxiliary data has a small influence on the test accuracy.
359
+
360
+ Table 5: Test accuracy on CIFAR10 with different choices of auxiliary datasets. The privacy guarantee is $( 8 , 1 0 ^ { - 5 } )$ -DP. We report the average accuracy of five runs with standard deviations in brackets.
361
+
362
+ <table><tr><td>Auxiliary Data</td><td>RandomLabel?</td><td>Test Accuracy</td></tr><tr><td>CIFAR10</td><td>No</td><td>72.9 (±0.31)</td></tr><tr><td>CIFAR10</td><td>Yes</td><td>75.1 (±0.42)</td></tr><tr><td>CIFAR100</td><td>Yes</td><td>74.7 (±0.46)</td></tr><tr><td>ImageNet</td><td>Yes</td><td>74.8 (±0.39)</td></tr></table>
363
+
364
+ The influence of the number of anchor gradients. In the main text, the size of auxiliary dataset is $m = 2 0 0 0$ . We conduct more experiments with different sizes of auxiliary dataset to examine the influence of $m$ . The auxiliary data is randomly sampled from ImageNet. Table 6 reports the test accuracy on CIFAR10 with different choices of $m$ . For both B-GEP and GEP, increasing $m$ leads to slightly improved performance.
365
+
366
+ Table 6: Test accuracy on CIFAR10 with different sizes of auxiliary dataset. The privacy guarantee is $( 8 , 1 0 ^ { - 5 } )$ -DP. We report the average accuracy of five runs with standard deviations in brackets.
367
+
368
+ <table><tr><td>Algorithm</td><td>m = 1000</td><td>m = 2000</td><td>m = 4000</td></tr><tr><td>B-GEP</td><td>62.2 (±0.26)</td><td>62.6 (±0.24)</td><td>63.3 (±0.27)</td></tr><tr><td>GEP</td><td>74.6 (±0.41)</td><td>74.8 (±0.39)</td><td>75.2 (±0.34)</td></tr></table>
369
+
370
+ The projection error of random basis vectors. It is tempting to construct the anchor subspace using random basis vectors because Johnson–Lindenstrauss Lemma (Dasgupta & Gupta, 2003) guarantees that one can preserve the pairwise distance between any two points after projecting into a random subspace of much lower dimension. We empirically verify the projection error of Gaussian random basis vectors on CIFAR10 and SVHN. The experiment settings are the same as in Section 4. The projection errors over the training process are plotted in Figure 7. The projection error of random basis vectors is very high $( > 9 5 \%$ ) throughout training. This is because preserving the pairwise distance is not sufficient for high quality gradient reconstruction, which requires one to preserve the average ‘distance’ between any individual gradient and all other gradients.
371
+
372
+ ![](images/6bd629998cab363e48acafcc2df5409bfe0ffc571069597eaba467654c736237.jpg)
373
+ Figure 7: Projection error rate of random basis vectors. The dimension of subspace is denoted by $k$ .
374
+
375
+ # D MISSING PROOFS
376
+
377
+ Lemma 3.1. Assume that the population covariance matrix $\pmb { \Sigma }$ is with rank $k$ and the distribution $\mathcal { P }$ satisfies $\mathbb { P } ( \pmb { \xi } \in \mathbb { F } _ { s } ) = 0$ for all $s$ -flats $\mathbb { F } _ { s }$ in $\mathbb { R } ^ { p }$ with $0 \leq s < k$ . Let $\pmb { \Sigma } = \pmb { V _ { k } } \pmb { \Lambda } \pmb { V } _ { k } ^ { T }$ and $\hat { \pmb { S } } = \hat { V } _ { k ^ { \prime } } \hat { \pmb { \Lambda } } \hat { V } _ { k ^ { \prime } } ^ { T }$ be the eigendecompositions of $\pmb { \Sigma }$ and the empirical covariance matrix $\hat { S }$ , respectively, such that $\lambda _ { k ^ { \prime } } ( \hat { S } ) > 0$ and $\lambda _ { k ^ { \prime } + 1 } ( \hat { \pmb S } ) = 0$ . Then if $m \geq k$ , we have with probability $^ { l }$ ,
378
+
379
+ $$
380
+ k ^ { \prime } = k \quad a n d \quad \| V _ { k } V _ { k } ^ { T } - \hat { V } _ { k } \hat { V } _ { k } ^ { T } \| _ { 2 } = 0 .
381
+ $$
382
+
383
+ Proof. We extend the Theorem 3.2 in Eaton & Perlman (1973) to the low-rank case.
384
+
385
+ Theorem D.1 (Theorem 3.2 in Eaton & Perlman (1973)). Let $\pmb { X } = ( \pmb { x } _ { 1 } , . . . , \pmb { x } _ { n } )$ where the $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ are i.i.d. random vectors in $\mathbb { R } ^ { p }$ , $n \geq p$ . If $\mathbb { P } \{ \pmb { x } _ { 1 } \in \mathbb { M } \} = 0$ for all proper manifolds $\mathbb { M } \subset \mathbb { R } ^ { p }$ , then $\mathbb { P } \{ X$ is non-singular $\scriptstyle \cdot \} = I$ .
386
+
387
+ We note that the subspace spanned by $\hat { V } _ { k ^ { \prime } }$ is in the space spanned by $V _ { k }$ by definition. Hence $k ^ { \prime } \leq k$
388
+
389
+ Let $\hat { \pmb { x } } _ { i } : = V _ { k } ^ { T } \pmb { \hat { \xi } } _ { i } \in \mathbb { R } ^ { k }$ for $i \in [ m ]$ . Then $\hat { \pmb X } : = ( \hat { \pmb x } _ { 1 } , . . . , \hat { \pmb x } _ { m } )$ is non-singular because of the assumption and Theorem D.1. That is $r a n k ( { \hat { X } } ) = k$ . Therefore $r a n k ( ( \hat { \xi } _ { 1 } , . . . , \hat { \xi } _ { m } ) ) \geq k , r a n k ( \hat { S } ) \geq k$ and $k ^ { \prime } \geq k$ . Therefore $k ^ { \prime } = k$ and the subspace spanned by $\hat { V } _ { k ^ { \prime } }$ and the subspace spanned by $V _ { k }$ are identical. □
390
+
391
+ Theorem 3.1. Let $S _ { 1 }$ and $S _ { 2 }$ be the sensitivity of w and $\pmb { r }$ , respectively, the output of Algorithm $^ { l }$ satisfies $( \epsilon , \delta )$ -DP for any $\delta \in ( 0 , 1 )$ and $\epsilon \leq 2 \log ( 1 / \delta )$ if we choose $\sigma _ { 1 } \geq 2 S _ { 1 } \sqrt { 2 \log ( 1 / \delta ) } / \epsilon$ and $\sigma _ { 2 } \geq 2 S _ { 2 } \sqrt { 2 \log ( 1 / \delta ) } / \epsilon$ .
392
+
393
+ Proof of Theorem 3.1. We first introduce some background knowledge of Rényi differential privacy (RDP) (Mironov, 2017). RDP measures the Rényi divergence between two output distributions.
394
+
395
+ Definition 2 ( $( \lambda , \gamma )$ -RDP). A randomized mechanism $f$ is said to guarantee $( \lambda , \gamma )$ -RDP if for any neighboring datasets $\mathbb { D } , \mathbb { D } ^ { \prime }$ and $\lambda > 1$ it holds that
396
+
397
+ $$
398
+ D _ { \lambda } ( f ( \mathbb { D } ) | | f ( \mathbb { D } ^ { \prime } ) ) \leq \gamma ,
399
+ $$
400
+
401
+ where $D _ { \lambda } ( \cdot | | \cdot )$ denotes the Rényi divergence of order $\lambda$ .
402
+
403
+ We next introduce some useful properties of RDP.
404
+
405
+ Lemma D.2 (Gaussian mechanism of RDP). Let $S = \operatorname* { m a x } _ { \mathbb { D } \sim \mathbb { D ^ { \prime } } } \| f ( \mathbb { D } ) - f ( \mathbb { D ^ { \prime } } ) \|$ be the $l _ { 2 }$ sensitivity, then Gaussian mechanism $\mathcal { M } = f ( \mathbb { D } ) + z$ satisfies $( \lambda , \frac { \lambda S ^ { 2 } } { 2 \sigma ^ { 2 } } )$ -RDP, where $z \sim \mathcal { N } ( 0 , \sigma ^ { 2 } I _ { p \times p } )$ .
406
+
407
+ Lemma D.3 (Composition of RDP). If $M _ { 1 }$ , $M _ { 2 }$ satisfy $( \lambda , \gamma _ { 1 } )$ -RDP and $( \lambda , \gamma _ { 2 } )$ -RDP respectively, then their composition satisfies $( \lambda , \gamma _ { 1 } + \gamma _ { 2 } ) – R D P$ .
408
+
409
+ Lemma D.4 (Conversion from RDP to $( \epsilon , \delta )$ -DP). If $\mathcal { M }$ obeys $( \lambda , \gamma )$ -RDP, then $\mathcal { M }$ obeys $( \gamma +$ $\log ( 1 / \delta ) / ( \lambda - 1 ) , \delta )$ -DP for all $0 < \delta < 1$ .
410
+
411
+ Now we proof Theorem 3.1. Let $W$ , $W ^ { \prime }$ be the gradient embeddings of two neighboring datasets $\mathbb { D } \sim \mathbb { D } ^ { \prime }$ and $R , R ^ { \prime }$ be corresponding residual gradients. Without loss of generality, suppose $W \left( R \right)$ has one more row than $W ^ { \prime } \left( R ^ { \prime } \right)$ . For given sensitivity $S _ { 1 } , S _ { 2 }$ ,
412
+
413
+ $$
414
+ \operatorname* { m a x } _ { \mathbb { D } \sim \mathbb { D } ^ { \prime } } \| \boldsymbol { w } - \boldsymbol { w } ^ { \prime } \| = \operatorname* { m a x } _ { \boldsymbol { W } \sim \boldsymbol { W } ^ { \prime } } \| \boldsymbol { W } _ { n , : } \| \le S _ { 1 } , \quad \operatorname* { m a x } _ { \mathbb { D } \sim \mathbb { D } ^ { \prime } } \| \boldsymbol { r } - \boldsymbol { r } ^ { \prime } \| = \operatorname* { m a x } _ { \boldsymbol { R } \sim \boldsymbol { R } ^ { \prime } } \| \boldsymbol { R } _ { n , : } \| \le S _ { 2 } .
415
+ $$
416
+
417
+ If we set $\sigma _ { 1 } = S _ { 1 } \sigma$ and $\sigma _ { 2 } = S _ { 2 } \sigma$ for some $\sigma$ , then Algorithm 1 satisfies $( \lambda , { \frac { \lambda } { \sigma ^ { 2 } } } )$ -RDP because of Lemma D.2 and D.3. In order to guarantee $( \epsilon , \delta )$ -DP, we need
418
+
419
+ $$
420
+ \frac { \lambda } { \sigma ^ { 2 } } + \frac { \log ( 1 / \delta ) } { \lambda - 1 } \leq \epsilon .
421
+ $$
422
+
423
+ Choose $\begin{array} { r } { \lambda = 1 + \frac { 2 \log ( 1 / \delta ) } { \epsilon } } \end{array}$ and rearrange Eq (5), we need
424
+
425
+ $$
426
+ \sigma ^ { 2 } \geq \frac { 2 \left( \epsilon + 2 \log ( 1 / \delta ) \right) } { \epsilon ^ { 2 } } .
427
+ $$
428
+
429
+ Then using the constraint on $\epsilon$ concludes the proof.
430
+
431
+ Theorem 3.2. For any $\epsilon < 2 \log ( 1 / \delta )$ and $\delta \in ( 0 , 1 )$ , the output of Algorithm 2 satisfies $( \epsilon , \delta )$ -DP if we set $\sigma \geq 2 \sqrt { 2 T \log ( 1 / \delta ) } / \epsilon$ .
432
+
433
+ Proof of Theorem 3.2. From the proof of Theorem 3.1, we have each call of GEP satisfies $( \lambda , { \frac { \lambda } { \sigma ^ { 2 } } } )$ - RDP. Then by the composition property of RDP (Lemma D.3), the output of Algorithm 2 satisfies $( \lambda , \frac { T \lambda } { \sigma ^ { 2 } } )$ -RDP. Plugging $\textstyle { \frac { T \lambda } { \sigma ^ { 2 } } }$ into Equation 5 and 6 concludes the proof.
434
+
435
+ Theorem 3.3. Suppose the loss $\begin{array} { r } { L ( \pmb \theta ) = \frac { 1 } { n } \sum _ { ( \pmb x , y ) \in \mathbb { D } } \ell ( f _ { \pmb \theta } ( \pmb x ) , y ) } \end{array}$ is $I$ -Lipschitz, convex, and $\beta$ - smooth. If $\begin{array} { r l r } { \eta } & { { } = } & { \frac { 1 } { \beta } } \end{array}$ , $\begin{array} { l } { T \ = \ { \frac { n \beta \epsilon } { \sqrt { p } } } } \end{array}$ √p , and $\begin{array} { r c l } { \overline { { \pmb { \theta } } } } & { = } & { \frac { 1 } { T } \sum _ { t = 1 } ^ { T } \pmb { \theta } _ { t } } \end{array}$ , then we have $\begin{array} { r } { \mathbb { E } [ L ( \bar { \pmb \theta } ) ] ~ - ~ L ( \pmb \theta _ { * } ) ~ \leq } \end{array}$ $\begin{array} { r } { \mathcal { O } \left( \frac { \sqrt { k \log ( 1 / \delta ) } } { n \epsilon } + \frac { \bar { r } \sqrt { p \log ( 1 / \delta ) } } { n \epsilon } \right) } \end{array}$ , where r¯ = 1T PT −1t=0 r2t and rt = maxi k(Rt)i,:k is the sensitivity of residual gradient at step $t$ .
436
+
437
+ Proof of Theorem 3.3. The $\beta$ -smooth condition gives
438
+
439
+ $$
440
+ L ( \pmb \theta _ { t + 1 } ) \leq L ( \pmb \theta _ { t } ) + \langle \nabla L ( \pmb \theta _ { t } ) , \pmb \theta _ { t + 1 } - \pmb \theta _ { t } \rangle + \frac { \beta } { 2 } \left. \pmb \theta _ { t + 1 } - \pmb \theta _ { t } \right. ^ { 2 } .
441
+ $$
442
+
443
+ Based on the update rule of GEP we have
444
+
445
+ $$
446
+ \pmb { \theta } _ { t + 1 } - \pmb { \theta } _ { t } = - \eta \tilde { \pmb { v } } = - \eta \nabla L ( \pmb { \theta } _ { t } ) - \frac { \eta } { n } ( z _ { t } ^ { ( 1 ) } \pmb { B } + z _ { t } ^ { ( 2 ) } ) ,
447
+ $$
448
+
449
+ where $\boldsymbol { z } _ { t } ^ { ( 1 ) } \sim \mathcal { N } ( 0 , \sigma ^ { 2 } \boldsymbol { I } _ { k \times k } )$ , $\boldsymbol { z } _ { t } ^ { ( 2 ) } \sim \mathcal { N } ( \boldsymbol { 0 } , \sigma ^ { 2 } r _ { t } ^ { 2 } \boldsymbol { I } _ { p \times p } )$ are the perturbation noises and $r _ { t } = $ $\operatorname * { m a x } _ { i } \| ( \pmb { R } _ { t } ) _ { i , : } \|$ is the sensitivity of residual gradients at step $t$ .
450
+
451
+ Take expectation on Eq (7) with respect to the perturbation noises.
452
+
453
+ $$
454
+ \mathbb { E } [ L ( \pmb { \theta } _ { t + 1 } ) ] \leq \mathbb { E } [ L ( \pmb { \theta } _ { t } ) ] - ( \eta - \beta \eta ^ { 2 } / 2 ) \mathbb { E } [ \| \nabla L ( \pmb { \theta } _ { t } ) \| ^ { 2 } ] + \frac { \beta \eta ^ { 2 } \sigma ^ { 2 } } { 2 n ^ { 2 } } \left( k + p r _ { t } ^ { 2 } \right) .
455
+ $$
456
+
457
+ Subtract $L ( \theta _ { * } )$ from both sides, we have
458
+
459
+ $$
460
+ \begin{array} { r l } & { \mathbb { I } [ L ( \theta _ { t + 1 } ) ] - L ( \theta _ { * } ) \le \mathbb { E } [ L ( \theta _ { t } ) ] - L ( \theta _ { * } ) - ( \eta - \beta \eta ^ { 2 } / 2 ) \mathbb { E } [ \left. \nabla L ( \theta _ { t } ) \right. ^ { 2 } ] + \displaystyle \frac { \beta \eta ^ { 2 } \sigma ^ { 2 } } { 2 n ^ { 2 } } \left( k + p r _ { t } ^ { 2 } \right) } \\ & { \qquad \le \mathbb { E } [ \langle \nabla L ( \theta _ { t } ) , \theta _ { t } - \theta _ { * } \rangle ] - ( \eta - \beta \eta ^ { 2 } / 2 ) \mathbb { E } [ \left. \nabla L ( \theta _ { t } ) \right. ^ { 2 } ] + \displaystyle \frac { \beta \eta ^ { 2 } \sigma ^ { 2 } } { 2 n ^ { 2 } } \left( k + p r _ { t } ^ { 2 } \right) . } \end{array}
461
+ $$
462
+
463
+ The second inequality holds because $L$ is convex. Then choose $\begin{array} { r } { \eta \mathrm { ~ = ~ } \frac { 1 } { \beta } } \end{array}$ and plug $\nabla L ( \pmb \theta _ { t } ) =$ $( \pmb { \theta } _ { t } - \pmb { \theta } _ { t + 1 } ) / \eta - ( z _ { 1 } ^ { t } \pmb { B } + z _ { 2 } ^ { t } ) / n$ into Eq (10).
464
+
465
+ $$
466
+ \begin{array} { r l } & { \displaystyle \mathbb { E } [ L ( \theta _ { t + 1 } ) ] - L ( \theta _ { * } ) \le \beta \mathbb { E } [ \langle \theta _ { t } - \theta _ { t + 1 } , \theta _ { t } - \theta _ { * } \rangle ] - \frac { \beta } { 2 } \mathbb { E } [ \| \theta _ { t } - \theta _ { t + 1 } \| ^ { 2 } ] + \frac { \sigma ^ { 2 } } { \beta n ^ { 2 } } \left( k + p r _ { t } ^ { 2 } \right) } \\ & { \quad \quad \quad \quad \quad = \displaystyle \frac { \beta } { 2 } \left( \mathbb { E } [ \| \theta _ { t } - \theta _ { * } \| ^ { 2 } ] - \mathbb { E } [ \| \theta _ { t + 1 } - \theta _ { * } \| ^ { 2 } ] \right) + \frac { \sigma ^ { 2 } } { \beta n ^ { 2 } } \left( k + p r _ { t } ^ { 2 } \right) . } \end{array}
467
+ $$
468
+
469
+ Sum over $t = 0 , \ldots , T - 1$ and use convexity, we have
470
+
471
+ $$
472
+ \mathbb { E } [ L ( \bar { \theta } ) ] - L ( \theta _ { * } ) \le \frac { \beta } { 2 T } \lVert \theta _ { 0 } - \theta _ { * } \rVert + \frac { \sigma ^ { 2 } } { \beta n ^ { 2 } } ( k + \frac { p } { T } \sum _ { t = 0 } ^ { T - 1 } r _ { t } ^ { 2 } ) .
473
+ $$
474
+
475
+ Then substituting $\begin{array} { r } { T = \frac { n \beta \epsilon } { \sqrt { p } } } \end{array}$ and $\sigma = \mathcal { O } ( \sqrt { T \log ( 1 / \delta ) } / \epsilon )$ yields the desired bound.
parse/train/7aogOj_VYO0/7aogOj_VYO0_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7aogOj_VYO0/7aogOj_VYO0_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/7aogOj_VYO0/7aogOj_VYO0_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1kJ6H9ex/B1kJ6H9ex.md ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COMBINING POLICY GRADIENT AND Q-LEARNING
2
+
3
+ Brendan O’Donoghue, Remi Munos, Koray Kavukcuoglu & Volodymyr Mnih ´ Deepmind {bodonoghue,munos,korayk,vmnih}@google.com
4
+
5
+ # ABSTRACT
6
+
7
+ Policy gradient is an efficient technique for improving a policy in a reinforcement learning setting. However, vanilla online variants are on-policy only and not able to take advantage of off-policy data. In this paper we describe a new technique that combines policy gradient with off-policy Q-learning, drawing experience from a replay buffer. This is motivated by making a connection between the fixed points of the regularized policy gradient algorithm and the Q-values. This connection allows us to estimate the Q-values from the action preferences of the policy, to which we apply Q-learning updates. We refer to the new technique as ‘PGQL’, for policy gradient and Q-learning. We also establish an equivalency between action-value fitting techniques and actor-critic algorithms, showing that regularized policy gradient techniques can be interpreted as advantage function learning algorithms. We conclude with some numerical examples that demonstrate improved data efficiency and stability of PGQL. In particular, we tested PGQL on the full suite of Atari games and achieved performance exceeding that of both asynchronous advantage actor-critic (A3C) and Q-learning.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In reinforcement learning an agent explores an environment and through the use of a reward signal learns to optimize its behavior to maximize the expected long-term return. Reinforcement learning has seen success in several areas including robotics (Lin, 1993; Levine et al., 2015), computer games (Mnih et al., 2013; 2015), online advertising (Pednault et al., 2002), board games (Tesauro, 1995; Silver et al., 2016), and many others. For an introduction to reinforcement learning we refer to the classic text by Sutton & Barto (1998). In this paper we consider model-free reinforcement learning, where the state-transition function is not known or learned. There are many different algorithms for model-free reinforcement learning, but most fall into one of two families: action-value fitting and policy gradient techniques.
12
+
13
+ Action-value techniques involve fitting a function, called the Q-values, that captures the expected return for taking a particular action at a particular state, and then following a particular policy thereafter. Two alternatives we discuss in this paper are SARSA (Rummery & Niranjan, 1994) and Q-learning (Watkins, 1989), although there are many others. SARSA is an on-policy algorithm whereby the action-value function is fit to the current policy, which is then refined by being mostly greedy with respect to those action-values. On the other hand, Q-learning attempts to find the Qvalues associated with the optimal policy directly and does not fit to the policy that was used to generate the data. Q-learning is an off-policy algorithm that can use data generated by another agent or from a replay buffer of old experience. Under certain conditions both SARSA and Q-learning can be shown to converge to the optimal Q-values, from which we can derive the optimal policy (Sutton, 1988; Bertsekas & Tsitsiklis, 1996).
14
+
15
+ In policy gradient techniques the policy is represented explicitly and we improve the policy by updating the parameters in the direction of the gradient of the performance (Sutton et al., 1999; Silver et al., 2014; Kakade, 2001). Online policy gradient typically requires an estimate of the action-value function of the current policy. For this reason they are often referred to as actor-critic methods, where the actor refers to the policy and the critic to the estimate of the action-value function (Konda & Tsitsiklis, 2003). Vanilla actor-critic methods are on-policy only, although some attempts have been made to extend them to off-policy data (Degris et al., 2012; Levine & Koltun, 2013).
16
+
17
+ In this paper we derive a link between the Q-values induced by a policy and the policy itself when the policy is the fixed point of a regularized policy gradient algorithm (where the gradient vanishes). This connection allows us to derive an estimate of the Q-values from the current policy, which we can refine using off-policy data and Q-learning. We show in the tabular setting that when the regularization penalty is small (the usual case) the resulting policy is close to the policy that would be found without the addition of the Q-learning update. Separately, we show that regularized actor-critic methods can be interpreted as action-value fitting methods, where the Q-values have been parameterized in a particular way. We conclude with some numerical examples that provide empirical evidence of improved data efficiency and stability of PGQL.
18
+
19
+ # 1.1 PRIOR WORK
20
+
21
+ Here we highlight various axes along which our work can be compared to others. In this paper we use entropy regularization to ensure exploration in the policy, which is a common practice in policy gradient (Williams & Peng, 1991; Mnih et al., 2016). An alternative is to use KL-divergence instead of entropy as a regularizer, or as a constraint on how much deviation is permitted from a prior policy (Bagnell & Schneider, 2003; Peters et al., 2010; Schulman et al., 2015; Fox et al., 2015). Natural policy gradient can also be interpreted as putting a constraint on the KL-divergence at each step of the policy improvement (Amari, 1998; Kakade, 2001; Pascanu & Bengio, 2013). In Sallans & Hinton (2004) the authors use a Boltzmann exploration policy over estimated Q-values which they update using TD-learning. In Heess et al. (2012) this was extended to use an actor-critic algorithm instead of TD-learning, however the two updates were not combined as we have done in this paper. In Azar et al. (2012) the authors develop an algorithm called dynamic policy programming, whereby they apply a Bellman-like update to the action-preferences of a policy, which is similar in spirit to the update we describe here. In Norouzi et al. (2016) the authors augment a maximum likelihood objective with a reward in a supervised learning setting, and develop a connection that resembles the one we develop here between the policy and the Q-values. Other works have attempted to combine on and off-policy learning, primarily using action-value fitting methods (Wang et al., 2013; Hausknecht & Stone, 2016; Lehnert & Precup, 2015), with varying degrees of success. In this paper we establish a connection between actor-critic algorithms and action-value learning algorithms. In particular we show that TD-actor-critic (Konda & Tsitsiklis, 2003) is equivalent to expected-SARSA (Sutton & Barto, 1998, Exercise 6.10) with Boltzmann exploration where the Q-values are decomposed into advantage function and value function. The algorithm we develop extends actor-critic with a Q-learning style update that, due to the decomposition of the Q-values, resembles the update of the dueling architecture (Wang et al., 2016). Recently, the field of deep reinforcement learning, i.e., the use of deep neural networks to represent action-values or a policy, has seen a lot of success (Mnih et al., 2015; 2016; Silver et al., 2016; Riedmiller, 2005; Lillicrap et al., 2015; Van Hasselt et al., 2016). In the examples section we use a neural network with PGQL to play the Atari games suite.
22
+
23
+ # 2 REINFORCEMENT LEARNING
24
+
25
+ We consider the infinite horizon, discounted, finite state and action space Markov decision process, with state space $s$ , action space $\mathcal { A }$ and rewards at each time period denoted by $r _ { t } \in \mathbb { R }$ . A policy $\pi : S \times A \to \mathbb { R } _ { + }$ is a mapping from state-action pair to the probability of taking that action at that state, so it must satisfy $\begin{array} { r } { \sum _ { a \in \mathcal { A } } \pi ( s , a ) = 1 } \end{array}$ for all states $s \in { \mathcal { S } }$ . Any policy $\pi$ induces a probability distribution over visited states, $d ^ { \pi } : S \to \mathbb { R } _ { + }$ (which may depend on the initial state), so the probability of seeing state-action pair $( s , a ) \in S \times A$ is $d ^ { \pi } ( s ) \pi ( s , a )$ .
26
+
27
+ In reinforcement learning an ‘agent’ interacts with an environment over a number of times steps. At each time step $t$ the agent receives a state $s _ { t }$ and a reward $r _ { t }$ and selects an action $a _ { t }$ from the policy $\pi _ { t }$ , at which point the agent moves to the next state $s _ { t + 1 } \sim P ( \cdot , s _ { t } , a _ { t } )$ , where $P ( s ^ { \prime } , s , a )$ is the probability of transitioning from state $s$ to state $s ^ { \prime }$ after taking action $a$ . This continues until the agent encounters a teto find a policy where the expec $\pi$ inal state (after which the process is typically restartthat maximizes the expected total discounted return tion is with respect to the initial state distribution, the $\begin{array} { r } { J ( \pi ) = \mathbf { \bar { E } } ( \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \ | \ \pi ) } \end{array}$ and the policy, and where $\gamma \in ( 0 , 1 )$ is the discount factor that, loosely speaking, controls how much the agent prioritizes long-term versus short-term rewards. Since the agent starts with no knowledge of the environment it must continually explore the state space and so will typically use a stochastic policy.
28
+
29
+ Action-values. The action-value, or Q-value, of a particular state under policy $\pi$ is the exaction at that state . The value of state d following under polic $\pi$ thereafter, i.e.,is denoted by $\begin{array} { r } { \dot { Q } ^ { \pi } ( s , a ) = \mathbf { E } ( \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \ | \ s _ { 0 } = s , a _ { 0 } = \overline { { \ a } } , \pi ) } \end{array}$ $s$ $\pi$ $\begin{array} { r } { V ^ { \pi } ( s ) = \mathbf { E } ( \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \mid s _ { 0 } = s , \pi ) } \end{array}$ , which is the expected total discounted return of policy $\pi$ from state $s$ . The optimal action-value function is denoted $Q ^ { \star }$ and satisfies $Q ^ { \star } ( s , a ) = \operatorname* { m a x } _ { \pi } Q ^ { \pi } ( s , a )$ for each $( s , a )$ . The policy that achieves the maximum is the optimal policy $\pi ^ { \star }$ , with value function $V ^ { \star }$ . The advantage function is the difference between the action-value and the value function, i.e., $A ^ { \pi } ( s , a ) = Q ^ { \pi } ( \bar { s _ { \bf { \Re } } } a ) - V ^ { \pi } ( s )$ , and represents the additional expected reward of taking action $a$ over the average performance of the policy from state $s$ . Since $\begin{array} { r } { V ^ { \bar { \pi } } ( s ) = \sum _ { a } \pi ( s , a ) Q ^ { \pi } \bar { ( } s , a ) } \end{array}$ we have the identity $\begin{array} { r } { \sum _ { a } \pi ( s , a ) A ^ { \pi } ( s , a ) ^ { - } = 0 } \end{array}$ , which simply states that the policy $\pi$ has no advantage over itself.
30
+
31
+ Bellman equation. The Bellman operator $\mathcal { T } ^ { \pi }$ (Bellman, 1957) for policy $\pi$ is defined as
32
+
33
+ $$
34
+ \mathcal { T } ^ { \pi } Q ( s , a ) = \mathrm { \bf ~ E } _ { s ^ { \prime } , r , b } ( r ( s , a ) + \gamma Q ( s ^ { \prime } , b ) ) ,
35
+ $$
36
+
37
+ where the expectation is over next state $s ^ { \prime } \sim P ( \cdot , s , a )$ , the reward $r ( s , a )$ , and the action $b$ from policy $\pi _ { s ^ { \prime } }$ . The Q-value function for policy $\pi$ is the fixed point of the Bellman operator for $\pi$ , i.e., ${ \mathcal { T } } ^ { \pi } Q ^ { \pi } = Q ^ { \pi }$ . The optimal Bellman operator $\mathcal { T } ^ { \star }$ is defined as
38
+
39
+ $$
40
+ \mathcal { T } ^ { \star } Q ( s , a ) = \mathbf { E } _ { s ^ { \prime } , r } ( r ( s , a ) + \gamma \operatorname* { m a x } _ { b } Q ( s ^ { \prime } , b ) ) ,
41
+ $$
42
+
43
+ where the expectation is over the next state $s ^ { \prime } \sim P ( \cdot , s , a )$ , and the reward $r ( s , a )$ . The optimal Q-value function is the fixed point of the optimal Bellman equation, i.e., ${ \mathcal { T } } ^ { \star } Q ^ { \star } = Q ^ { \star }$ . Both the $\pi$ -Bellman operator and the optimal Bellman operator are $\gamma$ -contraction mappings in the sup-norm, i.e., $\| T Q _ { 1 } - T Q _ { 2 } \| _ { \infty } \leq \gamma \| Q _ { 1 } - Q _ { 2 } \| _ { \infty }$ , for any $Q _ { 1 } , Q _ { 2 } \in \mathbb { R } ^ { S \times A }$ . From this fact one can show that the fixed point of each operator is unique, and that value iteration converges, i.e., $( T ^ { \pi } ) ^ { k } Q Q ^ { \pi }$ and $( T ^ { \star } ) ^ { \bar { k } } Q Q ^ { \star }$ from any initial $Q$ . (Bertsekas, 2005).
44
+
45
+ # 2.1 ACTION-VALUE LEARNING
46
+
47
+ In value based reinforcement learning we approximate the $\mathrm { Q }$ -values using a function approximator. We then update the parameters so that the Q-values are as close to the fixed point of a Bellman equation as possible. If we denote by $Q ( s , a ; \theta )$ the approximate Q-values parameterized by $\theta$ , then Q-learning updates the Q-values along direction $\mathbf { E } _ { s , a } ( \mathcal { T } ^ { \star } Q ( s , a ; \theta ) - Q ( \bar { s } , a ; \theta ) ) \nabla _ { \theta } Q ( s , a ; \theta )$ and SARSA updates the $\mathrm { Q }$ -values along direction $\begin{array} { r } { { \bf E } _ { s , a } ( \mathcal { T } ^ { \pi } Q ( s , a ; \theta ) - Q ( s , a ; \theta ) ) \nabla _ { \theta } Q ( s , a ; \theta ) . } \end{array}$ . In the online setting the Bellman operator is approximated by sampling and bootstrapping, whereby the Q-values at any state are updated using the Q-values from the next visited state. Exploration is achieved by not always taking the action with the highest $\mathrm { Q }$ -value at each time step. One common technique called ‘epsilon greedy’ is to sample a random action with probability $\epsilon > 0$ , where $\epsilon$ starts high and decreases over time. Another popular technique is ‘Boltzmann exploration’, where the policy is given by the softmax over the Q-values with a temperature $T$ , i.e., $\pi ( s , a ) = \mathrm { e x p } ( Q ( \dot { s , } a ) / \dot { T } ) / \bar { \sum _ { b } } \mathrm { e x p } \bar { ( } Q ( s , b ) / T )$ , where it is common to decrease the temperature over time.
48
+
49
+ # 2.2 POLICY GRADIENT
50
+
51
+ Alternatively, we can parameterize the policy directly and attempt to improve it via gradient ascent on the performance $J$ . The policy gradient theorem (Sutton et al., 1999) states that the gradient of $J$ with respect to the parameters of the policy is given by
52
+
53
+ $$
54
+ \nabla _ { \boldsymbol { \theta } } J ( \pi ) = \mathbf { \underline { { E } } } _ { s , a } Q ^ { \pi } ( s , a ) \nabla _ { \boldsymbol { \theta } } \log \pi ( s , a ) ,
55
+ $$
56
+
57
+ where the expectation is over $( s , a )$ with probability $d ^ { \pi } ( s ) \pi ( s , a )$ . In the original derivation of the policy gradient theorem the expectation is over the discounted distribution of states, i.e., over $\begin{array} { r } { d _ { \gamma } ^ { \pi , \overset { \cdot } { s _ { 0 } } } ( s ) \stackrel { \cdot } { = } \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } P r \{ s _ { t } = s \mid \overset { \cdot } { s _ { 0 } } , \pi \} } \end{array}$ . However, the gradient update in that case will assign a low weight to states that take a long time to reach and can therefore have poor empirical performance. In practice the non-discounted distribution of states is frequently used instead. In certain cases this is equivalent to maximizing the average (i.e., non-discounted) policy performance, even when $Q ^ { \pi }$ uses a discount factor (Thomas, 2014). Throughout this paper we will use the non-discounted distribution of states.
58
+
59
+ In the online case it is common to add an entropy regularizer to the gradient in order to prevent the policy becoming deterministic. This ensures that the agent will explore continually. In that case the (batch) update becomes
60
+
61
+ $$
62
+ \begin{array} { r } { \Delta \theta \propto \underline { { \mathbf { E } } } _ { a } Q ^ { \pi } ( s , a ) \nabla _ { \theta } \log \pi ( s , a ) + \alpha \underline { { \mathbf { E } } } _ { s } \nabla _ { \theta } H ^ { \pi } ( s ) , } \end{array}
63
+ $$
64
+
65
+ where $\begin{array} { r } { H ^ { \pi } ( s ) = - \sum _ { a } \pi ( s , a ) \log \pi ( s , a ) } \end{array}$ denotes the entropy of policy $\pi$ , and $\alpha > 0$ is the regularization penalty parameter. Throughout this paper we will make use of entropy regularization, however many of the results are true for other choices of regularizers with only minor modification, e.g., KL-divergence. Note that equation (2) requires exact knowledge of the Q-values. In practice they can be estimated, e.g., by the sum of discounted rewards along an observed trajectory (Williams, 1992), and the policy gradient will still perform well (Konda & Tsitsiklis, 2003).
66
+
67
+ # 3 REGULARIZED POLICY GRADIENT ALGORITHM
68
+
69
+ In this section we derive a relationship between the policy and the Q-values when using a regularized policy gradient algorithm. This allows us to transform a policy into an estimate of the Q-values. We then show that for small regularization the $\mathrm { Q }$ -values induced by the policy at the fixed point of the algorithm have a small Bellman error in the tabular case.
70
+
71
+ # 3.1 TABULAR CASE
72
+
73
+ Consider the fixed points of the entropy regularized policy gradient update (2). Let us define $f ( \theta ) =$ $\mathbf { E } _ { s , a } Q ^ { \pi } ( s , a ) \nabla _ { \theta } \log \pi ( s , a ) + \alpha \mathbf { E } _ { s } \bar { \nabla } _ { \theta } H ( \pi _ { s } )$ , and $\begin{array} { r } { \dot { g } _ { s } ( \pi ) \stackrel { - } { = } \sum _ { a } \pi ( \stackrel { - } { s } , a ) } \end{array}$ for each $s$ . A fixed point is one where we can no longer update $\theta$ in the direction of $f ( \theta )$ without violating one of the constraints $g _ { s } ( \pi ) = 1$ , i.e., where $f ( \theta )$ is in the span of the vectors $\{ \dot { \nabla _ { \theta } } g _ { s } ( \pi ) \}$ . In other words, any fixed point must satisfy $\begin{array} { r } { f ( \theta ) = \sum _ { s } \lambda _ { s } \nabla _ { \theta } g _ { s } ( \pi ) } \end{array}$ , where for each $s$ the Lagrange multiplier $\lambda _ { s } \in \mathbb { R }$ ensures that $g _ { s } ( \pi ) = 1$ . Substituting in terms to this equation we obtain
74
+
75
+ $$
76
+ \underset { s , a } { \mathbf { E } } \left( Q ^ { \pi } ( s , a ) - \alpha \log \pi ( s , a ) - c _ { s } \right) \nabla _ { \theta } \log \pi ( s , a ) = 0 ,
77
+ $$
78
+
79
+ where we have absorbed all constants into $c \in \mathbb { R } ^ { | s | }$ . Any solution $\pi$ to this equation is strictly positive element-wise since it must lie in the domain of the entropy function. In the tabular case $\pi$ is represented by a single number for each state and action pair and the gradient of the policy with respect to the parameters is the indicator function, i.e., $\nabla _ { \boldsymbol { \theta } ( t , b ) } \pi ( s , a ) = \bar { \mathbf { 1 } } _ { ( t , b ) = ( s , a ) } .$ . From this we obtain $Q ^ { \pi } ( s , a ) - \alpha \log \pi ( s , a ) - c _ { s } = 0$ for each $s$ (assuming that the measure $d ^ { \pi } ( s ) > 0 )$ . Multiplying by $\pi ( \boldsymbol { a } , \boldsymbol { s } )$ and summing over $a \in { \mathcal { A } }$ we get $c _ { s } = \alpha H ^ { \pi } \bar { ( } s ) + V ^ { \pi } ( s )$ . Substituting $c$ into equation (3) we have the following formulation for the policy:
80
+
81
+ $$
82
+ \pi ( s , a ) = \exp ( A ^ { \pi } ( s , a ) / \alpha - H ^ { \pi } ( s ) ) ,
83
+ $$
84
+
85
+ for all $s \in \mathcal { S }$ and $a \in \mathcal A$ . In other words, the policy at the fixed point is a softmax over the advantage function induced by that policy, where the regularization parameter $\alpha$ can be interpreted as the temperature. Therefore, we can use the policy to derive an estimate of the Q-values,
86
+
87
+ $$
88
+ \tilde { Q } ^ { \pi } ( s , a ) = \tilde { A } ^ { \pi } ( s , a ) + V ^ { \pi } ( s ) = \alpha ( \log \pi ( s , a ) + H ^ { \pi } ( s ) ) + V ^ { \pi } ( s ) .
89
+ $$
90
+
91
+ With this we can rewrite the gradient update (2) as
92
+
93
+ $$
94
+ \begin{array} { r } { \Delta \theta \propto \underset { s , a } { \mathbf { E } } ( Q ^ { \pi } ( s , a ) - \tilde { Q } ^ { \pi } ( s , a ) ) \nabla _ { \theta } \log \pi ( s , a ) , } \end{array}
95
+ $$
96
+
97
+ since the update is unchanged by per-state constant offsets. When the policy is parameterized as a softmax, i.e., $\pi ( s , a ) = \bar { \exp ( W ( s , a ) ) } / \sum _ { b } \exp W ( s , b )$ , the quantity $W$ is sometimes referred to as the action-preferences of the policy (Sutton & Barto, 1998, Chapter 6.6). Equation (4) states that the action preferences are equal to the Q-values scaled by $1 / \alpha$ , up to an additive per-state constant.
98
+
99
+ # 3.2 GENERAL CASE
100
+
101
+ Consider the following optimization problem:
102
+
103
+ $$
104
+ \begin{array} { r l } { \mathrm { n i n i m i z e } } & { \mathbf { E } _ { s , a } ( q ( s , a ) - \alpha \log \pi ( s , a ) ) ^ { 2 } } \\ { \mathrm { u b j e c t ~ t o } } & { \sum _ { a } \pi ( s , a ) = 1 , \quad s \in S } \end{array}
105
+ $$
106
+
107
+ over variable $\theta$ which parameterizes $\pi$ , where we consider both the measure in the expectation and the values $\boldsymbol { q } ( s , a )$ to be independent of $\theta$ . The optimality condition for this problem is
108
+
109
+ $$
110
+ \mathbf { E } _ { s , a } ( q ( s , a ) - \alpha \log \pi ( s , a ) + c _ { s } ) \nabla _ { \theta } \log \pi ( s , a ) = 0 ,
111
+ $$
112
+
113
+ where $c \in \mathbb { R } ^ { | S | }$ is the Lagrange multiplier associated with the constraint that the policy sum to one at each state. Comparing this to equation (3), we see that if $q = Q ^ { \pi }$ and the measure in the expectation is the same then they describe the same set of fixed points. This suggests an interpretation of the fixed points of the regularized policy gradient as a regression of the log-policy onto the Q-values. In the general case of using an approximation architecture we can interpret equation (3) as indicating that the error between $Q ^ { \pi }$ and ${ \bf \bar { \cal Q } } ^ { \pi }$ is orthogonal to $\nabla _ { \theta _ { i } } \log \pi$ for each $i$ , and so cannot be reduced further by changing the parameters, at least locally. In this case equation (4) is unlikely to hold at a solution to (3), however with a good approximation architecture it may hold approximately, so that the we can derive an estimate of the Q-values from the policy using equation (5). We will use this estimate of the Q-values in the next section.
114
+
115
+ # 3.3 CONNECTION TO ACTION-VALUE METHODS
116
+
117
+ The previous section made a connection between regularized policy gradient and a regression onto the Q-values at the fixed point. In this section we go one step further, showing that actor-critic methods can be interpreted as action-value fitting methods, where the exact method depends on the choice of critic.
118
+
119
+ Actor-critic methods. Consider an agent using an actor-critic method to learn both a policy $\pi$ and a value function $V$ . At any iteration $k$ , the value function $V ^ { k }$ has parameters $w ^ { k }$ , and the policy is of the form
120
+
121
+ $$
122
+ \pi ^ { k } ( s , a ) = \exp ( W ^ { k } ( s , a ) / \alpha ) / \sum _ { b } \exp ( W ^ { k } ( s , b ) / \alpha ) ,
123
+ $$
124
+
125
+ where $W ^ { k }$ is parameterized by $\theta ^ { k }$ and $\alpha > 0$ is the entropy regularization penalty. In this case $\begin{array} { r l } { \nabla _ { \theta } \log \pi ^ { k } ( s , \dot { a _ { ) } } = ( 1 / \alpha ) ( \nabla _ { \theta } \dot { W } ^ { k } ( s , a ) - \sum _ { b } \pi ( s , b ) \nabla _ { \theta } W ^ { k } ( \dot { s } , b ) \overset { \sim } { ) } } & { { } } \end{array}$ . Using equation (6) the parameters are updated as
126
+
127
+ $$
128
+ \Delta \theta \propto \underset { s , a } { \mathbf { E } } \delta _ { \mathrm { a c } } ( \nabla _ { \theta } W ^ { k } ( s , a ) - \sum _ { b } \pi ^ { k } ( s , b ) \nabla _ { \theta } W ^ { k } ( s , b ) ) , \quad \Delta w \propto \underset { s , a } { \mathbf { E } } \delta _ { \mathrm { a c } } \nabla _ { w } V ^ { k } ( s )
129
+ $$
130
+
131
+ where $\delta _ { \mathrm { a c } }$ is the critic minus baseline term, which depends on the variant of actor-critic being used (see the remark below).
132
+
133
+ Action-value methods. Compare this to the case where an agent is learning Q-values with a dueling architecture (Wang et al., 2016), which at iteration $k$ is given by
134
+
135
+ $$
136
+ Q ^ { k } ( s , a ) = Y ^ { k } ( s , a ) - \sum _ { b } \mu ( s , b ) Y ^ { k } ( s , b ) + V ^ { k } ( s ) ,
137
+ $$
138
+
139
+ where $\mu$ is a probability distribution, $Y ^ { k }$ is parameterized by $\theta ^ { k } , V ^ { k }$ is parameterized by $w ^ { k }$ , and the exploration policy is Boltzmann with temperature $\alpha$ , i.e.,
140
+
141
+ $$
142
+ \pi ^ { k } ( s , a ) = \exp ( Y ^ { k } ( s , a ) / \alpha ) / \sum _ { b } \exp ( Y ^ { k } ( s , b ) / \alpha ) .
143
+ $$
144
+
145
+ In action value fitting methods at each iteration the parameters are updated to reduce some error, where the update is given by
146
+
147
+ $$
148
+ \Delta \theta \propto \underset { s , a } { \mathbf { E } } \delta _ { \mathrm { a v } } \bigl ( \nabla _ { \theta } Y ^ { k } ( s , a ) - \sum _ { b } \mu ( s , b ) \nabla _ { \theta } Y ^ { k } ( s , b ) \bigr ) , \quad \Delta w \propto \underset { s , a } { \mathbf { E } } \delta _ { \mathrm { a v } } \nabla _ { w } V ^ { k } ( s )
149
+ $$
150
+
151
+ where $\delta _ { \mathrm { a v } }$ is the action-value error term and depends on which algorithm is being used (see the remark below).
152
+
153
+ Equivalence. The two policies (8) and (10) are identical if $W ^ { k } = Y ^ { k }$ for all $k$ . Since $X ^ { 0 }$ and $Y ^ { \tilde { 0 } }$ can be initialized and parameterized in the same way, and assuming the two value function estimates are initialized and parameterized in the same way, all that remains is to show that the updates in equations (11) and (9) are identical. Comparing the two, and assuming that $\delta _ { \mathrm { a c } } = \delta _ { \mathrm { a v } }$ (see remark), we see that the only difference is that the measure is not fixed in (9), but is equal to the current policy and therefore changes after each update. Replacing $\mu$ in (11) with $\pi ^ { k }$ makes the updates identical, in which case $W ^ { \widetilde { k } } = Y ^ { k }$ at all iterations and the two policies (8) and (10) are always the same. In other words, the slightly modified action-value method is equivalent to an actor-critic policy gradient method, and vice-versa (modulo using the non-discounted distribution of states, as discussed in $\ S 2 . 2 )$ . In particular, regularized policy gradient methods can be interpreted as advantage function learning techniques (Baird III, 1993), since at the optimum the quantity $\begin{array} { r } { W ( s , a ) - \sum _ { b } \pi ( s , b ) W ( s , b ) = \alpha ( \log \pi ( s , a ) + H ^ { \pi } ( s ) ) } \end{array}$ will be equal to the advantage function values in the tabular case.
154
+
155
+ Remark. In SARSA (Rummery & Niranjan, 1994) we set $\delta _ { \mathrm { a v } } = r ( s , a ) + \gamma Q ( s ^ { \prime } , b ) - Q ( s , a )$ , where $b$ is the action selected at state $s ^ { \prime }$ , which would be equivalent to using a bootstrap critic in equation (6) where $Q ^ { \pi } ( s , a ) = r ( s , a ) + \gamma \tilde { Q } ( s ^ { \prime } , b )$ . In expected-SARSA (Sutton & Barto, 1998, Exercise 6.10), (Van Seijen et al., 2009)) we take the expectation over the Q-values at the next state, so $\delta _ { \mathrm { a v } } = r ( s , a ) + \gamma V ( \bar { s ^ { \prime } } ) - Q ( s , a )$ . This is equivalent to TD-actor-critic (Konda & Tsitsiklis, 2003) where we use the value function to provide the critic, which is given by $Q ^ { \pi } = r ( s , a ) + \gamma V ( s ^ { \prime } )$ . In Q-learning (Watkins, 1989) $\delta _ { \mathrm { a v } } = r ( s , a ) + \gamma \operatorname* { m a x } _ { b } Q ( s ^ { \prime } , b ) - Q ( s , a )$ , which would be equivalent to using an optimizing critic that bootstraps using the max Q-value at the next state, i.e., $Q ^ { \pi } ( s , a ) =$ $r ( s , a ) + \gamma \operatorname* { m a x } _ { b } \tilde { Q } ^ { \pi } ( s ^ { \prime } , b )$ . In REINFORCE the critic is the Monte Carlo return from that state on, i.e., $\begin{array} { r } { Q ^ { \pi } ( s , a ) = ( \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \ | \ s _ { 0 } = s , a _ { 0 } = a ) } \end{array}$ . If the return trace is truncated and a bootstrap is performed after $n$ -steps, this is equivalent to $n$ -step SARSA or $n$ -step Q-learning, depending on the form of the bootstrap (Peng & Williams, 1996).
156
+
157
+ # 3.4 BELLMAN RESIDUAL
158
+
159
+ In this section we show that $\| \mathcal { T } ^ { \star } Q ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| \to 0$ with decreasing regularization penalty $\alpha$ , where $\pi _ { \alpha }$ is the policy defined by (4) and $Q ^ { \pi _ { \alpha } }$ is the corresponding $\mathrm { Q }$ -value function, both of which are functions of $\alpha$ . We shall show that it converges to zero by bounding the sequence below by zero and above with a sequence that converges to zero. First, we have that ${ \mathcal { T } } ^ { \star } Q ^ { \pi _ { \alpha } } \geq { \mathcal { T } } ^ { \pi _ { \alpha } } Q ^ { \pi _ { \alpha } } = Q ^ { \pi _ { \alpha } }$ , since $\mathcal { T } ^ { \star }$ is greedy with respect to the Q-values. So ${ \mathcal { T } } ^ { \star } Q ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \geq 0$ . Now, to bound from above we need the fact that $\begin{array} { r } { \pi _ { \alpha } ( s , a ) = \exp ( Q ^ { \pi _ { \alpha } } ( s , a ) / \alpha ) / \sum _ { b } \exp ( Q ^ { \pi _ { \alpha } } ( s , b ) / \alpha ) \leq \exp ( ( Q ^ { \pi _ { \alpha } } ( s , a ) - Q ^ { \pi _ { \alpha } } ( a , b ) ) ) . } \end{array}$ $\operatorname* { m a x } _ { c } Q ^ { \pi _ { \alpha } } ( s , c ) ) / \alpha )$ . Using this we have
160
+
161
+ $$
162
+ \begin{array} { r l r } { 0 } & { \leq } & { \mathcal { T } ^ { \star } Q ^ { \pi _ { \alpha } } ( s , a ) - Q ^ { \pi _ { \alpha } } ( s , a ) } \\ & { = } & { \mathcal { T } ^ { \star } Q ^ { \pi _ { \alpha } } ( s , a ) - \mathcal { T } ^ { \pi _ { \alpha } } Q ^ { \pi _ { \alpha } } ( s , a ) } \\ & { = } & { { \bf E } _ { s ^ { \prime } } \big ( \operatorname* { m a x } _ { c } Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , c ) - \sum _ { b } \pi _ { \alpha } ( s ^ { \prime } , b ) Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , b ) \big ) } \\ & { = } & { { \bf E } _ { s ^ { \prime } } \sum _ { b } \pi _ { \alpha } ( s ^ { \prime } , b ) \big ( \operatorname* { m a x } _ { c } Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , c ) - Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , b ) \big ) } \\ & { \leq } & { { \bf E } _ { s ^ { \prime } } \sum _ { b } \exp \big ( ( Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , b ) - Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , b ^ { \star } ) \big ) / \alpha \big ) \big ( \operatorname* { m a x } _ { c } Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , c ) - Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , b ) \big ) } \\ & { = } & { { \bf E } _ { s ^ { \prime } } \sum _ { b } f _ { \alpha } \big ( \operatorname* { m a x } _ { c } Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , c ) - Q ^ { \pi _ { \alpha } } ( s ^ { \prime } , b ) \big ) , } \end{array}
163
+ $$
164
+
165
+ where we define $f _ { \alpha } ( x ) = x \exp ( - x / \alpha )$ . To conclude our proof we use the fact that $f _ { \alpha } ( x ) \ \leq$ $\begin{array} { r } { \operatorname* { s u p } _ { x } f _ { \alpha } ( x ) = f _ { \alpha } ( \alpha ) \stackrel { \cdot } { = } \alpha \mathrm { e } ^ { - 1 } } \end{array}$ , which yields
166
+
167
+ $$
168
+ 0 \leq \mathcal T ^ { \star } Q ^ { \pi _ { \alpha } } ( s , a ) - Q ^ { \pi _ { \alpha } } ( s , a ) \leq | { \mathcal A } | \alpha \mathrm { e } ^ { - 1 }
169
+ $$
170
+
171
+ for all $( s , a )$ , and so the Bellman residual converges to zero with decreasing $\alpha$ . In other words, for small enough $\alpha$ (which is the regime we are interested in) the Q-values induced by the policy (4) will have a small Bellman residual. Moreover, this implies that $\mathrm { l i m } _ { \alpha \to 0 } Q ^ { \pi _ { \alpha } } = Q ^ { \star }$ , as one might expect.
172
+
173
+ # 4 PGQL
174
+
175
+ In this section we introduce the main contribution of the paper, which is a technique to combine policy gradient with Q-learning. We call our technique ‘PGQL’, for policy gradient and Q-learning. In the previous section we showed that the Bellman residual is small at the fixed point of a regularized policy gradient algorithm when the regularization penalty is sufficiently small. This suggests adding an auxiliary update where we explicitly attempt to reduce the Bellman residual as estimated from the policy, i.e., a hybrid between policy gradient and Q-learning.
176
+
177
+ We first present the technique in a batch update setting, with a perfect knowledge of $Q ^ { \pi }$ (i.e., a perfect critic). Later we discuss the practical implementation of the technique in a reinforcement learning setting with function approximation, where the agent generates experience from interacting with the environment and needs to estimate a critic simultaneously with the policy.
178
+
179
+ # 4.1 PGQL UPDATE
180
+
181
+ Define the estimate of $Q$ using the policy as
182
+
183
+ $$
184
+ \begin{array} { r } { \tilde { Q } ^ { \pi } ( s , a ) = \alpha ( \log \pi ( s , a ) + H ^ { \pi } ( s ) ) + V ( s ) , } \end{array}
185
+ $$
186
+
187
+ where $V$ has parameters $w$ and is not necessarily $V ^ { \pi }$ as it was in equation (5). In (2) it was unnecessary to estimate the constant since the update was invariant to constant offsets, although in practice it is often estimated for use in a variance reduction technique (Williams, 1992; Sutton et al., 1999).
188
+
189
+ Since we know that at the fixed point the Bellman residual will be small for small $\alpha$ , we can consider updating the parameters to reduce the Bellman residual in a fashion similar to Q-learning, i.e.,
190
+
191
+ $$
192
+ \Delta \theta \propto \underset { s , a } { \mathbf { E } } ( T ^ { \star } \tilde { Q } ^ { \pi } ( s , a ) - \tilde { Q } ^ { \pi } ( s , a ) ) \nabla _ { \theta } \log \pi ( s , a ) , \quad \Delta w \propto \underset { s , a } { \mathbf { E } } ( T ^ { \star } \tilde { Q } ^ { \pi } ( s , a ) - \tilde { Q } ^ { \pi } ( s , a ) ) \nabla _ { w } V ( s ) .
193
+ $$
194
+
195
+ This is Q-learning applied to a particular form of the $\mathrm { Q }$ -values, and can also be interpreted as an actor-critic algorithm with an optimizing (and therefore biased) critic.
196
+
197
+ The full scheme simply combines two updates to the policy, the regularized policy gradient update (2) and the Q-learning update (13). Assuming we have an architecture that provides a policy $\pi$ , a value function estimate $V$ , and an action-value critic $Q ^ { \pi }$ , then the parameter updates can be written as (suppressing the $( s , a )$ notation)
198
+
199
+ $$
200
+ \begin{array} { r l } & { \begin{array} { r l } & { \beth \theta \propto ( 1 - \eta ) \mathbf { E } _ { s , a } ( Q ^ { \pi } - \tilde { Q } ^ { \pi } ) \nabla _ { \theta } \log \pi + \eta \mathbf { E } _ { s , a } ( \mathcal { T } ^ { \star } \tilde { Q } ^ { \pi } - \tilde { Q } ^ { \pi } ) \nabla _ { \theta } \log \pi , } \end{array} } \\ & { \begin{array} { r l } & { \Delta w \propto ( 1 - \eta ) \mathbf { E } _ { s , a } ( Q ^ { \pi } - \tilde { Q } ^ { \pi } ) \nabla _ { w } V + \eta \mathbf { E } _ { s , a } ( \mathcal { T } ^ { \star } \tilde { Q } ^ { \pi } - \tilde { Q } ^ { \pi } ) \nabla _ { w } V , } \end{array} } \end{array}
201
+ $$
202
+
203
+ here $\eta \in [ 0 , 1 ]$ is a weighting parameter that controls how much of each update we apply. In the case where $\eta = 0$ the above scheme reduces to entropy regularized policy gradient. If $\eta = 1$ then it becomes a variant of (batch) Q-learning with an architecture similar to the dueling architecture (Wang et al., 2016). Intermediate values of $\eta$ produce a hybrid between the two. Examining the update we see that two error terms are trading off. The first term encourages consistency with critic, and the second term encourages optimality over time. However, since we know that under standard policy gradient the Bellman residual will be small, then it follows that adding a term that reduces that error should not make much difference at the fixed point. That is, the updates should be complementary, pointing in the same general direction, at least far away from a fixed point. This update can also be interpreted as an actor-critic update where the critic is given by a weighted combination of a standard critic and an optimizing critic. Yet another interpretation of the update is a combination of expected-SARSA and Q-learning, where the Q-values are parameterized as the sum of an advantage function and a value function.
204
+
205
+ # 4.2 PRACTICAL IMPLEMENTATION
206
+
207
+ The updates presented in (14) are batch updates, with an exact critic $Q ^ { \pi }$ . In practice we want to run this scheme online, with an estimate of the critic, where we don’t necessarily apply the policy gradient update at the same time or from same data source as the Q-learning update.
208
+
209
+ Our proposal scheme is as follows. One or more agents interact with an environment, encountering states and rewards and performing on-policy updates of (shared) parameters using an actor-critic algorithm where both the policy and the critic are being updated online. Each time an agent receives new data from the environment it writes it to a shared replay memory buffer. Periodically a separate learner process samples from the replay buffer and performs a step of Q-learning on the parameters of the policy using (13). This scheme has several advantages. The critic can accumulate the Monte
210
+
211
+ ![](images/60dbc9368380e17724e2be00298c93faa9fcae8bd176f729054dbc954cf8e87e.jpg)
212
+ Figure 1: Grid world experiment.
213
+
214
+ Carlo return over many time periods, allowing us to spread the influence of a reward received in the future backwards in time. Furthermore, the replay buffer can be used to store and replay ‘important’ past experiences by prioritizing those samples (Schaul et al., 2015). The use of the replay buffer can help to reduce problems associated with correlated training data, as generated by an agent exploring an environment where the states are likely to be similar from one time step to the next. Also the use of replay can act as a kind of regularizer, preventing the policy from moving too far from satisfying the Bellman equation, thereby improving stability, in a similar sense to that of a policy ‘trust-region’ (Schulman et al., 2015). Moreover, by batching up replay samples to update the network we can leverage GPUs to perform the updates quickly, this is in comparison to pure policy gradient techniques which are generally implemented on CPU (Mnih et al., 2016).
215
+
216
+ Since we perform Q-learning using samples from a replay buffer that were generated by a old policy we are performing (slightly) off-policy learning. However, Q-learning is known to converge to the optimal Q-values in the off-policy tabular case (under certain conditions) (Sutton & Barto, 1998), and has shown good performance off-policy in the function approximation case (Mnih et al., 2013).
217
+
218
+ # 4.3 MODIFIED FIXED POINT
219
+
220
+ The PGQL updates in equation (14) have modified the fixed point of the algorithm, so the analysis of $\ S 3$ is no longer valid. Considering the tabular case once again, it is still the case that the policy $\pi \propto \exp ( \tilde { Q } ^ { \pi } / \bar { \alpha } )$ as before, where ${ \tilde { Q } } ^ { \pi }$ is defined by (12), however where previously the fixed point satisfied $\tilde { Q } ^ { \pi } = Q ^ { \pi }$ , with $Q ^ { \pi }$ corresponding to the Q-values induced by $\pi$ , now we have
221
+
222
+ $$
223
+ \begin{array} { r } { \tilde { Q } ^ { \pi } = ( 1 - \eta ) Q ^ { \pi } + \eta T ^ { \star } \tilde { Q } ^ { \pi } , } \end{array}
224
+ $$
225
+
226
+ Or equivalently, if $\eta < 1$ , we have $\begin{array} { r } { \tilde { Q } ^ { \pi } = ( 1 - \eta ) \sum _ { k = 0 } ^ { \infty } \eta ^ { k } ( \mathcal { T } ^ { \star } ) ^ { k } Q ^ { \pi } } \end{array}$ . In the appendix we show that $\lVert \tilde { Q } ^ { \pi } - Q ^ { \pi } \rVert \to 0$ and that $\lVert \mathcal { T } ^ { \star } Q ^ { \pi } - Q ^ { \pi } \rVert \to 0$ with decreasing $\alpha$ in the tabular case. That is, for small $\alpha$ the induced $\mathrm { Q }$ -values and the $\mathbf { Q }$ -values estimated from the policy are close, and we still have the guarantee that in the limit the $\mathrm { Q }$ -values are optimal. In other words, we have not perturbed the policy very much by the addition of the auxiliary update.
227
+
228
+ # 5 NUMERICAL EXPERIMENTS
229
+
230
+ # 5.1 GRID WORLD
231
+
232
+ In this section we discuss the results of running PGQL on a toy 4 by 6 grid world, as shown in Figure 1a. The agent always begins in the square marked $\mathbf { \partial } ^ { \bullet } \mathbf { S } ^ { \bullet }$ and the episode continues until it reaches the square marked ‘T’, upon which it receives a reward of 1. All other times it receives no reward. For this experiment we chose regularization parameter $\alpha = 0 . 0 0 1$ and discount factor $\gamma = 0 . 9 5$ .
233
+
234
+ Figure 1b shows the performance traces of three different agents learning in the grid world, running from the same initial random seed. The lines show the true expected performance of the policy from the start state, as calculated by value iteration after each update. The blue-line is standard TD-actor-critic (Konda & Tsitsiklis, 2003), where we maintain an estimate of the value function and use that to generate an estimate of the Q-values for use as the critic. The green line is Q-learning where at each step an update is performed using data drawn from a replay buffer of prior experience and where the Q-values are parameterized as in equation (12). The policy is a softmax over the Q-value estimates with temperature $\alpha$ . The red line is PGQL, which at each step first performs the TD-actor-critic update, then performs the Q-learning update as in (14).
235
+
236
+ ![](images/0c1e17e8c806eefd3b1a2e103e5cc5f50b177953f93920598bd008882d3512cc.jpg)
237
+ Figure 2: PGQL network augmentation.
238
+
239
+ The grid world was totally deterministic, so the step size could be large and was chosen to be 1. A step-size any larger than this made the pure actor-critic agent fail to learn, but both PGQL and Q-learning could handle some increase in the step-size, possibly due to the stabilizing effect of using replay.
240
+
241
+ It is clear that PGQL outperforms the other two. At any point along the $\mathbf { X }$ -axis the agents have seen the same amount of data, which would indicate that PGQL is more data efficient than either of the vanilla methods since it has the highest performance at practically every point.
242
+
243
+ # 5.2 ATARI
244
+
245
+ We tested our algorithm on the full suite of Atari benchmarks (Bellemare et al., 2012), using a neural network to parameterize the policy. In figure 2 we show how a policy network can be augmented with a parameterless additional layer which outputs the Q-value estimate. With the exception of the extra layer, the architecture and parameters were chosen to exactly match the asynchronous advantage actor-critic (A3C) algorithm presented in Mnih et al. (2016), which in turn reused many of the settings from Mnih et al. (2015). Specifically we used the exact same learning rate, number of workers, entropy penalty, bootstrap horizon, and network architecture. This allows a fair comparison between A3C and PGQL, since the only difference is the addition of the Q-learning step. Our technique augmented A3C with the following change: After each actor-learner has accumulated the gradient for the policy update, it performs a single step of Q-learning from replay data as described in equation (13), where the minibatch size was 32 and the Q-learning learning rate was chosen to be 0.5 times the actor-critic learning rate (we mention learning rate ratios rather than choice of $\eta$ in (14) because the updates happen at different frequencies and from different data sources). Each actor-learner thread maintained a replay buffer of the last $1 0 0 k$ transitions seen by that thread. We ran the learning for 50 million agent steps (200 million Atari frames), as in (Mnih et al., 2016).
246
+
247
+ In the results we compare against both A3C and a variant of asynchronous deep Q-learning. The changes we made to Q-learning are to make it similar to our method, with some tuning of the hyperparameters for performance. We use the exact same network, the exploration policy is a softmax over the Q-values with a temperature of 0.1, and the Q-values are parameterized as in equation (12) (i.e., similar to the dueling architecture (Wang et al., 2016)), where $\alpha = 0 . 1$ . The $\mathrm { Q }$ -value updates are performed every 4 steps with a minibatch of 32 (roughly 5 times more frequently than PGQL). For each method, all games used identical hyper-parameters.
248
+
249
+ The results across all games are given in table 3 in the appendix. All scores have been normalized by subtracting the average score achieved by an agent that takes actions uniformly at random. Each game was tested 5 times per method with the same hyper-parameters but with different random seeds. The scores presented correspond to the best score obtained by any run from a random start evaluation condition (Mnih et al., 2016). Overall, PGQL performed best in 34 games, A3C performed best in 7 games, and Q-learning was best in 10 games. In 6 games two or more methods tied. In tables 1 and 2 we give the mean and median normalized scores as percentage of an expert human normalized score across all games for each tested algorithm from random and human-start conditions respectively. In a human-start condition the agent takes over control of the game from randomly selected human-play starting points, which generally leads to lower performance since the agent may not have found itself in that state during training. In both cases, PGQL has both the highest mean and median, and the median score exceeds $100 \%$ , the human performance threshold.
250
+
251
+ It is worth noting that PGQL was the worst performer in only one game, in cases where it was not the outright winner it was generally somewhere in between the performance of the other two algorithms. Figure 3 shows some sample traces of games where PGQL was the best performer. In these cases PGQL has far better data efficiency than the other methods. In figure 4 we show some of the games where PGQL under-performed. In practically every case where PGQL did not perform well it had better data efficiency early on in the learning, but performance saturated or collapsed. We hypothesize that in these cases the policy has reached a local optimum, or over-fit to the early data, and might perform better were the hyper-parameters to be tuned.
252
+
253
+ <table><tr><td></td><td>A3C</td><td>Q-learning</td><td>PGQL</td><td></td></tr><tr><td>Mean</td><td>636.8</td><td>756.3</td><td>877.2</td><td rowspan="3"></td></tr><tr><td>Median</td><td>107.3</td><td>58.9</td><td>145.6</td></tr></table>
254
+
255
+ Table 1: Mean and median normalized scores for the Atari suite from random starts, as a percentage of human normalized score.
256
+
257
+ Table 2: Mean and median normalized scores for the Atari suite from human starts, as a percentage of human normalized score.
258
+
259
+ <table><tr><td></td><td>A3C</td><td>Q-learning</td><td>PGQL</td></tr><tr><td>Mean</td><td>266.6</td><td>246.6</td><td>416.7</td></tr><tr><td>Median</td><td>58.3</td><td>30.5</td><td>103.3</td></tr></table>
260
+
261
+ ![](images/3da9915f0a0cf23f3d913c2a8ab571f5e5141f16c16785449e05122d43a1a9d3.jpg)
262
+ Figure 3: Some Atari runs where PGQL performed well.
263
+
264
+ ![](images/b3fd759a9cc8a345d3e3d9621f8f8b6c24cca20c40c9e706bcca7d1ae73da696.jpg)
265
+ Figure 4: Some Atari runs where PGQL performed poorly.
266
+
267
+ # 6 CONCLUSIONS
268
+
269
+ We have made a connection between the fixed point of regularized policy gradient techniques and the Q-values of the resulting policy. For small regularization (the usual case) we have shown that the Bellman residual of the induced Q-values must be small. This leads us to consider adding an auxiliary update to the policy gradient which is related to the Bellman residual evaluated on a transformation of the policy. This update can be performed off-policy, using stored experience. We call the resulting method ‘PGQL’, for policy gradient and Q-learning. Empirically, we observe better data efficiency and stability of PGQL when compared to actor-critic or Q-learning alone. We verified the performance of PGQL on a suite of Atari games, where we parameterize the policy using a neural network, and achieved performance exceeding that of both A3C and Q-learning.
270
+
271
+ # 7 ACKNOWLEDGMENTS
272
+
273
+ We thank Joseph Modayil for many comments and suggestions on the paper, and Hubert Soyer for help with performance evaluation. We would also like to thank the anonymous reviewers for their constructive feedback.
274
+
275
+ # REFERENCES
276
+
277
+ Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural computation, 10(2):251– 276, 1998.
278
+
279
+ Mohammad Gheshlaghi Azar, Vicenc¸ Gomez, and Hilbert J Kappen. Dynamic policy programming. ´ Journal of Machine Learning Research, 13(Nov):3207–3245, 2012.
280
+
281
+ J Andrew Bagnell and Jeff Schneider. Covariant policy search. In IJCAI, 2003.
282
+
283
+ Leemon C Baird III. Advantage updating. Technical Report WL-TR-93-1146, Wright-Patterson Air Force Base Ohio: Wright Laboratory, 1993.
284
+
285
+ Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 2012.
286
+
287
+ Richard Bellman. Dynamic programming. Princeton University Press, 1957.
288
+
289
+ Dimitri P Bertsekas. Dynamic programming and optimal control, volume 1. Athena Scientific, 2005.
290
+
291
+ Dimitri P. Bertsekas and John N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, 1996.
292
+
293
+ Thomas Degris, Martha White, and Richard S Sutton. Off-policy actor-critic. 2012.
294
+
295
+ Roy Fox, Ari Pakman, and Naftali Tishby. Taming the noise in reinforcement learning via soft updates. arXiv preprint arXiv:1207.4708, 2015.
296
+
297
+ Matthew Hausknecht and Peter Stone. On-policy vs. off-policy updates for deep reinforcement learning. Deep Reinforcement Learning: Frontiers and Challenges, IJCAI 2016 Workshop, 2016.
298
+
299
+ Nicolas Heess, David Silver, and Yee Whye Teh. Actor-critic reinforcement learning with energybased policies. In JMLR: Workshop and Conference Proceedings 24, pp. 43–57, 2012.
300
+
301
+ Sham Kakade. A natural policy gradient. In Advances in Neural Information Processing Systems, volume 14, pp. 1531–1538, 2001.
302
+
303
+ Vijay R Konda and John N Tsitsiklis. On actor-critic algorithms. SIAM Journal on Control and Optimization, 42(4):1143–1166, 2003.
304
+
305
+ Lucas Lehnert and Doina Precup. Policy gradient methods for off-policy control. arXiv preprint arXiv:1512.04105, 2015.
306
+
307
+ Sergey Levine and Vladlen Koltun. Guided policy search. In Proceedings of the 30th International Conference on Machine Learning (ICML), pp. 1–9, 2013.
308
+
309
+ Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. arXiv preprint arXiv:1504.00702, 2015.
310
+
311
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
312
+
313
+ Long-Ji Lin. Reinforcement learning for robots using neural networks. Technical report, DTIC Document, 1993.
314
+
315
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. In NIPS Deep Learning Workshop. 2013.
316
+
317
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 02 2015. URL http://dx.doi.org/10.1038/ nature14236.
318
+
319
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016.
320
+
321
+ Mohammad Norouzi, Samy Bengio, Zhifeng Chen, Navdeep Jaitly, Mike Schuster, Yonghui Wu, and Dale Schuurmans. Reward augmented maximum likelihood for neural structured prediction. arXiv preprint arXiv:1609.00150, 2016.
322
+
323
+ Razvan Pascanu and Yoshua Bengio. Revisiting natural gradient for deep networks. arXiv preprint arXiv:1301.3584, 2013.
324
+
325
+ Edwin Pednault, Naoki Abe, and Bianca Zadrozny. Sequential cost-sensitive decision making with reinforcement learning. In Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 259–268. ACM, 2002.
326
+
327
+ Jing Peng and Ronald J Williams. Incremental multi-step Q-learning. Machine Learning, 22(1-3): 283–290, 1996.
328
+
329
+ Jan Peters, Katharina Mulling, and Yasemin Altun. Relative entropy policy search. In ¨ AAAI. Atlanta, 2010.
330
+
331
+ Martin Riedmiller. Neural fitted Q iteration–first experiences with a data efficient neural reinforcement learning method. In Machine Learning: ECML 2005, pp. 317–328. Springer Berlin Heidelberg, 2005.
332
+
333
+ Gavin A Rummery and Mahesan Niranjan. On-line Q-learning using connectionist systems. 1994.
334
+
335
+ Brian Sallans and Geoffrey E Hinton. Reinforcement learning with factored states and actions. Journal of Machine Learning Research, 5(Aug):1063–1088, 2004.
336
+
337
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
338
+
339
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of The 32nd International Conference on Machine Learning, pp. 1889–1897, 2015.
340
+
341
+ David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML), pp. 387–395, 2014.
342
+
343
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
344
+
345
+ R. Sutton and A. Barto. Reinforcement Learning: an Introduction. MIT Press, 1998.
346
+
347
+ Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3 (1):9–44, 1988.
348
+
349
+ Richard S Sutton, David A McAllester, Satinder P Singh, Yishay Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In Advances in Neural Information Processing Systems, volume 99, pp. 1057–1063, 1999.
350
+
351
+ Gerald Tesauro. Temporal difference learning and TD-Gammon. Communications of the ACM, 38 (3):58–68, 1995.
352
+
353
+ Philip Thomas. Bias in natural actor-critic algorithms. In Proceedings of The 31st International Conference on Machine Learning, pp. 441–448, 2014.
354
+
355
+ Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double Qlearning. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence (AAAI-16), pp. 2094–2100, 2016.
356
+
357
+ Harm Van Seijen, Hado Van Hasselt, Shimon Whiteson, and Marco Wiering. A theoretical and empirical analysis of expected sarsa. In 2009 IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning, pp. 177–184. IEEE, 2009.
358
+
359
+ Yin-Hao Wang, Tzuu-Hseng S Li, and Chih-Jui Lin. Backward q-learning: The combination of sarsa algorithm and q-learning. Engineering Applications of Artificial Intelligence, 26(9):2184–2193, 2013.
360
+
361
+ Ziyu Wang, Tom Schaul, Matteo Hessel, Hado van Hasselt, Marc Lanctot, and Nando de Freitas. Dueling network architectures for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pp. 1995–2003, 2016.
362
+
363
+ Christopher John Cornish Hellaby Watkins. Learning from delayed rewards. PhD thesis, University of Cambridge England, 1989.
364
+
365
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
366
+
367
+ Ronald J Williams and Jing Peng. Function optimization using connectionist reinforcement learning algorithms. Connection Science, 3(3):241–268, 1991.
368
+
369
+ # A PGQL BELLMAN RESIDUAL
370
+
371
+ Here we demonstrate that in the tabular case the Bellman residual of the induced Q-values for the PGQL updates of (14) converges to zero as the temperature $\alpha$ decreases, which is the same guarantee as vanilla regularized policy gradient (2). We will use the notation that $\pi _ { \alpha }$ is the policy at the fixed point of PGQL updates (14) for some $\alpha$ , i.e., $\pi _ { \alpha } \propto \exp ( \tilde { Q } ^ { \pi _ { \alpha } } )$ , with induced Q-value function $Q ^ { \pi _ { \alpha } }$ .
372
+
373
+ First, note that we can apply the same argument as in $\ S 3 . 4$ to show that $\begin{array} { r l } { { \operatorname* { l i m } _ { \alpha \to 0 } \| T ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - } } \end{array}$ $\mathcal { T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| \ = \ 0$ (the only difference is that we lack the property that ${ \tilde { Q } } ^ { \pi _ { \alpha } }$ is the fixed point of $\mathcal { T } ^ { \pi _ { \alpha } } )$ . Secondly, from equation (15) we can write $\tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } = \eta ( { \cal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } )$ . Combining these two facts we have
374
+
375
+ $$
376
+ \begin{array} { r c l } { \| \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| } & { = } & { \eta \| { \cal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| } \\ & { = } & { \eta \| { \cal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \cal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } + { \cal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } - { Q } ^ { \pi _ { \alpha } } \| } \\ & { \leq } & { \eta ( \| { \cal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \cal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| + \| { \cal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } - { \cal T } ^ { \pi _ { \alpha } } Q ^ { \pi _ { \alpha } } \| ) } \\ & { \leq } & { \eta ( \| { \cal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \cal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| + \gamma \| \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| ) } \\ & { \leq } & { \eta / ( 1 - \eta \gamma ) \| { \cal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \cal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| , } \end{array}
377
+ $$
378
+
379
+ and so $\| \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| \to 0$ as $\alpha 0$ . Using this fact we have
380
+
381
+ $$
382
+ \begin{array} { r l } { \| T ^ { \star } \hat { Q } ^ { \pi _ { \alpha } } - \hat { Q } ^ { \pi _ { \alpha } } \| } & { = \| T ^ { \star } \hat { Q } ^ { \pi _ { \alpha } } - { \mathcal T } ^ { \pi _ { \alpha } } \hat { Q } ^ { \pi _ { \alpha } } + { \mathcal T } ^ { \pi _ { \alpha } } \hat { Q } ^ { \pi _ { \alpha } } - { Q } ^ { \pi _ { \alpha } } + { Q } ^ { \pi _ { \alpha } } - \tilde { Q } ^ { \pi _ { \alpha } } \| } \\ & { \leq \| { \mathcal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \mathcal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| + \| T ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } - { \mathcal T } ^ { \pi _ { \alpha } } { Q } ^ { \pi _ { \alpha } } \| + \| { Q } ^ { \pi _ { \alpha } } - \tilde { Q } ^ { \pi _ { \alpha } } \| } \\ & { \leq \| { \mathcal T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \mathcal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| + ( 1 + \gamma ) \| \tilde { Q } ^ { \pi _ { \alpha } } - { Q } ^ { \pi _ { \alpha } } \| } \\ & { < 3 / ( 1 - \eta \gamma ) \| { T } ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - { \mathcal T } ^ { \pi _ { \alpha } } \tilde { Q } ^ { \pi _ { \alpha } } \| , } \end{array}
383
+ $$
384
+
385
+ which therefore also converges to zero in the limit. Finally we obtain
386
+
387
+ $$
388
+ \begin{array} { r l r } { \| T ^ { \star } Q ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| } & { = } & { \| T ^ { \star } Q ^ { \pi _ { \alpha } } - T ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } + T ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - \tilde { Q } ^ { \pi _ { \alpha } } + \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| } \\ & { \leq } & { \| T ^ { \star } Q ^ { \pi _ { \alpha } } - T ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } \| + \| T ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - \tilde { Q } ^ { \pi _ { \alpha } } \| + \| \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| } \\ & { \leq } & { ( 1 + \gamma ) \| \tilde { Q } ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| + \| T ^ { \star } \tilde { Q } ^ { \pi _ { \alpha } } - \tilde { Q } ^ { \pi _ { \alpha } } \| , } \end{array}
389
+ $$
390
+
391
+ which combined with the two previous results implies that $\begin{array} { r } { \operatorname* { l i m } _ { \alpha \to 0 } \| T ^ { \star } Q ^ { \pi _ { \alpha } } - Q ^ { \pi _ { \alpha } } \| = 0 } \end{array}$ , as before.
392
+
393
+ B ATARI SCORES
394
+
395
+ Table 3: Normalized scores for the Atari suite from random starts, as a percentage of human normalized score.
396
+
397
+ <table><tr><td rowspan="2">Game</td><td rowspan="2">A3C</td><td rowspan="2">Q-learning</td><td rowspan="2">PGQL</td></tr><tr><td>25.53</td></tr><tr><td>alien</td><td>38.43 68.69</td><td>12.29</td><td>46.70 71.00</td></tr><tr><td>amidar</td><td></td><td></td><td>2802.87</td></tr><tr><td>assault</td><td>854.64</td><td>1695.21</td><td></td></tr><tr><td>asterix</td><td>191.69</td><td>98.53</td><td>3790.08</td></tr><tr><td>asteroids</td><td>24.37</td><td>5.32</td><td>50.23</td></tr><tr><td>atlantis</td><td>15496.01</td><td>13635.88</td><td>16217.49</td></tr><tr><td>bank heist</td><td>210.28</td><td>91.80</td><td>212.15</td></tr><tr><td>battle zone</td><td>21.63</td><td>2.89</td><td>52.00</td></tr><tr><td>beam rider</td><td>59.55</td><td>79.94</td><td>155.71</td></tr><tr><td>berzerk</td><td>79.38</td><td>55.55</td><td>92.85</td></tr><tr><td>bowling</td><td>2.70</td><td>-7.09</td><td>3.85</td></tr><tr><td>boxing</td><td>510.30</td><td>299.49</td><td>902.77</td></tr><tr><td>breakout</td><td>2341.13</td><td>3291.22</td><td>2959.16</td></tr><tr><td>centipede</td><td>50.22</td><td>105.98</td><td>73.88</td></tr><tr><td>chopper command</td><td>61.13</td><td>19.18</td><td>162.93</td></tr><tr><td>crazy climber</td><td>510.25</td><td>189.01</td><td>476.11</td></tr><tr><td>defender</td><td>475.93</td><td>58.94</td><td>911.13</td></tr><tr><td>demon attack</td><td>4027.57</td><td>3449.27</td><td>3994.49</td></tr><tr><td>double dunk</td><td>1250.00</td><td>91.35</td><td>1375.00</td></tr><tr><td>enduro</td><td>9.94</td><td>9.94</td><td>9.94</td></tr><tr><td>fishing derby</td><td>140.84</td><td>-14.48</td><td>145.57</td></tr><tr><td>freeway</td><td>-0.26</td><td>-0.13</td><td>-0.13</td></tr><tr><td>frostbite</td><td>5.85</td><td>10.71</td><td>5.71</td></tr><tr><td>gopher</td><td>429.76</td><td>9131.97</td><td>2060.41</td></tr><tr><td>gravitar</td><td>0.71</td><td>1.35</td><td>1.74</td></tr><tr><td>hero</td><td>145.71</td><td>15.47</td><td>92.88</td></tr><tr><td>ice hockey</td><td>62.25</td><td>21.57</td><td>76.96</td></tr><tr><td>jamesbond</td><td>133.90</td><td>110.97</td><td>142.08</td></tr><tr><td>kangaroo</td><td>-0.94</td><td>-0.94</td><td>-0.75</td></tr><tr><td>krull</td><td>736.30</td><td>3586.30</td><td>557.44</td></tr><tr><td>kung fu master</td><td>182.34</td><td>260.14</td><td>254.42</td></tr><tr><td>montezuma revenge</td><td>-0.49</td><td>1.80</td><td>-0.48</td></tr><tr><td>ms pacman</td><td>17.91</td><td>10.71</td><td>25.76</td></tr><tr><td>name this game</td><td>102.01</td><td>113.89</td><td>188.90</td></tr><tr><td>phoenix</td><td>447.05</td><td>812.99</td><td>1507.07</td></tr><tr><td>pitfall</td><td>5.48</td><td>5.49 24.96</td><td>5.49 116.37</td></tr><tr><td>pong</td><td>116.37 -0.88</td><td>0.03</td><td>-0.04</td></tr><tr><td>private eye</td><td></td><td></td><td></td></tr><tr><td>qbert riverraid</td><td>186.91</td><td>159.71</td><td>136.17</td></tr><tr><td></td><td>107.25</td><td>65.01</td><td>128.63</td></tr><tr><td>road runner robotank</td><td>603.11 15.71</td><td>179.69</td><td>519.51</td></tr><tr><td></td><td></td><td>134.87</td><td>71.50</td></tr><tr><td>seaquest</td><td>3.81</td><td>3.71</td><td>5.88</td></tr><tr><td>skiing solaris</td><td>54.27</td><td>54.10</td><td>54.16</td></tr><tr><td>space invaders</td><td>27.05</td><td>34.61</td><td>28.66</td></tr><tr><td></td><td>188.65</td><td>146.39</td><td>608.44</td></tr><tr><td>star gunner</td><td>756.60</td><td>205.70</td><td>977.99</td></tr><tr><td>surround</td><td>28.29</td><td>-1.51</td><td>78.15</td></tr><tr><td>tennis</td><td>145.58</td><td>-15.35</td><td>145.58</td></tr><tr><td>time pilot</td><td>270.74</td><td>91.59</td><td>438.50</td></tr><tr><td>tutankham</td><td>224.76</td><td>110.11</td><td>239.58</td></tr><tr><td>up n down</td><td>1637.01</td><td>148.10</td><td>1484.43</td></tr><tr><td>venture</td><td>-1.76</td><td>-1.76</td><td>-1.76</td></tr><tr><td>video pinball</td><td>3007.37</td><td>4325.02</td><td>4743.68</td></tr><tr><td>wizard of wor</td><td>150.52</td><td>88.07</td><td>325.39</td></tr><tr><td>yars revenge</td><td>81.54</td><td>23.39</td><td>252.83</td></tr><tr><td>zaxxon</td><td>4.01</td><td>44.11</td><td>224.89</td></tr></table>
parse/train/B1kJ6H9ex/B1kJ6H9ex_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1kJ6H9ex/B1kJ6H9ex_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1kJ6H9ex/B1kJ6H9ex_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkMWx309FX/BkMWx309FX.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkMWx309FX/BkMWx309FX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkMWx309FX/BkMWx309FX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkMWx309FX/BkMWx309FX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Dx3x05MlFwj/Dx3x05MlFwj.md ADDED
@@ -0,0 +1,495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Represent Your Own Policies: Learning with Policy-extended Value Function Approximator
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ 1 We study Policy-extended Value Function Approximator (PeVFA) in Reinforce
11
+ 2 ment Learning (RL), which extends conventional value function approximator
12
+ 3 (VFA) to take as input not only the state (and action) but also an explicit policy
13
+ 4 representation. Such an extension enables $\mathrm { P e V F A }$ to preserve values of multi
14
+ 5 ple policies at the same time and brings an appealing characteristic, i.e., value
15
+ 6 generalization among policies. We formally analyze the value generalization un
16
+ 7 der Generalized Policy Iteration (GPI). From theoretical and empirical lens, we
17
+ 8 show that generalized value estimates offered by PeVFA may have lower initial
18
+ 9 approximation error to true values of successive policies, which is expected to
19
+ 10 improve consecutive value approximation during GPI. Based on above clues, we
20
+ 11 introduce a new form of GPI with PeVFA which leverages the value generalization
21
+ 12 along policy improvement path. Moreover, we propose a representation learning
22
+ 13 framework for RL policy, providing several approaches to learn effective policy em
23
+ 14 beddings from policy network parameters or state-action pairs. In our experiments,
24
+ 15 we evaluate the efficacy of value generalization offered by PeVFA and policy
25
+ 16 representation learning in several OpenAI Gym continuous control tasks. For a
26
+ 17 representative instance of algorithm implementation, Proximal Policy Optimization
27
+ 18 (PPO) re-implemented under the paradigm of GPI with PeVFA achieves about $40 \%$
28
+ 19 performance improvement on its vanilla counterpart in most environments.
29
+
30
+ # 20 1 Introduction
31
+
32
+ 21 Reinforcement Learning (RL) has been widely considered as a promising way to learn optimal
33
+ 22 policies in many decision-making problems [35, 31, 53, 65, 47, 62, 16]. One fundamental element of
34
+ 23 RL is value function which defines the long-term evaluation of a policy. With function approximation
35
+ 24 (e.g., deep neural networks), a value function approximator (VFA) is able to approximate the values
36
+ 25 of a policy under large and continuous state spaces. As commonly recognized, most RL algorithms
37
+ 26 can be described as Generalized Policy Iteration (GPI) [55]. As illustrated on the left of Figure 1,
38
+ 27 at each iteration the VFA is trained to approximate the true values of current policy (i.e., policy
39
+ 28 evaluation), regarding which the policy is further improved (i.e., policy improvement). The value
40
+ 29 function approximation error hinders the effectiveness of policy improvement and then the overall
41
+ 30 optimality of GPI [5, 46]. Unfortunately, such errors are inevitable under function approximation. A
42
+ 31 large number of samples are usually required to ensure high-quality value estimates, resulting in the
43
+ 32 sample-inefficiency of deep RL algorithms. Therefore, this raises an urgent need for more efficient
44
+ 33 value approximation methods [61, 4, 12, 25].
45
+ 34 An intuitive idea to improve the efficiency value approximation is to leverage the knowledge on
46
+ 35 the values of previous encountered policies. However, a conventional VFA usually approximates
47
+ 36 the values of one policy and values learned from old policies are over-written gradually during
48
+ 37 the learning process. This means that the previously learned knowledge cannot be preserved and
49
+ 38 utilized with one conventional VFA. Thus, such limitations prevent the potentials to leverage the
50
+ 39 previous knowledge for future learning. In this paper, we study Policy-extended Value Function
51
+ 40 Approximator (PeVFA), which additionally takes an explicit policy representation as input in contrast
52
+ 41 to conventional VFA. Thanks to the policy representation input, PeVFA is able to approximate values
53
+ 42 for multiple policies and induces value generalization among policies. We formally analyze the
54
+ 43 generalization of approximate values among policies in a general form. From both theoretical and
55
+ 44 empirical lens, we show that the generalized value estimates can be closer to the true values of
56
+ 45 the successive policy, which can be beneficial to consecutive value approximation along the policy
57
+ 46 improvement path, called local generalization. Based on above clues, we introduce a new form
58
+ 47 of GPI with PeVFA (the right of Figure 1) that leverages the local generalization to improve the
59
+ 48 efficiency of consecutive value approximation along the policy improvement path.
60
+ 49 One key point of GPI with PeVFA is the representation of policy since it determines how PeVFA gen
61
+ 50 eralizes the values. For this, we propose a framework to learn effective low-dimensional embedding
62
+ 51 of RL policy. We use network parameters or state-action pairs as policy data and encode them into
63
+ 52 low-dimensional embeddings; then the embeddings are trained to capture the effective information
64
+ 53 through contrastive learning and policy recovery. Finally, we evaluate the efficacy of GPI with PeVFA
65
+ 54 and our policy representations. In principle, GPI with PeVFA is general and can be implemented
66
+ 55 in different ways. As a practical instance, we re-implement Proximal Policy Optimization (PPO)
67
+ 56 with PeVFA and propose PPO-PeVFA algorithm. Our experimental results on several OpenAI Gym
68
+ 57 continuous control tasks demonstrate the effectiveness of both value generalization offered by PeVFA
69
+ 58 and learned policy representations, with an about $40 \%$ improvement in average returns achieved by
70
+ 59 our best variants on standard PPO in most tasks.
71
+ 60 We summarize our main contributions below. 1) We study the value generalization among policies
72
+ 61 induced by PeVFA. From both theoretical and empirical aspects, we shed the light on the situations
73
+ 62 where the generalization can be beneficial to the learning along policy improvement path. 2) We
74
+ 63 propose a framework for policy representation learning. To our knowledge, we make the first attempt
75
+ 64 to learn a low-dimensional embedding of over $1 0 \mathrm { k }$ network parameters for an RL policy. 3) We
76
+ 65 introduce GPI with PeVFA that leverages the value generalization in a general form. Our experimental
77
+ 66 results demonstrate the potential of PeVFA in deriving practical and more effective RL algorithms.
78
+
79
+ ![](images/38feb809737473fb7948d8361bed05d65eceb8e03420789b9e49c35c2b8d2206.jpg)
80
+ Figure 1: Generalized Policy Iteration (GPI) with function approximation. Left: GPI with conventional value function approximator $V _ { \phi }$ . Right: GPI with PeVFA $\mathbb { V } _ { \theta } ( \chi _ { \pi } )$ (Sec. 3) where extra generalization steps exist. The subscripts of policy $\pi$ and value function parameters $\phi , \theta$ denote the iteration number. The squiggle lines represent non-perfect approximation of true values.
81
+
82
+ # 67 2 Related Work
83
+
84
+ 68 Extensions of Conventional Value Function. Sutton et al. [56] propose General Value Functions
85
+ 69 (GVFs) as a general form of knowledge representation of rewards and arbitrary cumulants. Later,
86
+ 70 conventional value functions are extended to take extra inputs for different purposes of generalization.
87
+ 71 One notable work is Universal Value Function Approximator (UVFA) [45], which is proposed to
88
+ 72 generalize values among different goals for goal-conditioned RL. UVFA is further developed in
89
+ 73 [1, 37, 9] and influences the occurrence of other value function extensions in context-based Meta-RL
90
+ 74 [43, 29], Hierarchical RL [64] and multiagent RL [19, 14] and etc. Most of the above works study
91
+ 75 how to generalize the policy or value function among extrinsic factors, i.e., environments, tasks and
92
+ 76 opponents; while we mainly study the value generalization among policies along policy improvement
93
+ 77 path, an intrinsic learning process of the agent itself.
94
+ 78 Policy Embedding and Representation. Although not well studied, representation (or embedding)
95
+ 79 learning for RL policies is involved in a few works [18, 14, 3]. The most common way to learn a
96
+ 80 policy representation is to extract from interaction experiences. As a representative, Grover et al. [14]
97
+ 81 propose learning the representation of opponent policy from interaction trajectories with a generative
98
+ 82 policy recovery loss and a discriminative triplet loss. These losses are later adopted in [64, 42].
99
+ 83 Another straightforward idea is to represent policy parameters. Network Fingerprint [17] is such a
100
+ 84 differentiable representation that uses the concatenation of the vectors of action distribution outputted
101
+ 85 by policy network on a set of probing states. The probing state set is co-optimized along with the
102
+ 86 primary learning objective, which can be non-trivial especially when the dimensionality of the set is
103
+ 87 high. Besides, some early attempts in learning low-dimensional embedding of policy parameters are
104
+ 88 studies in Evolutionary Algorithms [13, 44], mainly with the help of VAE [23]. Our work introduce a
105
+ 89 learning framework of policy representation including both above two perspectives.
106
+ 90 PVN and PVFs. Recently, several works study the generalization among policy space. Harb et al.
107
+ 91 [17] propose Policy Evaluation Network (PVN) to directly approximate the distribution of policy
108
+ 92 $\pi$ ’s objective function $J ( \pi ) = \mathbb { E } _ { \rho _ { 0 } } [ v ^ { \pi } ( s _ { 0 } ) ]$ with initial state $s _ { 0 } \sim \rho _ { 0 }$ . PVN takes as input Network
109
+ 93 Fingerprint (mentioned above) of policy network. After training on a pre-collected set of policies, a
110
+ 94 random initialized policy can be optimized in a zero-shot manner with the policy gradients of PVN by
111
+ 95 backpropagting through the differentiable policy input. We call such gradients GTPI for short below.
112
+ 96 Similar ideas are later integrated with task-specific context learning in multi-task RL [42], leveraging
113
+ 97 the generalization among policies and tasks for fast policy adaptation on new tasks. In PVN [17],
114
+ 98 as an early attempt, the generalization among policies is studied with small policy network and
115
+ 99 simple tasks; besides, the most regular online learning setting is not studied. Concurrent to our work,
116
+ 100 Faccio and Schmidhuber [10] propose a class of Parameter-based Value Functions (PVFs) that take
117
+ 101 vectorized policy parameters as inputs. Based on PVFs, new policy gradient algorithms are introduced
118
+ 102 in the form of a combination of conventional policy gradients and GTPI (i.e., by backpropagating
119
+ 103 through policy parameters in PVFs). Except for zero-shot policy optimization as conducted in PVN,
120
+ 104 PVFs are also evaluated for online policy learning. Due to directly taking parameters as input, PVFs
121
+ 105 suffer from the curse of dimensionality when the number of parameters is high. Besides, GTPI can
122
+ 106 be non-trivial to rein since policy parameter space are complex and extrapolation generalization
123
+ 107 error can be large when the value function is only trained on finite policies (usually much fewer than
124
+ 108 state-action samples) thus further resulting in erroneous policy gradients.
125
+ 109 Our work differs with PVFs from several aspects. First, we make use of learned policy representation
126
+ 110 rather than policy network parameters. Second, we do not resort to GTPI for the policy update
127
+ 111 in our algorithms but focus on utilizing value generalization for more efficient value estimation in
128
+ 112 GPI. Furthermore, we shed the light on two important problems — how value generalization among
129
+ 113 policies can happen formally and whether it is beneficial to learning or not — which are neglected in
130
+ 114 in previous works from both theoretical and empirical lens.
131
+
132
+ # 115 3 Policy-extended Value Function Approximator
133
+
134
+ 116 In this section, we propose Policy-extended Value Function Approximator (PeVFA), an extension
135
+ 117 of conventional VFA that explicitly takes as input a policy representation. First, we introduce the
136
+ 118 formulation (Sec. 3.1), then we study value generalization among policies theoretically (Sec. 3.2)
137
+ 119 along with some empirical evidences (Sec. 3.3). Finally, we derive a new form of GPI (Sec. 3.4).
138
+
139
+ # 3.1 Formulation
140
+
141
+ 121 Consider a Markov Decision Process (MDP) defined as $\langle S , \mathcal { A } , r , \mathcal { P } , \gamma \rangle$ where $s$ is the state space, $\mathcal { A }$
142
+ 122 is the action space, $r$ is the (bounded) reward function, $\mathcal { P }$ is the transition function and $\gamma \in [ 0 , 1 )$ is
143
+ 123 the discount factor. A policy $\pi \in P ( { \cal A } ) ^ { | S | }$ defines the distribution over all actions for each state. The
144
+ 124 goal of an RL agent is to find an optimal policy $\pi ^ { * }$ that maximizes the expected long-term discounted
145
+ 125 126 return. The state-vafollowing the policy $\pi$ e function from a st $v ^ { \pi } ( s )$ $s$ $\begin{array} { r } { v ^ { \pi } ( s ) = \mathbb { E } _ { \pi } \left[ \sum _ { t = 0 } ^ { \infty } \bar { \gamma } ^ { t } r _ { t + 1 } \vert s _ { 0 } = s \right] } \end{array}$ ted return for where $r _ { t + 1 } = r ( s _ { t } , a _ { t } )$
146
+ 127 to denote the vectorized form of value function.
147
+ 128 In a general form, we define policy-extended value function $\mathbb { V } : \mathcal { S } \times \Pi \mathbb { R }$ over state and policy
148
+ 129 space: $\mathbb { V } ( s , \pi ) = v ^ { \pi } ( s )$ for all $s \in { \mathcal { S } }$ and $\pi \in \Pi$ . In this paper, we focus on $\mathbb { V } ( s , \pi )$ and policy
149
+ 130 extended action-value function $\mathbb { Q } ( s , a , \pi )$ can be obtained similarly. We use $\mathbb { V } ( \pi )$ to denote the value
150
+ 131 vector for all states in the following. The key point is that PeVFA $\mathbb { V }$ is able to preserve the values of
151
+ 132 multiple policies. With function approximation, a $\mathrm { P e V F A }$ is expected to approximate the values of
152
+ 133 policies among policy space, i.e., $\bar { \{ V ^ { \pi } \} } _ { \pi \in \Pi }$ and then enable value generalization among policies.
153
+ 134 Formally, given a function $g : \Pi \mathcal { X } \subseteq \mathbb { R } ^ { n }$ that maps any policy $\pi$ to an $n$ -dimensional represen
154
+ 135 tation $\chi _ { \pi } \bar { = } g ( \pi ) \in \mathcal X$ , a PeVFA $\mathbb { V } _ { \theta }$ with parameter $\theta \in \Theta$ is to minimize the approximation error
155
+ 136 over all possible states and policies generally:
156
+
157
+ ![](images/433544a995e880196676e7310d94036d703d7b2b79a7871aedbf041ab7690f07.jpg)
158
+ Figure 2: Illustrations of value generalization among policies of $\mathrm { P e V F A }$ . Each circle denotes value function (estimate) of a policy. (a) Global Generalization: values learned from known policies can be generalized to unknown policies. (b) Local Generalization: values of previous policies (e.g., $\pi _ { t }$ ) can be generalized to successive policies (e.g., $\pi _ { t + 1 }$ ) along policy improvement path.
159
+
160
+ $$
161
+ F _ { \mu , p , \rho } ( \theta , g , \Pi ) = \sum _ { \pi \in \Pi } \mu ( \pi ) \| \mathbb { V } _ { \theta } ( \chi _ { \pi } ) - V ^ { \pi } \| _ { p , \rho } ,
162
+ $$
163
+
164
+ 137 where $\mu , \rho$ are distributions over policies and states respectively, $\begin{array} { r } { \| f \| _ { p , \rho } = ( \int _ { s } \rho ( \mathrm { d } s ) | f ( s ) | ^ { p } ) ^ { 1 / p } } \end{array}$ is
165
+ 138 $\rho$ -weighted $L _ { p }$ -norm [26, 46] for any $f : S \mathbb { R }$ . The policy distribution $\mu$ of interest depends on
166
+ 139 the scenario where value generalization is considered. As illustrated in Figure 2, we provide two
167
+ 140 value generalization scenarios. In the global generalization scenario, a uniform distribution over
168
+ 141 known policy set may be considered with a general purpose of value generalization for unknown
169
+ 142 policies. For the specific local generalization scenario along policy improvement path during GPI, a
170
+ 143 sophisticated distribution that adaptively weights recent policies more during the learning process
171
+ 144 may be more suitable in this case. In the following, we care more about the local generalization
172
+ 145 scenario and use uniform state distribution $\rho$ and $L _ { 2 }$ -norm for demonstration. The subscripts are
173
+ 146 omitted and we use $\| \cdot \|$ for clarity.
174
+
175
+ # 3.2 Theoretical Analysis on Value Generalization among Policies
176
+
177
+ 148 In this part, we theoretically analyze the value generalization among policies induced by PeVFA. We
178
+ 149 start from a two-policy case and study whether the value approximation learned for one policy can be
179
+ 150 generalized to the other one. Later, we study the local generalization scenario (Figure $2 ( \mathbf { b } ) ,$ ) and shed
180
+ 151 the light on the superiority of $\mathrm { P e V F A }$ for GPI. All the proofs are provided in Appendix A.
181
+ 152 For the convenience of demonstration, we use an identical policy representation function, i.e., $\chi _ { \pi } = \pi$ ,
182
+ 153 and define the approximation loss of PeVFA $\mathbb { V } _ { \theta }$ for any policy $\pi \in \Pi$ as $f _ { \theta } ( \pi ) = \| \mathbb { V } _ { \theta } ( \pi ) - V ^ { \bar { \pi } } \| \ge 0$ .
183
+ 154 We use the following definitions for a formal description of value approximation process with PeVFA
184
+ 155 and local property of loss function $f _ { \theta }$ that influences generalization [40, 63] respectively:
185
+ 156 Definition 1 ( $\pi$ -Value Approximation) We define a value approximation process $\mathcal { P } _ { \pi } : \Theta \to \Theta$
186
+ 157 with PeVFA as a $\gamma$ -contraction mapping on the approximation loss for policy $\pi$ , i.e., for $\hat { \theta } = \mathcal { P } _ { \pi } ( \theta )$ ,
187
+ 158 we have $f _ { \hat { \theta } } ( \pi ) \leq \gamma f _ { \theta } ( \pi )$ where $\gamma \in [ 0 , 1 )$ .
188
+
189
+ Definition 2 ( $L$ -Continuity) We call $f _ { \theta }$ is $L$ -continuous at policy $\pi$ if fθ is Lipschitz continuous at π with a constant $L \in [ 0 , \infty )$ , i.e., $| f _ { \theta } ( { \boldsymbol \pi } ) - f _ { \theta } ( { \boldsymbol \pi } ^ { \prime } ) | \leq L \cdot d ( { \boldsymbol \pi } , { \boldsymbol \pi } ^ { \prime } )$ for $\pi ^ { \prime } \in \Pi$ with some distance metric d for policy space $\Pi$ .
190
+
191
+ 162 With Definition 1, the consecutive value approximation for the policies along policy improvement path
192
+ 163 during GPI can be described as: $\theta _ { - 1 } \xrightarrow { \mathcal { P } _ { \pi _ { 0 } } } \theta _ { 0 } \xrightarrow { \mathcal { P } _ { \pi _ { 1 } } } \theta _ { 1 } \xrightarrow { \mathcal { P } _ { \pi _ { 2 } } } \dots ,$ , as the green arrows illustrated in
193
+ 164 Figure 1. One may refer to Appendix A.1 for a discussion on the rationality of the two definitions.
194
+ 65 To start our analysis, we first study the generalized value approximation loss in a two-policy case
195
+ 166 where only the value of policy $\pi _ { 1 }$ is approximated by PeVFA as below:
196
+
197
+ Lemma 1 For 67 $\theta \xrightarrow { \mathcal { P } _ { \pi _ { 1 } } } \hat { \theta } .$ , if $f _ { \hat { \theta } }$ is $\hat { L }$ -continuous at $\pi _ { 1 }$ and $f _ { \theta } ( \pi _ { 1 } ) \le f _ { \theta } ( \pi _ { 2 } )$ , we have: $f _ { \hat { \theta } } ( \pi _ { 2 } ) \leq$ 68 $\gamma f _ { \theta } ( \pi _ { 2 } ) + \mathcal { M } ( \pi _ { 1 } , \pi _ { 2 } , \hat { L } )$ , where $\mathcal { M } ( \pi _ { 1 } , \pi _ { 2 } , \hat { L } ) = \hat { L } \cdot d ( \pi _ { 1 } , \pi _ { 2 } )$ .
198
+
199
+ Corollary 1 Pπ1 is γg-contraction (γg ∈ [0, 1)) for π2 when fθ(π2) > Lˆ·d(π1,π2)1−γ169 .
200
+
201
+ 170 Lemma 1 shows that the post- $\mathcal { P } _ { \pi _ { 1 } }$ approximation loss for $\pi _ { 2 }$ is upper bounded by a generalized
202
+ 171 contraction of prior loss plus a locality margin term $\mathcal { M }$ which is related to $\pi _ { 1 } , \pi _ { 2 }$ and the locality
203
+ 172 property of $f _ { \hat { \theta } }$ . In general, the form of $\mathcal { M }$ depends on the local property assumed. Some higher
204
+ 173 order variants are provided in Appendix A.2. For a step further, Corollary 1 reveals the condition
205
+ 174 where a contraction on value approximation loss for $\pi _ { 2 }$ is achieved when $\mathrm { P e V F A }$ is only trained to
206
+ 175 approximate the values of $\pi _ { 1 }$ . Concretely, such a condition is apt to reach with tighter contraction for
207
+ 176 policy $\pi _ { 1 }$ is, closer two policies, or smoother approximation loss function $f _ { \hat { \theta } }$ .
208
+ 177 Then we consider the local generalization scenario as illustrated in Figure 2(b). For any iteration $t$
209
+ 178 of GPI, the values of current policy $\pi _ { t }$ are approximated by $\mathrm { P e V F A }$ , followed by a improved policy
210
+ 179 $\pi _ { t + 1 }$ whose values are to be approximated in the next iteration. The value generalization from each
211
+ 180 $\pi _ { t }$ and $\pi _ { t + 1 }$ can be similarly considered as the two-policy case. In addition to the former results, we
212
+ 181 shed the light on the value generalization loss of PeVFA along policy improvement path below:
213
+
214
+ Lemma 2 For $\theta _ { - 1 } \xrightarrow { \mathcal { P } _ { \pi _ { 0 } } } \theta _ { 0 } \xrightarrow { \mathcal { P } _ { \pi _ { 1 } } } \theta _ { 1 } \xrightarrow { \mathcal { P } _ { \pi _ { 2 } } } . . .$ Pπ2 −−−→ . . . with γt for each Pπt , if fθt is Lˆ t-continuous at πt for any $t \geq 0$ , we have $f _ { \theta _ { t } } ( \pi _ { t + 1 } ) \leq \gamma _ { t } f _ { \theta _ { t - 1 } } ( \pi _ { t } ) + \mathcal { M } _ { t }$ , where $\mathcal { M } _ { t } = L _ { t } \cdot d ( \pi _ { t } , \pi _ { t + 1 } )$ .
215
+
216
+ Corollary 2 By induction, we have 84 $\begin{array} { r } { f _ { \theta _ { t } } ( \pi _ { t + 1 } ) \leq \prod _ { i = 0 } ^ { t } \gamma _ { t } f _ { \theta _ { - 1 } } ( \pi _ { 0 } ) + \sum _ { i = 0 } ^ { t - 1 } \prod _ { j = i + 1 } ^ { t } \gamma _ { j } \mathcal M _ { i } + \mathcal M _ { t } . } \end{array}$
217
+
218
+ 185 The above results indicate that the value generalization loss can be recursively bounded and has
219
+ 186 a upper bound formed by a repeated contraction on initial loss plus the accumulation of locality
220
+ 187 margins induced from each local generalization. An infinity-case discussion for Corollary 2 is in
221
+ 188 Appendix A.5. The next question is whether $\mathrm { P e V F A }$ with value generalization among policies is
222
+ 189 preferable to the conventional VFA. To this end, we introduce a desirable condition which reveals the
223
+ 190 superiority of PeVFA during consecutive value approximation along the policy improvement path:
224
+
225
+ Theorem 1 During91 $\begin{array} { r l } & { \theta _ { - 1 } \xrightarrow { \mathcal { P } _ { \pi _ { 0 } } } \theta _ { 0 } \xrightarrow { \mathcal { P } _ { \pi _ { 1 } } } \theta _ { 1 } \xrightarrow { \mathcal { P } _ { \pi _ { 2 } } } \dots , f o r a n y t \ge 0 , \ i f f _ { \theta _ { t } } ( \pi _ { t } ) + f _ { \theta _ { t } } ( \pi _ { t + 1 } ) \le } \\ & { n f _ { \theta _ { t } } ( \pi _ { t + 1 } ) \le \| \mathbb { V } _ { \theta _ { t } } ( \pi _ { t } ) - V ^ { \pi _ { t + 1 } } \| . } \end{array}$ 92 $\| V ^ { \pi _ { t } } - V ^ { \pi _ { t + 1 } } \|$ , the
226
+
227
+ 193 Theorem 1 shows that the generalized value estimates $\mathbb { V } _ { \boldsymbol { \theta } _ { t } } \big ( \pi _ { t + 1 } \big )$ can be closer to the true values of
228
+ 194 policy $\pi _ { t + 1 }$ than $\mathbb { V } _ { \theta _ { t } } ( \pi _ { t } )$ . Note that $\mathbb { V } _ { \theta _ { t } } ( \pi _ { t } )$ is the value approximation for $\pi _ { t }$ which is equivalent
229
+ 195 to the counterpart $V _ { \phi _ { t } }$ for a conventional VFA as value generalization among policies does not
230
+ 196 exist. To consecutive value approximation along policy improvement path, this means that the value
231
+ 197 generalization of $\mathrm { P e V F A }$ has the potential to offer closer start points at each iteration. If such closer
232
+ 198 start points can often exist, we expect $\mathrm { P e V F A }$ to be preferable to conventional VFA since value
233
+ 199 approximation can be more efficient with $\mathrm { P e V F A }$ and it in turn facilitates the overall GPI process.
234
+ 200 However, the condition in Theorem 1 is not necessarily met in practice. Intuitively, it depends on the
235
+ 201 locality margins that may be related to function family and optimization method of PeVFA, as well
236
+ 202 as the scale of policy improvement. We leave these further theoretical investigations for future work.
237
+ 203 Instead, we empirically examine the existence of such desirable generalizations in the following.
238
+
239
+ # 3.3 Empirical Evidences
240
+
241
+ We empirically investigate the value generalization of PeVFA with didactic environments. In this section, PeVFA $\mathbb { V } _ { \theta }$ is parameterized by neural network and we use the concatenation of all weights and biases of the policy network as a straightforward representation $\chi _ { \pi }$ for each policy, called Raw Policy Representation $( R P R )$ . Experimental details are provided in Appendix B.
242
+
243
+ 209 First, we demonstrate the global generalization (illustrated in Figure 2(a)) in a continuous 2D Point
244
+ 210 Walker environment. We build the policy set $\Pi$ with synthetic policies, each of which is a randomly
245
+ 211 initialized 2-layer tanh-activated neural network with 2 units for each layer. The size of $\Pi$ is $2 0 \mathrm { k }$ and
246
+ 212 the behavioral diversity of synthetic policies is verified (see Figure 7(b) in Appendix). We divide $\Pi$
247
+ 213 into training set (i.e., known policies $\Pi _ { 0 }$ ) and testing set (i.e., unseen policies $\Pi _ { 1 }$ ). We rollout the
248
+
249
+ ![](images/ca62a1096edd30ab0ac3480db0f68aa5589accbab003cbc10927be11f5143231.jpg)
250
+ Figure 3: Empirical evidences of two kinds of generalization of $\mathrm { P e V F A }$ . (a) Global generalization: $\mathrm { P e V F A }$ shows comparable value estimation performance on testing policy set (red) after learning on training policy set (blue). (b) Local generalization: PeVFA $( \mathbb { V } _ { \theta } ( \chi _ { \pi } ) )$ shows lower losses than conventional VFA $( V _ { \phi } )$ before and after the value approximation training for successive policies along policy improvement path. In (b), the left axis is for approximation loss (lower is better) and the right axis is for average return as a reference of the policy learning process (green curve).
251
+
252
+ policies in the environment to collect trajectories, based on which we perform value approximation training. Our results show that a PeVFA trained on $\Pi _ { 0 }$ achieves reasonable generalization performance when evaluating on $\Pi _ { 1 }$ . The average losses on training and testing set are 1.782 and 2.071 over 6 trials. Figure 3(a) shows the value predictions for policies from training and testing set (100 for each).
253
+
254
+ Next, we investigate the value generalization along policy improvement path, i.e., local generalization as in Figure 2(b). We use a 2-layer 8-unit policy network trained by standard PPO algorithm [50] in MuJoCo continuous control tasks. Parallel to the conventional value network $V _ { \phi } ( s )$ (i.e., VFA) in PPO, we set a $\mathrm { P e V F A }$ network $\mathbb { V } _ { \theta } ( s , \chi _ { \pi } )$ as a reference for the comparison on value approximation loss. Compared to $V _ { \phi }$ , PeVFA $\mathbb { V } _ { \theta } ( s , \chi _ { \pi } )$ takes RPR as input and approximates the values of all historical policies $( \{ \pi _ { i } \} _ { i = 0 } ^ { t } )$ in addition. We compare the value approximation losses of $V _ { \phi }$ (red) and $\mathbb { V } _ { \theta }$ (blue) before (solid) and after (dashed) updating with on-policy samples collected by the improved policy $\pi _ { t + 1 }$ at each iteration. Figure 3(b) shows the results for InvertedPendulum-v1 and Ant-v1. Results for all 7 MuJoCo tasks can be found in Appendix B.2. By comparing approximation losses before updating (red and blue solid curves), we can observe that the approximation loss of $\mathbb { V } _ { \theta _ { t } } ( \chi _ { \pi _ { t + 1 } } )$ is almost consistently lower than that of $V _ { \phi _ { t } }$ . This means that the generalized value estimates offered by PeVFA are usually closer to the true values of $\pi _ { t + 1 }$ , demonstrating the consequence arrived in Theorem 1. For the dashed curves, it shows that PeVFA $\mathbb { V } _ { \theta _ { t + 1 } } ( \chi _ { \pi _ { t + 1 } } )$ can achieve lower approximation loss for $\pi _ { t + 1 }$ than conventional VFA $V _ { \phi _ { t + 1 } }$ after the same number of training with the same on-policy samples. The empirical evidence above indicates that $\mathrm { P e V F A }$ can be preferable to the conventional VFA for consecutive value approximation. The generalized value estimates along policy improvement path have the potential to expedite the process of GPI.
255
+
256
+ # 3.4 Reinforcement Learning with PeVFA
257
+
258
+ Based on the results above, we expect to leverage the value generalization of $\mathrm { P e V F A }$ to facilitate RL. In Algorithm 1, we propose a general description of RL algorithm under the paradigm of GPI with PeVFA. For each iteration, the interaction experiences of current policy and the policy
259
+
260
+ # Algorithm 1 RL under the paradigm of GPI with PeVFA $( \mathbb { V } ( s , \chi _ { \pi } )$ is used for demonstration)
261
+
262
+ 1: Initialize policy $\pi _ { 0 }$ , policy representation model $g , \mathrm { P e V F A } \ \mathbb { V } _ { - 1 }$ and experience buffer $\mathcal { D }$
263
+ 2: 3: for iteration Rollout $t = 0 , 1 , \ldots$ $\pi _ { t }$ dohe environment and obtain $k$ trajectories $\mathcal { T } _ { t } = \{ \tau _ { i } \} _ { i = 0 } ^ { k }$
264
+ 4: Get representation $\chi _ { \pi _ { t } } = g ( \pi )$ for policy $\pi _ { t }$ and add experiences $( \chi _ { \pi _ { t } } , \tau _ { t } )$ in buffer $\mathcal { D }$
265
+ 5: if $t \%$ $M = 0$ then
266
+ 6: Update PeVFA $\mathbb { V } _ { t - 1 } ( s , \chi _ { \pi _ { i } } )$ for previous policies with data $\{ ( \chi _ { \pi _ { i } } , T _ { i } ) \} _ { i = 0 } ^ { t - 1 }$
267
+ 7: Update policy representation model $g$ , e.g., with approaches provided in Sec. 4
268
+ 8: end if
269
+ 9: Update PeVFA $\mathbb { V } _ { t - 1 } ( s , \chi _ { \pi _ { t } } )$ for current policy $\chi _ { \pi _ { t } }$ and set $\mathbb { V } _ { t } \longleftarrow \mathbb { V } _ { t - 1 }$
270
+ 10: Update $\pi _ { t }$ w.r.t $\mathbb { V } _ { t } ( s , \chi _ { \pi _ { t } } )$ by policy improvement algorithm and set $\pi _ { t + 1 } \longleftarrow \pi _ { t }$
271
+ 11: end for
272
+ 239 representation are stored in a buffer (line 3-4). At an interval of $M$ iterations, PeVFA is trained via
273
+ 240 value approximation for previous policies with the stored data and the policy representation model
274
+ 241 is updated according to the method used (line 5-8). This part is unique to PeVFA for preservation
275
+ 242 and generalization of knowledge of historical policies. Next, value approximation for current policy
276
+ 243 is performed with $\mathrm { P e V F A }$ (line 9). A key difference here is that the generalized value estimates
277
+ 244 (i.e., $\mathbb { V } _ { t - 1 } ( \chi _ { \pi _ { t } } ) )$ are used as start points. Afterwards, a successive policy is obtained from typical
278
+ 245 policy improvement (line 10). Algorithm 1 can be implemented in different ways and we propose an
279
+ 246 instance implemented based on PPO [50] in our experiments later. In the next section, we introduce
280
+ 247 our methods for policy representation learning.
281
+
282
+ ![](images/16592e2f21ae4564e2ea2f7b946434c197861a704746ab2783434fc39908bdb1.jpg)
283
+ Figure 4: The framework of policy representation training. Policy network parameters used for OPR or policy state-action pairs used for SPR are fed into policy encoder with permutation-invariant (PI) transformations followed by an MLP, producing the representation $\chi _ { \pi }$ . Afterwards, $\chi _ { \pi }$ can be trained by gradients from the value approximation loss of $\mathrm { P e V F A }$ (i.e., End-to-End), as well as (optionally) the auxiliary loss of policy recovery or the contrastive learning (i.e., InfoNCE) loss.
284
+
285
+ # 248 4 Policy Representation Learning
286
+
287
+ To derive practical deep RL algorithms, one key point is policy representation, i.e., a low-dimensional embedding of RL policy. Intuitively, policy representation influences the approximation and generalization of PeVFA. Thus, it is of interest to find an effective policy representation based on which the superiority of PeVFA can be leveraged to improve RL algorithms. To our knowledge, policy representation is not well studied and it remains unclear on how to obtain an effective representation for an RL policy in a general case in practice. In previous section, we demonstrate the effectiveness of using policy parameters as a naive representation when policy network is small, called RPR. However, a usual policy network may have large number of parameters, thus making it inefficient and even irrational to use RPR for approximation and generalization [17, 10]. More generally, policy parameters of the policy we wish to represent may not be accessible.
288
+
289
+ 259 To this end, we propose a general framework of policy representation learning as illustrated in Figure
290
+ 260 4. The first thing to consider is data source, i.e., from which we can extract the information for an
291
+ 261 effective policy representation. Recall that the policy is a distribution over state and action space
292
+ 262 of high dimensionality. The features of such a distribution is not directly available. Therefore, we
293
+ 263 consider two kinds of data source below that indirectly contains the information of policies: 1) Surface
294
+ 264 Policy Representation $( S P R )$ : The first data source is state-action pairs (or trajectories [14]), since
295
+ 265 they reflect how policy may behave under such states. This data source is general since no explicit
296
+ 266 form of policy is assumed. In a geometric view, learning policy representation from state-action pairs
297
+ 267 can be viewed as capturing the features of policy via scattering sample points on the curved surface
298
+ 268 of policy distribution. 2) Origin Policy Representation (OPR): The other data source is parameters of
299
+ 269 policy since they determine the underlying form of policy distribution. Such a data source is often
300
+ 270 available during the learning process of deep RL algorithms when policy is parameterized by neural
301
+ 271 networks. Generally, we consider a policy network to be an MLP with well represented state features
302
+ 272 (e.g., features extracted by CNN for pixels or by LSTM for sequences) as input.
303
+ 273 The remaining question is how we extract the policy representation from the data sources mentioned
304
+ 274 above. As shown in Figure 4, we use permutation-invariant (PI) transformations followed by an
305
+ 275 MLP to encode the data of policy $\pi$ into an embedding $\chi _ { \pi }$ for both SPR and OPR. For SPR, each
306
+
307
+ 276 state-action pair of $\{ ( s _ { i } , a _ { i } ) \} _ { i = 1 } ^ { k }$ is fed into a common MLP, followed by a Mean-Reduce operation on the outputted features across $k$ . For OPR, we perform PI transformation (similar as done for state-action pairs) inner-layer weights and biases $\{ ( w _ { i } , b _ { i } ) \} _ { i = 1 } ^ { h }$ for each layer first, where $h$ denotes the number of nodes in this layer and $w _ { i } , b _ { i }$ is the income weight vector from previous layer and the bias of ith node; then we concatenate encoding of layers and obtain the OPR. A illustrative description for the encoding of OPR is in Figure 12 of Appendix.
308
+
309
+ To train the policy embedding $\chi _ { \pi }$ obtained above, the most straightforward way is to backpropagate the value approximation loss of $\mathrm { P e V F A }$ in an End-to-End $( E 2 E )$ fashion as illustrated on the lowerright of Figure 4. In addition, we provide two self-supervised training losses for both OPR and SPR, as illustrated on the upper-right of Figure 4. The first one is an auxiliary loss (AUX) of policy recovery [14], i.e., to recover the action distributions of $\pi$ from $\chi _ { \pi }$ under different states. To be specific, an auxiliary policy decoder $\bar { \pi } ( \cdot | s , \chi _ { \pi } )$ is trained through behavioral cloning, formally to minimize cross-entropy objective $\mathcal { L } _ { \mathrm { A U X } } = - \mathbb { E } _ { ( s , a ) } \left[ \log \bar { \pi } ( a | s , \chi _ { \pi } ) \right]$ . For the second one, we propose to train $\chi _ { \pi }$ by Contrastive Learning $( C L )$ [54, 51]: policies are encouraged to be close to similar ones (i.e., positive samples $\pi ^ { + }$ ), and to be apart from different ones (i.e., negative samples $\pi ^ { - }$ ) in representation space. For each policy, we construct positive samples by data augmentation on policy data, depending on SPR or OPR considered; and different policies along the policy improvement path naturally the InfoNCE loss [41] below: provide negative samples for each other. Finally, the embedding $\begin{array} { r } { \mathcal { L } _ { \mathrm { C L } } = - \mathbb { E } _ { ( \pi ^ { + } , \{ \pi ^ { - } \} ) } \left[ \log \frac { \exp ( \chi _ { \pi } ^ { T } W \chi _ { \pi ^ { + } } ) } { \exp ( \chi _ { \pi } ^ { T } W \chi _ { \pi ^ { + } } ) + \sum _ { \pi ^ { - } } \exp ( \chi _ { \pi } ^ { T } W \chi _ { \pi ^ { - } } ) } \right] . } \end{array}$ $\chi _ { \pi }$ is optimized through minimizing
310
+
311
+ Now, the training of policy representation model in Algorithm 1 can be performed with any combination of data sources and training losses provided above. A pseudo-code of the overall policy representation training framework and complete implementation details are provided in Appendix D.
312
+
313
+ # 5 Experiments
314
+
315
+ In this section, we conduct experimental study with focus on the following questions:
316
+
317
+ Question 1 Can value generalization offered by PeVFA improve a deep RL algorithm in practice? Question 2 Can our proposed framework to learn effective policy representation?
318
+
319
+ Our experiments are conducted in several OpenAI Gym continuous control tasks (one from Box2D and five from MuJoCo) [6, 58]. All experimental details and curves can be found in Appendix B.
320
+
321
+ Algorithm Implementation. We use PPO [50] as the basic algorithm and propose a representative implementation of Algorithm 1, called PPO-PeVFA. PPO is a policy optimization algorithm that follows the paradigm of GPI (Figure 1, left). A value network $V _ { \phi } ( s )$ with parameters $\phi$ (i.e., conventional VFA) is trained to approximate the value of current policy $\pi$ ; while $\pi$ is optimized with respect to a surrogate objective [48] using advantages calculated by $V _ { \phi }$ and GAE [49]. Compared with original PPO, PPO-PeVFA makes use of a $\mathrm { P e V F A }$ network $\mathbb { V } _ { \theta } ( s , \chi _ { \pi } )$ with parameters $\theta$ rather than the conventional VFA $V _ { \phi } ( s )$ , and follows the training scheme as in Algorithm 1. Note PPO-PeVFA uses the same policy optimization method as original PPO and only differs at value approximation.
322
+
323
+ Baselines and Variants. Except for original PPO as a default baseline, we use another two baselines: 1) PPO-PeVFA with randomly generated policy representation for each policy, denoted by Ran PR; 2) PPO-PeVFA with Raw Policy Representation (RPR), i.e., use the vector of all parameters of policy network as representation as adopted in PVFs [10]. Our variants of PPO-PeVFA differ at the policy representation used. In total, we consider 6 variants denoted by the combination of the policy data choice (i.e., OPR, SPR) and representation principle choice (i.e., E2E, CL, AUX).
324
+
325
+ Experimental Details. For all baselines and variants, we use a normal-scale policy network with 2 layers and 64 units for each layer, resulting in over $3 \mathrm { k }$ to 10k (e.g., Ant-v1) policy parameters depending on the environments. We do not assume the access to pre-collected policies. Thus the size of policy set increases from 1 (i.e., the initial policy) during the learning process, to about 1k to 2 for a single trial. The dimensionality of all kinds of policy representation expect for RPR is set to 64. The buffer $D$ maintains recent $2 0 0 \mathrm { k }$ steps of interaction experience and the policy data of corresponding policy. The number of interaction step of each trial is 1M for InvDouPend-v1 and LunarLander-v2, 4M for Ant-v1 and 2M for the others.
326
+
327
+ Results. The overall experimental results are summarized in Table 1. In Figure 5, we provide aggregated results across all environments expect for InvDouPend-v1 and LunarLander-v2 (since
328
+
329
+ Table 1: Average returns $\pm$ half a std) over 10 trials for algorithms. Each result is the maximum evaluation along the training process. Top two values for each environment are bold.
330
+
331
+ <table><tr><td rowspan="2">Environments</td><td colspan="3">Benchmarks</td><td colspan="3">Origin Policy Representation (Ours)</td><td colspan="3">Surface Policy Representation (Ours)</td></tr><tr><td>PPO</td><td>Ran PR</td><td>RPR</td><td>E2E</td><td>CL</td><td>AUX</td><td>E2E</td><td>CL</td><td>AUX</td></tr><tr><td>HalfCheetah-v1</td><td>2621</td><td>2470</td><td>2325 ± 399.27</td><td>3171 ± 427.63</td><td>3725±348.55</td><td>3175±517.52</td><td>2774 ± 233.39</td><td>3349 ± 341.42</td><td>3216 ± 506.39</td></tr><tr><td>Hopper-v1</td><td>1639</td><td>1226</td><td>1097 ± 213.47</td><td>2085 ± 310.91</td><td>2351 ± 231.11</td><td>2214 ± 360.78</td><td>2227 ± 297.35</td><td>2392 ± 263.93</td><td>2577 ± 217.73</td></tr><tr><td>Walker2d-v1</td><td>1505</td><td>1269</td><td>317 ± 152.68</td><td>1856 ± 305.51</td><td>2038 ± 315.51</td><td>2044 ±316.32</td><td>1930.57 ± 456.02</td><td>2203 ± 381.95</td><td>1980 ± 325.54</td></tr><tr><td>Ant-v1</td><td>2835</td><td>2742</td><td>2143 ± 406.64</td><td>3581 ± 185.43</td><td>4019 ± 162.47</td><td>3784 ± 268.99</td><td>3173 ± 184.75</td><td>3632 ± 134.27</td><td>3397 ± 200.03</td></tr><tr><td>InvDouPend-v1</td><td>9344</td><td>9355</td><td>8856 ± 551.90</td><td>9357 ± 0.29</td><td>9355±0.64</td><td>9355±0.68</td><td>9355±0.89</td><td>9356±0.96</td><td>9355 ±1.42</td></tr><tr><td>LunarLander-v2</td><td>219</td><td>226</td><td>-22±35.08</td><td>238±3.37</td><td>239 ± 3.70</td><td>234 ± 3.47</td><td>236± 3.13</td><td>234 ± 3.13</td><td>235±5.70</td></tr></table>
332
+
333
+ 28 most algorithms achieve near-optimal results), where all returns are normalized by the results of PPO
334
+ 29 in Table 1. Full learning curves are omitted and can be found in Appendix F.2.
335
+
336
+ To Question 1. From Table 1, we can find that both PPOPeVFA w/ OPR (E2E) and PPO-PeVFA w/ SPR (E2E) outperforms PPO in all 6 tasks, and achieve over $20 \%$ improvement in Figure 5. This demonstrates the effectiveness of $\mathrm { P e V F A }$ . Moreover, the improvement is further enlarged (to about $40 \%$ ) by CL and AUX for both OPR and SPR. This indicates that the superiority of PeVFA can be further utilized with better policy representation that offers a more suitable space for value generalization.
337
+
338
+ ![](images/20a85c9161cb7eeda14c0b97ac6b6838b2911bc0a0e66da144a476b8c3115d94.jpg)
339
+ Figure 5: Normalized averaged returns aggregated over 4 MuJoCo tasks.
340
+
341
+ To Question 2. In Table 1, consistent degeneration is observed for PPO-PeVFA w/ Ran PR due to the negative effects on generalization caused by the randomness and disorder of policy representation. This phenomenon seems to be more severe for PPO-PeVFA w/ RPR due to the complexity of high-dimensional parameter space. In contrast, the improvement achieved by our proposed PPO-PeVFA variants shows that effective policy representation can be learned from policy parameters (OPR) and state-action pairs (SPR) though value approximation loss (i.e., E2E) and further improved when additional selfsupervised representation learning is involved as CL and AUX. Overall, OPR slightly outperforms SPR as CL does over AUX. We hypothesize that it is due to the stochasticity of state-action pairs which serve as inputs of SPR and training samples for AUX. This reveals the space for future improvement. In addition, we visualize the learned representation in Figure 6. We can observe that policies from different trials are locally continuous and show different modes of embedding trajectories due to random initialization and optimization; while a global evolvement among trials emerges with respect to policy performance.
342
+
343
+ ![](images/ac8c916c244115b54aef4064f061a500686eb8885bd22f7a8cd07c919cc350ea.jpg)
344
+ Figure 6: A t-SNE visualization for representations learned by PPO-PeVFA OPR (E2E) in Ant-v1. In total, 6k policies from 5 trials (denoted by different markers) are plotted, which are colored according to average return.
345
+
346
+ # 61 6 Conclusion and Future Work
347
+
348
+ In this paper, we propose Policy-extended Value Function Approximator (PeVFA) and study value generalization among policies. We propose a new form of GPI based on PeVFA which is potentially preferable to conventional VFA for value approximation. Moreover, we propose a general framework to learn low-dimensional embedding of RL policy. Our experiments demonstrate the effectiveness of the generalization characteristic of $\mathrm { P e V F A }$ and our proposed policy representation learning methods.
349
+
350
+ Our work opens up some research directions on value generalization among policies and policy representation. A possible future study on the theory of value generalization among policies is to consider the interplay between approximation error, policy improvement and local generalization during GPI with PeVFA. Besides, analysis on influence factors of value generalization among policies (e.g., policy representation, architecture of ${ \mathrm { P e V F A } }$ ) and other utilization of $\mathrm { P e V F A }$ are expected. For better policy representation, inspirations on OPR may be got from studies on Manifold Hypothesis of neural network; the selection of more informative state-action pairs for SPR is also worth research.
351
+
352
+ # References
353
+
354
+ [1] M. Andrychowicz, D. Crow, A. Ray, J. Schneider, R. Fong, P. Welinder, B. McGrew, J. Tobin, P. Abbeel, and W. Zaremba. Hindsight experience replay. In NeurIPS, pages 5048–5058, 2017.
355
+ [2] M. Andrychowicz, A. Raichuk, P. Stanczyk, M. Orsini, S. Girgin, R. Marinier, L. Hussenot, M. Geist, O. Pietquin, M. Michalski, S. Gelly, and O. Bachem. What matters in on-policy reinforcement learning? A large-scale empirical study. CoRR, abs/2006.05990, 2020. [3] I. Arnekvist, D. Kragic, and J. A. Stork. VPE: variational policy embedding for transfer reinforcement learning. In ICRA, pages 36–42, 2019.
356
+ [4] M. G. Bellemare, W. Dabney, and R. Munos. A distributional perspective on reinforcement learning. In ICML, volume 70, pages 449–458, 2017. [5] D. P. Bertsekas and J. N. Tsitsiklis. Neuro-dynamic programming, volume 3 of Optimization and neural computation series. 1996.
357
+ [6] G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. Openai gym. CoRR, abs/1606.01540, 2016. [7] T. Chen, S. Kornblith, M. Norouzi, and G. E. Hinton. A simple framework for contrastive learning of visual representations. CoRR, abs/2002.05709, 2020. [8] L. Engstrom, A. Ilyas, S. Santurkar, D. Tsipras, F. Janoos, L. Rudolph, and A. Madry. Implementation matters in deep RL: A case study on PPO and TRPO. In ICLR, 2020.
358
+ [9] B. Eysenbach, X. Geng, S. Levine, and R. R. Salakhutdinov. Rewriting history with inverse RL: hindsight inference for policy improvement. In NeurIPS, 2020.
359
+ [10] F. Faccio and J. Schmidhuber. Parameter-based value functions. CoRR, abs/2006.09226, 2020.
360
+ [11] H. Fu, H. Tang, J. Hao, C. Chen, X. Feng, D. Li, and W. Liu. Towards effective context for metareinforcement learning: an approach based on contrastive learning. CoRR, abs/2009.13891, 2020.
361
+ [12] S. Fujimoto, H. v. Hoof, and D. Meger. Addressing function approximation error in actor-critic methods. In ICML, 2018.
362
+ [13] A. Gaier, A. Asteroth, and J. Mouret. Discovering representations for black-box optimization. In GECCO, pages 103–111, 2020.
363
+ [14] A. Grover, M. Al-Shedivat, J. K. Gupta, Y. Burda, and H. Edwards. Learning policy representations in multiagent systems. In ICML, volume 80, pages 1797–1806, 2018.
364
+ [15] T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In ICML, pages 1856–1865, 2018.
365
+ [16] D. Hafner, T. P. Lillicrap, J. Ba, and M. Norouzi. Dream to control: Learning behaviors by latent imagination. In ICLR, 2020.
366
+ [17] J. Harb, T. Schaul, D. Precup, and P. Bacon. Policy evaluation networks. CoRR, abs/2002.11833, 2020.
367
+ [18] K. Hausman, J. Tobias Springenberg, Z. Wang, N. Heess, and M. A. Riedmiller. Learning an embedding space for transferable robot skills. In ICLR, 2018.
368
+ [19] H. He and J. L. Boyd-Graber. Opponent modeling in deep reinforcement learning. In ICML, volume 48, pages 1804–1813, 2016.
369
+ [20] K. He, H. Fan, Y. Wu, S. Xie, and R. B. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, pages 9726–9735, 2020.
370
+ [21] M. Igl, G. Farquhar, J. Luketina, W. Boehmer, and S. Whiteson. The impact of non-stationarity on generalisation in deep reinforcement learning. CoRR, abs/2006.05826, 2020.
371
+ [22] N. S. Keskar, D. Mudigere, J. Nocedal, M. Smelyanskiy, and P. T. P. Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In ICLR, 2017.
372
+ [23] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In ICLR, 2014.
373
+ [24] I. Kostrikov, D. Yarats, and R. Fergus. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. CoRR, abs/2004.13649, 2020.
374
+
375
+ 421 [25] A. Kuznetsov, P. Shvechikov, A. Grishin, and D. P. Vetrov. Controlling overestimation bias with truncated
376
+ 422 mixture of continuous distributional quantile critics. In ICML, volume 119, pages 5556–5566, 2020.
377
+ 423 [26] M. G. Lagoudakis and R. Parr. Least-squares policy iteration. J. Mach. Learn. Res., 4:1107–1149, 2003.
378
+ 424 [27] Q. Lan, Y. Pan, A. Fyshe, and M. White. Maxmin q-learning: Controlling the estimation bias of q-learning.
379
+ 425 In ICLR, 2020.
380
+ 426 [28] M. Laskin, K. Lee, A. Stooke, L. Pinto, P. Abbeel, and A. Srinivas. Reinforcement learning with augmented
381
+ 427 data. CoRR, abs/2004.14990, 2020.
382
+ 428 [29] K. Lee, Y. Seo, S. Lee, H. Lee, and J. Shin. Context-aware dynamics model for generalization in
383
+ 429 model-based reinforcement learning. CoRR, abs/2005.06800, 2020.
384
+ 430 [30] A. Levy, G. D. Konidaris, R. P. Jr., and K. Saenko. Learning multi-level hierarchies with hindsight. In
385
+ 431 ICLR, 2019.
386
+ 432 [31] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous
387
+ 433 control with deep reinforcement learning. In ICLR, 2015.
388
+ 434 [32] H. Liu, K. Simonyan, and Y. Yang. DARTS: differentiable architecture search. In ICLR, 2019.
389
+ 435 [33] R. Luo, F. Tian, T. Qin, E. Chen, and T. Liu. Neural architecture optimization. In NeurIPS, pages
390
+ 436 7827–7838, 2018.
391
+ 437 [34] L. V. D. Maaten and G. E. Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9:
392
+ 438 2579–2605, 2008.
393
+ 439 [35] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. A. Riedmiller,
394
+ 440 A. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran,
395
+ 441 D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature,
396
+ 442 518(7540):529–533, 2015.
397
+ 443 [36] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. P. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu.
398
+ 444 Asynchronous methods for deep reinforcement learning. In ICML, 2016.
399
+ 445 [37] O. Nachum, S. Gu, H. Lee, and S. Levine. Data-efficient hierarchical reinforcement learning. CoRR,
400
+ 446 abs/1805.08296, 2018.
401
+ 447 [38] O. Nachum, S. Gu, H. Lee, and S. Levine. Near-optimal representation learning for hierarchical reinforce
402
+ 448 ment learning. In ICLR, 2019.
403
+ 449 [39] Y. E. Nesterov and B. T. Polyak. Cubic regularization of newton method and its global performance. Math.
404
+ 450 Program., 108(1):177–205, 2006.
405
+ 451 [40] R. Novak, Y. Bahri, D. A. Abolafia, J. Pennington, and J. Sohl-Dickstein. Sensitivity and generalization in
406
+ 452 neural networks: an empirical study. In ICLR, 2018.
407
+ 453 [41] A. Oord, Y. Li, and O. Vinyals. Representation learning with contrastive predictive coding. CoRR,
408
+ 454 abs/1807.03748, 2018.
409
+ 455 [42] R. Raileanu, M. Goldstein, A. Szlam, and R. Fergus. Fast adaptation via policy-dynamics value functions.
410
+ 456 CoRR, abs/2007.02879, 2020.
411
+ 457 [43] K. Rakelly, A. Zhou, C. Finn, S. Levine, and D. Quillen. Efficient off-policy meta-reinforcement learning
412
+ 458 via probabilistic context variables. In ICML, volume 97, pages 5331–5340, 2019.
413
+ 459 [44] N. Rakicevic, A. Cully, and P. Kormushev. Policy manifold search: Exploring the manifold hypothesis for
414
+ 460 diversity-based neuroevolution. CoRR, abs/2104.13424, 2021.
415
+ 461 [45] T. Schaul, D. Horgan, K. Gregor, and D. Silver. Universal value function approximators. In ICML,
416
+ 462 volume 37, pages 1312–1320, 2015.
417
+ 463 [46] B. Scherrer, M. Ghavamzadeh, V. Gabillon, B. Lesner, and M. Geist. Approximate modified policy iteration
418
+ 464 and its application to the game of tetris. J. Mach. Learn. Res., 16:1629–1676, 2015.
419
+ 465 [47] J. S Schreck, C. W Coley, and K. JM Bishop. Learning retrosynthetic planning through simulated
420
+ 466 experience. ACS central science, 5(6):970–981, 2019.
421
+ 467 [48] J. Schulman, S. Levine, P. Abbeel, M. I. Jordan, and P. Moritz. Trust region policy optimization. In ICML,
422
+ 468 pages 1889–1897, 2015.
423
+ 469 [49] J. Schulman, P. Moritz, S. Levine, M. I. Jordan, and P. Abbeel. High-dimensional continuous control using
424
+ 470 generalized advantage estimation. In ICLR, 2016.
425
+ 471 [50] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms.
426
+ 472 CoRR, abs/1707.06347, 2017.
427
+ 473 [51] M. Schwarzer, A. Anand, R. Goel, R. D. Hjelm, A. C. Courville, and P. Bachman. Data-efficient
428
+ 474 reinforcement learning with momentum predictive representations. CoRR, abs/2007.05929, 2020.
429
+ 475 [52] D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. A. Riedmiller. Deterministic policy gradient
430
+ 476 algorithms. In ICML, pages 387–395, 2014.
431
+ 477 [53] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser,
432
+ 478 I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner,
433
+ 479 I. Sutskever, T. P. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the game
434
+ 480 of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
435
+ 481 [54] A. Srinivas, M. Laskin, and P. Abbeel. CURL: contrastive unsupervised representations for reinforcement
436
+ 482 learning. CoRR, abs/2004.04136, 2020.
437
+ 483 [55] R. S. Sutton and A. G. Barto. Reinforcement learning - an introduction. Adaptive computation and machine
438
+ 484 learning. MIT Press, 1998.
439
+ 485 [56] R. S. Sutton, J. Modayil, M. Delp, T. Degris, P. M. Pilarski, A. White, and D. Precup. Horde: a scalable
440
+ 486 real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In AAMAS,
441
+ 487 pages 761–768, 2011.
442
+ 488 [57] A. Tacchetti, H. F. Song, P. A. M. Mediano, V. Flores Zambaldi, J. Kramár, N. C. Rabinowitz, Th. Graepel,
443
+ 489 M. Botvinick, and P. W. Battaglia. Relational forward models for multi-agent learning. In ICLR, 2019.
444
+ 490 [58] E. Todorov, T. Erez, and Y. Tassa. Mujoco: A physics engine for model-based control. 2012 IEEE/RSJ
445
+ 491 International Conference on Intelligent Robots and Systems, pages 5026–5033, 2012.
446
+ 492 [59] Y. H. Tsai, Y. Wu, R. Salakhutdinov, and L. Morency. Demystifying self-supervised learning: An
447
+ 493 information-theoretical framework. CoRR, abs/2006.05576, 2020.
448
+ 494 [60] T. Unterthiner, D. Keysers, S. Gelly, O. Bousquet, and I. O. Tolstikhin. Predicting neural network accuracy
449
+ 495 from weights. CoRR, abs/2002.11448, 2020.
450
+ 496 [61] H. v. Hasselt. Double q-learning. In J. D. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R. S. Zemel, and
451
+ 497 A. Culotta, editors, NeurIPS, pages 2613–2621, 2010.
452
+ 498 [62] O. Vinyals, I. Babuschkin, W. M. Czarnecki, M. Mathieu, A. Dudzik, J. Chung, D. H. Choi, R. Powell,
453
+ 499 T. Ewalds, P. Georgiev, J. Oh, D. Horgan, M. Kroiss, I. Danihelka, A. Huang, L. Sifre, T. Cai, J. P. Agapiou,
454
+ 500 M. Jaderberg, A. S. Vezhnevets, R. Leblond, T. Pohlen, V. Dalibard, D. Budden, Y. Sulsky, J. Molloy,
455
+ 501 T. L. Paine, C. Gulcehre, Z. Wang, T. Pfaff, Y. Wu, R. Ring, D. Yogatama, D. Wünsch, K. McKinney,
456
+ 502 O. Smith, T. Schaul, T. Lillicrap, K. Kavukcuoglu, D. Hassabis, C. Apps, and D. Silver. Grandmaster level
457
+ 503 in starcraft ii using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019.
458
+ 504 [63] H. Wang, N. S. Keskar, C. Xiong, and R. Socher. Identifying generalization properties in neural networks.
459
+ 505 CoRR, abs/1809.07402, 2018.
460
+ 506 [64] R. Wang, R. Yu, B. An, and Z. Rabinovich. I2hrl: Interactive influence-based hierarchical reinforcement
461
+ 507 learning. In IJCAI, pages 3131–3138, 2020.
462
+ 508 [65] J. You, B. Liu, Z. Ying, V. S. Pande, and J. Leskovec. Graph convolutional policy network for goal-directed
463
+ 509 molecular graph generation. In NeurIPS 2018, pages 6412–6422, 2018.
464
+
465
+ 1. For all authors...
466
+
467
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
468
+ (b) Did you describe the limitations of your work? [Yes] See the future work in Sec. 6.
469
+ (c) Did you discuss any potential negative societal impacts of your work? [No] Our work is on general Reinforcement Learning study. No specific practical application is considered.
470
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
471
+
472
+ 2. If you are including theoretical results...
473
+
474
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes]
475
+
476
+ 3. If you ran experiments...
477
+
478
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] Our experimental environment are public and standard. All the information needed to reproduce our results is provided in the main body and appendix. Code will be available publicly soon.
479
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Partially in main body and all details can be found in the appendix document.
480
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
481
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes]
482
+
483
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
484
+
485
+ (a) If your work uses existing assets, did you cite the creators? [Yes]
486
+ (b) Did you mention the license of the assets? [Yes] We use a free education licence for students for MuJoCo.
487
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No]
488
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
489
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
490
+
491
+ 5. If you used crowdsourcing or conducted research with human subjects...
492
+
493
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
494
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
495
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/Dx3x05MlFwj/Dx3x05MlFwj_content_list.json ADDED
@@ -0,0 +1,1081 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Represent Your Own Policies: Learning with Policy-extended Value Function Approximator ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 218,
8
+ 122,
9
+ 779,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 226,
20
+ 578,
21
+ 281
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 318,
32
+ 535,
33
+ 334
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "1 We study Policy-extended Value Function Approximator (PeVFA) in Reinforce \n2 ment Learning (RL), which extends conventional value function approximator \n3 (VFA) to take as input not only the state (and action) but also an explicit policy \n4 representation. Such an extension enables $\\mathrm { P e V F A }$ to preserve values of multi \n5 ple policies at the same time and brings an appealing characteristic, i.e., value \n6 generalization among policies. We formally analyze the value generalization un \n7 der Generalized Policy Iteration (GPI). From theoretical and empirical lens, we \n8 show that generalized value estimates offered by PeVFA may have lower initial \n9 approximation error to true values of successive policies, which is expected to \n10 improve consecutive value approximation during GPI. Based on above clues, we \n11 introduce a new form of GPI with PeVFA which leverages the value generalization \n12 along policy improvement path. Moreover, we propose a representation learning \n13 framework for RL policy, providing several approaches to learn effective policy em \n14 beddings from policy network parameters or state-action pairs. In our experiments, \n15 we evaluate the efficacy of value generalization offered by PeVFA and policy \n16 representation learning in several OpenAI Gym continuous control tasks. For a \n17 representative instance of algorithm implementation, Proximal Policy Optimization \n18 (PPO) re-implemented under the paradigm of GPI with PeVFA achieves about $40 \\%$ \n19 performance improvement on its vanilla counterpart in most environments. ",
40
+ "bbox": [
41
+ 148,
42
+ 349,
43
+ 766,
44
+ 612
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "20 1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 147,
54
+ 640,
55
+ 310,
56
+ 656
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "21 Reinforcement Learning (RL) has been widely considered as a promising way to learn optimal \n22 policies in many decision-making problems [35, 31, 53, 65, 47, 62, 16]. One fundamental element of \n23 RL is value function which defines the long-term evaluation of a policy. With function approximation \n24 (e.g., deep neural networks), a value function approximator (VFA) is able to approximate the values \n25 of a policy under large and continuous state spaces. As commonly recognized, most RL algorithms \n26 can be described as Generalized Policy Iteration (GPI) [55]. As illustrated on the left of Figure 1, \n27 at each iteration the VFA is trained to approximate the true values of current policy (i.e., policy \n28 evaluation), regarding which the policy is further improved (i.e., policy improvement). The value \n29 function approximation error hinders the effectiveness of policy improvement and then the overall \n30 optimality of GPI [5, 46]. Unfortunately, such errors are inevitable under function approximation. A \n31 large number of samples are usually required to ensure high-quality value estimates, resulting in the \n32 sample-inefficiency of deep RL algorithms. Therefore, this raises an urgent need for more efficient \n33 value approximation methods [61, 4, 12, 25]. \n34 An intuitive idea to improve the efficiency value approximation is to leverage the knowledge on \n35 the values of previous encountered policies. However, a conventional VFA usually approximates \n36 the values of one policy and values learned from old policies are over-written gradually during \n37 the learning process. This means that the previously learned knowledge cannot be preserved and \n38 utilized with one conventional VFA. Thus, such limitations prevent the potentials to leverage the \n39 previous knowledge for future learning. In this paper, we study Policy-extended Value Function \n40 Approximator (PeVFA), which additionally takes an explicit policy representation as input in contrast \n41 to conventional VFA. Thanks to the policy representation input, PeVFA is able to approximate values \n42 for multiple policies and induces value generalization among policies. We formally analyze the \n43 generalization of approximate values among policies in a general form. From both theoretical and \n44 empirical lens, we show that the generalized value estimates can be closer to the true values of \n45 the successive policy, which can be beneficial to consecutive value approximation along the policy \n46 improvement path, called local generalization. Based on above clues, we introduce a new form \n47 of GPI with PeVFA (the right of Figure 1) that leverages the local generalization to improve the \n48 efficiency of consecutive value approximation along the policy improvement path. \n49 One key point of GPI with PeVFA is the representation of policy since it determines how PeVFA gen \n50 eralizes the values. For this, we propose a framework to learn effective low-dimensional embedding \n51 of RL policy. We use network parameters or state-action pairs as policy data and encode them into \n52 low-dimensional embeddings; then the embeddings are trained to capture the effective information \n53 through contrastive learning and policy recovery. Finally, we evaluate the efficacy of GPI with PeVFA \n54 and our policy representations. In principle, GPI with PeVFA is general and can be implemented \n55 in different ways. As a practical instance, we re-implement Proximal Policy Optimization (PPO) \n56 with PeVFA and propose PPO-PeVFA algorithm. Our experimental results on several OpenAI Gym \n57 continuous control tasks demonstrate the effectiveness of both value generalization offered by PeVFA \n58 and learned policy representations, with an about $40 \\%$ improvement in average returns achieved by \n59 our best variants on standard PPO in most tasks. \n60 We summarize our main contributions below. 1) We study the value generalization among policies \n61 induced by PeVFA. From both theoretical and empirical aspects, we shed the light on the situations \n62 where the generalization can be beneficial to the learning along policy improvement path. 2) We \n63 propose a framework for policy representation learning. To our knowledge, we make the first attempt \n64 to learn a low-dimensional embedding of over $1 0 \\mathrm { k }$ network parameters for an RL policy. 3) We \n65 introduce GPI with PeVFA that leverages the value generalization in a general form. Our experimental \n66 results demonstrate the potential of PeVFA in deriving practical and more effective RL algorithms. ",
63
+ "bbox": [
64
+ 145,
65
+ 671,
66
+ 825,
67
+ 852
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "",
74
+ "bbox": [
75
+ 148,
76
+ 858,
77
+ 823,
78
+ 900
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/38feb809737473fb7948d8361bed05d65eceb8e03420789b9e49c35c2b8d2206.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Generalized Policy Iteration (GPI) with function approximation. Left: GPI with conventional value function approximator $V _ { \\phi }$ . Right: GPI with PeVFA $\\mathbb { V } _ { \\theta } ( \\chi _ { \\pi } )$ (Sec. 3) where extra generalization steps exist. The subscripts of policy $\\pi$ and value function parameters $\\phi , \\theta$ denote the iteration number. The squiggle lines represent non-perfect approximation of true values. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 228,
91
+ 0,
92
+ 766,
93
+ 195
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "",
100
+ "bbox": [
101
+ 145,
102
+ 291,
103
+ 825,
104
+ 458
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 145,
113
+ 464,
114
+ 825,
115
+ 616
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 147,
124
+ 622,
125
+ 825,
126
+ 720
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "67 2 Related Work ",
133
+ "text_level": 1,
134
+ "bbox": [
135
+ 148,
136
+ 741,
137
+ 320,
138
+ 757
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "68 Extensions of Conventional Value Function. Sutton et al. [56] propose General Value Functions \n69 (GVFs) as a general form of knowledge representation of rewards and arbitrary cumulants. Later, \n70 conventional value functions are extended to take extra inputs for different purposes of generalization. \n71 One notable work is Universal Value Function Approximator (UVFA) [45], which is proposed to \n72 generalize values among different goals for goal-conditioned RL. UVFA is further developed in \n73 [1, 37, 9] and influences the occurrence of other value function extensions in context-based Meta-RL \n74 [43, 29], Hierarchical RL [64] and multiagent RL [19, 14] and etc. Most of the above works study \n75 how to generalize the policy or value function among extrinsic factors, i.e., environments, tasks and \n76 opponents; while we mainly study the value generalization among policies along policy improvement \n77 path, an intrinsic learning process of the agent itself. \n78 Policy Embedding and Representation. Although not well studied, representation (or embedding) \n79 learning for RL policies is involved in a few works [18, 14, 3]. The most common way to learn a \n80 policy representation is to extract from interaction experiences. As a representative, Grover et al. [14] \n81 propose learning the representation of opponent policy from interaction trajectories with a generative \n82 policy recovery loss and a discriminative triplet loss. These losses are later adopted in [64, 42]. \n83 Another straightforward idea is to represent policy parameters. Network Fingerprint [17] is such a \n84 differentiable representation that uses the concatenation of the vectors of action distribution outputted \n85 by policy network on a set of probing states. The probing state set is co-optimized along with the \n86 primary learning objective, which can be non-trivial especially when the dimensionality of the set is \n87 high. Besides, some early attempts in learning low-dimensional embedding of policy parameters are \n88 studies in Evolutionary Algorithms [13, 44], mainly with the help of VAE [23]. Our work introduce a \n89 learning framework of policy representation including both above two perspectives. \n90 PVN and PVFs. Recently, several works study the generalization among policy space. Harb et al. \n91 [17] propose Policy Evaluation Network (PVN) to directly approximate the distribution of policy \n92 $\\pi$ ’s objective function $J ( \\pi ) = \\mathbb { E } _ { \\rho _ { 0 } } [ v ^ { \\pi } ( s _ { 0 } ) ]$ with initial state $s _ { 0 } \\sim \\rho _ { 0 }$ . PVN takes as input Network \n93 Fingerprint (mentioned above) of policy network. After training on a pre-collected set of policies, a \n94 random initialized policy can be optimized in a zero-shot manner with the policy gradients of PVN by \n95 backpropagting through the differentiable policy input. We call such gradients GTPI for short below. \n96 Similar ideas are later integrated with task-specific context learning in multi-task RL [42], leveraging \n97 the generalization among policies and tasks for fast policy adaptation on new tasks. In PVN [17], \n98 as an early attempt, the generalization among policies is studied with small policy network and \n99 simple tasks; besides, the most regular online learning setting is not studied. Concurrent to our work, \n100 Faccio and Schmidhuber [10] propose a class of Parameter-based Value Functions (PVFs) that take \n101 vectorized policy parameters as inputs. Based on PVFs, new policy gradient algorithms are introduced \n102 in the form of a combination of conventional policy gradients and GTPI (i.e., by backpropagating \n103 through policy parameters in PVFs). Except for zero-shot policy optimization as conducted in PVN, \n104 PVFs are also evaluated for online policy learning. Due to directly taking parameters as input, PVFs \n105 suffer from the curse of dimensionality when the number of parameters is high. Besides, GTPI can \n106 be non-trivial to rein since policy parameter space are complex and extrapolation generalization \n107 error can be large when the value function is only trained on finite policies (usually much fewer than \n108 state-action samples) thus further resulting in erroneous policy gradients. \n109 Our work differs with PVFs from several aspects. First, we make use of learned policy representation \n110 rather than policy network parameters. Second, we do not resort to GTPI for the policy update \n111 in our algorithms but focus on utilizing value generalization for more efficient value estimation in \n112 GPI. Furthermore, we shed the light on two important problems — how value generalization among \n113 policies can happen formally and whether it is beneficial to learning or not — which are neglected in \n114 in previous works from both theoretical and empirical lens. ",
145
+ "bbox": [
146
+ 147,
147
+ 772,
148
+ 825,
149
+ 911
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "",
156
+ "bbox": [
157
+ 145,
158
+ 92,
159
+ 825,
160
+ 257
161
+ ],
162
+ "page_idx": 2
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "",
167
+ "bbox": [
168
+ 143,
169
+ 262,
170
+ 826,
171
+ 526
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "",
178
+ "bbox": [
179
+ 142,
180
+ 532,
181
+ 825,
182
+ 616
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "115 3 Policy-extended Value Function Approximator ",
189
+ "text_level": 1,
190
+ "bbox": [
191
+ 143,
192
+ 633,
193
+ 593,
194
+ 652
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "116 In this section, we propose Policy-extended Value Function Approximator (PeVFA), an extension \n117 of conventional VFA that explicitly takes as input a policy representation. First, we introduce the \n118 formulation (Sec. 3.1), then we study value generalization among policies theoretically (Sec. 3.2) \n119 along with some empirical evidences (Sec. 3.3). Finally, we derive a new form of GPI (Sec. 3.4). ",
201
+ "bbox": [
202
+ 142,
203
+ 666,
204
+ 825,
205
+ 722
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "3.1 Formulation ",
212
+ "text_level": 1,
213
+ "bbox": [
214
+ 166,
215
+ 738,
216
+ 299,
217
+ 753
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "121 Consider a Markov Decision Process (MDP) defined as $\\langle S , \\mathcal { A } , r , \\mathcal { P } , \\gamma \\rangle$ where $s$ is the state space, $\\mathcal { A }$ \n122 is the action space, $r$ is the (bounded) reward function, $\\mathcal { P }$ is the transition function and $\\gamma \\in [ 0 , 1 )$ is \n123 the discount factor. A policy $\\pi \\in P ( { \\cal A } ) ^ { | S | }$ defines the distribution over all actions for each state. The \n124 goal of an RL agent is to find an optimal policy $\\pi ^ { * }$ that maximizes the expected long-term discounted \n125 126 return. The state-vafollowing the policy $\\pi$ e function from a st $v ^ { \\pi } ( s )$ $s$ $\\begin{array} { r } { v ^ { \\pi } ( s ) = \\mathbb { E } _ { \\pi } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\bar { \\gamma } ^ { t } r _ { t + 1 } \\vert s _ { 0 } = s \\right] } \\end{array}$ ted return for where $r _ { t + 1 } = r ( s _ { t } , a _ { t } )$ \n127 to denote the vectorized form of value function. \n128 In a general form, we define policy-extended value function $\\mathbb { V } : \\mathcal { S } \\times \\Pi \\mathbb { R }$ over state and policy \n129 space: $\\mathbb { V } ( s , \\pi ) = v ^ { \\pi } ( s )$ for all $s \\in { \\mathcal { S } }$ and $\\pi \\in \\Pi$ . In this paper, we focus on $\\mathbb { V } ( s , \\pi )$ and policy \n130 extended action-value function $\\mathbb { Q } ( s , a , \\pi )$ can be obtained similarly. We use $\\mathbb { V } ( \\pi )$ to denote the value \n131 vector for all states in the following. The key point is that PeVFA $\\mathbb { V }$ is able to preserve the values of \n132 multiple policies. With function approximation, a $\\mathrm { P e V F A }$ is expected to approximate the values of \n133 policies among policy space, i.e., $\\bar { \\{ V ^ { \\pi } \\} } _ { \\pi \\in \\Pi }$ and then enable value generalization among policies. \n134 Formally, given a function $g : \\Pi \\mathcal { X } \\subseteq \\mathbb { R } ^ { n }$ that maps any policy $\\pi$ to an $n$ -dimensional represen \n135 tation $\\chi _ { \\pi } \\bar { = } g ( \\pi ) \\in \\mathcal X$ , a PeVFA $\\mathbb { V } _ { \\theta }$ with parameter $\\theta \\in \\Theta$ is to minimize the approximation error \n136 over all possible states and policies generally: ",
224
+ "bbox": [
225
+ 145,
226
+ 763,
227
+ 825,
228
+ 863
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "",
235
+ "bbox": [
236
+ 142,
237
+ 869,
238
+ 825,
239
+ 911
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "image",
245
+ "img_path": "images/433544a995e880196676e7310d94036d703d7b2b79a7871aedbf041ab7690f07.jpg",
246
+ "image_caption": [
247
+ "Figure 2: Illustrations of value generalization among policies of $\\mathrm { P e V F A }$ . Each circle denotes value function (estimate) of a policy. (a) Global Generalization: values learned from known policies can be generalized to unknown policies. (b) Local Generalization: values of previous policies (e.g., $\\pi _ { t }$ ) can be generalized to successive policies (e.g., $\\pi _ { t + 1 }$ ) along policy improvement path. "
248
+ ],
249
+ "image_footnote": [],
250
+ "bbox": [
251
+ 200,
252
+ 94,
253
+ 799,
254
+ 242
255
+ ],
256
+ "page_idx": 3
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "",
261
+ "bbox": [
262
+ 145,
263
+ 321,
264
+ 826,
265
+ 366
266
+ ],
267
+ "page_idx": 3
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "",
272
+ "bbox": [
273
+ 142,
274
+ 371,
275
+ 825,
276
+ 412
277
+ ],
278
+ "page_idx": 3
279
+ },
280
+ {
281
+ "type": "equation",
282
+ "img_path": "images/cdf33cc55636dd3817be4c6e607a13d303010054d5d54d2c8ed2a0f07615f511.jpg",
283
+ "text": "$$\nF _ { \\mu , p , \\rho } ( \\theta , g , \\Pi ) = \\sum _ { \\pi \\in \\Pi } \\mu ( \\pi ) \\| \\mathbb { V } _ { \\theta } ( \\chi _ { \\pi } ) - V ^ { \\pi } \\| _ { p , \\rho } ,\n$$",
284
+ "text_format": "latex",
285
+ "bbox": [
286
+ 338,
287
+ 415,
288
+ 656,
289
+ 449
290
+ ],
291
+ "page_idx": 3
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "137 where $\\mu , \\rho$ are distributions over policies and states respectively, $\\begin{array} { r } { \\| f \\| _ { p , \\rho } = ( \\int _ { s } \\rho ( \\mathrm { d } s ) | f ( s ) | ^ { p } ) ^ { 1 / p } } \\end{array}$ is \n138 $\\rho$ -weighted $L _ { p }$ -norm [26, 46] for any $f : S \\mathbb { R }$ . The policy distribution $\\mu$ of interest depends on \n139 the scenario where value generalization is considered. As illustrated in Figure 2, we provide two \n140 value generalization scenarios. In the global generalization scenario, a uniform distribution over \n141 known policy set may be considered with a general purpose of value generalization for unknown \n142 policies. For the specific local generalization scenario along policy improvement path during GPI, a \n143 sophisticated distribution that adaptively weights recent policies more during the learning process \n144 may be more suitable in this case. In the following, we care more about the local generalization \n145 scenario and use uniform state distribution $\\rho$ and $L _ { 2 }$ -norm for demonstration. The subscripts are \n146 omitted and we use $\\| \\cdot \\|$ for clarity. ",
296
+ "bbox": [
297
+ 140,
298
+ 453,
299
+ 825,
300
+ 593
301
+ ],
302
+ "page_idx": 3
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "3.2 Theoretical Analysis on Value Generalization among Policies ",
307
+ "text_level": 1,
308
+ "bbox": [
309
+ 160,
310
+ 607,
311
+ 633,
312
+ 622
313
+ ],
314
+ "page_idx": 3
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "148 In this part, we theoretically analyze the value generalization among policies induced by PeVFA. We \n149 start from a two-policy case and study whether the value approximation learned for one policy can be \n150 generalized to the other one. Later, we study the local generalization scenario (Figure $2 ( \\mathbf { b } ) ,$ ) and shed \n151 the light on the superiority of $\\mathrm { P e V F A }$ for GPI. All the proofs are provided in Appendix A. \n152 For the convenience of demonstration, we use an identical policy representation function, i.e., $\\chi _ { \\pi } = \\pi$ , \n153 and define the approximation loss of PeVFA $\\mathbb { V } _ { \\theta }$ for any policy $\\pi \\in \\Pi$ as $f _ { \\theta } ( \\pi ) = \\| \\mathbb { V } _ { \\theta } ( \\pi ) - V ^ { \\bar { \\pi } } \\| \\ge 0$ . \n154 We use the following definitions for a formal description of value approximation process with PeVFA \n155 and local property of loss function $f _ { \\theta }$ that influences generalization [40, 63] respectively: \n156 Definition 1 ( $\\pi$ -Value Approximation) We define a value approximation process $\\mathcal { P } _ { \\pi } : \\Theta \\to \\Theta$ \n157 with PeVFA as a $\\gamma$ -contraction mapping on the approximation loss for policy $\\pi$ , i.e., for $\\hat { \\theta } = \\mathcal { P } _ { \\pi } ( \\theta )$ , \n158 we have $f _ { \\hat { \\theta } } ( \\pi ) \\leq \\gamma f _ { \\theta } ( \\pi )$ where $\\gamma \\in [ 0 , 1 )$ . ",
319
+ "bbox": [
320
+ 142,
321
+ 632,
322
+ 825,
323
+ 689
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "",
330
+ "bbox": [
331
+ 142,
332
+ 694,
333
+ 826,
334
+ 751
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "",
341
+ "bbox": [
342
+ 145,
343
+ 758,
344
+ 826,
345
+ 805
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Definition 2 ( $L$ -Continuity) We call $f _ { \\theta }$ is $L$ -continuous at policy $\\pi$ if fθ is Lipschitz continuous at π with a constant $L \\in [ 0 , \\infty )$ , i.e., $| f _ { \\theta } ( { \\boldsymbol \\pi } ) - f _ { \\theta } ( { \\boldsymbol \\pi } ^ { \\prime } ) | \\leq L \\cdot d ( { \\boldsymbol \\pi } , { \\boldsymbol \\pi } ^ { \\prime } )$ for $\\pi ^ { \\prime } \\in \\Pi$ with some distance metric d for policy space $\\Pi$ . ",
352
+ "bbox": [
353
+ 171,
354
+ 810,
355
+ 825,
356
+ 853
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "162 With Definition 1, the consecutive value approximation for the policies along policy improvement path \n163 during GPI can be described as: $\\theta _ { - 1 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 0 } } } \\theta _ { 0 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 1 } } } \\theta _ { 1 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 2 } } } \\dots ,$ , as the green arrows illustrated in \n164 Figure 1. One may refer to Appendix A.1 for a discussion on the rationality of the two definitions. \n65 To start our analysis, we first study the generalized value approximation loss in a two-policy case \n166 where only the value of policy $\\pi _ { 1 }$ is approximated by PeVFA as below: ",
363
+ "bbox": [
364
+ 145,
365
+ 862,
366
+ 825,
367
+ 912
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "",
374
+ "bbox": [
375
+ 150,
376
+ 90,
377
+ 825,
378
+ 119
379
+ ],
380
+ "page_idx": 4
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "Lemma 1 For 67 $\\theta \\xrightarrow { \\mathcal { P } _ { \\pi _ { 1 } } } \\hat { \\theta } .$ , if $f _ { \\hat { \\theta } }$ is $\\hat { L }$ -continuous at $\\pi _ { 1 }$ and $f _ { \\theta } ( \\pi _ { 1 } ) \\le f _ { \\theta } ( \\pi _ { 2 } )$ , we have: $f _ { \\hat { \\theta } } ( \\pi _ { 2 } ) \\leq$ 68 $\\gamma f _ { \\theta } ( \\pi _ { 2 } ) + \\mathcal { M } ( \\pi _ { 1 } , \\pi _ { 2 } , \\hat { L } )$ , where $\\mathcal { M } ( \\pi _ { 1 } , \\pi _ { 2 } , \\hat { L } ) = \\hat { L } \\cdot d ( \\pi _ { 1 } , \\pi _ { 2 } )$ . ",
385
+ "bbox": [
386
+ 158,
387
+ 125,
388
+ 825,
389
+ 164
390
+ ],
391
+ "page_idx": 4
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "Corollary 1 Pπ1 is γg-contraction (γg ∈ [0, 1)) for π2 when fθ(π2) > Lˆ·d(π1,π2)1−γ169 . ",
396
+ "bbox": [
397
+ 153,
398
+ 169,
399
+ 718,
400
+ 189
401
+ ],
402
+ "page_idx": 4
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "170 Lemma 1 shows that the post- $\\mathcal { P } _ { \\pi _ { 1 } }$ approximation loss for $\\pi _ { 2 }$ is upper bounded by a generalized \n171 contraction of prior loss plus a locality margin term $\\mathcal { M }$ which is related to $\\pi _ { 1 } , \\pi _ { 2 }$ and the locality \n172 property of $f _ { \\hat { \\theta } }$ . In general, the form of $\\mathcal { M }$ depends on the local property assumed. Some higher \n173 order variants are provided in Appendix A.2. For a step further, Corollary 1 reveals the condition \n174 where a contraction on value approximation loss for $\\pi _ { 2 }$ is achieved when $\\mathrm { P e V F A }$ is only trained to \n175 approximate the values of $\\pi _ { 1 }$ . Concretely, such a condition is apt to reach with tighter contraction for \n176 policy $\\pi _ { 1 }$ is, closer two policies, or smoother approximation loss function $f _ { \\hat { \\theta } }$ . \n177 Then we consider the local generalization scenario as illustrated in Figure 2(b). For any iteration $t$ \n178 of GPI, the values of current policy $\\pi _ { t }$ are approximated by $\\mathrm { P e V F A }$ , followed by a improved policy \n179 $\\pi _ { t + 1 }$ whose values are to be approximated in the next iteration. The value generalization from each \n180 $\\pi _ { t }$ and $\\pi _ { t + 1 }$ can be similarly considered as the two-policy case. In addition to the former results, we \n181 shed the light on the value generalization loss of PeVFA along policy improvement path below: ",
407
+ "bbox": [
408
+ 140,
409
+ 193,
410
+ 825,
411
+ 291
412
+ ],
413
+ "page_idx": 4
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "",
418
+ "bbox": [
419
+ 142,
420
+ 296,
421
+ 825,
422
+ 367
423
+ ],
424
+ "page_idx": 4
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "Lemma 2 For $\\theta _ { - 1 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 0 } } } \\theta _ { 0 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 1 } } } \\theta _ { 1 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 2 } } } . . .$ Pπ2 −−−→ . . . with γt for each Pπt , if fθt is Lˆ t-continuous at πt for any $t \\geq 0$ , we have $f _ { \\theta _ { t } } ( \\pi _ { t + 1 } ) \\leq \\gamma _ { t } f _ { \\theta _ { t - 1 } } ( \\pi _ { t } ) + \\mathcal { M } _ { t }$ , where $\\mathcal { M } _ { t } = L _ { t } \\cdot d ( \\pi _ { t } , \\pi _ { t + 1 } )$ . ",
429
+ "bbox": [
430
+ 163,
431
+ 371,
432
+ 821,
433
+ 406
434
+ ],
435
+ "page_idx": 4
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "Corollary 2 By induction, we have 84 $\\begin{array} { r } { f _ { \\theta _ { t } } ( \\pi _ { t + 1 } ) \\leq \\prod _ { i = 0 } ^ { t } \\gamma _ { t } f _ { \\theta _ { - 1 } } ( \\pi _ { 0 } ) + \\sum _ { i = 0 } ^ { t - 1 } \\prod _ { j = i + 1 } ^ { t } \\gamma _ { j } \\mathcal M _ { i } + \\mathcal M _ { t } . } \\end{array}$ ",
440
+ "bbox": [
441
+ 156,
442
+ 412,
443
+ 818,
444
+ 433
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "185 The above results indicate that the value generalization loss can be recursively bounded and has \n186 a upper bound formed by a repeated contraction on initial loss plus the accumulation of locality \n187 margins induced from each local generalization. An infinity-case discussion for Corollary 2 is in \n188 Appendix A.5. The next question is whether $\\mathrm { P e V F A }$ with value generalization among policies is \n189 preferable to the conventional VFA. To this end, we introduce a desirable condition which reveals the \n190 superiority of PeVFA during consecutive value approximation along the policy improvement path: ",
451
+ "bbox": [
452
+ 140,
453
+ 439,
454
+ 825,
455
+ 523
456
+ ],
457
+ "page_idx": 4
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "Theorem 1 During91 $\\begin{array} { r l } & { \\theta _ { - 1 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 0 } } } \\theta _ { 0 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 1 } } } \\theta _ { 1 } \\xrightarrow { \\mathcal { P } _ { \\pi _ { 2 } } } \\dots , f o r a n y t \\ge 0 , \\ i f f _ { \\theta _ { t } } ( \\pi _ { t } ) + f _ { \\theta _ { t } } ( \\pi _ { t + 1 } ) \\le } \\\\ & { n f _ { \\theta _ { t } } ( \\pi _ { t + 1 } ) \\le \\| \\mathbb { V } _ { \\theta _ { t } } ( \\pi _ { t } ) - V ^ { \\pi _ { t + 1 } } \\| . } \\end{array}$ 92 $\\| V ^ { \\pi _ { t } } - V ^ { \\pi _ { t + 1 } } \\|$ , the ",
462
+ "bbox": [
463
+ 156,
464
+ 532,
465
+ 825,
466
+ 570
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "193 Theorem 1 shows that the generalized value estimates $\\mathbb { V } _ { \\boldsymbol { \\theta } _ { t } } \\big ( \\pi _ { t + 1 } \\big )$ can be closer to the true values of \n194 policy $\\pi _ { t + 1 }$ than $\\mathbb { V } _ { \\theta _ { t } } ( \\pi _ { t } )$ . Note that $\\mathbb { V } _ { \\theta _ { t } } ( \\pi _ { t } )$ is the value approximation for $\\pi _ { t }$ which is equivalent \n195 to the counterpart $V _ { \\phi _ { t } }$ for a conventional VFA as value generalization among policies does not \n196 exist. To consecutive value approximation along policy improvement path, this means that the value \n197 generalization of $\\mathrm { P e V F A }$ has the potential to offer closer start points at each iteration. If such closer \n198 start points can often exist, we expect $\\mathrm { P e V F A }$ to be preferable to conventional VFA since value \n199 approximation can be more efficient with $\\mathrm { P e V F A }$ and it in turn facilitates the overall GPI process. \n200 However, the condition in Theorem 1 is not necessarily met in practice. Intuitively, it depends on the \n201 locality margins that may be related to function family and optimization method of PeVFA, as well \n202 as the scale of policy improvement. We leave these further theoretical investigations for future work. \n203 Instead, we empirically examine the existence of such desirable generalizations in the following. ",
473
+ "bbox": [
474
+ 140,
475
+ 578,
476
+ 825,
477
+ 676
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "",
484
+ "bbox": [
485
+ 142,
486
+ 683,
487
+ 825,
488
+ 738
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "3.3 Empirical Evidences ",
495
+ "text_level": 1,
496
+ "bbox": [
497
+ 173,
498
+ 753,
499
+ 356,
500
+ 768
501
+ ],
502
+ "page_idx": 4
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "We empirically investigate the value generalization of PeVFA with didactic environments. In this section, PeVFA $\\mathbb { V } _ { \\theta }$ is parameterized by neural network and we use the concatenation of all weights and biases of the policy network as a straightforward representation $\\chi _ { \\pi }$ for each policy, called Raw Policy Representation $( R P R )$ . Experimental details are provided in Appendix B. ",
507
+ "bbox": [
508
+ 165,
509
+ 779,
510
+ 825,
511
+ 835
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "209 First, we demonstrate the global generalization (illustrated in Figure 2(a)) in a continuous 2D Point \n210 Walker environment. We build the policy set $\\Pi$ with synthetic policies, each of which is a randomly \n211 initialized 2-layer tanh-activated neural network with 2 units for each layer. The size of $\\Pi$ is $2 0 \\mathrm { k }$ and \n212 the behavioral diversity of synthetic policies is verified (see Figure 7(b) in Appendix). We divide $\\Pi$ \n213 into training set (i.e., known policies $\\Pi _ { 0 }$ ) and testing set (i.e., unseen policies $\\Pi _ { 1 }$ ). We rollout the ",
518
+ "bbox": [
519
+ 140,
520
+ 842,
521
+ 823,
522
+ 911
523
+ ],
524
+ "page_idx": 4
525
+ },
526
+ {
527
+ "type": "image",
528
+ "img_path": "images/ca62a1096edd30ab0ac3480db0f68aa5589accbab003cbc10927be11f5143231.jpg",
529
+ "image_caption": [
530
+ "Figure 3: Empirical evidences of two kinds of generalization of $\\mathrm { P e V F A }$ . (a) Global generalization: $\\mathrm { P e V F A }$ shows comparable value estimation performance on testing policy set (red) after learning on training policy set (blue). (b) Local generalization: PeVFA $( \\mathbb { V } _ { \\theta } ( \\chi _ { \\pi } ) )$ shows lower losses than conventional VFA $( V _ { \\phi } )$ before and after the value approximation training for successive policies along policy improvement path. In (b), the left axis is for approximation loss (lower is better) and the right axis is for average return as a reference of the policy learning process (green curve). "
531
+ ],
532
+ "image_footnote": [],
533
+ "bbox": [
534
+ 200,
535
+ 94,
536
+ 789,
537
+ 228
538
+ ],
539
+ "page_idx": 5
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "policies in the environment to collect trajectories, based on which we perform value approximation training. Our results show that a PeVFA trained on $\\Pi _ { 0 }$ achieves reasonable generalization performance when evaluating on $\\Pi _ { 1 }$ . The average losses on training and testing set are 1.782 and 2.071 over 6 trials. Figure 3(a) shows the value predictions for policies from training and testing set (100 for each). ",
544
+ "bbox": [
545
+ 142,
546
+ 337,
547
+ 825,
548
+ 392
549
+ ],
550
+ "page_idx": 5
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "Next, we investigate the value generalization along policy improvement path, i.e., local generalization as in Figure 2(b). We use a 2-layer 8-unit policy network trained by standard PPO algorithm [50] in MuJoCo continuous control tasks. Parallel to the conventional value network $V _ { \\phi } ( s )$ (i.e., VFA) in PPO, we set a $\\mathrm { P e V F A }$ network $\\mathbb { V } _ { \\theta } ( s , \\chi _ { \\pi } )$ as a reference for the comparison on value approximation loss. Compared to $V _ { \\phi }$ , PeVFA $\\mathbb { V } _ { \\theta } ( s , \\chi _ { \\pi } )$ takes RPR as input and approximates the values of all historical policies $( \\{ \\pi _ { i } \\} _ { i = 0 } ^ { t } )$ in addition. We compare the value approximation losses of $V _ { \\phi }$ (red) and $\\mathbb { V } _ { \\theta }$ (blue) before (solid) and after (dashed) updating with on-policy samples collected by the improved policy $\\pi _ { t + 1 }$ at each iteration. Figure 3(b) shows the results for InvertedPendulum-v1 and Ant-v1. Results for all 7 MuJoCo tasks can be found in Appendix B.2. By comparing approximation losses before updating (red and blue solid curves), we can observe that the approximation loss of $\\mathbb { V } _ { \\theta _ { t } } ( \\chi _ { \\pi _ { t + 1 } } )$ is almost consistently lower than that of $V _ { \\phi _ { t } }$ . This means that the generalized value estimates offered by PeVFA are usually closer to the true values of $\\pi _ { t + 1 }$ , demonstrating the consequence arrived in Theorem 1. For the dashed curves, it shows that PeVFA $\\mathbb { V } _ { \\theta _ { t + 1 } } ( \\chi _ { \\pi _ { t + 1 } } )$ can achieve lower approximation loss for $\\pi _ { t + 1 }$ than conventional VFA $V _ { \\phi _ { t + 1 } }$ after the same number of training with the same on-policy samples. The empirical evidence above indicates that $\\mathrm { P e V F A }$ can be preferable to the conventional VFA for consecutive value approximation. The generalized value estimates along policy improvement path have the potential to expedite the process of GPI. ",
555
+ "bbox": [
556
+ 166,
557
+ 398,
558
+ 825,
559
+ 633
560
+ ],
561
+ "page_idx": 5
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "3.4 Reinforcement Learning with PeVFA ",
566
+ "text_level": 1,
567
+ "bbox": [
568
+ 163,
569
+ 642,
570
+ 472,
571
+ 657
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "Based on the results above, we expect to leverage the value generalization of $\\mathrm { P e V F A }$ to facilitate RL. In Algorithm 1, we propose a general description of RL algorithm under the paradigm of GPI with PeVFA. For each iteration, the interaction experiences of current policy and the policy ",
578
+ "bbox": [
579
+ 166,
580
+ 667,
581
+ 825,
582
+ 709
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "Algorithm 1 RL under the paradigm of GPI with PeVFA $( \\mathbb { V } ( s , \\chi _ { \\pi } )$ is used for demonstration) ",
589
+ "text_level": 1,
590
+ "bbox": [
591
+ 174,
592
+ 734,
593
+ 792,
594
+ 751
595
+ ],
596
+ "page_idx": 5
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "1: Initialize policy $\\pi _ { 0 }$ , policy representation model $g , \\mathrm { P e V F A } \\ \\mathbb { V } _ { - 1 }$ and experience buffer $\\mathcal { D }$ \n2: 3: for iteration Rollout $t = 0 , 1 , \\ldots$ $\\pi _ { t }$ dohe environment and obtain $k$ trajectories $\\mathcal { T } _ { t } = \\{ \\tau _ { i } \\} _ { i = 0 } ^ { k }$ \n4: Get representation $\\chi _ { \\pi _ { t } } = g ( \\pi )$ for policy $\\pi _ { t }$ and add experiences $( \\chi _ { \\pi _ { t } } , \\tau _ { t } )$ in buffer $\\mathcal { D }$ \n5: if $t \\%$ $M = 0$ then \n6: Update PeVFA $\\mathbb { V } _ { t - 1 } ( s , \\chi _ { \\pi _ { i } } )$ for previous policies with data $\\{ ( \\chi _ { \\pi _ { i } } , T _ { i } ) \\} _ { i = 0 } ^ { t - 1 }$ \n7: Update policy representation model $g$ , e.g., with approaches provided in Sec. 4 \n8: end if \n9: Update PeVFA $\\mathbb { V } _ { t - 1 } ( s , \\chi _ { \\pi _ { t } } )$ for current policy $\\chi _ { \\pi _ { t } }$ and set $\\mathbb { V } _ { t } \\longleftarrow \\mathbb { V } _ { t - 1 }$ \n10: Update $\\pi _ { t }$ w.r.t $\\mathbb { V } _ { t } ( s , \\chi _ { \\pi _ { t } } )$ by policy improvement algorithm and set $\\pi _ { t + 1 } \\longleftarrow \\pi _ { t }$ \n11: end for \n239 representation are stored in a buffer (line 3-4). At an interval of $M$ iterations, PeVFA is trained via \n240 value approximation for previous policies with the stored data and the policy representation model \n241 is updated according to the method used (line 5-8). This part is unique to PeVFA for preservation \n242 and generalization of knowledge of historical policies. Next, value approximation for current policy \n243 is performed with $\\mathrm { P e V F A }$ (line 9). A key difference here is that the generalized value estimates \n244 (i.e., $\\mathbb { V } _ { t - 1 } ( \\chi _ { \\pi _ { t } } ) )$ are used as start points. Afterwards, a successive policy is obtained from typical \n245 policy improvement (line 10). Algorithm 1 can be implemented in different ways and we propose an \n246 instance implemented based on PPO [50] in our experiments later. In the next section, we introduce \n247 our methods for policy representation learning. ",
601
+ "bbox": [
602
+ 176,
603
+ 753,
604
+ 816,
605
+ 906
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "image",
611
+ "img_path": "images/16592e2f21ae4564e2ea2f7b946434c197861a704746ab2783434fc39908bdb1.jpg",
612
+ "image_caption": [
613
+ "Figure 4: The framework of policy representation training. Policy network parameters used for OPR or policy state-action pairs used for SPR are fed into policy encoder with permutation-invariant (PI) transformations followed by an MLP, producing the representation $\\chi _ { \\pi }$ . Afterwards, $\\chi _ { \\pi }$ can be trained by gradients from the value approximation loss of $\\mathrm { P e V F A }$ (i.e., End-to-End), as well as (optionally) the auxiliary loss of policy recovery or the contrastive learning (i.e., InfoNCE) loss. "
614
+ ],
615
+ "image_footnote": [],
616
+ "bbox": [
617
+ 269,
618
+ 87,
619
+ 732,
620
+ 242
621
+ ],
622
+ "page_idx": 6
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "",
627
+ "bbox": [
628
+ 140,
629
+ 348,
630
+ 825,
631
+ 474
632
+ ],
633
+ "page_idx": 6
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "248 4 Policy Representation Learning ",
638
+ "text_level": 1,
639
+ "bbox": [
640
+ 140,
641
+ 493,
642
+ 470,
643
+ 511
644
+ ],
645
+ "page_idx": 6
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "To derive practical deep RL algorithms, one key point is policy representation, i.e., a low-dimensional embedding of RL policy. Intuitively, policy representation influences the approximation and generalization of PeVFA. Thus, it is of interest to find an effective policy representation based on which the superiority of PeVFA can be leveraged to improve RL algorithms. To our knowledge, policy representation is not well studied and it remains unclear on how to obtain an effective representation for an RL policy in a general case in practice. In previous section, we demonstrate the effectiveness of using policy parameters as a naive representation when policy network is small, called RPR. However, a usual policy network may have large number of parameters, thus making it inefficient and even irrational to use RPR for approximation and generalization [17, 10]. More generally, policy parameters of the policy we wish to represent may not be accessible. ",
650
+ "bbox": [
651
+ 158,
652
+ 525,
653
+ 825,
654
+ 662
655
+ ],
656
+ "page_idx": 6
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "259 To this end, we propose a general framework of policy representation learning as illustrated in Figure \n260 4. The first thing to consider is data source, i.e., from which we can extract the information for an \n261 effective policy representation. Recall that the policy is a distribution over state and action space \n262 of high dimensionality. The features of such a distribution is not directly available. Therefore, we \n263 consider two kinds of data source below that indirectly contains the information of policies: 1) Surface \n264 Policy Representation $( S P R )$ : The first data source is state-action pairs (or trajectories [14]), since \n265 they reflect how policy may behave under such states. This data source is general since no explicit \n266 form of policy is assumed. In a geometric view, learning policy representation from state-action pairs \n267 can be viewed as capturing the features of policy via scattering sample points on the curved surface \n268 of policy distribution. 2) Origin Policy Representation (OPR): The other data source is parameters of \n269 policy since they determine the underlying form of policy distribution. Such a data source is often \n270 available during the learning process of deep RL algorithms when policy is parameterized by neural \n271 networks. Generally, we consider a policy network to be an MLP with well represented state features \n272 (e.g., features extracted by CNN for pixels or by LSTM for sequences) as input. \n273 The remaining question is how we extract the policy representation from the data sources mentioned \n274 above. As shown in Figure 4, we use permutation-invariant (PI) transformations followed by an \n275 MLP to encode the data of policy $\\pi$ into an embedding $\\chi _ { \\pi }$ for both SPR and OPR. For SPR, each ",
661
+ "bbox": [
662
+ 142,
663
+ 670,
664
+ 825,
665
+ 863
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "",
672
+ "bbox": [
673
+ 142,
674
+ 869,
675
+ 825,
676
+ 911
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "276 state-action pair of $\\{ ( s _ { i } , a _ { i } ) \\} _ { i = 1 } ^ { k }$ is fed into a common MLP, followed by a Mean-Reduce operation on the outputted features across $k$ . For OPR, we perform PI transformation (similar as done for state-action pairs) inner-layer weights and biases $\\{ ( w _ { i } , b _ { i } ) \\} _ { i = 1 } ^ { h }$ for each layer first, where $h$ denotes the number of nodes in this layer and $w _ { i } , b _ { i }$ is the income weight vector from previous layer and the bias of ith node; then we concatenate encoding of layers and obtain the OPR. A illustrative description for the encoding of OPR is in Figure 12 of Appendix. ",
683
+ "bbox": [
684
+ 140,
685
+ 90,
686
+ 825,
687
+ 175
688
+ ],
689
+ "page_idx": 7
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "To train the policy embedding $\\chi _ { \\pi }$ obtained above, the most straightforward way is to backpropagate the value approximation loss of $\\mathrm { P e V F A }$ in an End-to-End $( E 2 E )$ fashion as illustrated on the lowerright of Figure 4. In addition, we provide two self-supervised training losses for both OPR and SPR, as illustrated on the upper-right of Figure 4. The first one is an auxiliary loss (AUX) of policy recovery [14], i.e., to recover the action distributions of $\\pi$ from $\\chi _ { \\pi }$ under different states. To be specific, an auxiliary policy decoder $\\bar { \\pi } ( \\cdot | s , \\chi _ { \\pi } )$ is trained through behavioral cloning, formally to minimize cross-entropy objective $\\mathcal { L } _ { \\mathrm { A U X } } = - \\mathbb { E } _ { ( s , a ) } \\left[ \\log \\bar { \\pi } ( a | s , \\chi _ { \\pi } ) \\right]$ . For the second one, we propose to train $\\chi _ { \\pi }$ by Contrastive Learning $( C L )$ [54, 51]: policies are encouraged to be close to similar ones (i.e., positive samples $\\pi ^ { + }$ ), and to be apart from different ones (i.e., negative samples $\\pi ^ { - }$ ) in representation space. For each policy, we construct positive samples by data augmentation on policy data, depending on SPR or OPR considered; and different policies along the policy improvement path naturally the InfoNCE loss [41] below: provide negative samples for each other. Finally, the embedding $\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { C L } } = - \\mathbb { E } _ { ( \\pi ^ { + } , \\{ \\pi ^ { - } \\} ) } \\left[ \\log \\frac { \\exp ( \\chi _ { \\pi } ^ { T } W \\chi _ { \\pi ^ { + } } ) } { \\exp ( \\chi _ { \\pi } ^ { T } W \\chi _ { \\pi ^ { + } } ) + \\sum _ { \\pi ^ { - } } \\exp ( \\chi _ { \\pi } ^ { T } W \\chi _ { \\pi ^ { - } } ) } \\right] . } \\end{array}$ $\\chi _ { \\pi }$ is optimized through minimizing ",
694
+ "bbox": [
695
+ 168,
696
+ 181,
697
+ 826,
698
+ 364
699
+ ],
700
+ "page_idx": 7
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "",
705
+ "bbox": [
706
+ 166,
707
+ 348,
708
+ 772,
709
+ 372
710
+ ],
711
+ "page_idx": 7
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "Now, the training of policy representation model in Algorithm 1 can be performed with any combination of data sources and training losses provided above. A pseudo-code of the overall policy representation training framework and complete implementation details are provided in Appendix D. ",
716
+ "bbox": [
717
+ 171,
718
+ 376,
719
+ 820,
720
+ 419
721
+ ],
722
+ "page_idx": 7
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "5 Experiments ",
727
+ "text_level": 1,
728
+ "bbox": [
729
+ 174,
730
+ 436,
731
+ 312,
732
+ 454
733
+ ],
734
+ "page_idx": 7
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "In this section, we conduct experimental study with focus on the following questions: ",
739
+ "bbox": [
740
+ 176,
741
+ 467,
742
+ 735,
743
+ 482
744
+ ],
745
+ "page_idx": 7
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "Question 1 Can value generalization offered by PeVFA improve a deep RL algorithm in practice? Question 2 Can our proposed framework to learn effective policy representation? ",
750
+ "bbox": [
751
+ 168,
752
+ 487,
753
+ 815,
754
+ 518
755
+ ],
756
+ "page_idx": 7
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "Our experiments are conducted in several OpenAI Gym continuous control tasks (one from Box2D and five from MuJoCo) [6, 58]. All experimental details and curves can be found in Appendix B. ",
761
+ "bbox": [
762
+ 169,
763
+ 525,
764
+ 821,
765
+ 554
766
+ ],
767
+ "page_idx": 7
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "Algorithm Implementation. We use PPO [50] as the basic algorithm and propose a representative implementation of Algorithm 1, called PPO-PeVFA. PPO is a policy optimization algorithm that follows the paradigm of GPI (Figure 1, left). A value network $V _ { \\phi } ( s )$ with parameters $\\phi$ (i.e., conventional VFA) is trained to approximate the value of current policy $\\pi$ ; while $\\pi$ is optimized with respect to a surrogate objective [48] using advantages calculated by $V _ { \\phi }$ and GAE [49]. Compared with original PPO, PPO-PeVFA makes use of a $\\mathrm { P e V F A }$ network $\\mathbb { V } _ { \\theta } ( s , \\chi _ { \\pi } )$ with parameters $\\theta$ rather than the conventional VFA $V _ { \\phi } ( s )$ , and follows the training scheme as in Algorithm 1. Note PPO-PeVFA uses the same policy optimization method as original PPO and only differs at value approximation. ",
772
+ "bbox": [
773
+ 171,
774
+ 559,
775
+ 825,
776
+ 670
777
+ ],
778
+ "page_idx": 7
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Baselines and Variants. Except for original PPO as a default baseline, we use another two baselines: 1) PPO-PeVFA with randomly generated policy representation for each policy, denoted by Ran PR; 2) PPO-PeVFA with Raw Policy Representation (RPR), i.e., use the vector of all parameters of policy network as representation as adopted in PVFs [10]. Our variants of PPO-PeVFA differ at the policy representation used. In total, we consider 6 variants denoted by the combination of the policy data choice (i.e., OPR, SPR) and representation principle choice (i.e., E2E, CL, AUX). ",
783
+ "bbox": [
784
+ 143,
785
+ 676,
786
+ 825,
787
+ 761
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "Experimental Details. For all baselines and variants, we use a normal-scale policy network with 2 layers and 64 units for each layer, resulting in over $3 \\mathrm { k }$ to 10k (e.g., Ant-v1) policy parameters depending on the environments. We do not assume the access to pre-collected policies. Thus the size of policy set increases from 1 (i.e., the initial policy) during the learning process, to about 1k to 2 for a single trial. The dimensionality of all kinds of policy representation expect for RPR is set to 64. The buffer $D$ maintains recent $2 0 0 \\mathrm { k }$ steps of interaction experience and the policy data of corresponding policy. The number of interaction step of each trial is 1M for InvDouPend-v1 and LunarLander-v2, 4M for Ant-v1 and 2M for the others. ",
794
+ "bbox": [
795
+ 173,
796
+ 765,
797
+ 825,
798
+ 877
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Results. The overall experimental results are summarized in Table 1. In Figure 5, we provide aggregated results across all environments expect for InvDouPend-v1 and LunarLander-v2 (since ",
805
+ "bbox": [
806
+ 165,
807
+ 882,
808
+ 821,
809
+ 911
810
+ ],
811
+ "page_idx": 7
812
+ },
813
+ {
814
+ "type": "table",
815
+ "img_path": "images/2125a2c16d17e54a10aa09e7c215769e93511cfbf83fbbc503336bf666b4462b.jpg",
816
+ "table_caption": [
817
+ "Table 1: Average returns $\\pm$ half a std) over 10 trials for algorithms. Each result is the maximum evaluation along the training process. Top two values for each environment are bold. "
818
+ ],
819
+ "table_footnote": [],
820
+ "table_body": "<table><tr><td rowspan=\"2\">Environments</td><td colspan=\"3\">Benchmarks</td><td colspan=\"3\">Origin Policy Representation (Ours)</td><td colspan=\"3\">Surface Policy Representation (Ours)</td></tr><tr><td>PPO</td><td>Ran PR</td><td>RPR</td><td>E2E</td><td>CL</td><td>AUX</td><td>E2E</td><td>CL</td><td>AUX</td></tr><tr><td>HalfCheetah-v1</td><td>2621</td><td>2470</td><td>2325 ± 399.27</td><td>3171 ± 427.63</td><td>3725±348.55</td><td>3175±517.52</td><td>2774 ± 233.39</td><td>3349 ± 341.42</td><td>3216 ± 506.39</td></tr><tr><td>Hopper-v1</td><td>1639</td><td>1226</td><td>1097 ± 213.47</td><td>2085 ± 310.91</td><td>2351 ± 231.11</td><td>2214 ± 360.78</td><td>2227 ± 297.35</td><td>2392 ± 263.93</td><td>2577 ± 217.73</td></tr><tr><td>Walker2d-v1</td><td>1505</td><td>1269</td><td>317 ± 152.68</td><td>1856 ± 305.51</td><td>2038 ± 315.51</td><td>2044 ±316.32</td><td>1930.57 ± 456.02</td><td>2203 ± 381.95</td><td>1980 ± 325.54</td></tr><tr><td>Ant-v1</td><td>2835</td><td>2742</td><td>2143 ± 406.64</td><td>3581 ± 185.43</td><td>4019 ± 162.47</td><td>3784 ± 268.99</td><td>3173 ± 184.75</td><td>3632 ± 134.27</td><td>3397 ± 200.03</td></tr><tr><td>InvDouPend-v1</td><td>9344</td><td>9355</td><td>8856 ± 551.90</td><td>9357 ± 0.29</td><td>9355±0.64</td><td>9355±0.68</td><td>9355±0.89</td><td>9356±0.96</td><td>9355 ±1.42</td></tr><tr><td>LunarLander-v2</td><td>219</td><td>226</td><td>-22±35.08</td><td>238±3.37</td><td>239 ± 3.70</td><td>234 ± 3.47</td><td>236± 3.13</td><td>234 ± 3.13</td><td>235±5.70</td></tr></table>",
821
+ "bbox": [
822
+ 178,
823
+ 125,
824
+ 816,
825
+ 204
826
+ ],
827
+ "page_idx": 8
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "28 most algorithms achieve near-optimal results), where all returns are normalized by the results of PPO \n29 in Table 1. Full learning curves are omitted and can be found in Appendix F.2. ",
832
+ "bbox": [
833
+ 151,
834
+ 217,
835
+ 823,
836
+ 244
837
+ ],
838
+ "page_idx": 8
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "To Question 1. From Table 1, we can find that both PPOPeVFA w/ OPR (E2E) and PPO-PeVFA w/ SPR (E2E) outperforms PPO in all 6 tasks, and achieve over $20 \\%$ improvement in Figure 5. This demonstrates the effectiveness of $\\mathrm { P e V F A }$ . Moreover, the improvement is further enlarged (to about $40 \\%$ ) by CL and AUX for both OPR and SPR. This indicates that the superiority of PeVFA can be further utilized with better policy representation that offers a more suitable space for value generalization. ",
843
+ "bbox": [
844
+ 173,
845
+ 251,
846
+ 550,
847
+ 376
848
+ ],
849
+ "page_idx": 8
850
+ },
851
+ {
852
+ "type": "image",
853
+ "img_path": "images/20a85c9161cb7eeda14c0b97ac6b6838b2911bc0a0e66da144a476b8c3115d94.jpg",
854
+ "image_caption": [
855
+ "Figure 5: Normalized averaged returns aggregated over 4 MuJoCo tasks. "
856
+ ],
857
+ "image_footnote": [],
858
+ "bbox": [
859
+ 576,
860
+ 257,
861
+ 808,
862
+ 393
863
+ ],
864
+ "page_idx": 8
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "To Question 2. In Table 1, consistent degeneration is observed for PPO-PeVFA w/ Ran PR due to the negative effects on generalization caused by the randomness and disorder of policy representation. This phenomenon seems to be more severe for PPO-PeVFA w/ RPR due to the complexity of high-dimensional parameter space. In contrast, the improvement achieved by our proposed PPO-PeVFA variants shows that effective policy representation can be learned from policy parameters (OPR) and state-action pairs (SPR) though value approximation loss (i.e., E2E) and further improved when additional selfsupervised representation learning is involved as CL and AUX. Overall, OPR slightly outperforms SPR as CL does over AUX. We hypothesize that it is due to the stochasticity of state-action pairs which serve as inputs of SPR and training samples for AUX. This reveals the space for future improvement. In addition, we visualize the learned representation in Figure 6. We can observe that policies from different trials are locally continuous and show different modes of embedding trajectories due to random initialization and optimization; while a global evolvement among trials emerges with respect to policy performance. ",
869
+ "bbox": [
870
+ 171,
871
+ 382,
872
+ 549,
873
+ 685
874
+ ],
875
+ "page_idx": 8
876
+ },
877
+ {
878
+ "type": "image",
879
+ "img_path": "images/ac8c916c244115b54aef4064f061a500686eb8885bd22f7a8cd07c919cc350ea.jpg",
880
+ "image_caption": [
881
+ "Figure 6: A t-SNE visualization for representations learned by PPO-PeVFA OPR (E2E) in Ant-v1. In total, 6k policies from 5 trials (denoted by different markers) are plotted, which are colored according to average return. "
882
+ ],
883
+ "image_footnote": [],
884
+ "bbox": [
885
+ 583,
886
+ 439,
887
+ 807,
888
+ 574
889
+ ],
890
+ "page_idx": 8
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "61 6 Conclusion and Future Work ",
895
+ "text_level": 1,
896
+ "bbox": [
897
+ 153,
898
+ 707,
899
+ 449,
900
+ 724
901
+ ],
902
+ "page_idx": 8
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "In this paper, we propose Policy-extended Value Function Approximator (PeVFA) and study value generalization among policies. We propose a new form of GPI based on PeVFA which is potentially preferable to conventional VFA for value approximation. Moreover, we propose a general framework to learn low-dimensional embedding of RL policy. Our experiments demonstrate the effectiveness of the generalization characteristic of $\\mathrm { P e V F A }$ and our proposed policy representation learning methods. ",
907
+ "bbox": [
908
+ 173,
909
+ 738,
910
+ 825,
911
+ 808
912
+ ],
913
+ "page_idx": 8
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "Our work opens up some research directions on value generalization among policies and policy representation. A possible future study on the theory of value generalization among policies is to consider the interplay between approximation error, policy improvement and local generalization during GPI with PeVFA. Besides, analysis on influence factors of value generalization among policies (e.g., policy representation, architecture of ${ \\mathrm { P e V F A } }$ ) and other utilization of $\\mathrm { P e V F A }$ are expected. For better policy representation, inspirations on OPR may be got from studies on Manifold Hypothesis of neural network; the selection of more informative state-action pairs for SPR is also worth research. ",
918
+ "bbox": [
919
+ 171,
920
+ 814,
921
+ 825,
922
+ 911
923
+ ],
924
+ "page_idx": 8
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "References ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 142,
932
+ 89,
933
+ 267,
934
+ 106
935
+ ],
936
+ "page_idx": 9
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "[1] M. Andrychowicz, D. Crow, A. Ray, J. Schneider, R. Fong, P. Welinder, B. McGrew, J. Tobin, P. Abbeel, and W. Zaremba. Hindsight experience replay. In NeurIPS, pages 5048–5058, 2017. \n[2] M. Andrychowicz, A. Raichuk, P. Stanczyk, M. Orsini, S. Girgin, R. Marinier, L. Hussenot, M. Geist, O. Pietquin, M. Michalski, S. Gelly, and O. Bachem. What matters in on-policy reinforcement learning? A large-scale empirical study. CoRR, abs/2006.05990, 2020. [3] I. Arnekvist, D. Kragic, and J. A. Stork. VPE: variational policy embedding for transfer reinforcement learning. In ICRA, pages 36–42, 2019. \n[4] M. G. Bellemare, W. Dabney, and R. Munos. A distributional perspective on reinforcement learning. In ICML, volume 70, pages 449–458, 2017. [5] D. P. Bertsekas and J. N. Tsitsiklis. Neuro-dynamic programming, volume 3 of Optimization and neural computation series. 1996. \n[6] G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. Openai gym. CoRR, abs/1606.01540, 2016. [7] T. Chen, S. Kornblith, M. Norouzi, and G. E. Hinton. A simple framework for contrastive learning of visual representations. CoRR, abs/2002.05709, 2020. [8] L. Engstrom, A. Ilyas, S. Santurkar, D. Tsipras, F. Janoos, L. Rudolph, and A. Madry. Implementation matters in deep RL: A case study on PPO and TRPO. In ICLR, 2020. \n[9] B. Eysenbach, X. Geng, S. Levine, and R. R. Salakhutdinov. Rewriting history with inverse RL: hindsight inference for policy improvement. In NeurIPS, 2020. \n[10] F. Faccio and J. Schmidhuber. Parameter-based value functions. CoRR, abs/2006.09226, 2020. \n[11] H. Fu, H. Tang, J. Hao, C. Chen, X. Feng, D. Li, and W. Liu. Towards effective context for metareinforcement learning: an approach based on contrastive learning. CoRR, abs/2009.13891, 2020. \n[12] S. Fujimoto, H. v. Hoof, and D. Meger. Addressing function approximation error in actor-critic methods. In ICML, 2018. \n[13] A. Gaier, A. Asteroth, and J. Mouret. Discovering representations for black-box optimization. In GECCO, pages 103–111, 2020. \n[14] A. Grover, M. Al-Shedivat, J. K. Gupta, Y. Burda, and H. Edwards. Learning policy representations in multiagent systems. In ICML, volume 80, pages 1797–1806, 2018. \n[15] T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In ICML, pages 1856–1865, 2018. \n[16] D. Hafner, T. P. Lillicrap, J. Ba, and M. Norouzi. Dream to control: Learning behaviors by latent imagination. In ICLR, 2020. \n[17] J. Harb, T. Schaul, D. Precup, and P. Bacon. Policy evaluation networks. CoRR, abs/2002.11833, 2020. \n[18] K. Hausman, J. Tobias Springenberg, Z. Wang, N. Heess, and M. A. Riedmiller. Learning an embedding space for transferable robot skills. In ICLR, 2018. \n[19] H. He and J. L. Boyd-Graber. Opponent modeling in deep reinforcement learning. In ICML, volume 48, pages 1804–1813, 2016. \n[20] K. He, H. Fan, Y. Wu, S. Xie, and R. B. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, pages 9726–9735, 2020. \n[21] M. Igl, G. Farquhar, J. Luketina, W. Boehmer, and S. Whiteson. The impact of non-stationarity on generalisation in deep reinforcement learning. CoRR, abs/2006.05826, 2020. \n[22] N. S. Keskar, D. Mudigere, J. Nocedal, M. Smelyanskiy, and P. T. P. Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In ICLR, 2017. \n[23] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In ICLR, 2014. \n[24] I. Kostrikov, D. Yarats, and R. Fergus. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. CoRR, abs/2004.13649, 2020. ",
941
+ "bbox": [
942
+ 168,
943
+ 106,
944
+ 828,
945
+ 916
946
+ ],
947
+ "page_idx": 9
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "421 [25] A. Kuznetsov, P. Shvechikov, A. Grishin, and D. P. Vetrov. Controlling overestimation bias with truncated \n422 mixture of continuous distributional quantile critics. In ICML, volume 119, pages 5556–5566, 2020. \n423 [26] M. G. Lagoudakis and R. Parr. Least-squares policy iteration. J. Mach. Learn. Res., 4:1107–1149, 2003. \n424 [27] Q. Lan, Y. Pan, A. Fyshe, and M. White. Maxmin q-learning: Controlling the estimation bias of q-learning. \n425 In ICLR, 2020. \n426 [28] M. Laskin, K. Lee, A. Stooke, L. Pinto, P. Abbeel, and A. Srinivas. Reinforcement learning with augmented \n427 data. CoRR, abs/2004.14990, 2020. \n428 [29] K. Lee, Y. Seo, S. Lee, H. Lee, and J. Shin. Context-aware dynamics model for generalization in \n429 model-based reinforcement learning. CoRR, abs/2005.06800, 2020. \n430 [30] A. Levy, G. D. Konidaris, R. P. Jr., and K. Saenko. Learning multi-level hierarchies with hindsight. In \n431 ICLR, 2019. \n432 [31] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous \n433 control with deep reinforcement learning. In ICLR, 2015. \n434 [32] H. Liu, K. Simonyan, and Y. Yang. DARTS: differentiable architecture search. In ICLR, 2019. \n435 [33] R. Luo, F. Tian, T. Qin, E. Chen, and T. Liu. Neural architecture optimization. In NeurIPS, pages \n436 7827–7838, 2018. \n437 [34] L. V. D. Maaten and G. E. Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9: \n438 2579–2605, 2008. \n439 [35] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. A. Riedmiller, \n440 A. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, \n441 D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, \n442 518(7540):529–533, 2015. \n443 [36] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. P. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu. \n444 Asynchronous methods for deep reinforcement learning. In ICML, 2016. \n445 [37] O. Nachum, S. Gu, H. Lee, and S. Levine. Data-efficient hierarchical reinforcement learning. CoRR, \n446 abs/1805.08296, 2018. \n447 [38] O. Nachum, S. Gu, H. Lee, and S. Levine. Near-optimal representation learning for hierarchical reinforce \n448 ment learning. In ICLR, 2019. \n449 [39] Y. E. Nesterov and B. T. Polyak. Cubic regularization of newton method and its global performance. Math. \n450 Program., 108(1):177–205, 2006. \n451 [40] R. Novak, Y. Bahri, D. A. Abolafia, J. Pennington, and J. Sohl-Dickstein. Sensitivity and generalization in \n452 neural networks: an empirical study. In ICLR, 2018. \n453 [41] A. Oord, Y. Li, and O. Vinyals. Representation learning with contrastive predictive coding. CoRR, \n454 abs/1807.03748, 2018. \n455 [42] R. Raileanu, M. Goldstein, A. Szlam, and R. Fergus. Fast adaptation via policy-dynamics value functions. \n456 CoRR, abs/2007.02879, 2020. \n457 [43] K. Rakelly, A. Zhou, C. Finn, S. Levine, and D. Quillen. Efficient off-policy meta-reinforcement learning \n458 via probabilistic context variables. In ICML, volume 97, pages 5331–5340, 2019. \n459 [44] N. Rakicevic, A. Cully, and P. Kormushev. Policy manifold search: Exploring the manifold hypothesis for \n460 diversity-based neuroevolution. CoRR, abs/2104.13424, 2021. \n461 [45] T. Schaul, D. Horgan, K. Gregor, and D. Silver. Universal value function approximators. In ICML, \n462 volume 37, pages 1312–1320, 2015. \n463 [46] B. Scherrer, M. Ghavamzadeh, V. Gabillon, B. Lesner, and M. Geist. Approximate modified policy iteration \n464 and its application to the game of tetris. J. Mach. Learn. Res., 16:1629–1676, 2015. \n465 [47] J. S Schreck, C. W Coley, and K. JM Bishop. Learning retrosynthetic planning through simulated \n466 experience. ACS central science, 5(6):970–981, 2019. \n467 [48] J. Schulman, S. Levine, P. Abbeel, M. I. Jordan, and P. Moritz. Trust region policy optimization. In ICML, \n468 pages 1889–1897, 2015. \n469 [49] J. Schulman, P. Moritz, S. Levine, M. I. Jordan, and P. Abbeel. High-dimensional continuous control using \n470 generalized advantage estimation. In ICLR, 2016. \n471 [50] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. \n472 CoRR, abs/1707.06347, 2017. \n473 [51] M. Schwarzer, A. Anand, R. Goel, R. D. Hjelm, A. C. Courville, and P. Bachman. Data-efficient \n474 reinforcement learning with momentum predictive representations. CoRR, abs/2007.05929, 2020. \n475 [52] D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. A. Riedmiller. Deterministic policy gradient \n476 algorithms. In ICML, pages 387–395, 2014. \n477 [53] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, \n478 I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, \n479 I. Sutskever, T. P. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the game \n480 of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. \n481 [54] A. Srinivas, M. Laskin, and P. Abbeel. CURL: contrastive unsupervised representations for reinforcement \n482 learning. CoRR, abs/2004.04136, 2020. \n483 [55] R. S. Sutton and A. G. Barto. Reinforcement learning - an introduction. Adaptive computation and machine \n484 learning. MIT Press, 1998. \n485 [56] R. S. Sutton, J. Modayil, M. Delp, T. Degris, P. M. Pilarski, A. White, and D. Precup. Horde: a scalable \n486 real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In AAMAS, \n487 pages 761–768, 2011. \n488 [57] A. Tacchetti, H. F. Song, P. A. M. Mediano, V. Flores Zambaldi, J. Kramár, N. C. Rabinowitz, Th. Graepel, \n489 M. Botvinick, and P. W. Battaglia. Relational forward models for multi-agent learning. In ICLR, 2019. \n490 [58] E. Todorov, T. Erez, and Y. Tassa. Mujoco: A physics engine for model-based control. 2012 IEEE/RSJ \n491 International Conference on Intelligent Robots and Systems, pages 5026–5033, 2012. \n492 [59] Y. H. Tsai, Y. Wu, R. Salakhutdinov, and L. Morency. Demystifying self-supervised learning: An \n493 information-theoretical framework. CoRR, abs/2006.05576, 2020. \n494 [60] T. Unterthiner, D. Keysers, S. Gelly, O. Bousquet, and I. O. Tolstikhin. Predicting neural network accuracy \n495 from weights. CoRR, abs/2002.11448, 2020. \n496 [61] H. v. Hasselt. Double q-learning. In J. D. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R. S. Zemel, and \n497 A. Culotta, editors, NeurIPS, pages 2613–2621, 2010. \n498 [62] O. Vinyals, I. Babuschkin, W. M. Czarnecki, M. Mathieu, A. Dudzik, J. Chung, D. H. Choi, R. Powell, \n499 T. Ewalds, P. Georgiev, J. Oh, D. Horgan, M. Kroiss, I. Danihelka, A. Huang, L. Sifre, T. Cai, J. P. Agapiou, \n500 M. Jaderberg, A. S. Vezhnevets, R. Leblond, T. Pohlen, V. Dalibard, D. Budden, Y. Sulsky, J. Molloy, \n501 T. L. Paine, C. Gulcehre, Z. Wang, T. Pfaff, Y. Wu, R. Ring, D. Yogatama, D. Wünsch, K. McKinney, \n502 O. Smith, T. Schaul, T. Lillicrap, K. Kavukcuoglu, D. Hassabis, C. Apps, and D. Silver. Grandmaster level \n503 in starcraft ii using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019. \n504 [63] H. Wang, N. S. Keskar, C. Xiong, and R. Socher. Identifying generalization properties in neural networks. \n505 CoRR, abs/1809.07402, 2018. \n506 [64] R. Wang, R. Yu, B. An, and Z. Rabinovich. I2hrl: Interactive influence-based hierarchical reinforcement \n507 learning. In IJCAI, pages 3131–3138, 2020. \n508 [65] J. You, B. Liu, Z. Ying, V. S. Pande, and J. Leskovec. Graph convolutional policy network for goal-directed \n509 molecular graph generation. In NeurIPS 2018, pages 6412–6422, 2018. ",
952
+ "bbox": [
953
+ 140,
954
+ 98,
955
+ 828,
956
+ 911
957
+ ],
958
+ "page_idx": 10
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "",
963
+ "bbox": [
964
+ 137,
965
+ 70,
966
+ 828,
967
+ 915
968
+ ],
969
+ "page_idx": 11
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "1. For all authors... ",
974
+ "bbox": [
975
+ 214,
976
+ 116,
977
+ 330,
978
+ 128
979
+ ],
980
+ "page_idx": 12
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See the future work in Sec. 6. \n(c) Did you discuss any potential negative societal impacts of your work? [No] Our work is on general Reinforcement Learning study. No specific practical application is considered. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
985
+ "bbox": [
986
+ 240,
987
+ 132,
988
+ 825,
989
+ 217
990
+ ],
991
+ "page_idx": 12
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "2. If you are including theoretical results... ",
996
+ "bbox": [
997
+ 214,
998
+ 220,
999
+ 467,
1000
+ 234
1001
+ ],
1002
+ "page_idx": 12
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes] ",
1007
+ "bbox": [
1008
+ 240,
1009
+ 238,
1010
+ 686,
1011
+ 267
1012
+ ],
1013
+ "page_idx": 12
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "3. If you ran experiments... ",
1018
+ "bbox": [
1019
+ 214,
1020
+ 272,
1021
+ 377,
1022
+ 285
1023
+ ],
1024
+ "page_idx": 12
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] Our experimental environment are public and standard. All the information needed to reproduce our results is provided in the main body and appendix. Code will be available publicly soon. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Partially in main body and all details can be found in the appendix document. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] ",
1029
+ "bbox": [
1030
+ 240,
1031
+ 289,
1032
+ 825,
1033
+ 422
1034
+ ],
1035
+ "page_idx": 12
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1040
+ "bbox": [
1041
+ 215,
1042
+ 428,
1043
+ 767,
1044
+ 440
1045
+ ],
1046
+ "page_idx": 12
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [Yes] We use a free education licence for students for MuJoCo. \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1051
+ "bbox": [
1052
+ 240,
1053
+ 445,
1054
+ 825,
1055
+ 558
1056
+ ],
1057
+ "page_idx": 12
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1062
+ "bbox": [
1063
+ 214,
1064
+ 560,
1065
+ 658,
1066
+ 574
1067
+ ],
1068
+ "page_idx": 12
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1073
+ "bbox": [
1074
+ 240,
1075
+ 578,
1076
+ 825,
1077
+ 660
1078
+ ],
1079
+ "page_idx": 12
1080
+ }
1081
+ ]
parse/train/Dx3x05MlFwj/Dx3x05MlFwj_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Dx3x05MlFwj/Dx3x05MlFwj_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lIMn05F7/S1lIMn05F7.md ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A DIRECT APPROACH TO ROBUST DEEP LEARNINGUSING ADVERSARIAL NETWORKS
2
+
3
+ Huaxia Wang
4
+ Department of Electrical and Computer Engineering
5
+ Stevens Institute of Technology
6
+ Hoboken, NJ 07030, USA
7
+ hwang38@stevens.edu
8
+ Chun-Nam Yu
9
+ Nokia Bell Labs
10
+ 600 Mountain Avenue
11
+ Murray Hill, NJ 07974, USA
12
+ chun-nam.yu@nokia-bell-labs.com
13
+
14
+ # ABSTRACT
15
+
16
+ Deep neural networks have been shown to perform well in many classical machine learning problems, especially in image classification tasks. However, researchers have found that neural networks can be easily fooled, and they are surprisingly sensitive to small perturbations imperceptible to humans. Carefully crafted input images (adversarial examples) can force a well-trained neural network to provide arbitrary outputs. Including adversarial examples during training is a popular defense mechanism against adversarial attacks. In this paper we propose a new defensive mechanism under the generative adversarial network (GAN) framework. We model the adversarial noise using a generative network, trained jointly with a classification discriminative network as a minimax game. We show empirically that our adversarial network approach works well against black box attacks, with performance on par with state-of-art methods such as ensemble adversarial training and adversarial training with projected gradient descent.
17
+
18
+ # 1 INTRODUCTION
19
+
20
+ Deep neural networks have been successfully applied to a variety of tasks, including image classification (Krizhevsky et al., 2012), speech recognition (Graves et al., 2013), and human-level playing of video games through deep reinforcement learning (Mnih et al., 2015). However, Szegedy et al. (2014) showed that convolutional neural networks (CNN) are extremely sensitive to carefully crafted small perturbations added to the input images. Since then, many adversarial examples generating methods have been proposed, including Jacobian based saliency map attack (JSMA) (Papernot et al., 2016a), projected gradient descent (PGD) attack (Madry et al., 2018), and C&W’s attack (Carlini & Wagner, 2017). In general, there are two types of attack models: white box attack and black box attack. Attackers in white box attack model have complete knowledge of the target network, including network’s architecture and parameters. Whereas in black box attacks, attackers only have partial or no information on the target network (Papernot et al., 2017).
21
+
22
+ Various defensive methods have been proposed to mitigate the effect of the adversarial examples. Adversarial training which augments the training set with adversarial examples shows good defensive performance in terms of white box attacks (Kurakin et al., 2017; Madry et al., 2018). Apart from adversarial training, there are many other defensive approaches including defensive distillation (Papernot et al., 2016b), using randomization at inference time (Xie et al., 2018), and thermometer encoding (Buckman et al., 2018), etc.
23
+
24
+ In this paper, we propose a defensive method based on generative adversarial network (GAN) (Goodfellow et al., 2014). Instead of using the generative network to generate samples that can fool the discriminative network as real data, we train the generative network to generate (additive) adversarial noise that can fool the discriminative network into misclassifying the input image. This allows flexible modeling of the adversarial noise by the generative network, which can take in the original image or a random vector or even the class label to create different types of noise. The discriminative networks used in our approach are just the usual neural networks designed for their specific classification tasks. The purpose of the discriminative network is to classify both clean and adversarial example with correct label, while the generative network aims to generate powerful perturbations to fool the discriminative network. This approach is simple and it directly uses the minimax game concept employed by GAN. Our main contributions include:
25
+
26
+ • We show that our adversarial network approach can produce neural networks that are robust towards black box attacks. In the experiments they show similar, and in some cases better, performance when compared to state-of-art defense methods such as ensemble adversarial training (Tramer et al., 2018) and adversarial training with projected gradient \` descent (Madry et al., 2018). To our best knowledge we are also the first to study the joint training of a generative attack network and a discriminative network. • We study the effectiveness of different generative networks in attacking a trained discriminative network, and show that a variety of generative networks, including those taking in random noise or labels as inputs, can be effective in attacks. We also show that training against these generative networks can provide robustness against different attacks.
27
+
28
+ The rest of the paper is organized as follows. In Section 2, related works including multiple attack and defense methods are discussed. Section 3 presents our defensive method in details. Experimental results are shown in Section 4, with conclusions of the paper in Section 5.
29
+
30
+ # 2 RELATED WORKS
31
+
32
+ In this section, we briefly review the attack and defense methods in neural network training.
33
+
34
+ # 2.1 ATTACK MODEL
35
+
36
+ Given a neural network model $D _ { \theta }$ parameterized by $\theta$ trained for classification, an input image $\boldsymbol { x } \in \mathbb { R } ^ { d }$ and its label $y$ , we want to find a small adversarial perturbation $\Delta x$ such that $x + \Delta x$ is not classified as $y$ . The minimum norm solution $\Delta x$ can be described as:
37
+
38
+ $$
39
+ \operatorname* { a r g m i n } _ { \Delta x } \| \Delta x \| \quad \mathrm { s . t . } \ \arg \operatorname* { m a x } D _ { \theta } ( x + \Delta x ) \neq y ,
40
+ $$
41
+
42
+ where arg max $D _ { \theta } ( x )$ gives the predicted class for input $x$ . Szegedy et al. (2014) introduced the first method to generate adversarial examples by considering the following optimization problem,
43
+
44
+ $$
45
+ \Delta x = \underset { z } { \arg \operatorname* { m i n } } \lambda \| z \| + L ( D _ { \theta } ( x + z ) , \hat { y } ) , \quad x + z \in [ 0 , 1 ] ^ { d }
46
+ $$
47
+
48
+ where $L$ is a distance function measuring the closeness of the output $D _ { \theta } ( x + z )$ with some target $\hat { y } \neq$ $y$ . The objective is minimized using box-constrained L-BFGS. Goodfellow et al. (2015) introduced the fast gradient sign method (FGS) to generate adversarial examples in one step, which can be represented as $\Delta x { \mathbf { \bar { \phi } } } = \epsilon \cdot \mathrm { s i g n } \left( \nabla _ { x } l ( D _ { \theta } ( { \bar { { x } } } ) , y ) \right)$ , where $l$ is the cross-entropy loss used in neural networks training. Madry et al. (2018) argues with strong evidence that projected gradient descent (PGD), which can be viewed as an iterative version of the fast gradient sign method, is the strongest attack using only first-order gradient information. Papernot et al. (2017) presented a Jacobian-based saliency-map attack (J-BSMA) model to generate adversarial examples by changing a small number of pixels. Moosavi-Dezfooli et al. (2017) showed that there exist a single/universal small image perturbation that fools all natural images. Papernot et al. (2017) introduced the first demonstration of black-box attacks against neural network classifiers. The adversary has no information about the architecture and parameters of the neural networks, and does not have access to large training dataset.
49
+
50
+ # 2.2 DEFENSE MODEL
51
+
52
+ In order to mitigate the effect of the generated adversarial examples, various defensive methods have been proposed. Papernot et al. (2016b) introduced distillation as a defense to adversarial examples. Lou et al. (2016) introduced a foveation-based mechanism to alleviate adversarial examples.
53
+
54
+ The idea of adversarial training was first proposed by Szegedy et al. (2014). The effect of adversarial examples can be reduced through explicitly training the model with both original and perturbed adversarial images. Adversarial training can be viewed as a minimax game,
55
+
56
+ $$
57
+ \theta ^ { * } = \underset { \theta } { \arg \operatorname* { m i n } } \operatorname { E } _ { x , y } \underset { \Delta x } { \operatorname* { m a x } } l ( D _ { \theta } ( x + \Delta x ) , y ) .
58
+ $$
59
+
60
+ ![](images/23802e87c1be4f67cbfc9eb8c53124ad25c8bbddfc15716d481f690141d3401b.jpg)
61
+ Figure 1: Architecture diagram of our adversarial networks
62
+
63
+ The inner maximization requires a separate oracle for generating the perturbations $\Delta x$ . FGS is a common method for generating the adversarial perturbations $\Delta x$ due to its speed. Madry et al. (2018) advocates the use of PGD in generating adversarial examples. Moreover, a cascade adversarial training is presented in Na et al. (2018), which injects adversarial examples from an already defended network added with adversarial images from the network being trained.
64
+
65
+ There are a few recent works on using GANs for generating and defending against adversarial examples. Samangouei et al. (2018) and Ilyas et al. (2017) use GAN for defense by learning the manifold of input distribution with GAN, and then project any input examples onto this learned manifold before classification to filter out any potential adversarial noise. Our approach is more direct because we do not learn the input distribution and no input denoising is involved. Both Baluja & Fischer (2018) and Xiao et al. (2018) train neural networks to generate adversarial examples by maximizing the loss over a fixed pre-trained discriminative network. They show that they can train neural networks to effectively attack undefended discriminative networks while ensuring the generated adversarial examples look similar to the original samples. Our work is different from these because instead of having a fixed discriminative network, we co-train the discriminative network together with the adversarial generative network in a minimax game. Xiao et al. (2018) also train a second discriminative network as in typical GANs, but their discriminative network is used for ensuring the generated images look like the original samples, and not for classification. Lee et al. (2017) also considered the use of GAN to train robust discriminative networks. However, the inputs to their generative network is the gradient of the discriminative network with respect to the input image $x$ , not just the image $x$ as in our current work. This causes complex dependence of the gradient of the generative network parameters to the discriminative network parameters, and makes the parameter updates for the generative network more complicated. Also there is no single minimax objective that they are solving for in their work; the update rules for the discriminative and generative networks optimize related but different objectives.
66
+
67
+ # 3 METHOD
68
+
69
+ In generative adversarial networks (GAN) (Goodfellow et al., 2014), the goal is to learn a generative neural network that can model a distribution of unlabeled training examples. The generative network transforms a random input vector into an output that is similar to the training examples, and there is a separate discriminative network that tries to distinguish the real training examples against samples generated by the generative network. The generative and discriminative networks are trained jointly with gradient descent, and at equilibrium we want the samples from the generative network to be indistinguishable from the real training data by the discriminative network, i.e., the discriminative network does no better than doing a random coin flip.
70
+
71
+ We adopt the GAN approach in generating adversarial noise for a discriminative model to train against. This approach has already been hinted at in Tramer et al. (2018), but they decided to train \` against a static set of adversarial models instead of training against a generative noise network that can dynamically adapt in a truly GAN fashion. In this work we show that this idea can be carried out fruitfully to train robust discriminative neural networks.
72
+
73
+ Given an input $x$ with correct label $y$ , from the viewpoint of the adversary we want to find additive noise $\Delta x$ such that $x + \Delta x$ will be incorrectly classified by the discriminative neural network to some other labels $\hat { y } \ne y$ . We model this additive noise as $\epsilon G ( x )$ , where $G$ is a generative neural network that generates instance specific noise based on the input $x$ and $\epsilon$ is the scaling factor that controls the size of the noise. Notice that unlike white box attack methods such as FGS or PGD, once trained $G$ does not need to know the parameters of the discriminative network that it is attacking. $G$ can also take in other inputs to generate adversarial noise, e.g., Gaussian random vector $z \in { \mathbb { R } ^ { d } }$ as in typical GAN, or even the class label $y$ . For simplicity we assume $G$ takes in $x$ as input in the descriptions below.
74
+
75
+ Suppose we have a training set $\left\{ ( x _ { 1 } , y _ { 1 } ) , \dotsc , ( x _ { n } , y _ { n } ) \right\}$ of image-label pairs. Let $D _ { \theta }$ be the discriminator network (for classification) parameterized by $\theta$ , and $G _ { \phi }$ be the generator network parameterized by $\phi$ . We want to solve the following minimax game between $D _ { \theta }$ and $G _ { \phi }$ :
76
+
77
+ $$
78
+ \operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \phi } \sum _ { i = 1 } ^ { n } l ( D _ { \theta } ( x _ { i } ) , y _ { i } ) + \lambda \sum _ { i = 1 } ^ { n } l ( D _ { \theta } ( x _ { i } + \epsilon G _ { \phi } ( x _ { i } ) ) , y _ { i } ) ,
79
+ $$
80
+
81
+ where $l$ is the cross-entropy loss, $\lambda$ is the trade-off parameter between minimizing the loss on normal examples versus minimizing the loss on the adversarial examples, and $\epsilon$ is the magnitude of the noise. See Figure 1 for an illustration of the model.
82
+
83
+ In this work we focus on perturbations based on $\ell _ { \infty }$ norm. This can be achieved easily by adding a tanh layer as the final layer of the generator network $G _ { \phi }$ , which normalizes the output to the range of $[ - 1 , 1 ]$ . Perturbations based on $\ell _ { 1 }$ or $\ell _ { 2 }$ norms can be accommodated by having the appropriate normalization layers in the final layer of $G _ { \phi }$ .
84
+
85
+ We now explain the intuition of our approach. Ideally, we would like to find a solution $\theta$ that has small risk on clean examples
86
+
87
+ $$
88
+ R \left( \theta \right) = \sum _ { i = 1 } ^ { n } l ( D _ { \theta } ( x _ { i } ) , y _ { i } ) ,
89
+ $$
90
+
91
+ and also small risk on the adversarial examples under maximum perturbation of size $\epsilon$
92
+
93
+ $$
94
+ R _ { a d v } ( \theta ) = \sum _ { i = 1 } ^ { n } \operatorname* { m a x } _ { \Delta x , \| \Delta x \| \leq \epsilon } l ( D _ { \theta } ( x _ { i } + \Delta x ) , y _ { i } ) .
95
+ $$
96
+
97
+ However, except for simple datasets like MNIST, there are usually fairly large differences between the solutions of $R ( \theta )$ and solutions of $R _ { a d v } ( \theta )$ under the same model class $D _ { \theta }$ (Tsipras et al., 2018). Optimizing for the risk under white box attacks $R _ { a d v } ( \theta )$ involves tradeoff on the risk on clean data $R ( \theta )$ . Note that $R _ { a d v } ( \theta )$ represent the risk under white box attacks, since we are free to choose the perturbation $\Delta x$ with knowledge of $\theta$ . This can be approximated using the powerful PGD attack.
98
+
99
+ Instead of allowing the perturbations $\Delta x$ to be completely free, we model the adversary as a neural network $G _ { \phi }$ with finite capacity
100
+
101
+ $$
102
+ R _ { G } ( \theta ) = \operatorname* { m a x } _ { \phi } \sum _ { i = 1 } ^ { n } l ( D _ { \theta } ( x _ { i } + \epsilon G _ { \phi } ( x _ { i } ) ) , y _ { i } ) .
103
+ $$
104
+
105
+ Here the adversarial noise $G _ { \phi } ( x _ { i } )$ is not allowed to directly depend on the discriminative network parameters $\theta$ . Also, the generative network parameter $\phi$ is shared across all examples, not computed per example like $\Delta x$ . We believe this is closer to the situation of defending against black box attacks, when the adversary does not know the discriminator network parameters. However, we still want $G _ { \phi }$ to be expressive enough to represent powerful attacks, so that $D _ { \theta }$ has a good adversary to train against. Previous work (Xiao et al., 2018; Baluja & Fischer, 2018) show that there are powerful classes of $G _ { \phi }$ that can attack trained classifiers $D _ { \theta }$ effectively.
106
+
107
+ In traditional GANs we are most interested in the distributions learned by the generative network. The discriminative network is a helper that drives the training, but can be discarded afterwards. In our setting we are interested in both the discriminative network and the generative network. The generative network in our formulation can give us a powerful adversary for attacking, while the discriminative network can give us a robust classifier that can defend against adversarial noise.
108
+
109
+ # 3.1 STABILIZING THE GAN TRAINING
110
+
111
+ The stability and convergence of GAN training is still an area of active research (Mescheder et al., 2018). In this paper we adopt gradient regularization (Mescheder et al., 2017) to stabilize the gradient descent/ascent training. Denote the minimax objective in Eq. 4 as $F ( \theta , \phi )$ . With the generative
112
+
113
+ network parameter fixed at $\phi _ { k }$ , instead of minimizing the usual objective $F ( \theta , \phi _ { k } )$ to update $\theta$ for the discriminator network, we instead try to minimize the regularized objective
114
+
115
+ $$
116
+ F ( \theta , \phi _ { k } ) + \frac { \gamma } { 2 } \| \nabla _ { \phi } F ( \theta , \phi _ { k } ) \| ^ { 2 } ,
117
+ $$
118
+
119
+ where $\gamma$ is the regularization parameter for gradient regularization. Minimizing the gradient norm $\| \nabla _ { \phi } F ( \theta , \phi _ { k } ) \| ^ { 2 }$ jointly makes sure that the norm of the gradient for $\phi$ at $\phi _ { k }$ does not grow when we update $\theta$ to reduce the objective $F ( \theta , \phi _ { k } )$ . This is important because if the gradient norm $\| \nabla _ { \phi } \bar { F } ( \theta , \phi _ { k } ) \| ^ { 2 }$ becomes large after an update of $\theta$ , it is easy to update $\phi$ to make the objective large again, leading to zigzagging behaviour and slow convergence. Note that the gradient norm term is zero at a saddle point according to the first-order optimality conditions, so the regularizer does not change the set of solutions. With these we update $\theta$ using SGD with step size $\eta _ { D }$ :
120
+
121
+ $$
122
+ \begin{array} { l } { { \displaystyle \theta _ { l + 1 } = \theta _ { l } - \eta _ { D } \nabla _ { \theta } [ F ( \theta _ { l } , \phi _ { k } ) + \frac { \gamma } { 2 } \| \nabla _ { \phi } F ( \theta _ { l } , \phi _ { k } ) \| ^ { 2 } ] } } \\ { { \displaystyle \quad \quad = \theta _ { l } - \eta _ { D } [ \nabla _ { \theta } F ( \theta _ { l } , \phi _ { k } ) + \gamma \nabla _ { \theta \phi } ^ { 2 } F ( \theta _ { l } , \phi _ { k } ) \nabla _ { \phi } F ( \theta _ { l } , \phi _ { k } ) ] } } \end{array}
123
+ $$
124
+
125
+ The Hessian-vector product term $\nabla _ { \theta \phi } ^ { 2 } F ( \theta _ { l } , \phi _ { k } ) \nabla _ { \phi } F ( \theta _ { l } , \phi _ { k } )$ can be computed with double backpropagation provided by packages like Tensorflow/PyTorch, but we find it faster to compute it with finite difference approximation. Recall that for a function $f ( x )$ with gradient $g ( x )$ and Hessian $H ( x )$ , the Hessian-vector product $H ( x ) v$ can be approximated by $( g ( x + h v ) - g ( x ) ) / h$ for small $h$ (Pearlmutter, 1994). Therefore we approximate:
126
+
127
+ $$
128
+ \nabla _ { \theta \phi } ^ { 2 } F ( \theta _ { l } , \phi _ { k } ) \nabla _ { \phi } F ( \theta _ { l } , \phi _ { k } ) \approx \nabla _ { \theta } [ \frac { F ( \theta _ { l } , \phi _ { k } + h v ) - F ( \theta _ { l } , \phi _ { k } ) } { h } ] ,
129
+ $$
130
+
131
+ where $v = \nabla _ { \phi } F ( \theta _ { l } , \phi _ { k } )$ . Note that $\phi _ { k } + h v$ is exactly a gradient step for generative network $G _ { \phi }$ . Setting $h$ to be too small can lead to numerical instability. We therefore correlate $h$ with the gradient step size and set $h = \eta _ { G } / 1 0$ to capture the curvature at the scale of the gradient ascent algorithm.
132
+
133
+ We update the generative network parameters $\phi$ with using (stochastic) gradient ascent. With the discriminative network parameters fixed at $\theta _ { l }$ and step size $\eta _ { G }$ , we update:
134
+
135
+ $$
136
+ \phi _ { k + 1 } = \phi _ { k } + \eta _ { G } \nabla _ { \phi } F ( \theta _ { l } , \phi _ { k } ) .
137
+ $$
138
+
139
+ We do not add a gradient regularization term for $\phi$ , since empirically we find that adding gradient regularization to $\theta$ is sufficient to stabilize the training.
140
+
141
+ # 3.2 GENERATIVE AND DISCRIMINATIVE NETWORK PARAMETER UPDATES
142
+
143
+ In the experiments we train both the discriminative network and generative network from scratch with random weight initializations. We do not need to pre-train the discriminative network with clean examples, or the generative network against some fixed discriminative networks, to arrive at good saddle point solutions.
144
+
145
+ In our experiments we find that the discriminative networks $D _ { \theta }$ we use tend to overpower the generative network $G _ { \phi }$ if we just perform simultaneous parameter updates to both networks. This can lead to saddle point solutions where it seems $G _ { \phi }$ cannot be improved locally against $D _ { \theta }$ , but in reality can be made more powerful by just running more gradient steps on $\phi$ . In other words we want the region around the saddle point solution to be relatively flat for $G _ { \phi }$ . To make the generative network more powerful so that the discriminative network has a good adversary to train against, we adopt the following strategy. For each update of $\theta$ for $D _ { \theta }$ , we perform multiple gradient steps on $\phi$ using the same mini-batch. This allows the generative network to learn to map the inputs in the mini-batch to adversarial noises with high loss directly, compared to running multiple gradient steps on different mini-batches. In the experiments we run 5 gradient steps on each mini-batch. We fix the tradeoff parameter $\lambda$ (Eq. 4) over loss on clean examples and adversarial loss at 1. We also fix the gradient regularization parameter $\gamma$ (Eq. 8) at 0.01, which works well for different datasets.
146
+
147
+ # 4 EXPERIMENTS
148
+
149
+ We implemented our adversarial network approach using Tensorflow(Abadi et al., 2016), with the experiments run on several machines each with 4 GTX1080 Ti GPUs. In addition to our adversarial
150
+
151
+ networks, we also train standard undefended models and models trained with adversarial training using PGD for comparison. For attacks we focus on the commonly used fast gradient sign (FGS) method, and the more powerful projected gradient descent (PGD) method.
152
+
153
+ For the fast gradient sign (FGS) attack, we compute the adversarial image by
154
+
155
+ $$
156
+ \begin{array} { r } { \hat { x } _ { i } = \mathrm { P r o j } _ { X } \left( x _ { i } + \epsilon \mathrm { s i g n } \nabla _ { x } l ( D _ { \theta } ( x _ { i } ) , y _ { i } ) \right) , } \end{array}
157
+ $$
158
+
159
+ where $\mathrm { P r o j } _ { X }$ projects onto the feasible range of rescaled pixel values $X$ (e.g., [-1,1]).
160
+
161
+ For the projected gradient descent (PGD) attack, we iterate the fast gradient sign attack multiple times with projection, with random initialization near the starting point neighbourhood.
162
+
163
+ $$
164
+ \begin{array} { r l } & { ~ \hat { x } _ { i } ^ { 0 } = \mathrm { P r o j } _ { X } \left( x _ { i } + \epsilon u \right) } \\ & { \hat { x } _ { i } ^ { k + 1 } = \mathrm { P r o j } _ { B _ { \epsilon } ^ { \infty } ( x _ { i } ) \cap X } \left( \hat { x } _ { i } ^ { k } + \delta \operatorname { s i g n } \nabla _ { x } \boldsymbol { l } ( D _ { \theta } ( \hat { x } _ { i } ^ { k } ) , y _ { i } ) \right) , } \end{array}
165
+ $$
166
+
167
+ where $u \in \mathbb { R } ^ { d }$ is a uniform random vector in $[ - 1 , 1 ] ^ { d }$ , $\delta$ is the step size, and $B _ { \epsilon } ^ { \infty } ( x _ { i } )$ is an $\ell _ { \infty }$ ball centered around the input $x _ { i }$ with radius $\epsilon$ . In the experiments we set $\delta$ to be a quarter of the perturbation $\epsilon$ , i.e., $\epsilon / 4$ , and the number of PGD steps $k$ to be 10. We adopt exactly the same PGD attack procedure when generating adversarial examples in PGD adversarial training. Our implementation is available at https://github.com/whxbergkamp/RobustDL_GAN.
168
+
169
+ # 4.1 MNIST
170
+
171
+ For MNIST the inputs are black and white images of digits of size $2 8 \mathbf { x } 2 8$ with pixel values scaled between 0 and 1. We rescale the inputs to the range of [-1,1]. Following previous work (Kannan et al., 2018), we study perturbations of $\epsilon = 0 . 3$ (in the original scale of [0,1]). We use a simple convolutional neural network similar to LeNet5 as our discriminator networks for all training methods. For our adversarial approach we use an encoder-decoder network for the generator. See Model D1 and Model G0 in the Appendix for the details of these networks. We use SGD with learning rate of $\eta _ { D } = 0 . 0 1$ and momentum 0.9, batch size of 64, and run for 200k iterations for all the discriminative networks. The learning rates are decreased by a factor of 10 after $1 0 0 \mathrm { k }$ iterations. We use SGD with a fixed learning rate $\eta _ { G } = 0 . 0 1$ with momentum 0.9 for the generative network. We use weight decay of 1E-4 for standard and adversarial PGD training, and 1E-5 for our adversarial network approach (for both $D _ { \theta }$ and $G _ { \phi }$ ). For this dataset we find that we can improve the robustness of $D _ { \theta }$ by running more updates on $G _ { \phi }$ , so we run 5 updates on $G _ { \phi }$ (each update contains 5 gradient steps described in Section 3.2 ) for each update on $D _ { \theta }$ .
172
+
173
+ Table 1(left) shows the white box attack accuracies of different models, under perturbations of $\epsilon =$ 0.3 for input pixel values between 0 and 1. Adversarial training with PGD performs best under white box attacks. Its accuracies stay above $90 \%$ under FGS and PGD attacks. Our adversarial network model performs much better than the undefended standard training model, but there is still a gap in accuracies compared to the PGD model. However, the PGD model has a small but noticeable drop in accuracy on clean examples compared to the standard model and adversarial network model.
174
+
175
+ Table 1(right) shows the black box attack accuracies of different models. We generate the black box attack images by running the FGS and PGD attacks on surrogate models A’, B’ and $\mathrm { C } '$ . These surrogate models are trained in the same way as their counterparts (standard - A, PGD - B, adversarial network - C) with the same network architecture, but using a different random seed. We notice that the black box attacks tend to be the most effective on models trained with the same method (A’ on A, $\mathbf { B } ^ { \prime }$ on B, and $\mathrm { C } '$ on C). Although adversarial PGD beats our adversarial network approach on white box attacks, they have comparable performance on these black box attacks. Interestingly, the adversarial examples from adversarial PGD (B’) and adversarial networks $\mathbf { \pi } ( \mathbf { C } ^ { \prime } )$ do not transfer well to the undefended standard model. The undefended model still have accuracies between $8 5 - 9 5 \%$ .
176
+
177
+ # 4.2 SVHN
178
+
179
+ For the Street View House Number(SVHN) data, we use the original training set, augmented with $8 0 \mathrm { k }$ randomly sampled images from the extra set as our training data. The test set remains the same and we do not perform any preprocessing on the images apart from scaling it to the range of [-1,1]. We study perturbations of size $\epsilon = 0 . 0 5$ (in the range of [0,1]). We use a version of ResNet-18(He
180
+
181
+ Table 1: Classification accuracies under white box and black box attack on MNIST $\epsilon = 0 . 3$ )
182
+
183
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="2">white box</td><td rowspan="2">black box</td><td colspan="6"></td></tr><tr><td>No Noise FGS</td><td>PGD</td><td>FGS(A)</td><td>PGD(A&#x27;)</td><td></td><td>FGS(B&#x27;)PGD(B&#x27;))</td><td>)FGS(C&#x27;)</td><td>PGD(C&#x27;)</td></tr><tr><td>standard(A)</td><td>99.40%</td><td>23.70%</td><td>0.00%</td><td>39.49%</td><td>3.41%</td><td>90.56%</td><td>86.10%</td><td>94.21%</td><td>91.36%</td></tr><tr><td>adversarial PGD(B)</td><td>98.70%</td><td>95.46%</td><td>92.92%</td><td>95.78%</td><td>96.18%</td><td>95.58%</td><td>95.01%</td><td>97.05%</td><td>96.48%</td></tr><tr><td>adversarial network(C)</td><td>99.32%</td><td>94.66%</td><td>87.09%</td><td>95.75%</td><td>96.19%</td><td>96.15%</td><td>95.24%</td><td>96.96%</td><td>95.78%</td></tr></table>
184
+
185
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="2">white box</td><td rowspan="2"></td><td colspan="5">black box</td></tr><tr><td>No Noise FGS</td><td>PGD</td><td>FGS(A&#x27;)PGD(A&#x27;)</td><td>FGS(B’)PGD(B&#x27;)</td><td></td><td>FGS(C&#x27;)]</td><td>PGD(C&#x27;)</td></tr><tr><td>standard(A)</td><td>96.34%</td><td>64.64%</td><td>3.69%</td><td>69.47% 49.92%</td><td>56.46%</td><td>44.25%</td><td></td><td>89.71%</td><td>83.02%</td></tr><tr><td>adversarial PGD(B)</td><td>87.45%</td><td>55.94%</td><td>42.96%</td><td>85.21%</td><td>83.46% 59.09%</td><td></td><td>48.20%</td><td>87.41%</td><td>83.23%</td></tr><tr><td>adversarial network(C)</td><td>96.34%</td><td>91.51%</td><td>37.97%</td><td>90.02%</td><td>88.04%</td><td>75.34%</td><td>57.52%</td><td>91.48%</td><td>81.68%</td></tr></table>
186
+
187
+ Table 2: Classification accuracies under white box and black box attacks on SVHN $\epsilon = 0 . 0 5$ )
188
+
189
+ et al., 2016) adapted to $3 2 \mathrm { x } 3 2 $ images as our discriminative networks. For the generator in our adversarial network we use an encoder-decoder network based on residual blocks from ResNet. See Model D2 and Model G1 in the Appendix for details. For the discriminative networks we use SGD with learning rate of $\eta _ { D } = 0 . 0 1$ and momentum 0.9, batch size of 64, weight decay of 1E-4 and run for $1 0 0 \mathrm { k }$ iterations, and then decrease the learning rate to 0.001 and run for another $1 0 0 \mathrm { k }$ iterations. For the generative network we use SGD with a fixed learning rate of $\eta _ { G } = 0 . 0 1$ and momentum 0.9, and use weight decay of 1E-4.
190
+
191
+ Table 2(left) shows the white box attack accuracies of the models. Adversarial PGD performs best against PGD attacks, but has lower accuracies on clean data and against FGS attacks, since it is difficult to optimize over all three objectives with finite network capacity. Our adversarial network approach has the best accuracies on clean data and against FGS attacks, and also improved accuracies against PGD over standard training.
192
+
193
+ Table 2(right) shows the black box attack accuracies of the models. As before A’, B’, C’ are networks trained in the same ways as their counterparts, but with a different random seed. We can see that the adversarial network approach performs best across most attacks, except the PGD attack from its own copy $\mathbf { C } '$ . It is also interesting to note that for this dataset, adversarial examples generated from the adversarial PGD model $\mathbf { B } ^ { \ast }$ have the strongest attack power across all models. In the other two datasets, adversarial examples generated from a model are usually most effective against their counterparts that are trained in the same way.
194
+
195
+ # 4.3 CIFAR10
196
+
197
+ For CIFAR10 we scale the $3 2 \mathrm { x } 3 2 $ inputs to the range of [-1,1]. We also perform data augmentation by randomly padding and cropping the images by at most 4 pixels, and randomly flipping the images left to right. In this experiment we use the same discriminative and generative networks as in SVHN. We study perturbations of size $\epsilon = 8 / 2 5 6$ . We train the discriminative networks with batch size of 64, and learning rate of $\eta _ { D } = 0 . 1$ for 100k iterations, and decrease learning rate to 0.01 for another 100k iterations. We use Adam with learning rate $\eta _ { G } ~ = ~ 0 . 0 0 2$ , $\beta _ { 1 } ~ = ~ 0 . 5$ , $\beta _ { 2 } ~ = ~ 0 . 9 9 9$ for the generative network. We use weight decay 1E-4 for standard training, and 1E-5 for adversarial PGD and our adversarial networks.
198
+
199
+ Table 3(left) shows the white box accuracies of different models under attack with $\epsilon = 8 / 2 5 6$ . The PGD model has the best accuracy under PGD attack, but suffer a considerably lower accuracy on clean data and FGS attack. One reason for this is that it is difficult to balance between the objective of getting good accuracies on clean examples and good accuracies on very hard PGD attack adversarial examples with a discriminative network of limited capacity. Our adversarial model is able to keep up with the standard model in terms of accuracies on clean examples, and improve upon it on accuracies against FGS and PGD attacks.
200
+
201
+ Table 3(right) shows the black box attack accuracies of the models. Our adversarial network method works better than the other approaches in general, except for the PGD attack from the most similar model C’. The adversarial PGD model also works quite well except against its own closest model $\mathbf { B } ^ { \prime }$ , and offers the smallest drop in accuracies in general. But its overall results are not the best since it suffers from the disadvantage of having a lower baseline accuracy on clean examples.
202
+
203
+ Table 3: Classification accuracies under white box and black box attack on CIFAR10 $\epsilon = 8 / 2 5 6 )$
204
+
205
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="2">white box</td><td rowspan="2">black box</td><td colspan="5"></td></tr><tr><td>No Noise FGS</td><td>PGD</td><td>FGS(A&#x27;) PGD(A&#x27;)</td><td></td><td>FGS(B&#x27;) PGD(B&#x27;)</td><td>FGS(C&#x27;)</td><td>PGD(C&#x27;)</td></tr><tr><td>standard(A)</td><td>91.59%</td><td>57.31%</td><td>1.32%</td><td>67.99%</td><td>22.88%</td><td>77.13%</td><td>75.06%</td><td>73.34%</td><td>55.34%</td></tr><tr><td>adversarial PGD(B)</td><td>75.30%</td><td>47.63%</td><td>41.16%</td><td>74.04%</td><td>74.23%</td><td>57.73%</td><td>55.72%</td><td>73.31%</td><td>73.09%</td></tr><tr><td>adversarial network(C)</td><td>91.08%</td><td>72.81%</td><td>44.28%</td><td>81.74%</td><td>79.48%</td><td>77.23%</td><td>74.04%</td><td>78.51%</td><td>66.74%</td></tr></table>
206
+
207
+ Table 4: Classification accuracies under white box and black box attacks on ensemble adversarial training and adversarial networks on different datasets
208
+
209
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="3">white box</td><td colspan="5">black box</td></tr><tr><td>No Noise FGS</td><td></td><td>PGD</td><td>FGS(A&#x27;) PGD(A&#x27;)</td><td>FGS(B&#x27;) PGD(B&#x27;) I</td><td></td><td>FGS(C&#x27;)</td><td>PGD(C&#x27;)</td></tr><tr><td>ensemble(MNIST,ε=0.3)</td><td>98.65%</td><td>2.52%</td><td>0.00%</td><td>90.91% 93.91%</td><td>90.94%</td><td>88.12%</td><td>90.79%</td><td>89.61%</td></tr><tr><td>adv. net(MNIST,ε=0.3)</td><td>99.03%</td><td>94.66%</td><td>87.09%</td><td>95.75% 96.19%</td><td>96.15%</td><td>95.24%</td><td>96.96%</td><td>95.78%</td></tr><tr><td>ensemble(SVHN,e=0.05)</td><td>95.30%</td><td>79.16%</td><td>2.74%</td><td>95.32% 93.88%</td><td>67.97%</td><td>54.81%</td><td>95.60%</td><td>93.21%</td></tr><tr><td>adv. net(SVHN,e=0.05)</td><td>96.34%</td><td>91.51%</td><td>37.97%</td><td>90.02% 88.04%</td><td>75.34%</td><td>57.52%</td><td>91.48%</td><td>81.68%</td></tr><tr><td>ensemble(CIFAR10,e= 8</td><td>87.17%</td><td>57.91%</td><td>11.35%</td><td>85.01% 85.19%</td><td>68.76%</td><td>67.41%</td><td>79.64%</td><td>70.98%</td></tr><tr><td>adv. net(CIFAR10,ε= 25</td><td>91.08%</td><td>72.81%</td><td>44.28%</td><td>81.74%</td><td>79.48% 77.23%</td><td>74.04%</td><td>78.51%</td><td>66.74%</td></tr></table>
210
+
211
+ We have also performed experiments on CIFAR10 using a wider version of ResNet (Zagoruyko & Komodakis, 2016) by multiplying the number of filters by 10 in each of the convolutional layers. These wider version of ResNets have higher accuracies, but the relative strengths of the methods are similar to those presented here. In addition we have experiments on CIFAR100, and the results are qualitatively similar to CIFAR10. All these results are presented in the Appendix due to space restrictions.
212
+
213
+ # 4.4 COMPARING AGAINST ENSEMBLE ADVERSARIAL TRAINING
214
+
215
+ We also compare against a version of ensemble adversarial training (Tramer et al., 2018) on the \` above 3 datasets. Ensemble adversarial training works by including adversarial examples generated from static pre-trained models to enlarge the training set, and then train a new model on top of it. The quality of solutions depends on the type of adversarial examples included. Here we construct adversarial examples by running FGS (Eq. 10) and PGD (Eq. 11) on an undefended model, i.e., FGS(A) and PGD(A) in the previous tables. Here for FGS we substitute the target label $y$ with the most likely class arg max $\bar { D _ { \theta } } ( x )$ to avoid the problem of label leakage. Following Tramer et al. \` (2018) we also include another attack using the least likely class:
216
+
217
+ $$
218
+ \hat { x } _ { i } = \mathrm { P r o j } _ { X } \left( x _ { i } - \epsilon \mathrm { s i g n } \nabla _ { x } l ( D _ { \theta } ( x _ { i } ) , y _ { L L } ) \right) ,
219
+ $$
220
+
221
+ where $y _ { L L } = \arg \operatorname* { m i n } D _ { \theta } ( x _ { i } )$ is the least likely class. We include all these adversarial examples together with the original clean data for training. We use the same perturbations $\epsilon$ as in the respective experiments above.
222
+
223
+ Table 4 shows the results comparing ensemble adversarial training (EAT) with our adversarial networks approach. On MNIST, adversarial networks is better on white box attacks and also better on all black box attacks using models trained with standard training(A’), adversarial PGD(B’), and our adversarial networks approach(C’) with different random seeds. On SVHN and CIFAR10 adversarial networks is better on white box attacks, and both methods have wins and losses on the black box attacks, depending on the attacks used. In general adversarial networks seem to have better white box attack accuracies since they are trained dynamically with a varying adversary. The black box accuracies depend a lot on the dataset and the type of attacks used. There is no definitive conclusion on whether training against a static set of adversaries as in EAT or training against a dynamically adjusting adversary as in adversarial networks is a better approach against black box attacks. This is an interesting question requiring further research.
224
+
225
+ Table 5: Attack performance of various generator networks against an undefended network in terms of test accuracies. First column is the accuracy on the discriminative model $D _ { \theta }$ that the generative attacker $G _ { \phi }$ is trained on (similar to white box attacks). The next three columns are the attack accuracies on other models by the learned $G _ { \phi }$ (similar to black box attacks)
226
+
227
+ <table><tr><td>Generator</td><td>Original (A)</td><td>standard(A&#x27;)</td><td>adversarial PGD(B&#x27;)</td><td>adversarial network(C&#x27;)</td></tr><tr><td>original accuracy</td><td>91.59%</td><td>90.54%</td><td>75.71%</td><td>89.21%</td></tr><tr><td>autoencoder(8 filters)</td><td>31.07%</td><td>41.40%</td><td>74.56%</td><td>84.59%</td></tr><tr><td>autoencoder(64 filters)</td><td>6.08%</td><td>14.74%</td><td>75.52%</td><td>86.64%</td></tr><tr><td>random Gaussian</td><td>45.27%</td><td>58.68%</td><td>75.02%</td><td>87.33%</td></tr><tr><td>label</td><td>11.17%</td><td>23.29%</td><td>74.78%</td><td>82.43%</td></tr></table>
228
+
229
+ Table 6: Classification accuracies under white box and black box attacks on CIFAR10 for adversarial networks trained with different generative adversaries $\zeta = 8 / 2 5 6 )$ )
230
+
231
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="3">white box</td><td colspan="4">black box</td></tr><tr><td>No Noise</td><td>FGS</td><td>PGD</td><td>FGS(A&#x27;)</td><td>PGD(A&#x27;)</td><td>FGS(B&#x27;)</td><td>PGD(B&#x27;)</td></tr><tr><td>autoencoder(8 filters)</td><td>88.70%</td><td>67.28%</td><td>33.56%</td><td>78.94%</td><td>74.15%</td><td>70.70%</td><td>68.54%</td></tr><tr><td>autoencoder(64 filters)</td><td>89.10%</td><td>67.05%</td><td>33.38%</td><td>79.56%</td><td>74.40%</td><td>70.52%</td><td>68.66%</td></tr><tr><td>random Gaussian</td><td>89.73%</td><td>69.43%</td><td>35.16%</td><td>80.09%</td><td>76.02%</td><td>71.22%</td><td>69.66%</td></tr><tr><td>label</td><td>88.72%</td><td>67.09%</td><td>37.70%</td><td>80.95%</td><td>77.80%</td><td>70.90%</td><td>68.81%</td></tr></table>
232
+
233
+ # 4.5 EXAMINING THE GENERATIVE NETWORKS
234
+
235
+ We also did a more in-depth study on the generative network with CIFAR10. We want to understand how the capacity of the generative network affects the quality of saddle point solution, and also the power of the generative networks themselves as adversarial attack methods. First we study the ability of the generative networks to learn to attack a fixed undefended discriminative network. The architectures of the generative networks (G1, G2, G3) are described in the Appendix. Here we study a narrow (G1, $k = 8$ ) and a wide version (G1, $k = 6 4$ ) of autoencoder networks using the input images as inputs, and also decoder networks $G ( z )$ using random Gaussian vectors $z \in \mathring { \mathbb { R } } ^ { d }$ (G2) or networks $G ( y )$ using the labels $y$ (G3) as inputs. We run SGD for $2 0 0 \mathrm { k }$ iterations with step size 0.01 and momentum of 0.9, and use weight decay of 1E-5. We report test accuracies on the original discriminator after attacks.
236
+
237
+ From Table 5 the wide autoencoder is more powerful than the narrow autoencoder in attacking the undefended discriminator network across different models. As a white-box attack method, the wide autoencoder is close to PGD in terms of attack power $( 6 . 0 8 \%$ vs $1 . 3 2 \%$ in Table 3(left)) on the undefended model. As a black-box attack method on the undefended model $\mathbf { A } '$ , it works even better than PGD ( $1 4 . 7 4 \%$ vs $2 2 . 8 8 \%$ in Table 3(right)). However, on defended models trained with PGD and our adversarial network approach the trained generator networks do not have much effect. PGD is especially robust with very small drops in accuracies against these attacks.
238
+
239
+ It is interesting that generator network $G ( z )$ with random Gaussian $z$ as inputs and $G ( y )$ with label as input works well against undefended models A and $\mathbf { A } '$ , reducing the accuracies by more than $30 \%$ , even though they are not as effective as using the image as input. $G ( z )$ is essentially a distribution of random adversarial noise that we add to the image without knowing the image or label. $G ( y )$ is a generator network with many parameters, but after training it is essentially a set of 10 class conditional $3 2 \mathbf { x } 3 2 \mathbf { x } 3$ filters. We have also performed similar experiments on attacking models trained with adversarial PGD and our adversarial networks using the above generative networks. The results are included in the Appendix due to space restrictions.
240
+
241
+ We also co-train these different generative networks with our discriminative network (D2) on CIFAR10. The results are shown in Table 6. It is slightly surprising that they all produce very similar performance in terms of white box and black box attacks, even as they have different attack powers against undefended networks. The generative networks do have very similar decoder portions, and this could be a reason why they all converge to saddle points of similar quality.
242
+
243
+ # 4.6 DISCUSSIONS
244
+
245
+ In the experiments above we see that adversarial PGD training usually works best on white box attacks, but there is a tradeoff between accuracies on clean data against accuracies on adversarial examples due to finite model capacity. We can try to use models with larger capacity, but there is always a tradeoff between the two, especially for larger perturbations $\epsilon$ . There are some recent works that indicate training for standard accuracy and training for adversarial accuracy (e.g., with PGD) are two fairly different problems (Schmidt et al., 2018; Tsipras et al., 2018). Examples generated from PGD are particularly difficult to train against. This makes adversarial PGD training disadvantaged in many black box attack situations, when compared with models trained with weaker adversaries, e.g., ensemble adversarial training and our adversarial networks method.
246
+
247
+ We have also observed in the experiments that for black box attacks, the most effective adversarial examples are usually those constructed from models trained using the same method but with different random seed. This suggests hiding the knowledge of the training method from the attacker could be an important factor in defending against black box attacks. Defending against black box attacks is closely related to the question of the transferability of adversarial examples. Although there are some previous works exploring this question (Liu et al., 2017), the underlying factors affecting transferability are still not well understood.
248
+
249
+ In our experimentation with the architectures of the discriminative and generative networks, the choice of architectures of $G _ { \phi }$ does not seem to have a big effect on the quality of solution. The dynamics of training, such as the step size used and the number of iterations to run for each network during gradient descent/ascent, seem to have a bigger effect on the saddle point solution quality than the network architecture. It would be interesting to find classes of generative network architectures that lead to substantially different saddle points when trained against a particular discriminative network architecture. Also, recent works have shown that there are connected flat regions in the minima of neural network loss landscapes (Garipov et al., 2018; Draxler et al., 2018). We believe that the same might hold true for GANs, and it would be interesting to explore how the training dynamics can lead to different GAN solutions that might have different robustness properties.
250
+
251
+ Our approach can be extended with multiple discriminative networks playing against multiple generative networks. It can also be combined with ensemble adversarial training, where some adversarial examples come from static pre-trained models, while some other come from dynamically adjusting generative networks.
252
+
253
+ # 5 CONCLUSIONS
254
+
255
+ We have proposed an adversarial network approach to learning discriminative neural networks that are robust to adversarial noise, especially under black box attacks. For future work we are interested in extending the experiments to ImageNet, and exploring the choice of architectures of the discriminative and generative networks and their interaction.
256
+
257
+ # REFERENCES
258
+
259
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for largescale machine learning. In OSDI, volume 16, pp. 265–283, 2016.
260
+
261
+ Shumeet Baluja and Ian Fischer. Adversarial transformation networks: Learning to generate adversarial examples. In AAAI Conference on Artificial Intelligence, 2018.
262
+
263
+ Jacob Buckman, Aurko Roy, Colin Raffel, and Ian Goodfellow. Thermometer encoding: One hot way to resist adversarial examples. In International Conference on Learning Representations, 2018.
264
+
265
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pp. 39–57. IEEE, 2017.
266
+
267
+ Felix Draxler, Kambis Veschgini, Manfred Salmhofer, and Fred A Hamprecht. Essentially no barriers in neural network energy landscape. In International Conference on Machine Learning, 2018.
268
+
269
+ Timur Garipov, Pavel Izmailov, Dmitrii Podoprikhin, Dmitry P Vetrov, and Andrew Gordon Wilson. Loss surfaces, mode connectivity, and fast ensembling of DNNs. Advances in Neural Information Processing Systems, 2018.
270
+
271
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
272
+
273
+ Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015.
274
+
275
+ Alex Graves, Abdel-Rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In Acoustics, speech and signal processing (ICASSP), 2013 IEEE International Conference on, pp. 6645–6649. IEEE, 2013.
276
+
277
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
278
+
279
+ Andrew Ilyas, Ajil Jalal, Eirini Asteri, Constantinos Daskalakis, and Alexandros G Dimakis. The robust manifold defense: Adversarial training using generative models. arXiv preprint arXiv:1712.09196, 2017.
280
+
281
+ Harini Kannan, Alexey Kurakin, and Ian Goodfellow. Adversarial logit pairing. arXiv preprint arXiv:1803.06373, 2018.
282
+
283
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pp. 1097–1105, 2012.
284
+
285
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In International Conference on Learning Representations, 2017.
286
+
287
+ Hyeungill Lee, Sungyeob Han, and Jungwoo Lee. Generative adversarial trainer: Defense to adversarial perturbations with GAN. arXiv preprint arXiv:1705.03387, 2017.
288
+
289
+ Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. In International Conference on Learning Representations, 2017.
290
+
291
+ Yan Lou, Xavier Boix, Gemma Roig, Tomaso Poggio, and Qi Zhao. Foveation-based mechanisms alleviate adversarial examples. Technical report, Center for Brains, Minds and Machines (CBMM), arXiv, 2016.
292
+
293
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018.
294
+
295
+ Lars Mescheder, Sebastian Nowozin, and Andreas Geiger. The numerics of GANs. In Advances in Neural Information Processing Systems, pp. 1825��1835, 2017.
296
+
297
+ Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for GANs do actually converge? In International Conference on Machine Learning, pp. 3478–3487, 2018.
298
+
299
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
300
+
301
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1765–1773, 2017.
302
+
303
+ Taesik Na, Jong Hwan Ko, and Saibal Mukhopadhyay. Cascade adversarial machine learning regularized with a unified embedding. In International Conference on Learning Representations, 2018.
304
+
305
+ Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In Security and Privacy (EuroS&P), 2016 IEEE European Symposium on, pp. 372–387. IEEE, 2016a.
306
+
307
+ Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In 2016 IEEE Symposium on Security and Privacy $( S P )$ , pp. 582–597. IEEE, 2016b.
308
+
309
+ Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, pp. 506–519. ACM, 2017.
310
+
311
+ Barak A Pearlmutter. Fast exact multiplication by the Hessian. Neural computation, 6(1):147–160, 1994.
312
+
313
+ Pouya Samangouei, Maya Kabkab, and Rama Chellappa. Defense-GAN: Protecting classifiers against adversarial attacks using generative models. In International Conference on Learning Representations, 2018.
314
+
315
+ Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarially robust generalization requires more data. In Advances in Neural Information Processing Systems, 2018.
316
+
317
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, 2014.
318
+
319
+ Florian Tramer, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick Mc- \` Daniel. Ensemble adversarial training: Attacks and defenses. In International Conference on Learning Representations, 2018.
320
+
321
+ Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. arXiv preprint arXiv:1805.12152, 2018.
322
+
323
+ Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples with adversarial networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, 2018.
324
+
325
+ Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. In International Conference on Learning Representations, 2018.
326
+
327
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In British Machine Vision Confernece (BMVC), 2016.
328
+
329
+ # APPENDIX
330
+
331
+ # NETWORK ARCHITECTURES
332
+
333
+ Our networks are mostly based on ResNet. Figure 2 shows the residual block used in our networks. We denote a residual block with $k$ copies of $d \times d$ filters, with a stride of $s$ in the first convolution as residual-block $( d , s , k )$ . A stride of 2 means the inputs are downsampled by a factor of 2. The notation $\mathrm { c o n v } 2 \mathrm { d } ( d , \ : s , \ : k )$ refers to a convolutional layer with $k$ copies of $d \times d$ filters, convolved with stride $s$ , and similarly for the deconvolution deconv $2 \mathrm { d } ( d , s , k )$ . The notations maxpool $( s )$ and avgpool(s) denote max-pooling and average pooling operations with strides $s$ . FC denotes a fully connected layer, while BN denotes a batch normalization layer.
334
+
335
+ Figure 3 shows the discriminative networks used in this paper. D1 is a simple convolutional neural network used in the MNIST experiments. D2 is the standard version of ResNet. Figure 4 shows the generative networks used in this paper. G0 and G1 are encoder-decoder networks, while G2 and G3 are decoder networks using a random vector and a one-hot encoding of the label respectively. The generative networks are parameterized by a factor $k$ determining the number of filters used (width of network). As default we use $k = 6 4$ , and $k = 1 6$ for networks using labels as inputs.
336
+
337
+ ![](images/1ea0ce3b43da3757a7918ce2e4590b39b9ea745d64239f2b06ae107f43159b0c.jpg)
338
+ Figure 2: Residual block used in the network definitions
339
+
340
+ ![](images/d822e2068943f26380b553ff146d93b82e57b4954ce15f7c28533f32b39186a3.jpg)
341
+ Figure 3: Discriminative networks used in this paper
342
+
343
+ # EXTRA RESULTS ON CIFAR100 AND WIDE RESNET ON CIFAR10
344
+
345
+ The discriminative and generative networks in our CIFAR100 experiment have the same network architecture as the CIFAR10 experiment, except that the output layer dimension of the D network is 100 other than 10 in CIFAR10. We use learning rate of 0.1 for the first $1 0 0 \mathrm { k }$ iterations, and 0.01 for another $1 0 0 \mathrm { k }$ iterations. The batch size is 64 and weight decay is 1E-5.
346
+
347
+ Table 7(left) presents the white box attack accuracies of different models with $\epsilon = 8 / 2 5 6$ . From the table we can see that the PGD adversarial training has the best defensive performance under PGD attack, but still suffers performance degradation on clean image and FGS attack. Our adversarial model gives similar classification performance as the standard model on clean image, and improves classification accuracies on FGS and PGD attack. Table 7(right) shows the black box attack accuracies of different models. Our adversarial network approach gives the best classification accuracy in most cases, except the FGS and PGD attack from model $\mathbf { C } '$ .
348
+
349
+ <table><tr><td rowspan="2">training method attack</td><td colspan="2">white box</td><td rowspan="2">black box</td><td colspan="6"></td></tr><tr><td>No Noise FGS</td><td>PGD</td><td></td><td>FGS(A&#x27;) PGD(A&#x27;) FGS(B&#x27;) PGD(B&#x27;) FGS(C&#x27;) PGD(C&#x27;)</td><td></td><td></td><td></td><td></td></tr><tr><td>standard(A)</td><td>70.11%</td><td>31.27%</td><td>4.61%</td><td>44.24%</td><td>32.55%</td><td>53.65%</td><td>50.51%</td><td>47.82%</td><td>34.99%</td></tr><tr><td>adversarial PGD(B)</td><td>55.53%</td><td>32.13%</td><td>28.48%</td><td>53.91%</td><td>54.62%</td><td>41.80%</td><td>40.61%</td><td>54.55%</td><td> 53.57%</td></tr><tr><td>adversarial network(C)</td><td>70.99 %</td><td>41.86%</td><td>18.25%</td><td>58.11%</td><td>56.94%</td><td> 53.15%</td><td> 51.87%</td><td>53.35%</td><td>46.61%</td></tr></table>
350
+
351
+ Table 7: Classification accuracies under white box and black box attacks on CIFAR100 $\epsilon = 8 / 2 5 6 )$ )
352
+
353
+ ![](images/db4f9913b00a33a68bd33683287f87e68d164083684db42626b5da8f905e2640.jpg)
354
+ Figure 4: Generative networks used in this paper
355
+
356
+ Table 8: Classification accuracies under white box and black box attacks on CIFAR10 with Wide ResNet $( \epsilon = 8 / 2 5 6 )$ )
357
+
358
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="2">white box</td><td rowspan="2">black box</td><td colspan="5"></td></tr><tr><td>No Noise FGS</td><td>PGD</td><td>FGS(A)]</td><td>)PGD(A&#x27;) FGS(B&#x27;)PGD(B&#x27;) FGS(C&#x27;) PGD(C&quot;)</td><td></td><td></td><td></td></tr><tr><td>standard(A)</td><td>94.69%</td><td>62.36%</td><td>1.08%</td><td>69.89% 9.14%</td><td>85.05%</td><td>82.82%</td><td>76.27%</td><td>45.16%</td></tr><tr><td>adversarial PGD(B)</td><td>83.50%</td><td>67.92%</td><td>60.15%</td><td>83.21% 82.96%</td><td>72.66%</td><td>68.82%</td><td>82.01%</td><td>78.59%</td></tr><tr><td>adversarial network(C)</td><td>91.32%</td><td>73.77%</td><td>49.55%</td><td>83.29 % 81.65%</td><td>79.32%</td><td>76.00%</td><td>79.32%</td><td>62.71%</td></tr></table>
359
+
360
+ Table 8 gives the results on CIFAR10 using a wider version of Resnet (Model D2), by multiplying the number of filters in each convolutional layer by a factor of 10. Some of the previous works in the literature use models of larger capacity for training adversarially robust models, so we perform experiments on these large capacity models here. First the accuracies increase across the board with larger capacity models. The accuracy gap on clean data between adversarial PGD and standard training still exists, but now there is also a small accuracy gap between our adversarial network approach and standard training. For the rest of the white box and black accuracies the story is similar, the models are weakest against attacks trained with the same method but with a different random seed. Our adversarial network approach has very good performance across different attacks, even as it is not always the winner for each individual attack. Table 9 gives the results of Wide ResNet on CIFAR100, and the results are qualitatively similar.
361
+
362
+ # EXTRA RESULTS ON ATTACKING USING GENERATIVE NETWORKS AND THEIR TRANSFERABILITY
363
+
364
+ Following Section 4.5, we run extra experiments on using different generative networks to attack networks trained with adversarial PGD and our adversarial networks approach, in addition to the
365
+
366
+ <table><tr><td rowspan="2">training method\attack</td><td colspan="2">white box</td><td rowspan="2"></td><td colspan="5">black box</td></tr><tr><td>No Noise FGS</td><td>PGD</td><td>FGS(A) PGD(A)]</td><td></td><td>FGS(B&#x27;) PGD(B’) FGS(C&#x27;)</td><td></td><td>PGD(C&#x27;)</td></tr><tr><td>standard(A)</td><td>79.22%</td><td>44.86%</td><td>6.38%</td><td>48.52% 13.42%</td><td>65.18%</td><td>63.56%</td><td>53.17%</td><td>28.04%</td></tr><tr><td>adversarial PGD(B)</td><td>66.68%</td><td>45.54%</td><td>38.36%</td><td>64.81% 64.84%</td><td>53.41%</td><td>49.77%</td><td>64.35%</td><td>62.44%</td></tr><tr><td>adversarial network(C)</td><td>80.21%</td><td>57.21%</td><td>30.27%</td><td>65.37% 58.27%</td><td>67.38%</td><td>64.28%</td><td>61.11%</td><td>40.27%</td></tr></table>
367
+
368
+ Table 9: Classification accuracies under white box and black box attacks on CIFAR100 with Wide Resnet $\epsilon = 8 / 2 5 6 )$
369
+
370
+ Table 10: Attack performance of various generator networks against a network trained with adversarial PGD in terms of test accuracies. First column is the accuracy on the discriminative model $D _ { \theta }$ that the generative attacker $G _ { \phi }$ is trained on (similar to white box attacks). The next three columns are the attack accuracies on other models by the learned $G _ { \phi }$ (similar to black box attacks)
371
+
372
+ <table><tr><td>Generator</td><td>Original (B)</td><td>standard(A&#x27;)</td><td>adversarial PGD(B&#x27;)</td><td>adversarial network(C&#x27;)</td></tr><tr><td>original accuracy</td><td>75.30%</td><td>90.54%</td><td>75.71%</td><td>89.21%</td></tr><tr><td>autoencoder(8 filters)</td><td>72.74%</td><td>88.38%</td><td>73.07%</td><td>87.89%</td></tr><tr><td>autoencoder(64 filters)</td><td>71.26%</td><td>87.64%</td><td>71.98%</td><td>87.02%</td></tr><tr><td>random Gaussian</td><td>74.13%</td><td>88.71%</td><td>74.70%</td><td>88.45%</td></tr><tr><td>label</td><td>70.15%</td><td>84.95%</td><td>70.10%</td><td>84.96%</td></tr></table>
373
+
374
+ Table 11: Attack performance of various generator networks against our adversarial network in terms of test accuracies. First column is the accuracy on the discriminative model $D _ { \theta }$ that the generative attacker $G _ { \phi }$ is trained on (similar to white box attacks). The next three columns are the attack accuracies on other models by the learned $G _ { \phi }$ (similar to black box attacks)
375
+
376
+ <table><tr><td>Generator</td><td>Original (C)</td><td>standard(A&#x27;)</td><td>adversarial PGD(B&#x27;)</td><td>adversarial network(C&#x27;)</td></tr><tr><td>original accuracy</td><td>91.08%</td><td>90.54%</td><td>75.71%</td><td>89.21%</td></tr><tr><td>autoencoder(8 filters)</td><td>74.66%</td><td>66.95%</td><td>74.42%</td><td>80.55%</td></tr><tr><td>autoencoder(64 filters)</td><td>53.68%</td><td>46.37%</td><td>73.08%</td><td>72.18%</td></tr><tr><td>random Gaussian</td><td>85.91%</td><td>71.00%</td><td>75.00%</td><td>86.55%</td></tr><tr><td>label</td><td>81.46%</td><td>77.46%</td><td>73.09%</td><td>83.98%</td></tr></table>
377
+
378
+ undefended network in Section 4.5. Table 10 shows the results of various generative networks in attacking a network trained with adversarial PGD. The adversarial PGD network is very robust, and the generative networks can at most reduce the accuracy by $5 \%$ . Interestingly, the strongest attack come from the more restrictive generative network using only the label as input. It is also the most successful in transferring to other networks. However, since the adversarial PGD network is so robust, none of the generative networks can learn much from it in generating adversarial examples.
379
+
380
+ Table 11 shows the results of various generative networks in attacking our adversarial network. Our adversarial network is not as robust as adversarial PGD under white box attack, and the autoencoder(64 filters) network can reduce its accuracy from over $90 \%$ to $53 \%$ . Nonetheless, it is still much more robust than the undefended network. Interestingly, in addition to transferring well to the adversarial network trained with a different random seed $\mathbf { \pi } ( \mathbf { C } )$ , the autoencoder(64 filters) network also transfers well to the undefended network, reducing its accuracy to $46 \%$ .
parse/train/S1lIMn05F7/S1lIMn05F7_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lIMn05F7/S1lIMn05F7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1lIMn05F7/S1lIMn05F7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1ldO2EFPr/S1ldO2EFPr.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1ldO2EFPr/S1ldO2EFPr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1ldO2EFPr/S1ldO2EFPr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1ldO2EFPr/S1ldO2EFPr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S5S3eTEmouw/S5S3eTEmouw.md ADDED
@@ -0,0 +1,471 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OFFLINE META-REINFORCEMENT LEARNING WITHADVANTAGE WEIGHTING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ This paper introduces the offline meta-reinforcement learning (offline meta-RL) problem setting and proposes an algorithm that performs well in this setting. Offline meta-RL is analogous to the widely successful supervised learning strategy of pretraining a model on a large batch of fixed, pre-collected data (possibly from various tasks) and fine-tuning the model to a new task with relatively little data. That is, in offline meta-RL, we meta-train on fixed, pre-collected data from several tasks and adapt to a new task with a very small amount (less than 5 trajectories) of data from the new task. By nature of being offline, algorithms for offline meta-RL can utilize the largest possible pool of training data available and eliminate potentially unsafe or costly data collection during meta-training. This setting inherits the challenges of offline RL, but it differs significantly because offline RL does not generally consider a) transfer to new tasks or b) limited data from the test task, both of which we face in offline meta-RL. Targeting the offline meta-RL setting, we propose Meta-Actor Critic with Advantage Weighting (MACAW). MACAW is an optimization-based meta-learning algorithm that uses simple, supervised regression objectives for both the inner and outer loop of meta-training. On offline variants of common meta-RL benchmarks, we empirically find that this approach enables fully offline meta-reinforcement learning and achieves notable gains over prior methods.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Meta-reinforcement learning (meta-RL) has emerged as a promising strategy for tackling the high sample complexity of reinforcement learning algorithms, when the goal is to ultimately learn many tasks. Meta-RL algorithms exploit shared structure among tasks during meta-training, amortizing the cost of learning across tasks and enabling rapid adaptation to new tasks during meta-testing from only a small amount of experience. Yet unlike in supervised learning, where large amounts of pre-collected data can be pooled from many sources to train a single model, existing meta-RL algorithms assume the ability to collect millions of environment interactions online during meta-training. Developing offline meta-RL methods would enable such methods, in principle, to leverage existing data from any source, making them easier to scale to real-world problems where large amounts of data might be necessary to generalize broadly. To this end, we propose the offline meta-RL problem setting and a corresponding algorithm that uses only offline (or batch) experience from a set of training tasks to enable efficient transfer to new tasks without any further interaction with either the training or testing environments. See Figure 1 for a comparison of offline meta-RL and standard meta-RL.
12
+
13
+ Because the offline setting does not allow additional data collection during training, it highlights the desirability of a consistent meta-RL algorithm. A meta-RL algorithm is consistent if, given enough diverse data on the test task, adaptation can find a good policy for the task regardless of the training task distribution. Such an algorithm would provide a) rapid adaptation to new tasks from the same distribution as the train tasks while b) allowing for improvement even for out of distribution test tasks. However, designing a consistent meta-RL algorithm in the offline setting is difficult: the consistency requirement suggests we might aim to extend the model-agnostic meta-learning (MAML) algorithm (Finn et al., 2017a), since it directly corresponds to fine-tuning at meta-test time. However, existing MAML approaches use online policy gradients, and only value-based approaches have proven effective in the offline setting. Yet combining MAML with value-based RL subroutines is not straightforward: the higher-order optimization in MAML-like methods demands stable and efficient gradient-descent updates, while TD backups are both somewhat unstable and require a large number of steps to propagate reward information across long time horizons.
14
+
15
+ To address these challenges, one might combine MAML with a supervised, bootstrap-free RL subroutine, such as advantage-weighted regression (AWR) (Peters and Schaal, 2007; Peng et al., 2019), for both for the inner and outer loop of a gradient-based meta-learning algorithm, yielding a ‘MAML+AWR’ algorithm. However, as we will discuss in Section 4 and find empirically in Section 5, naïvely combining MAML and AWR in this way does not provide satisfactory performance because the AWR policy update is not sufficiently expressive. Motivated by prior work that studies the expressive power of MAML (Finn and Levine, 2018), we increase the expressive power of the meta-learner by introducing a carefully chosen policy update in the inner loop. We theoretically prove that this change increases the richness of the policy’s update and find empirically that this policy update dramatically improves adaptation performance and stability in some settings. We further observe that standard feedforward neural network architectures used in reinforcement learning are not well-suited to optimization-based meta-learning and suggest an alternative that proves critical for good performance across four different environments. We call the resulting meta-RL algorithm and architecture Meta-Actor Critic with Advantage Weighting, or MACAW.
16
+
17
+ Our main contributions are the offline meta-RL problem setting itself and MACAW, an offline meta-reinforcement learning algorithm that possesses three key properties: sample efficiency, offline meta-training, and consistency at meta-test time. To our knowledge, MACAW is the first algorithm to successfully combine gradient-based meta-learning and off-policy value-based RL. Our evaluations include experiments on offline variants of standard continuous control meta-RL benchmarks as well as settings specifically designed to test the robustness of an offline meta-learner when training tasks are scarce. In all of these settings, MACAW significantly outperforms fully offline variants state-of-the-art off-policy RL and meta-RL baselines.
18
+
19
+ # 2 PRELIMINARIES
20
+
21
+ In reinforcement learning, an agent interacts with a Markov Decision Process (MDP) to maximize its cumulative reward. An MDP is a tuple $( \boldsymbol { S } , \boldsymbol { A } , \boldsymbol { T } , \boldsymbol { r } )$ consisting of a state space $s$ , an action space $\mathcal { A }$ , stochastic transition dynamics $T : \mathcal { S } \times \mathcal { A } \times \mathcal { S } [ 0 , 1 ]$ , and a reward function $r$ . At each time step, the agent receives reward $r _ { t } = r ( s _ { t } , a _ { t } , s _ { t + 1 } )$ . The agent’s objective is to maximize the expected return (i.e. discounted sum of rewards) $\begin{array} { r } { \mathcal { R } = \sum _ { t } \gamma ^ { t } r _ { t } } \end{array}$ , where $\gamma \in [ 0 , 1 ]$ is a discount factor. To extend this setting to meta-RL, we consider tasks drawn from a distribution $\mathcal { T } _ { i } \sim p ( \mathcal { T } )$ , where each task $\mathcal { T } _ { i } = ( \mathcal { S } , \bar { \mathcal { A } } , p _ { i } , r _ { i } )$ represents a different MDP. Both the dynamics and reward function may vary across tasks. The tasks are generally assumed to exhibit some (unknown) shared structure. During meta-training, the agent is presented with tasks sampled from $p ( \mathcal T )$ ; at meta-test time, an agent’s objective is to rapidly find a high-performing policy for a (potentially unseen) task $\mathcal { T } ^ { \prime } \sim p ( \mathcal { T } )$ . That is, with only a small amount of experience on $\mathcal { T } ^ { \prime }$ , the agent should find a policy that achieves high expected return on that task. During meta-training, the agent meta-learns parameters or update rules that enables such rapid adaptation at test-time.
22
+
23
+ Model-agnostic meta-learning One class of algorithms for addressing the meta-RL problem (as well as meta-supervised learning) are variants of the MAML algorithm (Finn et al., 2017a), which involves a bi-level optimization that aims to achieve fast adaptation via a few gradient updates. Specifically, MAML optimizes a set of initial policy parameters $\theta$ such that a few gradient-descent steps from $\theta$ leads to policy parameters that achieve good task performance. At each meta-training step, the inner loop adapts $\theta$ to a task $\tau$ by computing $\theta ^ { \prime } = \theta - \alpha \nabla _ { \theta } \mathcal { L } _ { T } ( \theta )$ , where $\mathcal { L }$ is the loss function for task $\tau$ and $\alpha$ is the step size (in general, $\theta ^ { \prime }$ might be computed from multiple gradient steps, rather than just one as is written here). The outer loop updates the initial parameters as $\theta \doteq \theta - \beta \nabla _ { \theta } \mathcal { L } _ { T } ^ { \prime } ( \bar { \theta } ^ { \prime } )$ , where $\mathcal { L } _ { \mathcal { T } } ^ { \prime }$ is a loss function for task $\tau$ , which may or may not be the same as the inner-loop loss function $\mathcal { L } _ { T }$ , and $\beta$ is the step size. MAML has been previously instantiated with policy gradient updates in the inner and outer loops (Finn et al., $2 0 1 7 \mathrm { a }$ ; Rothfuss et al., 2018), which can only be applied to on-policy meta-RL settings; we address this shortcoming in this work.
24
+
25
+ Advantage-weighted regression. To develop an offline meta-RL algorithm, we build upon advantage-weighted regression (AWR) (Peng et al., 2019), a simple offline RL method. The AWR policy objective is given by
26
+
27
+ $$
28
+ \mathcal { L } ^ { \mathrm { A W R } } ( \vartheta , \varphi , B ) = \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim B } \left[ - \log \pi _ { \vartheta } ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { T } \left( \mathcal { R } _ { B } ( \mathbf { s } , \mathbf { a } ) - V _ { \varphi } ( \mathbf { s } ) \right) \right) \right] ,
29
+ $$
30
+
31
+ where $B = \{ \mathbf { s } _ { j } , \mathbf { a } _ { j } , \mathbf { s } _ { j } ^ { \prime } , r _ { j } \}$ can be an arbitrary dataset of transition tuples sampled from some behavior policy, and $\mathcal { R } _ { B } ( \mathbf { s } , \mathbf { a } )$ is the return recorded in the dataset for performing action a in state s, $V _ { \varphi } ( \mathbf { s } )$ is the learned value function for the behavior policy evaluated at state s, and $T > 0$ is a temperature parameter. The term $\mathcal { R } _ { B } ( \mathbf { s } , \mathbf { a } ) - V _ { \varphi } ( \mathbf { s } )$ represents the advantage of a particular action. The objective can be interpreted as a weighted regression problem, where actions that lead to higher advantages are assigned larger weights. The value function parameters $\varphi$ are typically trained using simple regression onto Monte Carlo returns, and the policy parameters $\vartheta$ are trained using $\mathcal { L } ^ { \mathrm { A W R } }$ . Next, we discuss the offline meta-RL problem and some of the challenges it poses.
32
+
33
+ ![](images/a17861f422ba39e7b1dfe60c3bd68a029f6f9c282c0c1ff49b334b0c0a136289.jpg)
34
+ Figure 1: Comparing the standard meta-RL setting (left), which includes on-policy and off-policy meta-RL, with offline meta-RL (right). In standard meta-RL, new interactions are sampled from the environment during both meta-training and meta-testing, potentially storing experiences in a replay buffer (off-policy meta-RL). In offline meta-RL, a batch of data is provided for each training task $\mathcal { T } _ { i }$ . This data could be the result of prior skills learned, demonstrations, or other means of data collection. The meta-learner uses these static buffers of data for meta-training and can then learn a new test task when given a small buffer of data for that task.
35
+
36
+ # 3 THE OFFLINE META-RL PROBLEM
37
+
38
+ In the offline meta-RL problem setting, we aim to leverage offline multi-task experience to enable fast adaptation to new downstream tasks. Each task $\mathcal { T } _ { i }$ is drawn from a task distribution $p ( \mathcal { T } )$ . In the offline setting, the meta-training algorithm is not permitted to directly interact with the meta-training tasks $\mathcal { T } _ { i }$ , but instead is provided with a fixed dataset of transition tuples $B _ { i } = \{ s _ { i , j } , a _ { i , j } , s _ { i , j } ^ { \prime } , r _ { i , j } \}$ for each task. Each $B _ { i }$ is populated with trajectories sampled from a corresponding behavior policy $\mu _ { i }$ . Each $\mu _ { i }$ might be an expert policy, sub-optimal demonstrations, other RL agents, or some mixture thereof. Regardless of the behavior policies $\mu _ { i }$ , the objective of offline meta-RL is to maximize return after adaptation on the test tasks. However, depending on the quality of the behavior policies, the maximum attainable return may vary. We observe such a phenomenon in a offline data quality ablation experiment in Section 5.
39
+
40
+ Sampling data from a fixed dataset at both meta-training and meta-testing time, rather than from the learned policy itself, distinguishes offline meta-RL from the standard meta-RL setting. This constraint is significant, because most algorithms for meta-RL require a large amount of on-policy experience from the environment during meta-training; these algorithms are generally unable to fully make use of data collected by external sources. During meta-testing, a (generally unseen) test task $\mathcal { T } _ { \mathrm { t e s t } }$ is drawn from $p ( \mathcal T )$ , and the meta-trained agent is presented with a new batch of experience $D$ sampled from a distribution $B _ { \mathrm { t e s t } }$ . The agent’s objective is to use this batch of data to find the highest-performing policy for the test task. We consider the case where only $B _ { i }$ is fixed during meta-training and $B _ { \mathrm { t e s t } }$ corresponds to sampling online trajectories to be the offline meta-RL problem. The case where both $B _ { i }$ and $B _ { \mathrm { t e s t } }$ are fixed data buffers is called the fully offline meta-RL problem, which is especially applicable in situations when allowing online exploration might be difficult or dangerous. In the fully offline case, we might also consider the setting where we perform additional online rollouts with our adapted policy and fine-tune with this online data after the initial offline adaptation step. We call this the fully offline meta-RL problem with online fine-tuning. The experiments performed in this paper mostly correspond to the fully offline setting. In Appendix C.2 we also conduct an experiment in the setting of fully offline meta-RL with online fine-tuning.
41
+
42
+ Prior meta-RL methods require interaction with the MDP for each of the meta-training tasks (Finn et al., 2017a), and though some prior methods build on off-policy RL algorithms (Rakelly et al., 2019), these algorithms are known to perform poorly in the fully offline setting (Levine et al., 2020). Both of the offline meta-RL settings described above inherit the distributional difficulties of offline RL, which means that addressing this problem setting requires a new type of meta-RL method that is capable of meta-training from offline data.
43
+
44
+ # 4 MACAW: META ACTOR-CRITIC WITH ADVANTAGE WEIGHTING
45
+
46
+ # Algorithm 1 MACAW Meta-Training
47
+
48
+ # Algorithm 2 MACAW Meta-Testing
49
+
50
+ 1: Input: Tasks $\{ \mathcal { T } _ { i } \}$ , offline buffers $\{ D _ { i } \}$
51
+ 2: Hyperparameters: learning rates $\alpha _ { 1 }$ , $\alpha _ { 2 }$ , $\eta _ { 1 }$
52
+ $\eta _ { 2 }$ , training iterations $n$ , temperature $T$
53
+ 3: Randomly initialize meta-parameters $\theta , \phi$
54
+ 4: for $n$ steps do
55
+ 5: for task $\mathcal { T } _ { i } \in \{ \mathcal { T } _ { i } \}$ do
56
+ 6: Sample disjoint batches $D _ { i } ^ { \mathrm { t r } } , D _ { i } ^ { \mathrm { t s } } \sim D _ { i }$
57
+ 7: $\begin{array}{c} \begin{array} { r l } & { \quad \phi _ { i } ^ { \prime } \xleftarrow { * } \phi - \check { \eta } _ { 1 } \nabla _ { \phi } \mathcal { L } _ { V } ( \phi , D _ { i } ^ { \mathrm { t r } } ) } \\ & { \quad \theta _ { i } ^ { \prime } \xleftarrow \theta - \alpha _ { 1 } \nabla _ { \theta } \mathcal { L } _ { \pi } ( \theta , \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t r } } ) } \\ & { \quad \phi \xleftarrow \phi - \eta _ { 2 } \sum _ { i } \left[ \nabla _ { \phi } \mathcal { L } _ { V } ( \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t s } } ) \right] } \\ & { \quad \theta \xleftarrow \theta - \alpha _ { 2 } \sum _ { i } \left[ \nabla _ { \theta } \mathcal { L } ^ { \mathrm { A W R } } ( \theta _ { i } ^ { \prime } , \phi _ { i } ^ { \prime } , \right.} \end{array} \end{array}$
58
+ 8:
59
+ 9:
60
+ 10:
61
+
62
+ 1: Input: Test task $\tau _ { j }$ , offline experience $D$ , meta-policy $\pi _ { \theta }$ , meta-value function $V _ { \phi }$
63
+ 2: Hyperparameters: learning rates $\alpha _ { 1 } , \eta$ , adaptation iterations $n$ , temperature $T$
64
+ 3: Initialize $\theta _ { 0 } \theta$ , $\phi _ { 0 } \phi$ .
65
+ 4: for $n$ steps do
66
+ 5: 6: $\begin{array} { r l } & { \phi _ { t + 1 } \dot { } \phi _ { t } - \eta _ { 1 } \nabla _ { \phi _ { t } } \mathcal { L } _ { V } ( \phi _ { t } , D ) } \\ & { \theta _ { t + 1 } \theta _ { t } - \alpha _ { 1 } \nabla _ { \theta _ { t } } \mathcal { L } _ { \pi } ( \theta _ { t } , \phi _ { t + 1 } , D ) } \end{array}$
67
+
68
+ In addition to satisfying the demands of the offline setting, an ideal method for offline meta-RL should not be limited to the distribution of tasks observed at training time. This is especially important in the offline meta-RL setting, in which the sampling of the training data is out of the control of the agent. In other words, it is critical that an offline meta-RL algorithm be consistent, in the sense that given enough, sufficiently diverse adaptation data at meta-test time, the algorithm can find a good solution to that task, regardless of the meta-training tasks.
69
+
70
+ To address the numerous challenges posed by offline meta-RL, we propose meta actor-critic with advantage weighting (MACAW). MACAW is an offline meta-RL algorithm that learns initializations $\phi$ and $\theta$ for a value function $V _ { \phi }$ and policy $\pi _ { \theta }$ , respectively, that can rapidly adapt to a new task seen at meta-test time via gradient descent. Both the value function and the policy objectives correspond to simple regression losses in both the inner and outer loop, leading to a stable and consistent inner-loop adaptation process and outer-loop meta-training signal. While these objectives build upon AWR, we show that the naive application of an AWR update in the inner loop leads to unsatisfactory performance, motivating the enriched policy update that we describe in Section 4.1. In Sections 4.2 and 4.3, we detail the full meta-training procedure and an important architectural component of the policy and value networks.
71
+
72
+ # 4.1 INNER-LOOP MACAW PROCEDURE
73
+
74
+ The adaptation process for MACAW consists of a value function update followed by a policy update and can be found in lines 6-8 in Algorithm 1. Optimization-based meta-learning methods typically rely on truncated optimization for the adaptation process (Finn et al., 2017a), to satisfy both computational and memory constraints (Wu et al., 2018; Rajeswaran et al., 2019), and MACAW also uses a truncated optimization. However, value-based algorithms that use bootstrapping, such as Q-learning, can require many iterations for values to propagate. Therefore, we use a bootstrap-free update for the value function that simply performs supervised regression onto Monte-Carlo returns.
75
+
76
+ ![](images/c95b5d2cfb234d39803bd3d8890f803420ea4b928748173a00e2021c8d765a20.jpg)
77
+ Figure 2: MACAW policy architecture. Solid lines show the forward pass; dashed lines show gradient flow during the backward pass during adaptation only; the advantage head is not used in the outer loop policy update.
78
+
79
+ Given a batch of training data $D _ { i } ^ { \mathrm { t r } }$ collected for $\mathcal { T } _ { i }$ , MACAW adapts the value function by taking one or a few gradient steps on the following supervised objective:
80
+
81
+ $$
82
+ \phi _ { i } ^ { \prime } \xleftarrow { } \phi - \eta _ { 1 } \nabla _ { \phi } \mathcal { L } _ { V } ( \phi , D _ { i } ^ { \mathrm { I } } ) , \qquad \mathrm { w h e r e } \qquad \mathcal { L } _ { V } ( \phi , D ) \triangleq \mathbb { E } _ { \mathbf { s } , \mathbf { a } \sim D } \left[ ( V _ { \phi } ( \mathbf { s } ) - \mathcal { R } _ { D } ( \mathbf { s } , \mathbf { a } ) ) ^ { 2 } \right]
83
+ $$
84
+
85
+ and where $\mathcal { R } _ { D } ( \mathbf { s } , \mathbf { a } )$ is the Monte Carlo return from the state s taking action a observed in $D$ .
86
+
87
+ After adapting the value function, we proceed to updating the policy. The AWR algorithm updates its policy by performing supervised regression onto actions weighted by the estimated advantage, where the advantage is given by the return minus the value: $\mathcal { R } _ { D } ( \mathbf { s } , \mathbf { a } ) - V _ { \phi _ { i } ^ { \prime } } ( \mathbf { s } )$ . While it is tempting to use this same update rule here, we observe that this update does not provide the meta-learner with sufficient expressive power to be a universal update procedure for the policy, using universality in the sense used by Finn and Levine (2018). For MAML-based methods to approximate any learning procedure, the inner gradient must not discard information needed to infer the task (Finn and Levine,
88
+
89
+ 2018). The gradient of the AWR objective does not contain full information of both the regression weight and the regression target. That is, one cannot recover both the advantage weight and the action from the gradient. We formalize this problem in Theorem 1 in Appendix A. To address this issue and make our meta-learner sufficiently expressive, the MACAW policy update performs both advantage-weighted regression onto actions as well as an additional regression onto action advantages. This enriched policy update is only used during adaptation, and the predicted advantage is used only to enrich the inner loop policy update during meta-training; during meta-test, this predicted advantage is discarded. We prove the universality of the enriched policy update in Theorem 2 in Appendix A. We observe empirically the practical impact of the universality property with an ablation study presented in Figure 4 (left).
90
+
91
+ To make predictions for both the AWR loss and advantage regression, our policy architecture has two output heads corresponding to the predicted action given the state, $\pi _ { \boldsymbol { \theta } } ( \cdot | \mathbf { s } )$ , and the predicted advantage given both state and action $A _ { \boldsymbol { \theta } } ( \mathbf { s } , \mathbf { a } )$ . This architecture is shown in Figure 2. Policy adaptation then proceeds as follows:
92
+
93
+ $$
94
+ \theta _ { i } ^ { \prime } \theta - \alpha _ { 1 } \nabla _ { \theta } \mathcal { L } _ { \pi } ( \theta , \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t r } } ) , \qquad \mathrm { w h e r e } \qquad \mathcal { L } _ { \pi } = \mathcal { L } ^ { \mathrm { A W R } } + \lambda \mathcal { L } ^ { \mathrm { A D V } } .
95
+ $$
96
+
97
+ In our policy update, we show only one gradient step for conciseness of notation, but it can be easily extended to multiple gradient steps. The AWR loss is given in Equation 1, and the advantage regression loss is given by:
98
+
99
+ $$
100
+ \mathcal { L } ^ { \mathrm { A D V } } ( \theta , \phi _ { i } ^ { \prime } , D ) \triangleq \underset { \mathbf { s } , \mathbf { a } \sim D } { \triangleq } \left[ ( \hat { A } ( \mathbf { s } , \mathbf { a } ) - \left( \mathcal { R } _ { D } ( \mathbf { s } , \mathbf { a } ) - V _ { \phi _ { i } ^ { \prime } } ( \mathbf { s } ) \right) ) ^ { 2 } \right]
101
+ $$
102
+
103
+ Adapting with ${ \mathcal { L } } _ { \pi }$ rather than $\mathcal { L } ^ { \mathrm { A W R } }$ addresses the expressiveness problems noted earlier. This adaptation process is done both in the inner loop of meta-training and during meta-test time, as outlined in Algorithm 2. MACAW is consistent at meta-test time because it executes a well-defined RL fine-tuning subroutine based on AWR during adaptation. Next, we describe the meta-training procedure for learning the meta-parameters $\theta$ and $\phi$ , the initializations of the policy and value function, respectively.
104
+
105
+ # 4.2 OUTER-LOOP MACAW PROCEDURE
106
+
107
+ To enable rapid adaptation at meta-test time, we meta-train a set of initial parameters for both the value function and policy to optimize the AWR losses ${ \mathcal { L } } _ { V }$ and $\mathcal { L } ^ { \mathrm { A W R } }$ , respectively, after adaptation (L9-10 in Algorithm 1). We sample a batch of data $D _ { i } ^ { \mathrm { t s } }$ for the outer loop update that is disjoint from the adaptation data $D _ { i } ^ { \mathrm { t r } }$ in order to promote few-shot generalization rather than memorization of the adaptation data. The meta-learning procedure for the value function follows MAML, using the supervised Monte Carlo objective:
108
+
109
+ $$
110
+ \operatorname* { m i n } _ { \phi } \mathbb { E } _ { T _ { i } } \left[ \mathcal { L } _ { V } ( \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t s } } ) \right] ~ = ~ \operatorname* { m i n } _ { \phi } \mathbb { E } _ { T _ { i } } \left[ \mathcal { L } _ { V } ( \phi - \eta _ { 1 } \nabla _ { \phi } \mathcal { L } _ { V } ( \phi , D _ { i } ^ { \mathrm { t } } ) , D _ { i } ^ { \mathrm { t s } } ) \right] .
111
+ $$
112
+
113
+ where ${ \mathcal { L } } _ { V }$ is defined in Equation 2. This objective optimizes for a set of initial value function parameters such that one or a few inner gradient steps lead to an accurate value estimator.
114
+
115
+ Unlike the inner loop, we optimize the initial policy parameters in the outer loop with a standard advantage-weighted regression objective, since expressiveness concerns only pertain to the inner loop where only a small number of gradient steps are taken. Hence, the meta-objective for our initial policy parameters is as follows:
116
+
117
+ $$
118
+ \operatorname* { m i n } _ { \theta } \mathbb { E } _ { \mathcal { T } _ { i } } \left[ \mathcal { L } ^ { \mathrm { A W R } } ( \theta _ { i } ^ { \prime } , \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t s } } ) \right] \ = \ \operatorname* { m i n } _ { \theta } \mathbb { E } _ { \mathcal { T } _ { i } } \left[ \mathcal { L } ^ { \mathrm { A W R } } ( \theta - \alpha _ { 1 } \nabla _ { \theta } \mathcal { L } _ { \pi } ( \theta , \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t r } } ) , \phi _ { i } ^ { \prime } , D _ { i } ^ { \mathrm { t s } } ) \right] ,
119
+ $$
120
+
121
+ where ${ \mathcal { L } } _ { \pi }$ is defined in Equation 3 and $\mathcal { L } ^ { \mathrm { A W R } }$ is defined in Equation 1. Note we use the adapted value function for policy adaptation. The complete MACAW algorithm is summarized in Algorithm 1.
122
+
123
+ # 4.3 MACAW ARCHITECTURE
124
+
125
+ MACAW’s enriched policy update (Equation 3) is motivated by the desire to make inner loop policy updates more expressive. In addition to augmenting the objective, we can also take an architectural approach to increasing gradient expressiveness. Recall that for an MLP, a single step of gradient descent can only make a rank-1 update to each weight matrix. Finn and Levine (2018) show that this implies that MLPs must be impractically deep for MAML to be able to produce any learning procedure. However, we can shortcut this rank-1 limitation with a relatively simple change to the layers of an MLP, which we call a weight transform layer. This layer maps a latent code into the weight matrix and bias, which are then used to compute the layer’s output just as in a typical fully-connected layer. This ‘layer-wise linear hypernetwork’ (Ha et al., 2016) doesn’t change the class of functions computable by the layer on its input, but it increases the expressivity of MAML’s gradient. Because we update the latent code by gradient descent (which is mapped back into a new weight matrix and bias in the forward pass) we can, in theory, acquire weight matrix updates of rank up to the dimensionality of the latent code. We use this strategy for all of the weights in both the value function network and the policy network. This architecture is similar to latent embedding optimization (LEO) (Rusu et al., 2019), but the choice of using simple linear mapping functions allows us to apply weight transform layers to the entire network while still providing more expressive gradients. For a more detailed explanation of this strategy, see Appendix B. Our experiments find that this layer significantly improves learning speed and stability.
126
+
127
+ ![](images/c2d3c77930d93ed2e281d85fd95e50e89fbb79687248630c2ac7e9cc8fc3189a.jpg)
128
+ Figure 3: Comparing MACAW with (i) an offline variant of PEARL (Rakelly et al., 2019), a state-of-the-art off-policy meta-RL method, (ii) an offline multi-task training $^ +$ fine tuning method based on AWR (Peng et al., 2019), and (iii) a meta-behavior cloning baseline. Shaded regions show one standard error of the mean reward of four seeds. MACAW is the only algorithm to consistently outperform the imitation learning baseline, and also learns with the fewest number of training steps in every environment (note the log x axis).
129
+
130
+ # 5 EXPERIMENTS
131
+
132
+ The primary goal of our empirical evaluations is to test whether we can acquire priors from offline multi-task data that facilitate rapid transfer to new tasks. Our evaluation compares MACAW with three sensible approaches to this problem: a meta-imitation learning, multi-task offline RL with fine-tuning, and an offline variant of the state-of-the-art off-policy meta-RL method, PEARL (Rakelly et al., 2019). Further, we analyze a) the importance of MACAW’s enriched policy update (Equation 3) in various data quality regimes; b) the effect of the proposed weight transformation; and c) how each method’s performance is affected when the sampling of the task space during training is very sparse. The first two settings highlight the differences between MACAW and the naïve combination of MAML and AWR; the third setting represents a realistic setting where fewer tasks are available during meta-training. See Appendix C for additional experiments a) ablating the weight transform layer b) investigating the performance of MACAW and PEARL when online fine-tuning is available and c) a richer task distribution.
133
+
134
+ For our experiments, we construct offline variants of the widely-used simulated continuous control benchmark problems introduced by Finn et al. (2017a); Rothfuss et al. (2018), including the halfcheetah with varying directions and varying velocities, the walker with varying physical parameters, and the ant with varying directions. If not noted otherwise, the offline data for each experiment is generated from the replay buffer of a RL agent trained from scratch. This reflects a practical scenario where an agent has previously learned a set of tasks via RL, stored its experiences, and now would like to quickly learn a related task. Data collection information is available in Appendix D.
135
+
136
+ ![](images/622a648f60aef4640a9d619d79c6449b1fd72ba2fd307d65f26c9b17a2c7267d.jpg)
137
+ Ablating MACAW's Weight Transform
138
+
139
+ ![](images/0b2b8be14162f085ffb0cbb13f145ee11743a80135a9332f52d12997878a0b6b.jpg)
140
+ Test Performance with Sparse Task Sampling
141
+
142
+ ![](images/bb285f5837b705f9346b158e8b16fc2f1922ca5701f04b800fdca3994e6aa06b.jpg)
143
+ Ablating MACAW's Enriched Policy Update
144
+ Figure 4: Left: Ablating MACAW’s enriched policy update when varying the quality of the inner loop adaptation data. Solid lines correspond to MACAW, dashed lines correspond to MACAW without the auxiliary policy loss (equivalently, MAML $^ +$ AWR with weight transforms). Both perform similarly with good quality adaptation data (orange), but the policy adaptation step without the auxiliary loss begins to fail as adaptation data is increasingly sub-optimal (blue and red). Bad, medium, and good data correspond to the first, middle, and last 500 trajectories from the lifetime replay buffer of the behavior policy for each task; see Appendix D for learning curves of the individual offline policies. Center: Ablating MACAW’s weight transform layer in the same experimental setting as the cheetah-velocity experiment in Figure 3. Without the additional expressiveness, learning is much slower and less stable. Right: Train task sparsity split performance of MACAW, Offline PEARL, and Offline $\mathbf { M T + }$ fine tune. Each curve corresponds to the performance of a method as the number of tasks available for training is varied. MACAW shows the most consistent performance when different numbers of tasks are used, performing well even when only three tasks are used for training.
145
+
146
+ Can we learn to adapt to new tasks quickly from purely offline data? Our first evaluation compares three approaches to the offline meta-RL problem setting, testing their ability to leverage the offline task datasets in order to quickly adapt to a new task. Specifically, we compare MACAW with i) offline PEARL (Rakelly et al., 2019), ii) multi-task AWR (Peng et al., 2019), which uses 20 steps of Adam (Kingma and Ba, 2015) to adapt to a new task at meta-test time (Offline $\mathrm { M T + F T }$ ) and iii) a meta-behavior cloning baseline. We choose PEARL and AWR because they achieve state-of-the-art performance in off-policy meta-RL and offline RL, respectively, and are readily adaptable to the offline meta-RL problem. As in Rakelly et al. (2019), for each experiment, we sample a finite set of training tasks and held out test tasks upfront and keep these fixed throughout training. Figure 3 shows the results. We find that MACAW is the only algorithm to consistently outperform the meta-behavior cloning baseline. Multi-task AWR $^ +$ fine-tuning makes meaningful progress on the simpler cheetah problems, but it is unable to adapt well on the more challenging walker and ant problems. Offline PEARL shows initial progress on cheetah-velocity and walker-params, but struggles to make steady progress on any of the problems. We attribute PEARL’s failure to Q-function extrapolation error, a problem known to affect many off-policy RL algorithms (Fujimoto et al., 2019), as well as generally unstable offline bootstrapping. MACAW’s and AWR’s value function is bootstrap-free and their policy updates maximize a weighted maximum likelihood objective during training, which biases the policy toward safer actions (Peng et al., 2019), implicitly avoiding problems caused by extrapolation error. In contrast to Offline PEARL and multi-task AWR, MACAW trains efficiently and relatively stably on all problems, providing an effective approach to learning representations from multi-task offline data that can be effectively adapted to new tasks at meta-test time.
147
+
148
+ How does MACAW’s performance differ from MAML $^ +$ AWR? MACAW has two key features distinguishing it from MAML $^ +$ AWR: the enriched policy loss and weight transform layers. Here, we use the Cheetah-Velocity setting to test the effects of both of these changes. We first ablate the enriched policy loss used in MACAW’s inner loop update. This experiment compares MACAW and MAML $+ .$ AWR $^ +$ weight transform layers, which optimize Equation 3 and Equation 1 in the policy inner-loop, respectively. To identify when policy update expressiveness is most crucial, we repeat this ablation study three times, meta-training and meta-testing with various qualities of inner-loop data, using good outer loop data for all experiments. Figure 4 (left) shows the results. MAML $^ +$ AWR performs well when the offline adaptation data comes from a near-optimal policy, which is essentially a one-shot imitation setting (orange); however, when the offline adaptation data comes from a policy pre-convergence, the difference between MACAW and MAML $+$ AWR becomes significant (blue and red). This result supports the intuition that policy update expressiveness is of greater importance when the adaptation data is more random, because in this case the adaptation data includes a weaker signal from which to infer the task (e.g. the task cannot be inferred by simply looking at the states visited). Because an agent is unable to collect further experience from the environment during offline adaptation, it is effectively at the mercy of the quality of the behavior policy that produced the data. An important property of a meta-RL algorithm is thus its robustness to sub-optimal behavior policies, a property that MACAW exhibits. Next, we ablate the weight transform layers, comparing
149
+
150
+ MAML $+ .$ AWR $^ +$ enriched policy update with MACAW. Figure 4 (center) suggests that the weight transform layers significantly improve both learning speed and stability. The No WT-Equal Width variant removes the weight transform from each fully-connected layer, replacing it with a regular fully-connected layer of equal width in the forward pass. The No WT-Equal Params variant replaces each of MACAW’s weight transform layers with a regular fully-connected layer of greater width, to keep the total number of learnable parameters in the network roughly constant. In either case, we find that MACAW provides a significant improvement in learning speed, as well as stability when compared to the Equal Width variant. Figure 5 in the appendix shows that this result is consistent across problems.
151
+
152
+ How do algorithms perform with varying numbers of meta-training tasks? Generally, we prefer an offline meta-RL algorithm that can generalize to new tasks when presented with only a small number of meta-training tasks sampled from $p ( \mathcal { T } )$ . In this section, we conduct an experiment to evaluate the extent to which various algorithms rely on dense sampling of the space of tasks during training in order to generalize well. We compare the test performance of MACAW, offline PEARL, and offline multi-task AWR $^ +$ fine-tuning as we hold out an increasingly large percentage of the Cheetah-Velocity task space. The results are presented in Figure 4 (right). Surprisingly, Offline PEARL completely fails to learn both when training tasks are plentiful and when they are scarce, but learns relatively effectively in the middle regime (5-20 tasks). In our experiments, we often observe instability in Offline PEARL’s task inference and value function networks when training on too many offline tasks. On the other hand, with too few tasks, the task inference network simply learns a degenerate solution, providing no useful information for the value functions or policy to identify the task. The multi-task learning $^ +$ fine-tuning baseline exhibits a steadier degradation in performance as training tasks are removed, likely owing to its bootstrap-free learning procedure. Similarly to Offline PEARL, it is not able to learn a useful prior for fine-tuning when only presented with 3 tasks for training. However, MACAW finds a solution of reasonable quality for any sampling of the task space, even for very dense or very sparse samplings of the training tasks. In practice, this property is desirable, because it allows the same algorithm to scale to very large offline datasets while still producing useful adaptation behaviors for small datasets. Ultimately, MACAW effectively exploits the available data when meta-training tasks are plentiful and shows by far the greatest robustness when tasks are scarce, which we attribute to its SGD-based adaptation procedure during both meta-training and meta-testing.
153
+
154
+ # 6 RELATED WORK
155
+
156
+ Meta-learning algorithms enable efficient learning of new tasks by learning elements of the learning process itself (Schmidhuber, 1987; Bengio et al., 1992; Thrun and Pratt, 1998; Finn, 2018). We specifically consider the problem of meta-reinforcement learning. Prior methods for meta-RL can generally be categorized into two groups. Contextual meta-RL methods condition a neural network on experience using a recurrent network (Wang et al., 2016; Duan et al., 2016; Fakoor et al., 2020), a recursive network (Mishra et al., 2017), or a stochastic inference network (Rakelly et al., 2019; Zintgraf et al., 2020; Humplik et al., 2019; Sæmundsson et al., 2018). Optimization-based meta-RL methods embed an optimization procedure such as gradient descent into the meta-level optimization (Finn et al., 2017a; Nagabandi et al., 2019; Rothfuss et al., 2018; Zintgraf et al., 2019; Gupta et al., 2018; Mendonca et al., 2019; Yang et al., 2019), potentially using a learned loss function (Houthooft et al., 2018; Bechtle et al., 2019; Kirsch et al., 2020b;a). In prior works, the former class of approaches tend to reach higher asymptotic performance, while the latter class is typically more robust to out-of-distribution tasks, since the meta-test procedure corresponds to a well-formed optimization. Concurrent work by Dorfman and Tamar (2020) investigates the offline meta-RL setting, directly applying an existing meta-RL algorithm, VariBAD (Zintgraf et al., 2020), to the offline setting. The proposed method further assumes knowledge of the reward function for each task to relabel rewards and share data across tasks with shared dynamics. MACAW does not rely on this knowledge nor the assumption that some tasks share dynamics, but this technique could be readily combined with MACAW when these assumptions do hold.
157
+
158
+ Unlike these prior works, we aim to develop an optimization-based meta-RL algorithm that can both learn from entirely offline data and produces a monotonic learning procedure. Only a handful of previous model-free meta-RL methods leverage off-policy data at all (Rakelly et al., 2019; Mendonca et al., 2019), and none have considered the fully offline setting. Guided meta-policy search (Mendonca et al., 2019) is optimization-based, but is not applicable to the batch setting as it partially relies on policy gradients. This only leaves PEARL (Rakelly et al., 2019) and its relatives (Fakoor et al., 2020), which correspond to a contextual meta-learning approach that is sensitive to the meta-training task distribution without fine-tuning (Fakoor et al., 2020) at test time. We also compare to PEARL, and find that, as expected, it performs worse than in the off-policy setting, since the fully offline setting is substantially more challenging than the off-policy setting that it was designed for.
159
+
160
+ The proposed algorithm builds on the idea of batch off-policy or offline reinforcement learning (Fujimoto et al., 2019; Kumar et al., 2019b; Wu et al., 2019; Levine et al., 2020; Agarwal et al., 2020), extending the problem setting to the meta-learning setting. There are a number of recent works that have demonstrated successful results with offline reinforcement learning and deep neural networks (Fujimoto et al., 2019; Jaques et al., 2019; Kumar et al., 2019a; Wu et al., 2019; Peng et al., 2019; Agarwal et al., 2020). We specifically choose to build upon the advantage-weighted regression (AWR) algorithm (Peng et al., 2019). We find that AWR performs well without requiring dynamic programming, instead using Monte Carlo estimation to infer the value function. This property is appealing, as it is difficult to combine truncated optimization-based meta-learners such as MAML (Finn et al., 2017a) with TD learning, which requires a larger number of gradient steps to effectively back-up values.
161
+
162
+ # 7 CONCLUSION
163
+
164
+ In this work, we formulated the problem of offline meta-reinforcement learning and presented MACAW, a practical algorithm that achieves good performance on various continuous control tasks compared with other state-of-the-art meta-RL algorithms. We motivated the design of MACAW by the desire to build an offline meta-RL algorithm that is both sample-efficient (using value-based RL subroutines) and consistent (running a full-fledged RL algorithm at test time). We hope that this work serves as the basis for future research in offline meta-RL, enabling more sample-efficient learning algorithms to make better use of purely observational data from previous tasks and adapt to new tasks more quickly.
165
+
166
+ We consider fully offline meta-training and meta-testing with and without online fine-tuning, showing that MACAW is effective both when collecting online data is totally infeasible as well as when some online data collection is possible at meta-test time. However, an interesting direction for future work is to consider how we might enable online adaptation from purely offline meta-training while preserving the consistency property of MACAW. This would require an offline strategy for learning to explore, a problem that has largely been considered in on-policy settings in the past (Gupta et al., 2018; Zintgraf et al., 2020) but also recently in offline settings (Dorfman and Tamar, 2020).
167
+
168
+ # REFERENCES
169
+
170
+ Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, 2020.
171
+
172
+ Sarah Bechtle, Artem Molchanov, Yevgen Chebotar, Edward Grefenstette, Ludovic Righetti, Gaurav Sukhatme, and Franziska Meier. Meta-learning via learned loss. arXiv preprint arXiv:1906.05374, 2019.
173
+
174
+ Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and Jan Gecsei. On the optimization of a synaptic learning rule. In Preprints Conf. Optimality in Artificial and Biological Neural Networks, volume 2. Univ. of Texas, 1992.
175
+
176
+ Tristan Deleu, Tobias Würfl, Mandana Samiei, Joseph Paul Cohen, and Yoshua Bengio. Torchmeta: A Meta-Learning library for PyTorch, 2019. URL https://arxiv.org/abs/1909.06576. Available at: https://github.com/tristandeleu/pytorch-meta.
177
+
178
+ Ron Dorfman and Aviv Tamar. Offline meta reinforcement learning. arXiv preprint arXiv:2008.02598, 2020.
179
+
180
+ Yan Duan, John Schulman, Xi Chen, Peter L Bartlett, Ilya Sutskever, and Pieter Abbeel. Rl2: Fast reinforcement learning via slow reinforcement learning. arXiv preprint arXiv:1611.02779, 2016.
181
+
182
+ Rasool Fakoor, Pratik Chaudhari, Stefano Soatto, and Alexander J. Smola. Meta-q-learning. In International Conference on Learning Representations, 2020.
183
+
184
+ Chelsea Finn and Sergey Levine. Meta-learning and universality: Deep representations and gradient descent can approximate any learning algorithm. International Conference on Learning Representations, 10 2018.
185
+
186
+ Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, 2017a.
187
+
188
+ Chelsea Finn, Tianhe Yu, Tianhao Zhang, Pieter Abbeel, and Sergey Levine. One-shot visual imitation learning via meta-learning. CoRL, abs/1709.04905, 2017b. URL http://arxiv.org/abs/ 1709.04905.
189
+
190
+ Chelsea B Finn. Learning to Learn with Gradients. University of California, Berkeley, 2018.
191
+
192
+ Scott Fujimoto, Herke Hoof, and David Meger. Addressing function approximation error in actorcritic methods. In International Conference on Machine Learning, pages 1582–1591, 2018.
193
+
194
+ Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2052–2062, Long Beach, California, USA, 09–15 Jun 2019. PMLR. URL http://proceedings.mlr.press/v97/fujimoto19a.html.
195
+
196
+ Abhishek Gupta, Russell Mendonca, YuXuan Liu, Pieter Abbeel, and Sergey Levine. Metareinforcement learning of structured exploration strategies. In Advances in Neural Information Processing Systems, pages 5302–5311, 2018.
197
+
198
+ David Ha, Andrew Dai, and Quoc V. Le. Hypernetworks, 2016.
199
+
200
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018.
201
+
202
+ Rein Houthooft, Yuhua Chen, Phillip Isola, Bradly Stadie, Filip Wolski, OpenAI Jonathan Ho, and Pieter Abbeel. Evolved policy gradients. In Advances in Neural Information Processing Systems, pages 5400–5409, 2018.
203
+
204
+ Jan Humplik, Alexandre Galashov, Leonard Hasenclever, Pedro A Ortega, Yee Whye Teh, and Nicolas Heess. Meta reinforcement learning as task inference. arXiv preprint arXiv:1905.06424, 2019.
205
+
206
+ Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Gu, and Rosalind Picard. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456, 2019.
207
+
208
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http://arxiv.org/abs/1412.6980.
209
+
210
+ Louis Kirsch, Sjoerd van Steenkiste, and Juergen Schmidhuber. Improving generalization in meta reinforcement learning using learned objectives. In International Conference on Learning Representations, 2020a. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ S1evHerYPr.
211
+
212
+ Louis Kirsch, Sjoerd van Steenkiste, and Jurgen Schmidhuber. Improving generalization in metareinforcement learning using learned objectives. ICLR, 2020b.
213
+
214
+ Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pages 11761–11771, 2019a.
215
+
216
+ Aviral Kumar, Justin Fu, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. NeurIPS, 2019b. URL http://arxiv.org/abs/1906. 00949.
217
+
218
+ B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, December 2015. doi: 10.1126/science. aab3050. URL https://doi.org/10.1126/science.aab3050.
219
+
220
+ Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
221
+
222
+ Russell Mendonca, Abhishek Gupta, Rosen Kralev, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Guided meta-policy search. In Advances in Neural Information Processing Systems, pages 9653–9664, 2019.
223
+
224
+ Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. Meta-learning with temporal convolutions. arXiv:1707.03141, 2017.
225
+
226
+ Anusha Nagabandi, Ignasi Clavera, Simin Liu, Ronald S Fearing, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Learning to adapt in dynamic, real-world environments through meta-reinforcement learning. International Conference on Learning Representations (ICLR), 2019.
227
+
228
+ Ashvin Nair, Murtaza Dalal, Abhishek Gupta, and Sergey Levine. Accelerating online reinforcement learning with offline datasets, 2020.
229
+
230
+ Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning, 2019.
231
+
232
+ Jan Peters and Stefan Schaal. Reinforcement learning by reward-weighted regression for operational space control. In Proceedings of the 24th International Conference on Machine Learning, ICML ’07, page 745–750, New York, NY, USA, 2007. Association for Computing Machinery. ISBN 9781595937933. doi: 10.1145/1273496.1273590. URL https: //doi.org/10.1145/1273496.1273590.
233
+
234
+ Aravind Rajeswaran, Chelsea Finn, Sham M Kakade, and Sergey Levine. Meta-learning with implicit gradients. In Advances in Neural Information Processing Systems, pages 113–124, 2019.
235
+
236
+ Kate Rakelly, Aurick Zhou, Deirdre Quillen, Chelsea Finn, and Sergey Levine. Efficient off-policy meta-reinforcement learning via probabilistic context variables. In International Conference on Machine Learning, 2019.
237
+
238
+ Jonas Rothfuss, Dennis Lee, Ignasi Clavera, Tamim Asfour, and Pieter Abbeel. Promp: Proximal meta-policy search. arXiv preprint arXiv:1810.06784, 2018.
239
+
240
+ Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id= BJgklhAcK7.
241
+
242
+ Steindór Sæmundsson, Katja Hofmann, and Marc Peter Deisenroth. Meta reinforcement learning with latent variable gaussian processes. arXiv preprint arXiv:1803.07551, 2018.
243
+
244
+ Jurgen Schmidhuber. Evolutionary principles in self-referential learning. On learning how to learn: The meta-meta-... hook.) Diploma thesis, Institut f. Informatik, Tech. Univ. Munich, 1:2, 1987.
245
+
246
+ Sebastian Thrun and Lorien Pratt. Learning to learn: Introduction and overview. In Learning to learn, pages 3–17. Springer, 1998.
247
+
248
+ Oriol Vinyals, Charles Blundell, Timothy Lillicrap, koray kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29, pages 3630–3638. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper/2016/ file/90e1357833654983612fb05e3ec9148c-Paper.pdf.
249
+
250
+ Jane X Wang, Zeb Kurth-Nelson, Dhruva Tirumala, Hubert Soyer, Joel Z Leibo, Remi Munos, Charles Blundell, Dharshan Kumaran, and Matt Botvinick. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016.
251
+
252
+ Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. arXiv preprint arXiv:1911.11361, 2019.
253
+
254
+ Yuhuai Wu, Mengye Ren, Renjie Liao, and Roger Grosse. Understanding short-horizon bias in stochastic meta-optimization. arXiv preprint arXiv:1803.02021, 2018.
255
+
256
+ Yuxiang Yang, Ken Caluwaerts, Atil Iscen, Jie Tan, and Chelsea Finn. Norml: No-reward meta learning. In Proceedings of the 18th International Conference on Autonomous Agents and MultiAgent Systems, pages 323–331. International Foundation for Autonomous Agents and Multiagent Systems, 2019.
257
+
258
+ Tianhe Yu, Deirdre Quillen, Zhanpeng He, Ryan Julian, Karol Hausman, Chelsea Finn, and Sergey Levine. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on Robot Learning, 2019.
259
+
260
+ Luisa Zintgraf, Kyriacos Shiarlis, Maximilian Igl, Sebastian Schulze, Yarin Gal, Katja Hofmann, and Shimon Whiteson. Varibad: A very good method for bayes-adaptive deep rl via meta-learning. In International Conference on Learning Representations, 2020.
261
+
262
+ Luisa M Zintgraf, Kyriacos Shiarlis, Vitaly Kurin, Katja Hofmann, and Shimon Whiteson. Fast context adaptation via meta-learning. In International Conference on Machine Learning, 2019.
263
+
264
+ # Appendix
265
+
266
+ # A MACAW AUXILIARY LOSS AND UPDATE EXPRESSIVENESS
267
+
268
+ Finn and Levine (2018) lay out conditions under which the MAML update procedure is universal, in the sense that it can approximate any function $f ( \mathbf { x } , \mathbf { y } , \mathbf { x } ^ { * } )$ arbitrarily well (given enough capacity), where $\mathbf { x }$ and y are the support set inputs and labels, respectively, and $\mathbf { x } ^ { * }$ is the test input. Universality in this sense is an attractive property because it implies that the update is expressive enough to approximate any update procedure; a method that does not possess the universality property might be limited in its asymptotic post-adaptation performance because it cannot express (or closely approximate) the true optimal update procedure. In order for the MAML update procedure to be universal, several requirements of the network architecture, hyperparameters, and loss function must be satisfied. Most of these are not method-specific in that they stipulate minimum network depth, activation functions, and non-zero learning rate for any neural network. However, the condition placed on the loss function require more careful treatment. The requirement is described in Definition 1.
269
+
270
+ Definition 1. A loss function is ‘universal’ if the gradient of the loss with respect to the prediction(s) is an invertible function of the label(s) used to compute the loss.
271
+
272
+ We note that Definition 1 is a necessary but not sufficient condition for an update procedure to be universal (see other conditions above and Finn and Levine (2018)). For the AWR loss function (copied below from Equation 1 with minor changes), the labels are the ground truth action a and the corresponding advantage $\mathcal { R } ( \mathbf { s } , \mathbf { a } ) - V _ { \phi _ { i } ^ { \prime } } ( \mathbf { s } )$ .
273
+
274
+ $$
275
+ \mathcal { L } ^ { \mathrm { A W R } } ( \mathbf { s } , \mathbf { a } , \theta , \phi _ { i } ^ { \prime } ) = - \log \pi _ { \theta } ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { T } \left( \mathcal { R } ( \mathbf { s } , \mathbf { a } ) - V _ { \phi _ { i } ^ { \prime } } ( \mathbf { s } ) \right) \right)
276
+ $$
277
+
278
+ For simplicity and without loss of generality (see Finn and Levine (2018), Sections 4 & 5), we will consider the loss for only a single sample, rather than averaged over a batch.
279
+
280
+ In the remainder of this section, we first state in Theorem 1 that the standard AWR policy loss function does not satisfy the condition for universality described in Definition 1. The proof is by a simple counterexample. Next, we state in Theorem 2 that the MACAW auxiliary loss does satisfy the universality condition, enabling a universal update procedure given the other generic universality conditions are satisfied (note that the MACAW value function loss satisfies the condition in Definition 1 because it uses L2 regression Finn and Levine (2018)).
281
+
282
+ # A.1 NON-UNIVERSALITY OF STANDARD AWR POLICY LOSS FUNCTION
283
+
284
+ Intuitively, the AWR gradient does not satisfy the invertibility condition because it does not distinguish between a small error in the predicted action that has a large corresponding advantage weight and a large error in the predicted action (in the same direction) that has a small corresponding advantage weight. The following theorem formalizes this statement.
285
+
286
+ Theorem 1. The AWR loss function $\mathcal { L } ^ { A W R }$ is not universal according to Definition 1.
287
+
288
+ The proof is by counterexample; we will show that there exist different sets of labels $\{ \mathbf { a } _ { 1 } , A _ { 1 } ( \mathbf { s } , \mathbf { a } _ { 1 } ) \}$ and $\{ \mathbf { a } _ { 2 } , A _ { 2 } ( \mathbf { s } , \mathbf { a } _ { 1 } ) \}$ that produce the same gradient for some output of the model. First, rewriting Equation 7 with $A ( \mathbf { s } , \mathbf { a } ) = \left( \mathcal { R } ( \mathbf { s } , \mathbf { a } ) - V _ { \phi _ { i } ^ { \prime } } ( \mathbf { s } ) \right)$ , we have
289
+
290
+ $$
291
+ { \mathcal { L } } ^ { \mathrm { A W R } } ( \mathbf { s } , \mathbf { a } , \theta ) = - \log \pi _ { \theta } ( \mathbf { a } | \mathbf { s } ) \exp \left( { \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } } \right)
292
+ $$
293
+
294
+ Because our policy is parameterized as a Gaussian with fixed diagonal covariance $\sigma ^ { 2 } I$ , we can again rewrite this loss as
295
+
296
+ $$
297
+ \mathcal { L } ^ { \mathrm { A W R } } ( \mathbf { s } , \mathbf { a } , \hat { \mathbf { a } } _ { \mu } ) = \left( \log \frac { 1 } { ( 2 \pi \sigma ^ { 2 } ) ^ { \frac { k } { 2 } } } + \frac { | | \mathbf { a } - \hat { \mathbf { a } } _ { \mu } | | ^ { 2 } } { 2 \sigma ^ { 2 } } \right) \exp \left( \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } \right)
298
+ $$
299
+
300
+ where $\hat { \mathbf { a } } _ { \mu }$ is the mean of the Gaussian output by the policy and $k = \dim ( \mathbf { a } )$ . For the purpose of the simplicity of the counterexample, we assume the policy output $\hat { \mathbf { a } } _ { \mu }$ is 0. The gradient of this loss with respect to the policy output is
301
+
302
+ $$
303
+ \nabla _ { \hat { \mathbf { a } } _ { \mu } } { \mathcal { L } } ^ { \mathrm { A W R } } ( \mathbf { s } , \mathbf { a } , \mathbf { 0 } ) = - { \frac { 1 } { \sigma ^ { 2 } } } \exp \left( { \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } } \right) \mathbf { a }
304
+ $$
305
+
306
+ To demonstrate that the gradient operator applied to this loss function is not invertible, we pick two distinct label values and show that they give the same gradient. We pick $\mathbf { a } _ { 1 } = [ 1 , . . . , 1 ] ^ { T }$ , $A _ { 1 } ( \mathbf { s } , \mathbf { a } _ { 1 } ) =$ $T$ and $\mathbf { a } _ { 2 } = [ 0 . 1 , . . . , 0 . 1 ] ^ { T }$ , $A _ { 2 } ( \mathbf { s } , \mathbf { a } _ { 2 } ) \stackrel { - } { = } \log ( 1 0 ) T$ . Inserting these values into Equation A.1, this gives gradients $\begin{array} { r } { g _ { 1 } ~ = ~ \frac { - e } { \sigma ^ { 2 } } [ 1 , . . . , 1 ] ^ { T } } \end{array}$ and $\begin{array} { r } { g _ { 2 } ^ { \sim } = \frac { - 1 0 e } { \sigma ^ { 2 } } [ 0 . 1 , . . . , 0 . 1 ] ^ { T } = \frac { - e } { \sigma ^ { 2 } } [ 1 , . . . , 1 ] ^ { T } = g _ { 1 } } \end{array}$ . Thus the gradient of the standard AWR loss does not possess sufficient information to recover the labels uniquely and using this loss for policy adaptation does not produce a universal policy update procedure. Next, we show how the auxiliary loss used in MACAW alleviates this problem.
307
+
308
+ # A.2 UNIVERSALITY OF THE MACAW POLICY ADAPTATION LOSS FUNCTION
309
+
310
+ In this section, we show that by adding an additional term to the AWR loss function, we acquire a loss that satisfies the condition stated in Definition 1, which we state in Theorem 2. Intuitively, the additional loss term allows the gradient to distinguish between the cases that were problematic for the AWR loss (large action error and small advantage weight vs small action error and large advantage weight).
311
+
312
+ Theorem 2. The MACAW policy loss function ${ \mathcal { L } } _ { \pi }$ is universal according to Definition 1.
313
+
314
+ The MACAW policy adaptation loss (given in Equation 3) is the sum of the AWR loss and an auxiliary advantage regression loss (the following is adapted from Equation 8):
315
+
316
+ $$
317
+ \mathcal { L } _ { \pi } ( \mathbf { s } , \mathbf { a } , \hat { \mathbf { a } } _ { \mu } , \hat { A } ) = \left( \log \frac { 1 } { ( 2 \pi \sigma ^ { 2 } ) ^ { \frac { k } { 2 } } } + \frac { \| \mathbf { a } - \hat { \mathbf { a } } _ { \mu } \| ^ { 2 } } { 2 \sigma ^ { 2 } } \right) \exp \left( \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } \right) + \lambda ( A ( \mathbf { s } , \mathbf { a } ) - \hat { A } ) ^ { 2 }
318
+ $$
319
+
320
+ where $\hat { A }$ is the predicted advantage output from the policy advantage head and $\lambda$ is the advantage regression coefficient. The gradient of this loss with respect to the predicted advantage $\hat { A }$ is
321
+
322
+ $$
323
+ g _ { \mathrm { A D V } } = \nabla _ { \hat { A } } \mathcal { L } _ { \pi } ( \mathbf { s } , \mathbf { a } , \hat { \mathbf { a } } _ { \mu } , \hat { A } ) = 2 \lambda ( \hat { A } - A ( \mathbf { s } , \mathbf { a } ) )
324
+ $$
325
+
326
+ and the gradient of the loss with respect to $\hat { \mathbf { a } } _ { \mu }$ is
327
+
328
+ $$
329
+ \mathbf { g } _ { \mathrm { A W R } } = \nabla _ { \hat { \mathbf { a } } _ { \mu } } \mathcal { L } _ { \pi } ( \mathbf { s } , \mathbf { a } , \hat { \mathbf { a } } _ { \mu } , \hat { A } ) = \frac { 1 } { \sigma ^ { 2 } } \exp \left( \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } \right) ( \hat { \mathbf { a } } _ { \mu } - \mathbf { a } )
330
+ $$
331
+
332
+ We write the combined gradient as $\mathbf { g } = \left[ \mathbf { \mathcal { G } } _ { \mathrm { A W R } } \right]$ . In order to provide a universal update procedure, we must be able to recover both the action label a and the advantage label $A ( \mathbf { s } , \mathbf { a } )$ from g. First, because $g _ { \mathrm { A D V } }$ is an invertible function of $A ( \mathbf { s } , \mathbf { a } )$ , we can directly extract the advantage label by re-arranging Equation 9:
333
+
334
+ $$
335
+ A ( \mathbf { s } , \mathbf { a } ) = \frac { g _ { \mathrm { A D V } } - 2 \lambda \hat { A } } { - 2 \lambda }
336
+ $$
337
+
338
+ Similarly, gAWR is an invertible function of a, so we can then extract the action label by re-arranging Equation 10:
339
+
340
+ $$
341
+ \mathbf { a } = { \frac { \mathbf { g } _ { \mathrm { A W R } } - { \frac { 1 } { \sigma ^ { 2 } } } \exp \left( { \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } } \right) \hat { \mathbf { a } } _ { \mu } } { - { \frac { 1 } { \sigma ^ { 2 } } } \exp \left( { \frac { A ( \mathbf { s } , \mathbf { a } ) } { T } } \right) } }
342
+ $$
343
+
344
+ Because we can compute $A ( \mathbf { s } , \mathbf { a } )$ from $g _ { \mathrm { A D V } }$ , there are no unknowns in the RHS of Equation 11 and we can compute a (here, $\sigma , \lambda$ , and $T$ are known constants); it is thus the additional information provided by $g _ { \mathrm { A D V } }$ that resolves the ambiguity that is problematic for the standard AWR policy loss gradient. We have now shown that both the action label and advantage label used in the MACAW policy adaptation loss are recoverable from its gradient, implying that the update procedure is universal under the conditions given by Finn and Levine (2018), which concludes the proof.
345
+
346
+ # B WEIGHT TRANSFORM LAYERS
347
+
348
+ Here, we describe in detail the ‘weight transformation’ layer that augments the expressiveness of the MAML update in MACAW. First, we start with the observation in past work (Finn et al., 2017b) that adding a ‘bias transformation’ to each layer improves the expressiveness of the MAML update.
349
+
350
+ To understand the bias transform, we compare with a typical fully-connected layer, which has the forward pass
351
+
352
+ $$
353
+ \mathbf { y } = \sigma \left( W \mathbf { x } + \mathbf { b } \right)
354
+ $$
355
+
356
+ where $\mathbf { x }$ is the previous layer’s activations, $\mathbf { b }$ is the bias vector, $W$ is the weight matrix, and $\mathbf { y }$ is this layer’s activations. For a bias transformation layer, the forward pass is
357
+
358
+ $$
359
+ \mathbf { y } = \sigma \left( W \mathbf { x } + W ^ { b } \mathbf { z } \right)
360
+ $$
361
+
362
+ where $\mathbf { z }$ and $W ^ { b }$ are learnable parameters of the bias transformation. During adaptation, either only the vector $\mathbf { z }$ or both the vector $\mathbf { z }$ and the bias matrix $W ^ { b }$ are adapted. The vector $\mathbf { \bar { \boldsymbol { W } } } ^ { b } \mathbf { z }$ has the same dimensionality as the bias in the previous equation. This formulation does not increase the expressive power of the forward pass of the layer, but it does allow for a more expressive update of the ‘bias vector’ $W ^ { b } \mathbf { z }$ (in the case of $\dim ( \mathbf { z } ) = \dim ( \mathbf { b } )$ and $W ^ { b } = I$ , we recover the standard fully-connected layer).
363
+
364
+ For a weight transformation layer (used in MACAW), we extend the idea of computing the bias from a latent vector to the weight matrix itself. We now present the forward pass for a weight transformation layer layer with $d$ input and $d$ output dimensions and latent dimension $c$ . First, we compute $w =$ $W ^ { \mathrm { w t } } \mathbf { z }$ , where $W ^ { \mathrm { w t } } \in \mathbf { \mathbb { R } } ^ { ( d ^ { 2 } + d ) \times c }$ . The first $d ^ { 2 }$ components of $w$ are reshaped into the $d \times d$ weight matrix of the layer $W ^ { * }$ , and the last $d$ components are used as the bias vector $b ^ { * }$ . The forward pass is then the same as a regular fully-connected layer, but using the computed matrix and bias $W ^ { * }$ and $b ^ { * }$ instead of a fixed matrix and bias vector; that is $y = \bar { \sigma } ( W ^ { * } \mathbf { x } + \mathbf { \bar { b } } ^ { * } )$ . During adaptation, both the latent vector $\mathbf { z }$ and the transform matrix $W ^ { \mathrm { w t } }$ are adapted. We note that adapting $\mathbf { z }$ enables the post-adaptation weight matrix used in the forward pass, $W ^ { * ^ { \prime } }$ , to differ from the pre-adaptation weight matrix $W ^ { * }$ by a matrix of rank up to the dimension of $\mathbf { z }$ , whereas gradient descent with normal layers makes rank-1 updates to weight matrices. We hypothesize it is this added expressivity that makes the weight transform layer effective. A comparison of MACAW with and without weight transformation layers can be found in Figures 4-center and 6.
365
+
366
+ # C ADDITIONAL EXPERIMENTS AND ABLATIONS
367
+
368
+ # C.1 WEIGHT TRANSFORM ABLATION STUDY
369
+
370
+ In addition to the results shown in Figure 4 (center), we include an ablation of the weight transform here for all tasks. Figure 5 shows these results. We find that across environments, the weight transform plays a significant role in increasing training speed, stability, and even final performance. On the relatively simple cheetah direction benchmark, it does not affect the quality of the final meta-trained agent, but it does improve the speed and stability of training. On the other three (more difficult) tasks, we see a much more noticeable affect in terms of both training stability as well as final performance.
371
+
372
+ Additionally, we investigate the effect of the weight transform in a few-shot image classification setting. We use the 20-way 1-shot Omniglot digit classification setup (Lake et al., 2015), specifically the train/val split used by (Vinyals et al., 2016) as implemented by Deleu et al. (2019). We compare three MLP models, all with 4 hidden layers:
373
+
374
+ 1. An MLP with weight transform layers of 128 hidden units and a latent layer dimension of 32 (4,866,048 parameters; Weight Transform in Figure 6).
375
+ 2. An MLP without weight transform layers, with 128 hidden units (152,596 parameters; No WT-Equal Width in Figure 6)
376
+ 3. An MLP without weight transform layers, with 1150 hidden units (4,896,720 parameters; No WT-Equal Params in Figure 6)
377
+
378
+ We find that the model with weight transform layers shows the best combination of fast convergence and good asymptotic performance compared with baselines with regular fully-connected layers. No WT-Equal Width has the same number of hidden units as the weight transform model (128), which means the model has fewer parameters in total (because the weight transform layers include a larger weight matrix). The No WT-Equal Params baseline uses wider hidden layers to equalize the number of parameters in the entire model with the Weight Transform model. Somewhat surprisingly, the smaller baseline model (Equal Width) outperforms the larger baseline model (Equal Params).
379
+
380
+ ![](images/cedc853cfcacf9d7c0bdcc3294feab865d89f98d34b1c4415f03ae668dbfc96f.jpg)
381
+ Figure 5: Ablating the weight transformation in MACAW on the MuJoCo benchmark environments. All networks have the same number of hidden units. Although MACAW is able to learn with regular fully-connected layers, the weight transformation significantly improves performance on all tasks that require adaptation to unseen tasks.
382
+
383
+ When using MAML-style meta-learners, it is important to consider that adding parameters to the model affects the expressiveness of both the forward computation of the model and the updates computable with a finite number of steps of gradient descent.
384
+
385
+ Generally, increasing the number of parameters in the model should improve the model’s ability to fit the training set (because the inner loop of MAML is more expressive), which we observe here. Increasing the expressiveness of the inner loop of MAML can also speed convergence, which we also observe in Figure 6. However, by simply adding neurons to a typical MLP, the post-adaptation model tends to overfit the training set more, as we see in Figure 6. On the other hand, adding parameters through weight transformation layers increases expressiveness of the adaptation step by enabling weight updates with rank greater than 1 without changing the expressiveness of the forward computation of the model.
386
+
387
+ ![](images/bd1149db91abb6b55b7be7dced214bd043f024408c107192614d31e935ae5407.jpg)
388
+ Figure 6: Faster convergence provided by the weight transform layer (orange) on Omniglot 20- way 1-shot image classification (Lake et al., 2015).
389
+
390
+ # C.2 ONLINE FINE-TUNING FOROUT-OF-DISTRIBUTION TEST TASKS
391
+
392
+ In some cases, it may be necessary or desirable to perform online fine-tuning after the initial offline adaptation step. This is the fully offline meta-RL problem with online fine-tuning described in Section 3, where an algorithm is given a small amount of initial adaptation data from the test task, just as in the fully offline setting, and then is able to interact with the environment to collect additional training data and perform on-policy updates. This ability to continually improve with additional training after the initial offline adaptation step is what makes a consistent meta-reinforcement learner advantageous.
393
+
394
+ This hybrid setting (offline training with additional online fine-tuning) is known to be extremely challenging in traditional reinforcement learning. These difficulties are clearly documented by recent work (Nair et al., 2020). In short, this setting is challenging in traditional RL because while offline pre-training might produce a policy that performs well, online fine-tuning often leads to a significant drop in initial performance, which can take a very long time to recover from (see Nair et al. (2020)).
395
+
396
+ <table><tr><td rowspan="2">Additional Env. Steps</td><td colspan="2">Offline PEARL+FT</td><td colspan="2">MACAW</td></tr><tr><td>Reward</td><td>Improvement</td><td>Reward</td><td>Improvement</td></tr><tr><td>0</td><td>-553.4 (21.2)</td><td>一</td><td>-323.1 (42.9)</td><td></td></tr><tr><td>20k</td><td>-565.0 (4.7)</td><td>-11.5 (3.5)</td><td>-279.1 (16.8)</td><td>44.0 (14.5)</td></tr><tr><td>200k</td><td>-533.6 (19.8)</td><td>19.8 (3.7)</td><td>-272.0 (15.2)</td><td>51.1 (12.7)</td></tr></table>
397
+
398
+ Table 1: Absolute reward as well as improvement (in terms of reward) of Offline PEARL $+ \mathrm { F T }$ and MACAW after 0, 20k, and $2 0 0 \mathrm { k }$ additional environment steps are gathered and used for online fine tuning. Standard errors of the mean over the 13 test tasks are reported in parentheses. Averages are taken over 10 rollouts of each policy. We find that MACAW achieves both better out-of-distribution performance before online training as well as faster improvement during online fine-tuning. Note that Offline PEARL $+ \mathrm { F T }$ experiences an initial drop in average performance on the test task after $2 0 \mathrm { k }$ steps, compared with the performance of the policy conditioned only on the initial batch of offline data. A similar effect has been reported in recent work in offline RL (Nair et al., 2020).
399
+
400
+ In many cases, online fine-tuning can take a very long time to recover the performance of the offlineonly policy, if it does so at all. In offline meta-RL, we have a similar challenge; an offline meta-RL algorithm must not only meta-train for good performance on a single batch of offline test data, but it must also learn a set of parameters that enables fine-tuning to make productive updates to its policy and/or value function without completely destroying the meta-learned knowledge about the task distribution.
401
+
402
+ In this section, we use a hybrid setting as described above to evaluate not only MACAW’s consistency (its ability to continue to improve after an initial offline adaptation step), but its ability to continue to improve even when the test task distribution differs from the train distribution. Because significant distribution shift means that some train tasks are irrelevant, or even detrimental to test performance, this setting is very difficult. In order to make a meaningful comparison, we compare with an "Offline PEARL $^ +$ fine-tuning" (Offline PEARL ${ \bf \Phi } + \mathrm { F T }$ ) algorithm, which is also technically consistent (because it essentially performs the SAC algorithm on the test task after the initial task inference step). However, we hypothesize that MACAW will have an advantage over this Offline PEARL $+ \mathrm { F T }$ algorithm because while both algorithms are consistent, MACAW explicitly trains for good fine-tunability with gradient descent, unlike task inference-based meta-RL algorithms.
403
+
404
+ The training procedure for Offline PEARL+FT is the same at the regular Offline PEARL training procedure. However, at test time, after receiving an initial small batch of offline data for task inference, we alternative between performing rollouts of the task-conditioned policy to collect additional data from the test task and perform gradient descent on the PEARL policy and value function objectives with this off-policy data. Similarly, for MACAW test time involves first using the small batch of offline test task data to take an initial gradient step on the value and policy loss functions (Eqns 2 and 3), then alternating between rolling out the adapted policy and taking more steps of gradient descent on the MACAW losses.
405
+
406
+ The specific experimental setup is as follows. We partition the individual tasks in the Cheetah-Vel problem such that training tasks correspond to target velocities in the range [0,2] and test tasks correspond to target velocities in the range [2,3]. After meta-training, for each test task, we provide the algorithm with a small batch of offline data for adaptation just as in the fully offline setting. However, we allow the algorithm to then collect and train on up to $2 0 0 \mathrm { k }$ additional interactions from the environment. Both algorithms alternate between sampling a single trajectory (200 environment interactions) and performing 100 steps of gradient descent on the aggregate buffer of data for the test task, which contains both the initial offline batch of data as well as all online data collected so far. We evaluate both algorithms on their performance after $2 0 \mathrm { k }$ and $2 0 0 \mathrm { k }$ additional interactions with the environment. The results of this experiment are reported in Table 1. We observe that MACAW achieves both higher absolute reward on the OOD test tasks as well as faster relative improvement over the offline-only adapted policy compared to the Offline PEARL+FT baseline.
407
+
408
+ # C.3 METAWORLD ML45 BENCHMARK
409
+
410
+ As an additional experiment, we test the training and generalization capabilities of MACAW on a much broader distribution of tasks, and where test tasks differ significantly from training tasks (e.g. picking up an object as opposed to opening a window or hammering a nail). Recently,
411
+
412
+ ![](images/9197515ff40248fcc48afe703179c7e00b59ad9d2ce4621a34699a9a92cb1b05.jpg)
413
+ Figure 7: Average success rates of MACAW, PEARL, and $\mathrm { M T } +$ fine-tuning (with 20 fine-tuning steps) on the 5 test tasks the Meta-World ML45 suite of continuous control tasks. Dashed line shows final PEARL average success rate after $1 0 \mathrm { m }$ training steps.
414
+
415
+ Yu et al. (2019) proposed the Meta-World (Yu et al., 2019) suite of continuous control benchmark environments as a more realistic distribution of tasks for multi-task and meta-learning algorithms. This benchmark includes 45 meta-training tasks and 5 meta-testing tasks. The results of this experiment are summarized in Figure 7.
416
+
417
+ We find that all methods are able to make meaningful progress on the test tasks, with gradient-based methods (MACAW and MT $^ +$ fine tune) learning much more quickly than PEARL. MACAW does achieve a quite high level of performance quite early on in training; however, it begins to overfit with further training. In the regime where periodic online evaluations are available for the purpose of early stopping, we could avoid this issue, in which case MACAW would slightly underperform the multi-task learning baseline. A possible reason for some inconsistency between the performance of each algorithm on Meta-World and the results reported in Figure 3 is the difficult scaling of the rewards in the current version of the Meta-World benchmark. Rewards can vary by 5 orders of magnitude, from negative values to values on the order of 100,000. This has been documented to adversely impact training performance even in single-task RL and increase hyperparameter sensitivity (see https://github.com/rlworkgroup/metaworld/issues/226). Because of the problems stemming from the current reward functions in Meta-World, the maintainers of the benchmark are updating them for the next version of the benchmark, which has not been released as of November 2020.
418
+
419
+ # D EXPERIMENTAL SET-UP AND DATA COLLECTION
420
+
421
+ D.1 OVERVIEW OF PROBLEM SETTINGS
422
+
423
+ The problems of interest include:
424
+
425
+ 1. Half-Cheetah Direction Train a simple cheetah to run in one of two direction: forward and backward. Thus, there are no held-out test tasks for this problem, making it more ‘proof of concept’ than benchmark.
426
+ 2. Half-Cheetah Velocity Train a cheetah to run at a desired velocity, which fully parameterizes each task. For our main experiment, values of the task parameters are sampled from a uniform interval of 40 velocities in the range [0, 3]. A subset of 5 target velocities is sampled randomly for evaluation. For ablation experiments
427
+ 3. Ant-2D Direction Train a simulated ant with 8 articulated joints to run in a random 2D direction. For our experiments, we sample 50 random directions uniformly, holding out 5 for testing.
428
+ 4. Walker-2D Params Train a simulated agent to move forward, where different tasks correspond to different randomized dynamics parameters rather than reward functions. For our experiments, we sample 50 random sets of dynamics parameters, holding out 5 for testing.
429
+ 5. Meta-World ML45 Train a simulated Sawyer robot to complete 45 different robotics manipulation tasks (for training). 5 additional tasks are included for testing, making 50 tasks in total. Tasks include opening a window, hammering a nail, pulling a lever, picking & placing
430
+
431
+ Table 2: Hyperparameters used for the PEARL experiments. For the MuJoCo tasks, we generally used the same parameters as reported in (Rakelly et al., 2019), with some minor modifications. The different parameters used for the MetaWorld ML45 environment are reported above.
432
+
433
+ <table><tr><td>Parameter</td><td>Standard Configuration</td><td>Meta-World</td></tr><tr><td>Optimizer</td><td>Adam</td><td>一</td></tr><tr><td>Meta batch size</td><td>4-10</td><td>16</td></tr><tr><td>Batch size</td><td>256</td><td>1</td></tr><tr><td>Embedding batch size</td><td>100-256</td><td>750</td></tr><tr><td>KL penalty</td><td>0.1</td><td>、</td></tr><tr><td>Hidden layers</td><td>3</td><td>1</td></tr><tr><td>Neurons per hidden layer</td><td>300</td><td>512</td></tr><tr><td>Latent space size</td><td>5</td><td>8</td></tr><tr><td>Policy learning rate</td><td>3e-4</td><td>1</td></tr><tr><td>Value function learning rate</td><td>3e-4</td><td></td></tr><tr><td>Context embedding learning rate</td><td>3e-4</td><td></td></tr><tr><td>Q-Function learning rate</td><td>3e-4</td><td></td></tr><tr><td>Reward scale</td><td>5.0</td><td></td></tr><tr><td>Recurrent</td><td>False</td><td></td></tr></table>
434
+
435
+ an object. See Yu et al. (2019) for more information. Our experiments use a continuous space randomization for each task setup, unlike the experiments in (Yu et al., 2019), which sample from a fixed number of task states. This creates a much more challenging environment, as seen in the success rate curves above.
436
+
437
+ For the first 4 MuJoCo domains, each trajectory is 200 time steps (as in Rakelly et al. (2019)); for Meta-World, trajectories are 150 time steps long.
438
+
439
+ # D.2 DATA COLLECTION
440
+
441
+ We adapt each task to the offline setting by restricting the data sampling procedure to sample data only from a fixed offline buffer of data. For each task, we train a separate policy from scratch, using Soft Actor-Critic (Haarnoja et al., 2018) for all tasks except Cheetah-Velocity, for which we use TD3 (Fujimoto et al., 2018) as it proved more stable across the various Cheetah-Velocity tasks. We save complete replay buffers from the entire lifetime of training for each task, which includes 5M steps for Meta-World, 2.5M steps for Cheetah-Velocity, 2.5M steps for Cheetah-Dir, 2M steps for Ant-Direction, and 1M steps for Walker-Params. We use these buffers of trajectories, one per task for each problem, to sample data in both the inner and outer loop of the algorithm during training. See Figures 8 and 9 for the learning curves of the offline policies for each train and test task.
442
+
443
+ # D.3 ABLATION EXPERIMENTS
444
+
445
+ For the data quality experiment, we compare the post-adaptation performance when MACAW is trained with 3 different sampling regimes for the Cheetah-Vel problem setting. Bad, medium, and good data quality mean that adaptation data (during both training and evaluation) is drawn from the first, middle, and last 500 trajectories from the offline replay buffers. For the task quantity experiment, we order the tasks by the target velocity in ascending order, giving equally spaced tasks with target velocities $g _ { 0 } = 0 . 0 7 5$ , $g _ { 2 } = 0 . 1 5 , . . . , g _ { 3 9 } = 3 . 0$ . For the 20 task experiment, we use $g _ { i }$ with even $i$ for training and odd $i$ for testing. For the 10 task experiment, we move every other train task to the test set (e.g. tasks $i = 2 , 6 , 1 0 , . . . )$ . For the 5 task experiment, we move every other remaining train task to the test set (e.g. tasks $i = 4 , 1 2 , 2 0 , . . . )$ , and for the 3 task experiment, we again move every other task to the test set, so that the train set only contains tasks 0, 16, and 32. Task selection was performed this way to ensure that even in sparse task environments, the train tasks provide coverage of most of the task space.
446
+
447
+ # E IMPLEMENTATION DETAILS AND HYPERPARAMETERS
448
+
449
+ Peng et al. (2019) note several strategies used to increase the stability of their advantage-weighted regression implementation. We normalize the advantage logits in the policy update step to have zero mean and unit standard deviation, as in Peng et al. (2019). Advantage weight logits are also clipped
450
+
451
+ ![](images/f56b11358e36417a1ca4bfb309af242dbc448cfd4b43fad3c69a87df2aa73a04.jpg)
452
+ Figure 8: Learning curves for offline policies for the 4 different MuJoCo environments used in the experimental evaluations. Each curve corresponds to a policy trained on a unique task. Various levels of smoothing are applied for the purpose of easier visualization.
453
+
454
+ ![](images/2d6d567b921998eec2d15a9ea27caf595a591019afdd8e598bf1a85c9a4e9d84.jpg)
455
+ Figure 9: Learning curves and success rates for all tasks in the MetaWorld 45 benchmark. Each curve corresponds to a policy trained on a unique task. Various levels of smoothing are applied for the purpose of plotting.
456
+
457
+ Table 3: Hyperparameters used for the multi-task learning $^ +$ fine tuning baseline. \*For the Walker environment, the value learning rate was 1e-5 for stability.
458
+
459
+ <table><tr><td>Parameter</td><td>Standard Configuration</td><td>Meta-World</td></tr><tr><td>Optimizer</td><td>Adam</td><td>一</td></tr><tr><td>Value learning rate</td><td>1e-4*</td><td>1e-6</td></tr><tr><td>Policy learning rate</td><td>1e-4</td><td>1</td></tr><tr><td>Value fine-tuning learning rate</td><td>1e-4</td><td>1e-6</td></tr><tr><td>Policy fine-tuning learning rate</td><td>1e-3</td><td>1</td></tr><tr><td>Train outer loop batch size</td><td>256</td><td>一</td></tr><tr><td>Fine-tuning batch size</td><td>256</td><td>1</td></tr><tr><td>Number of hidden layers</td><td>3</td><td>1</td></tr><tr><td>Neurons per hidden layer</td><td>100</td><td>300</td></tr><tr><td>Task batch size</td><td>5</td><td>1</td></tr><tr><td>Max advantage clip</td><td>20</td><td>一</td></tr></table>
460
+
461
+ <table><tr><td>Parameter</td><td>Standard Configuration</td><td>Meta-World</td></tr><tr><td>Optimizer</td><td>Adam</td><td>一</td></tr><tr><td>Auxiliary advantage loss coefficient</td><td>1e-2</td><td>1e-3</td></tr><tr><td>Outer value learning rate</td><td>1e-5</td><td>1e-6</td></tr><tr><td>Outer policy learning rate</td><td>1e-4</td><td></td></tr><tr><td>Inner policy learning rate</td><td>1e-3 (learned)</td><td>1e-2 (learned)</td></tr><tr><td>Inner value learning rate</td><td>1e-3 (learned)</td><td>1e-4 (learned)</td></tr><tr><td>Train outer loop batch size</td><td>256</td><td>1</td></tr><tr><td>Train adaptation batch size</td><td>256</td><td>256</td></tr><tr><td>Eval adaptation batch size</td><td>256</td><td>1</td></tr><tr><td>Number of adaptation steps</td><td>1</td><td>1</td></tr><tr><td>Learning rate for learnable learning rate</td><td>1e-3</td><td>1</td></tr><tr><td>Number of hidden layers</td><td>3</td><td>1</td></tr><tr><td>Neurons per hidden layer</td><td>100</td><td>300</td></tr><tr><td>Task batch size</td><td>5</td><td>10</td></tr><tr><td>Max advantage clip</td><td>20</td><td>1</td></tr><tr><td>AWR policy temperature</td><td>1</td><td>1</td></tr></table>
462
+
463
+ Table 4: Hyperparameters used for MACAW. The Standard Configuration is used for all experiments and all environments except for Meta-World (due to the extreme difference in magnitude of rewards in Meta-World, which has typical rewards $1 0 0 { - } 1 0 0 0 \mathrm { x }$ larger than in the other tasks). For the Meta-World configuration, only parameters that differ from the standard configuration are listed.
464
+
465
+ to avoid exploding gradients and numerical overflow. To train the value function, we use simple least squares regression onto Monte Carlo returns, rather than $\mathrm { T D } ( \lambda )$ . Finally, our policy is parameterized by a single Gaussian with fixed variance of 0.04; our policy network thus predicts only the mean of the Gaussian distribution.
466
+
467
+ In addition to using weight transformation layers instead of regular fully-connected layers, we also learn learning rates for each layer of our network by gradient descent. To speed up training, we compute our loss using a ‘task minibatch’ of 5 tasks at each step of optimization, rather than using all of the training tasks. Finally, specific to the RL setting, we sample experiences in contiguous chunks from the replay buffers during train-time adaptation and uniformly (non-contiguously) from the replay buffers for outer-loop updates and test-time adaptation. For outer loop updates, we sample data selectively towards the end of the replay buffers.
468
+
469
+ # E.1 HYPERPARAMETERS
470
+
471
+ Tables 2, 3, and 4 describe the hyperparameters used for each algorithm in our empirical evaluations. We performed some manual tuning of hyperparameters for all algorithms, but found that the performance was not significantly affected for environments other than Meta-World, likely due to the difficult reward scaling in the current release of Meta-World.
parse/train/S5S3eTEmouw/S5S3eTEmouw_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S5S3eTEmouw/S5S3eTEmouw_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S5S3eTEmouw/S5S3eTEmouw_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skl4mRNYDr/Skl4mRNYDr.md ADDED
@@ -0,0 +1,449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP IMITATIVE MODELS FOR FLEXIBLE INFERENCE, PLANNING, AND CONTROL
2
+
3
+ Nicholas Rhinehart UC Berkeley nrhinehart@berkeley.edu
4
+
5
+ Rowan McAllister UC Berkeley rmcallister@berkeley.edu
6
+
7
+ Sergey Levine
8
+ UC Berkeley
9
+ svlevine@berkeley.edu
10
+
11
+ # ABSTRACT
12
+
13
+ Imitation Learning $\left( \operatorname { I L } \right)$ is an appealing approach to learn desirable autonomous behavior. However, directing IL to achieve arbitrary goals is difficult. In contrast, planning-based algorithms use dynamics models and reward functions to achieve goals. Yet, reward functions that evoke desirable behavior are often difficult to specify. In this paper, we propose “Imitative Models” to combine the benefits of $\mathrm { I L }$ and goal-directed planning. Imitative Models are probabilistic predictive models of desirable behavior able to plan interpretable expert-like trajectories to achieve specified goals. We derive families of flexible goal objectives, including constrained goal regions, unconstrained goal sets, and energy-based goals. We show that our method can use these objectives to successfully direct behavior. Our method substantially outperforms six IL approaches and a planning-based approach in a dynamic simulated autonomous driving task, and is efficiently learned from expert demonstrations without online data collection. We also show our approach is robust to poorly specified goals, such as goals on the wrong side of the road.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Imitation learning (IL) is a framework for learning a model to mimic behavior. At test-time, the model pursues its best-guess of desirable behavior. By letting the model choose its own behavior, we cannot direct it to achieve different goals. While work has augmented IL with goal conditioning (Dosovitskiy & Koltun, 2016; Codevilla et al., 2018), it requires goals to be specified during training, explicit goal labels, and are simple (e.g., turning). In contrast, we seek flexibility to achieve general goals for which we have no demonstrations.
18
+
19
+ In contrast to IL, planning-based algorithms like model-based reinforcement learning (MBRL) methods do not require expert demonstrations. MBRL can adapt to new tasks specified through reward functions (Kuvayev & Sutton, 1996; Deisenroth & Rasmussen, 2011). The “model” is a dynamics model, used to plan under the user-supplied reward function. Planning enables these approaches to perform new tasks at test-time. The key drawback is that these models learn dynamics of possible behavior rather than dynamics of desirable behavior. This means that the responsibility of evoking desirable behavior is entirely deferred to engineering the input reward function. Designing reward functions that cause MBRL to evoke complex, desirable behavior is difficult when the space of possible undesirable behaviors is large. In order to succeed, the rewards cannot lead the model astray towards observations significantly different than those with which the model was trained.
20
+
21
+ Our goal is to devise an algorithm that combines the advantages of MBRL and IL by offering MBRL’s flexibility to achieve new tasks at test-time and IL’s potential to learn desirable behavior entirely from offline data. To accomplish this, we first train a model to forecast expert trajectories with a density function, which can score trajectories and plans by how likely they are to come from the expert. A probabilistic model is necessary because expert behavior is stochastic: e.g. at an intersection, the expert could choose to turn left or right. Next, we derive a principled probabilistic inference objective to create plans that incorporate both (1) the model and (2) arbitrary new tasks. Finally, we derive families of tasks that we can provide to the inference framework. Our method can accomplish new tasks specified as complex goals without having seen an expert complete these tasks before.
22
+
23
+ ![](images/bf69f40603bad34ad920a937a823802c36761e74323933467cc0c50446e6d9b5.jpg)
24
+ Figure 1: Our method: deep imitative models. Top Center. We use demonstrations to learn a probability density function $q$ of future behavior and deploy it to accomplish various tasks. Left: A region in the ground plane is input to a planning procedure that reasons about how the expert would achieve that task. It coarsely specifies a destination, and guides the vehicle to turn left. Right: Goal positions and potholes yield a plan that avoids potholes and achieves one of the goals on the right.
25
+
26
+ We investigate properties of our method on a dynamic simulated autonomous driving task (see Fig. 1). Videos are available at https://sites.google.com/view/imitative-models. Our contributions are as follows:
27
+
28
+ 1. Interpretable expert-like plans with minimal reward engineering. Our method outputs multistep expert-like plans, offering superior interpretability to one-step imitation learning models. In contrast to MBRL, our method generates expert-like behaviors with minimal reward engineering.
29
+ 2. Flexibility to new tasks: In contrast to IL, our method flexibly incorporates and achieves goals not seen during training, and performs complex tasks that were never demonstrated, such as navigating to goal regions and avoiding test-time only potholes, as depicted in Fig. 1.
30
+ 3. Robustness to goal specification noise: We show that our method is robust to noise in the goal specification. In our application, we show that our agent can receive goals on the wrong side of the road, yet still navigate towards them while staying on the correct side of the road.
31
+ 4. State-of-the-art CARLA performance: Our method substantially outperforms MBRL, a custom IL method, and all five prior CARLA IL methods known to us. It learned near-perfect driving through dynamic and static CARLA environments from expert observations alone.
32
+
33
+ # 2 DEEP IMITATIVE MODELS
34
+
35
+ We begin by formalizing assumptions and notation. We model continuous-state, discrete-time, Partially-Observed Markov Decision Processes (POMDPs). For brevity, we call the components of state of which we have direct observations the agent’s “state”, although we explicitly assume these states do not represent the full Markovian world state. Our agent’s state at time $t$ is $\bar { \bf s } _ { t } \in \mathbb { R } ^ { D }$ ; $t = 0$ refers to the current time step, and $\phi$ is all of the agent’s observations. Variables are bolded. Random variables are capitalized. Absent subscripts denote all future time steps, e.g. $\mathbf { S } \doteq \mathbf { S } _ { 1 : T } \in \mathbb { R } ^ { T \times D }$ . We denote a probability density function of a random variable $\mathbf { S }$ as $p ( \mathbf { S } )$ , and its value as $p ( \mathbf { s } ) \doteq p ( \mathbf { S } = \mathbf { s } )$ .
36
+
37
+ To learn agent dynamics that are possible and preferred, we construct a model of expert behavior. We fit an “Imitative Model” $\begin{array} { r } { q ( \mathbf { S } _ { 1 : T } | \phi ) = \prod _ { t = 1 } ^ { T } q ( \mathbf { S } _ { t } | \mathbf { S } _ { 1 : t - 1 } , \phi ) } \end{array}$ to a dataset of expert trajectories $\mathcal { D } = \{ ( s ^ { i } , \phi ^ { i } ) \} _ { i = 1 } ^ { N }$ drawn from a (unknown) distribution of expert behavior $s ^ { i } \sim p ( \mathbf { S } | \phi ^ { i } )$ . By training $q ( \mathbf { S } | \phi )$ to forecast expert trajectories with high likelihood, we model the scene-conditioned expert dynamics, which can score trajectories by how likely they are to come from the expert.
38
+
39
+ # 2.1 IMITATIVE PLANNING TO GOALS
40
+
41
+ After training, $q ( \mathbf { S } | \phi )$ can generate trajectories that resemble those that the expert might generate – e.g. trajectories that navigate roads with expert-like maneuvers. However, these maneuvers will not have a specific goal. Beyond generating human-like behaviors, we wish to direct our agent to goals and have the agent automatically reason about the necessary mid-level details. We define general tasks by a set of goal variables $\mathcal { G }$ . The probability of a plan s conditioned on the goal $\mathcal { G }$ is modelled by a posterior $p ( \mathbf { s } | \mathcal { G } , \phi )$ . This posterior is implemented with $q ( \mathbf { s } | \boldsymbol { \phi } )$ as a learned imitation prior and $p ( \mathcal { G } | \mathbf { s } , \phi )$ as a test-time goal likelihood. We give examples of $p ( { \mathcal { G } } | \mathbf { s } , \phi )$ after deriving a maximum a posteriori inference procedure to generate expert-like plans that achieve abstract goals:
42
+
43
+ $$
44
+ \begin{array} { r l } { \mathbf { s } ^ { * } \ \stackrel { } { = } \ \underset { \mathbf { s } } { \arg \operatorname* { m a x } } \ \log p ( \mathbf { s } | \mathcal { G } , \boldsymbol { \phi } ) \ = \ \underset { \mathbf { s } } { \arg \operatorname* { m a x } } \ \log q ( \mathbf { s } | \boldsymbol { \phi } ) + \log p ( \mathcal { G } | \mathbf { s } , \boldsymbol { \phi } ) - \log p ( \mathcal { G } | \boldsymbol { \phi } ) } & { } \\ { \ \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad = \ \underset { \mathbf { s } } { \arg \operatorname* { m a x } } \ \log \underset { \underset { \mathrm { i m i t a t i o n ~ p r i o r } } { \underbrace { q ( \mathbf { s } | \boldsymbol { \phi } ) } } } { \underbrace { q ( \mathbf { s } | \boldsymbol { \phi } ) } } + \log \underset { \mathrm { g o a l l i k e l i h o o d } } { \underbrace { p ( \mathcal { G } | \mathbf { s } , \boldsymbol { \phi } ) } } . } \end{array}
45
+ $$
46
+
47
+ We perform gradient-based optimization of Eq. 1, and defer this discussion to Appendix A. Next, we discuss several goal likelihoods, which direct the planning in different ways. They communicate goals they desire the agent to achieve, but not how to achieve them. The planning procedure determines how to achieve them by producing paths similar to those an expert would have taken to reach the given goal. In contrast to black-box one-step IL that predicts controls, our method produces interpretable multi-step plans accompanied by two scores. One estimates the plan’s “expertness”, the second estimates its probability to achieve the goal. Their sum communicates the plan’s overall quality.
48
+
49
+ Our approach can also be viewed as a learning-based method to integrate mid-level and high-level controllers together, where demonstrations from both are available at train-time, only the highlevel controller is available at test-time, and the high-level controller can vary. The high-level controller’s action specifies a subgoal for the mid-level controller. A density model of future trajectories of an expert mid-level controller is learned at train-time, and is amenable to different types of direction as specified by the high-level controller. In this sense, the model is an “apprentice”, having learned to imitate mid-level behaviors. In our application, the high-level controller is composed of an $A ^ { * }$ path-planning algorithm and one of a library of components that forms goal likelihoods from the waypoints produced by $A ^ { * }$ . Connecting this to related approaches, learning the midlevel controller (Imitative Model) resembles offline IL, whereas inference with an Imitative Model resembles trajectory optimization in MBRL, given goals provided by the high-level controller.
50
+
51
+ # 2.2 CONSTRUCTING GOAL LIKELIHOODS
52
+
53
+ Constraint-based planning to goal sets (hyperparameter-free): Consider the setting where we have access to a set of desired final states, one of which the agent should achieve. We can model this by applying a Dirac-delta distribution on the final state, to ensure it lands in a goal set $\mathbb { G } \subset \mathbb { R } ^ { D }$ :
54
+
55
+ $$
56
+ p ( \mathcal { G } | \mathbf { s } , \phi ) \delta _ { \mathbf { s } _ { T } } ( \mathbb { G } ) , \quad \delta _ { \mathbf { s } _ { T } } ( \mathbb { G } ) = 1 \mathrm { i f ~ } \mathbf { s } _ { T } \in \mathbb { G } , \quad \delta _ { \mathbf { s } _ { T } } ( \mathbb { G } ) = 0 \mathrm { i f ~ } \mathbf { s } _ { T } \ncong \mathbb { G } .
57
+ $$
58
+
59
+ $\delta _ { \mathbf { s } _ { T } } ( \mathbb { G } )$ ’s partial support of $\mathbf { s } _ { T } \in \mathbb { G } \subset \mathbb { R } ^ { D }$ constrains ${ \bf s } _ { T }$ and introduces no hyperparameters into $p ( \mathcal { G } | \mathbf { s } , \phi )$ . For each choice of $\mathbb { G }$ , we have a different way to provide high-level task information to the agent. The simplest choice for $\mathbb { G }$ is a finite set of points: a (A) Final-State Indicator likelihood. We applied (A) to a sequence of waypoints received from a standard $\mathbf { A } ^ { * }$ planner (provided by the CARLA simulator), and outperformed all prior dynamic-world CARLA methods known to us. We can also consider providing an infinite number of points. Providing a set of line-segments as $\mathbb { G }$ yields a (B) Line-Segment Final-State Indicator likelihood, which encourages the final state to land along one of the segments. Finally, consider a (C) Region Final-State Indicator likelihood in which $\mathbb { G }$ is a polygon (see Figs. 1 and 4). Solving Eq. 1 with (C) amounts to planning the most expert-like trajectory that ends inside a goal region. Appendix B provides derivations, implementation details, and additional visualizations. We found these methods to work well when $\mathbb { G }$ contains “expert-like” final position(s), as the prior strongly penalizes plans ending in non-expert-like positions.
60
+
61
+ Unconstrained planning to goal sets (hyperparameter-based): Instead of constraining that the final state of the trajectory reach a goal, we can use a goal likelihood with full support $( \mathbf { s } _ { T } \in \mathbb { R } ^ { D } )$ , centered at a desired final state. This lets the goal likelihood encourage goals, rather than dictate them. If there is a single desired goal $\langle \mathbf { G } = \{ \mathbf { g } _ { T } \}$ ), the $\mathbf { \eta } ^ { ( \mathbf { D } ) }$ Gaussian Final-State likelihood $p ( { \mathcal { G } } | \mathbf { s } , \phi ) \gets$ $\mathcal { N } ( \mathbf { g } _ { T } ; \mathbf { s } _ { T } , \epsilon I )$ treats ${ \bf g } _ { T }$ as a noisy observation of a final future state, and encourages the plan to arrive at a final state. We can also plan to $K$ successive states $\mathcal { G } = ( \mathbf { g } _ { T - K + 1 } , \dots , \mathbf { g } _ { T } )$ with a $\mathbf { ( E ) }$ Gaussian State Sequence: $\begin{array} { r } { p ( \mathcal { G } | \mathbf { s } , \acute { \phi } ) \prod _ { k = T - K + 1 } ^ { T } \mathcal { N } ( \mathbf { g } _ { k } ; \mathbf { s } _ { k } , \epsilon I ) } \end{array}$ if a program wishes to specify a desired end velocity or acceleration when reaching the final state ${ \bf g } _ { T }$ (Fig. 2). Alternatively, a planner may propose a set of states with the intention that the agent should reach any one of them. This is possible by using a $\mathbf { \Pi } ^ { ( \mathbf { F } ) }$ Gaussian Final-State Mixture: $\begin{array} { r } { p ( \mathcal { G } | \mathbf { s } , \boldsymbol { \phi } ) \gets \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathcal { N } ( \mathbf { g } _ { T } ^ { k } ; \mathbf { s } _ { T } , \boldsymbol { \epsilon } I ) } \end{array}$ and is useful if some of those final states are not reachable with an expert-like plan. Unlike A–C, D–F introduce a hyperparameter $\cdot \epsilon ^ { * }$ . However, they are useful when no states in $\mathbb { G }$ correspond to observed expert behavior, as they allow the imitation prior to be robust to poorly specified goals.
62
+
63
+ Costed planning: Our model has the additional flexibility to accept arbitrary user-specified costs $c$ at test-time. For example, we may have updated knowledge of new hazards at test-time, such as a given map of potholes or a predicted cost map. Cost-based knowledge $c ( \mathbf { s } _ { i } | \phi )$ can be incorporated as an (G) Energy-based likelihood: $\begin{array} { r } { p ( \mathcal { G } | \mathbf { s } , \boldsymbol { \phi } ) \overset { } { \propto } \prod _ { t = 1 } ^ { T } e ^ { - c ( \mathbf { s } _ { t } | \boldsymbol { \phi } ) } } \end{array}$ (Todorov, 2007; Levine, 2018). This can be combined with other goal-seeking objectives by simply multiplying the likelihoods together. Examples of combining G (energy-based) with F (Gaussian mixture) were shown in Fig. 1 and are shown in Fig. 3. Next, we describe instantiating $q ( \mathbf { S } | \phi )$ in CARLA (Dosovitskiy et al., 2017).
64
+
65
+ Designing general goal likelihoods can be considered a form of reward engineering if there are no restrictions on the goal likelihoods. This connection is best seen in (G), which has an explicit cost term. One reason why it is easier to design goal likelihoods than to design reward functions is that the task of evoking most aspects of goal-driven behavior is already learned by the prior $q ( \mathbf { s } | \boldsymbol { \phi } )$ , which models desirable behavior. This is in contrast to model-free RL, which entirely relies on the reward design to evoke goal-driven behavior, and in contrast to model-based RL, which heavily relies on the reward design to evoke goal-driven behavior, as its dynamics model learns what is possible, rather than what is desirable. Additionally, it is easy to design goal likelihoods when goals provide a significant amount of information that obviates the need to do any manual tuning. The main assumption is that one of the goals in the goal set is reachable within the model’s time-horizon.
66
+
67
+ ![](images/4615e57662296686c7ab9b9ee0503fbe3ccb28b5dc38253123f746e3fa2d5bed.jpg)
68
+ Figure 2: Imitative planning with the Gaussian State Sequence enables finegrained control of the plans.
69
+
70
+ ![](images/ed1a6dfab38dd5fb50623c62291f64dbfaa63101e7cb10746575f7eca777e22d.jpg)
71
+ Figure 3: Costs can be assigned to “potholes” only seen at test-time. The planner prefers routes avoiding potholes.
72
+
73
+ ![](images/2d9fd574887390907a8ef9e0db2cca4da1bd779e49a15a1648cc1976be125788.jpg)
74
+ Figure 4: Goal regions can be coarsely specified to give directions.
75
+
76
+ # 2.3 APPLYING DEEP IMITATIVE MODELS TO AUTONOMOUS DRIVING
77
+
78
+ In our autonomous driving application, we model the agent’s state at time $t$ as $\mathbf { s } _ { t } \in \mathbb { R } ^ { D }$ with $D = 2$ ; $\mathbf { s } _ { t }$ represents our agent’s location on the ground plane. The agent has access to environment perception $\phi { \bf \bar { \omega } } \{ { \bf s } _ { - \tau : 0 } , \chi , { \bf \bar { \omega } } \}$ , where $\tau$ is the number of past positions we condition on, $x$ is a high-dimensional observation of the scene, and $\boldsymbol { \lambda }$ is a low-dimensional traffic light signal. $x$ could represent either LIDAR or camera images (or both), and is the agent’s observation of the world. In our setting, we featurize LIDAR to $\chi = \mathrm { \mathbb { R } ^ { 2 0 0 \times 2 0 0 \times 2 } }$ , with $\chi _ { i j }$ representing a 2-bin histogram of points above and at ground level in a $0 . 5 \mathrm { m } ^ { 2 }$ cell at position $( i , j )$ . CARLA provides ground-truth ${ \bf s } _ { - \tau : 0 }$ and $\boldsymbol { \lambda }$ . Their availability is a realistic input assumption in perception-based autonomous driving pipelines.
79
+
80
+ Model requirements: A deep imitative model forecasts future expert behavior. It must be able to compute $\bar { q ( \mathbf { s } | \boldsymbol { \phi } ) } \forall \mathbf { s } \in \mathbb { R } ^ { T \times D }$ . The ability to compute $\nabla _ { \mathbf { s } } q ( \mathbf { s } | \phi )$ enables gradient-based optimization for planning. Rudenko et al. (2019) provide a recent survey on forecasting agent behavior. As many forecasting methods cannot compute trajectory probabilities, we must be judicious in choosing $q ( \mathbf { S } | \phi )$ . A model that can compute probabilities R2P2 (Rhinehart et al., 2018), a generative autoregressive flow (Rezende & Mohamed, 2015; Oord et al., 2017). We extend R2P2 to instantiate the deep imitative model $q ( \mathbf { S } | \phi )$ . R2P2 was previously used to forecast vehicle trajectories: it was not demonstrated or developed to plan or execute controls. Although we used R2P2, other future-trajectory density estimation techniques could be used – designing ${ \dot { \mathbf { \zeta } } } _ { q } ( \mathbf { s } | \phi )$ is not the primary focus of this work. In R2P2, $q _ { \theta } ( \mathbf { S } | \phi )$ is induced by an invertible, differentiable function: $\mathbf { S } = f _ { \theta } ( \mathbf { Z } ; \phi ) : \mathbb { R } ^ { T \times 2 } \mapsto \mathbb { R } ^ { T \times 2 }$ ; $f _ { \theta }$ warps a latent sample from a base distribution $\mathbf { Z } \sim q _ { 0 } = \mathcal { N } ( 0 , I )$ to S. $\theta$ is trained to maximize $q _ { \theta } ( \mathbf { S } | \phi )$ of expert trajectories. $f _ { \theta }$ is defined for $1 . . T$ as follows:
81
+
82
+ ![](images/c23878e57a42f82d9c10542daaeed971816ea15b60f9f4fb3b4cb25feb8b7355.jpg)
83
+ Figure 5: Illustration of our method applied to autonomous driving. Our method trains an imitative model from a dataset of expert examples. After training, the model is repurposed as an imitative planner. At test-time, a route planner provides waypoints to the imitative planner, which computes expert-like paths to each goal. The best plan is chosen according to the planning objective and provided to a low-level PID-controller in order to produce steering and throttle actions. This procedure is also described with pseudocode in Appendix A.
84
+
85
+ $$
86
+ \mathbf { S } _ { t } = f _ { t } ( \mathbf { Z } _ { 1 : t } ) = \mu _ { \theta } ( \mathbf { S } _ { 1 : t - 1 } , \phi ) + \sigma _ { \theta } ( \mathbf { S } _ { 1 : t - 1 } , \phi ) \mathbf { Z } _ { t } ,
87
+ $$
88
+
89
+ where µ $\begin{array} { r } { \phantom { \frac { 1 } { \theta } } \theta ( \mathbf { S } _ { 1 : t - 1 } , \phi ) = \mathbf { S } _ { t - 1 } + ( \mathbf { S } _ { t - 1 } - \mathbf { S } _ { t - 2 } ) \phantom { \frac { 1 } { \theta } } + m _ { \theta } ( \mathbf { S } _ { 1 : t - 1 } , \phi ) = 2 \mathbf { S } _ { t - 1 } - \mathbf { S } _ { t - 2 } + m _ { \theta } ( \mathbf { S } _ { 1 : t - 1 } , \phi ) , } \end{array}$ encodes a constant-velocity inductive bias. The $m _ { \theta } \in \mathbb { R } ^ { 2 }$ and $\sigma _ { \theta } \in \mathbb { R } ^ { 2 \times 2 }$ are computed by expressive neural networks. The resulting trajectory distribution is complex and multimodal (Appendix C.1 depicts samples). Because traffic light state was not included in the $\phi$ of R2P2’s “RNN” model, it could not react to traffic lights. We created a new model that includes $\boldsymbol { \lambda }$ . It fixed cases where $q ( \mathbf { S } | \phi )$ exhibited no forward-moving preference when the agent was already stopped, and improved $q ( \mathbf { S } | \phi )$ ’s stopping preference at red lights. We used $T = 4 0$ trajectories at $1 0 \mathrm { H z }$ (4 seconds), and $\tau = 3$ . Fig. 12 in Appendix C depicts the architecture of $\mu _ { \theta }$ and $\sigma _ { \theta }$ .
90
+
91
+ # 2.4 IMITATIVE DRIVING
92
+
93
+ We now instantiate a complete autonomous driving framework based on imitative models to study in our experiments, seen in Fig. 5. We use three layers of spatial abstraction to plan to a faraway destination, common to autonomous vehicle setups: coarse route planning over a road map, path planning within the observable space, and feedback control to follow the planned path (Paden et al., 2016; Schwarting et al., 2018). For instance, a route planner based on a conventional GPS-based navigation system might output waypoints roughly in the lanes of the desired direction of travel, but not accounting for environmental factors such as the positions of other vehicles. This roughly communicates possibilities of where the vehicle could go, but not when or how it could get to them, or any environmental factors like other vehicles. A goal likelihood from Sec. 2.2 is formed from the route and passed to the planner, which generates a state-space plan according to the optimization in Eq. 1. The resulting plan is fed to a simple PID controller on steering, throttle, and braking. Pseudocode of the driving and inference algorithms are given in Algs 1 and 2. The PID algorithm is given in Appendix A.
94
+
95
+ # 3 RELATED WORK
96
+
97
+ A body of previous work has explored offline IL (Behavior Cloning – BC) in the CARLA simulator (Li et al., 2018; Liang et al., 2018; Sauer et al., 2018; Codevilla et al., 2018; 2019). These BC approaches condition on goals drawn from a small discrete set of directives. Despite BC’s theoretical drift shortcomings (Ross et al., 2011), these methods still perform empirically well. These approaches and ours share the same high-level routing algorithm: an $A ^ { * }$ planner on route nodes that generates waypoints. In contrast to our approach, these approaches use the waypoints in a Waypoint Classifier, which reasons about the map and the geometry of the route to classify the waypoints into one of several directives: {Turn left, Turn right, Follow Lane, Go Straight}. One of the original motivations for
98
+
99
+ Algorithm 1 IMITATIVEDRIVING(ROUTEPLAN, IMITATIVEPLAN, PIDCONTROLLER, $q _ { \theta } , f , p , H )$
100
+
101
+ 1: $\phi \mathrm { E N V I R O N M E N T } ( \emptyset )$ {Initialize the robot}
102
+ 2: while not at destination do
103
+ 3: $\mathcal { G } \gets \mathsf { R o u r r E P L A N } ( \phi )$ {Generate goals from a route}
104
+ 4: $\mathbf { s } _ { 1 : T } ^ { \mathcal { G } } \gets \mathrm { I M I T A T I V E P L A N } ( q _ { \theta } , f , p , \mathcal { G } , \phi )$ {Plan path}
105
+ 5: for $h = 0$ to $H$ do
106
+ 6: u ← PIDCONTROLLER $( \phi , \mathbf { s } _ { 1 : T } ^ { \mathcal { G } } , h , H )$
107
+ 7: $\phi \gets \mathrm { E N V I R O N M E N T } ( u )$ {Execute control}
108
+ 8: end for
109
+ 9: end while
110
+
111
+ # Algorithm 2 IMITATIVEPLAN(qθ, f, p, G, φ)
112
+
113
+ 1: Initialize ${ \mathbf z } _ { 1 : T } \sim q _ { 0 }$
114
+ 2: while not converged do
115
+ 3: $\mathbf { z } _ { 1 : T } \gets \mathbf { z } _ { 1 : T } + \mathbf { \bar { V } } _ { \mathbf { z } _ { 1 : T } } \left[ \log q ( f ( \mathbf { z } _ { 1 : T } ) | \phi ) + \log p ( \mathcal { G } | f ( \mathbf { z } _ { 1 : T } ) , \phi ) \right]$ {Gradient ascent on Eq. 1}
116
+ 4: end while
117
+ 5: return ${ \bf s } _ { 1 : T } = f ( { \bf z } _ { 1 : T } )$
118
+
119
+ these type of controls was to enable a human to direct the robot (Codevilla et al., 2018). However, in scenarios where there is no human in the loop (i.e. autonomous driving), we advocate for approaches to make use of the detailed spatial information inherent in these waypoints. Our approach and several others we designed make use of this spatial information. One of these is CIL-States (CILS): whereas the approach in Codevilla et al. (2018) uses images to directly generate controls, CILS uses identical inputs and PID controllers as our method. With respect to prior conditional IL methods, our main approach has more flexibility to handle more complex directives post-training, the ability to learn without goal labels, and the ability to generate interpretable planned and unplanned trajectories. These contrasting capabilities are illustrated in Table 1.
120
+
121
+ Our approach is also related to MBRL. MBRL can also plan with a predictive model, but its model only represents possible dynamics. The task of evoking expert-like behavior is offloaded to the reward function, which can be difficult and time-consuming to craft properly. We know of no MBRL approach previously applied to CARLA, so we devised one for comparison. This MBRL approach also uses identical inputs to our method, instead to plan a reachability tree (LaValle, 2006) over an dynamic obstacle-based reward function. See Appendix D for further details of the MBRL and CILS methods, which we emphasize use the same inputs as our method.
122
+
123
+ Several prior works (Tamar et al., 2016; Amos et al., 2018; Srinivas et al., 2018) used imitation learning to train policies that contain planning-like modules as part of the model architecture. While our work also combines planning and imitation learning, ours captures a distribution over possible trajectories, and then plan trajectories at test-time that accomplish a variety of given goals with high probability under this distribution. Our approach is suited to offline-learning settings where interactively collecting data is costly (time-consuming or dangerous). However, there exists online IL approaches that seek to be safe (Menda et al., 2017; Sun et al., 2018; Zhang & Cho, 2017).
124
+
125
+ # 4 EXPERIMENTS
126
+
127
+ We evaluate our method using the CARLA driving simulator (Dosovitskiy et al., 2017). We seek to answer four primary questions: (1) Can we generate interpretable, expert-like plans with offline learning and minimal reward engineering? Neither IL nor MBRL can do so. It is straightforward to interpret the trajectories by visualizing them on the ground plane; we thus seek to validate whether these plans are expert-like by equating expert-like behavior with high performance on the CARLA benchmark. (2) Can we achieve state-of-the-art CARLA performance using resources commonly available in real autonomous vehicle settings? There are several differences between the approaches, as discussed in Sec 3 and shown in Tables 1 and 2. Our approach uses the CARLA toolkit’s resources that are commonly available in real autonomous vehicle settings: waypoint-based routes (all prior approaches use these), LIDAR and traffic-light observations (both are CARLAprovided, but only the approaches we implemented use it). Furthermore, the two additional methods of comparison we implemented (CILS and MBRL) use the exact same inputs as our algorithm. These reasons justify an overall performance comparison to answer (2): whether we can achieve state-of-the-art performance using commonly available resources. We advocate that other approaches also make use of such resources. (3) How flexible is our approach to new tasks? We investigate (3) by applying each of the goal likelihoods we derived and observing the resulting performance. (4) How robust is our approach to error in the provided goals? We do so by injecting two different types of error into the waypoints and observing the resulting performance.
128
+
129
+ Table 1: Desirable attributes of each approach. A green check denotes that a method has a desirable attribute, whereas a red cross denotes the opposite. A “†” indicates an approach we implemented.
130
+
131
+ <table><tr><td>Approach</td><td></td><td>Flexible to New GoalsTrains without goal labelsOutputs PlansTrains OflineHas Expert P.D.F.</td><td></td><td></td><td></td></tr><tr><td>CIRL*(Liang et al., 2018)</td><td>X</td><td>X</td><td>X</td><td>X</td><td>X</td></tr><tr><td>CAL* (Sauer et al.,2018)</td><td>xxxxxν</td><td></td><td></td><td></td><td></td></tr><tr><td>MT*(Li et al.,2018)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CIL*(Codevilla et al., 2018)</td><td></td><td></td><td></td><td></td><td>xxx</td></tr><tr><td>CILRS*(Codevilla et al.,2019)</td><td></td><td></td><td></td><td></td><td>X</td></tr><tr><td>CILSt</td><td></td><td>xxxx//</td><td>xxxxx/</td><td></td><td>X</td></tr><tr><td>MBRL†</td><td></td><td></td><td></td><td>X</td><td>X</td></tr><tr><td>Imitative Models (Ours)t</td><td>√</td><td></td><td></td><td></td><td></td></tr><tr><td colspan="6">Table 2: Algorithmic components of each approach. A “t” i indicates an approach we implemented.</td></tr><tr><td>Approach</td><td>Control Algorithm← Learning Algorithm</td><td></td><td>←Goal-Generation Algorithm ←Routing Algorithm</td><td></td><td>High-Dim. Obs.</td></tr><tr><td>CIRL*(Liang et al.,2018)</td><td></td><td></td><td>Waypoint Classifier</td><td>A*Waypointer</td><td></td></tr><tr><td></td><td>Policy</td><td>Behavior Cloning+RL Affordance Learning</td><td>Waypoint Classifier</td><td>A*Waypointer</td><td>Image Image</td></tr><tr><td>CAL*(Sauer et al.,2018) MT*(Li et al., 2018)</td><td>PID Policy</td><td>Behavior Cloning</td><td>Waypoint Classifier</td><td>A*Waypointer</td><td>Image</td></tr><tr><td>CIL*(Codevilla et al., 2018)</td><td>Policy</td><td>Behavior Cloning</td><td>Waypoint Classifier</td><td>A*Waypointer</td><td>Image</td></tr><tr><td>CILRS*(Codevilla et al., 2019)</td><td>Policy</td><td>Behavior Cloning</td><td>Waypoint Classifier</td><td>A*Waypointer</td><td>Image</td></tr><tr><td>CILSt</td><td>PID</td><td>Trajectory Regressor</td><td>Waypoint Classifier</td><td>A*Waypointer</td><td>(LIDAR,入)</td></tr><tr><td>MBRL†</td><td>Reachability Tree</td><td>State Regressor</td><td>Waypoint Selector</td><td>A*Waypointer</td><td>(LIDAR,λ)</td></tr><tr><td>Imitative Models (Ours)†</td><td>Imitative Plan+PID</td><td>Traj. Density Est.</td><td>Goal Likelihoods</td><td>A*Waypointer</td><td>(LIDAR,λ)</td></tr></table>
132
+
133
+ We begin by training $q ( \mathbf { S } | \phi )$ on a dataset of 25 hours of driving we collected in Town01, detailed in Appendix C.2. Following existing protocol, each test episode begins with the vehicle starting in one of a finite set of starting positions provided by the CARLA simulator in Town01 or Town02 maps in one of two settings: static-world (no other vehicles) or dynamic-world (with other vehicles). We ran the same benchmark 3 times across different random seeds to quantify means and their standard errors. We construct the goal set $\mathbb { G }$ for the Final-State Indicator (A) directly from the route output by CARLA’s waypointer. B’s line segments are formed by connecting the waypoints to form a piecewise linear set of segments. C’s regions are created a polygonal goal region around the segments of (B). Each represents an increasing level of coarseness of direction. Coarser directions are easier to specify when there is ambiguity in positions (both the position of the vehicle and the position of the goals). Further details are discussed in Appendix B.3. Visualizations of (C) are shown in Figures 6 and 7. Visualizations of (A) and (B) are shown in Figures 8 and 9. We use three metrics: (a) success rate in driving to the destination without any collisions (which all prior work reports); (b) red-light violations; and (c) proportion of time spent driving in the wrong lane and off road. With the exception of metric (a), lower numbers are better.
134
+
135
+ Results: Towards questions (1) and (3) (expert-like plans and flexibility), we apply our approach with a variety of goal likelihoods to the CARLA simulator. Towards question (2), we compare our methods against CILS, MBRL, and prior work. These results are shown in Table 3. The metrics for the methods we did not implement are from the aggregation reported in Codevilla et al. (2019). We observe our method to outperform all other approaches in all settings: static world, dynamic world, training conditions, and test conditions. We observe the Goal Indicator methods are able to perform well, despite having no hyperparameters to tune. We found that we could further improve our approach’s performance if we use the light state to define different goal sets, which defines a “smart” waypointer. The settings where we use this are suffixed with “S.” in the Tables. We observed the planner prefers closer goals when obstructed, when the vehicle was already stopped, and when a red light was detected; we observed the planner prefers farther goals when unobstructed and when green lights or no lights were observed. Examples of these and other interesting behaviors are best seen in the videos on the website (https://sites.google.com/view/imitative-models). These behaviors follow from the method leveraging $q ( \mathbf { S } | \phi )$ ’s internalization of aspects of expert behavior in order to reproduce them in new situations. Altogether, these results provide affirmative answers to questions (1) and (2). Towards question (3), these results show that our approach is flexible to different directions defined by these goal likelihoods.
136
+
137
+ Table 3: We evaluate different autonomous driving methods on CARLA’s Dynamic Navigation task. A “†” indicates methods we have implemented (each observes the same waypoints and LIDAR as input). A “∗” indicates results reported in Codevilla et al. (2019). A “–” indicates an unreported statistic. A “‡” indicates an optimistic estimate in transferring a result from the static setting to the dynamic setting. “S.” denotes a “smart” waypointer reactive to light state, detailed in Appendix B.2. Results accompanied by standard errors are computed with $N = 3$ trials across environment seeds.
138
+
139
+ <table><tr><td rowspan="2">Dynamic Nav. Method</td><td colspan="4">TownO1 (training conditions)</td><td colspan="4">Town02 (test conditions)</td></tr><tr><td>Success↑</td><td>Ran Red Light↓</td><td>Wrong lane↓</td><td>Off road↓</td><td>Success↑</td><td>Ran Red Light↓</td><td>Wrong lane↓</td><td>Off road↓</td></tr><tr><td>CIRL*(Liang et al., 2018)</td><td>82%</td><td></td><td></td><td></td><td>41%</td><td></td><td></td><td></td></tr><tr><td>CAL*(Sauer et al.,2018)</td><td>83%</td><td></td><td></td><td></td><td>64%</td><td></td><td></td><td></td></tr><tr><td>MT* (Li et al., 2018)</td><td>81%</td><td></td><td></td><td></td><td>53%</td><td></td><td></td><td></td></tr><tr><td>CIL*(Codevilla et al., 2018)</td><td>83%</td><td>83%</td><td></td><td></td><td>38%</td><td>82%t</td><td></td><td></td></tr><tr><td>CILRS*(Codevilla et al., 2019)</td><td>92%</td><td>27%</td><td></td><td></td><td>66%</td><td>64%</td><td></td><td></td></tr><tr><td>CILS,Waypoint Input†</td><td>17%</td><td>0.0%</td><td>0.20%</td><td>12.1%</td><td>36%</td><td>0.0%</td><td>1.11%</td><td>11.70%</td></tr><tr><td>MBRL,Waypoint Input</td><td>64%</td><td>72%</td><td>11.1%</td><td>2.96%</td><td>48%</td><td>54%</td><td>20.6%</td><td>13.3 %</td></tr><tr><td>Ourmethod,RegionFinal-St.IndicatorS.t</td><td>96%±1.9</td><td>0.89%±0.4</td><td>0.05%±0.01</td><td>0.11%±0.01</td><td>88%±3.3</td><td>2.60%±0.04</td><td>0.49%±0.32</td><td>2.60%±1.1</td></tr><tr><td>Ourmethod,RegionFinal-St.Inictor</td><td>93%±2.2</td><td>18%±0.5</td><td>0.023%±0.002</td><td>0.195%±0.004</td><td>81%±2.2</td><td>54.7%±1.5</td><td>0.12%±0.01</td><td>1.32%±0.69</td></tr><tr><td>Ourmethod,LineegmentFinal-St.Indicatort</td><td>91%±1.1</td><td>32%±1.3</td><td>0.055%±0.002</td><td>0.013%±0.001</td><td>88%±3.3</td><td>35.2%±2.4</td><td>0.52%±0.03</td><td>0.18%±0.02</td></tr><tr><td>Ourmethod,Final-StateIndicatort</td><td>92%</td><td>26%</td><td>0.05%</td><td>0.012%</td><td>84%</td><td>35%</td><td>0.13%</td><td>0.38%</td></tr><tr><td>Ourmethod,Gussianinal-t.</td><td>92% 100%</td><td>6.3% 1.7%</td><td>0.04%</td><td>0.005%</td><td>100%</td><td>12%</td><td>0.11%</td><td>0.04%</td></tr><tr><td>Our method, Gaussian Final-St.Mix.S.t</td><td></td><td></td><td>0.03%</td><td>0.005%</td><td>92%</td><td>0.0%</td><td>0.05%</td><td>0.15%</td></tr><tr><td></td><td colspan="4">Town01 (training conditions)</td><td colspan="4">Town02 (test conditions)</td></tr><tr><td>Static Nav. Method</td><td>Success↑</td><td>Ran RedLight↓</td><td>Wrong lane↓</td><td>Off road↓</td><td>Success↑</td><td>Ran RedLight↓</td><td>Wrong lane↓</td><td>Off road↓</td></tr><tr><td>CIRL*(Liang et al., 2018)</td><td>93%</td><td></td><td></td><td></td><td>68%</td><td></td><td></td><td></td></tr><tr><td>CAL*(Sauer et al.,2018)</td><td>92%</td><td></td><td></td><td></td><td>68%</td><td></td><td></td><td></td></tr><tr><td>MT*(Li et al.,2018)</td><td>81%</td><td></td><td></td><td></td><td>78%</td><td></td><td></td><td></td></tr><tr><td>CIL*(Codevilla et al., 2018)</td><td>86%</td><td>83%</td><td></td><td></td><td>44%</td><td>82%</td><td></td><td></td></tr><tr><td>CILRS*(Codevilla et al., 2019)</td><td>95%</td><td>27%</td><td></td><td></td><td>90%</td><td>64%</td><td></td><td></td></tr><tr><td>CILS,Waypoint Inputt</td><td>28%</td><td>0.0%</td><td>0.38%</td><td>10.23%</td><td>36%</td><td>0.0%</td><td>1.69%</td><td>16.82%</td></tr><tr><td>MBRL,Waypoint Input†</td><td>96%</td><td>78%</td><td>14.3%</td><td>1.94%</td><td>96%</td><td>73%</td><td>19.6 %</td><td>0.75%</td></tr><tr><td>Ourmethod,Final-StateIndicatort</td><td>100%</td><td>48%</td><td>0.05%</td><td>0.002%</td><td>100%</td><td>52%</td><td>0.10%</td><td>0.13%</td></tr><tr><td>Our method,GaussianFinal-St. Mixturet</td><td>96%</td><td>0.83%</td><td>0.01%</td><td>0.08%</td><td>96%</td><td>0.0%</td><td>0.03%</td><td>0.14%</td></tr><tr><td>Ourmethod,GaussianFinal-St.ix..t</td><td>96%</td><td>0.0%</td><td>0.04%</td><td>0.07%</td><td>92%</td><td>0.0%</td><td>0.18%</td><td>0.27%</td></tr></table>
140
+
141
+ ![](images/d0e5003b39ffd8af354765f4a41ccb338bb60327e0b2d15098d188b19a79d9a0.jpg)
142
+ Figure 6: Planning with the Region Final State Indicator yields plans that end inside the region. The orange polygon indicates the region. The red circles indicate the chosen plan.
143
+
144
+ ![](images/58f2baf54f05b70cebe1496658bda359bdc94de6ab7f7752eca9ec9d49fdd210.jpg)
145
+ Figure 7: Even with a wider goal region than Fig. 6, the vehicle remains in its lane. Despite their coarseness, these wide goal regions still provide useful guidance to the vehicle.
146
+
147
+ # 4.1 ROBUSTNESS TO ERRORS IN GOAL-SPECIFICATION
148
+
149
+ Towards questions (3) (flexibility) and (4) (noise-robustness), we analyze the performance of our method when the path planner is heavily degraded, to understand its stability and reliability. We use the Gaussian Final-State Mixture goal likelihood.
150
+
151
+ Navigating with high-variance waypoints. As a test of our model’s capability to stay in the distribution of demonstrated behavior, we designed a “decoy waypoints” experiment, in which half of the waypoints are highly perturbed versions of the other half, serving as distractions for our Gaussian Final-State Mixture imitative planner. We observed surprising robustness to decoy waypoints. Examples of this robustness are shown in Fig. 10. In Table 4, we report the success rate and the mean number of planning rounds for failed episodes in the $^ { 6 6 } \%$ distractors” row. These numbers indicate our method can execute dozens of planning rounds without decoy waypoints causing a catastrophic failure, and often it can execute the hundreds necessary to achieve the goal. See Appendix E for details.
152
+
153
+ Navigating with waypoints on the wrong side of the road. We also designed an experiment to test our method under systemic bias in the route planner. Our method is provided waypoints on the wrong side of the road (in CARLA, the left side), and tasked with following the directions of these waypoints while staying on the correct side of the road (the right side). In order for the value of $q ( \mathbf { s } | \boldsymbol { \phi } )$ to outweigh the influence of these waypoints, we increased the $\epsilon$ hyperparameter. We found our method to still be very effective at navigating, and report results in Table 4. We also investigated providing very coarse 8-meter wide regions to the Region Final-State likelihood; these always include space in the wrong lane and off-road (Fig. 7 in Appendix ?? provides visualization). Nonetheless, on Town01 Dynamic, this approach still achieved an overall success rate of $4 8 \%$ . Taken together towards question (4), our results indicate that our method is fairly robust to errors in goal-specification.
154
+
155
+ ![](images/2138ef8e7bb5566ff77af505c28955e60ae36f8ca04afd3d1bd0a9e1d1ecdeb3.jpg)
156
+ Figure 8: Planning with the Final State Indicator yields plans that end at one of the provided locations. Orange diamonds indicate the locations in the goal set. Red circles indicate the chosen plan.
157
+
158
+ ![](images/08f73d8ccefdf0796b7bf2e02b790e11057096defc95284b7ae07db44e75c5b3.jpg)
159
+ Figure 9: Planning with the Line Segment Final State Indicator yields plans that end along a segment. Orange diamonds indicate line segment endpoints. Red circles indicate the chosen plan.
160
+
161
+ ![](images/0d3a5bf828280148d3ce24b021aad8cb207c1501042928f484322246c7ba2609.jpg)
162
+ Figure 10: Tolerating bad goals. The planner prefers goals in the distribution of expert behavior (on the road at a reasonable distance). Left: Planning with $^ 1 / 2$ decoy goals. Right: Planning with all goals on the wrong side of the road.
163
+ Figure 11: Testtime plans steering around potholes.
164
+
165
+ # 4.2 PRODUCING UNOBSERVED BEHAVIORS TO AVOID NOVEL OBSTACLES
166
+
167
+ Table 4: Robustness to waypoint noise and test-time pothole adaptation. Our method is robust to waypoints on the wrong side of the road and fairly robust to decoy waypoints. Our method is flexible enough to safely produce behavior not demonstrated (pothole avoidance) by incorporating a test-time cost. Ten episodes are collected in each Town.
168
+
169
+ <table><tr><td></td><td></td><td colspan="3">Town01 (training conditions)</td><td colspan="3">Town02 (test conditions)</td></tr><tr><td>Waypointer</td><td>Extra Cost</td><td>Success</td><td>Wrong lane</td><td>Potholes hit</td><td>Success</td><td>Wrong lane</td><td>Potholes hit</td></tr><tr><td>Noiseless waypointer</td><td></td><td>100%</td><td>0.00%</td><td>177/230</td><td>100%</td><td>0.41%</td><td>82/154</td></tr><tr><td>Waypoints wrong lane</td><td></td><td>100%</td><td>0.34%</td><td>1</td><td>70%</td><td>3.16%</td><td>二</td></tr><tr><td>1/2 waypoints distracting</td><td></td><td>70%</td><td>1</td><td></td><td>50%</td><td>1</td><td>二</td></tr><tr><td>Noiseless waypointer</td><td>Pothole</td><td>90%</td><td>1.53%</td><td>10/230</td><td>70%</td><td>1.53%</td><td>35/154</td></tr></table>
170
+
171
+ To further investigate our model’s flexibility to test-time objectives (question 3), we designed a pothole avoidance experiment. We simulated potholes in the environment by randomly inserting them in the cost map near waypoints. We ran our method with a test-time-only cost map of the simulated potholes by combining goal likelihoods (F) and (G), and compared to our method that did not incorporate the cost map (using (F) only, and thus had no incentive to avoid potholes). We recorded the number of collisions with potholes. In Table 4, our method with cost incorporated avoided most potholes while avoiding collisions with the environment. To do so, it drove closer to the centerline, and occasionally entered the opposite lane. Our model internalized obstacle avoidance by staying on the road and demonstrated its flexibility to obstacles not observed during training. Fig. 11 shows an example of this behavior. See Appendix F for details of the pothole generation.
172
+
173
+ # 5 DISCUSSION
174
+
175
+ We proposed “Imitative Models” to combine the benefits of IL and MBRL. Imitative Models are probabilistic predictive models able to plan interpretable expert-like trajectories to achieve new goals. Inference with an Imitative Model resembles trajectory optimization in MBRL, enabling it to both incorporate new goals and plan to them at test-time, which IL cannot. Learning an Imitative Model resembles offline IL, enabling it to circumvent the difficult reward-engineering and costly online data collection necessities of MBRL. We derived families of flexible goal objectives and showed our model can successfully incorporate them without additional training. Our method substantially outperformed six IL approaches and an MBRL approach in a dynamic simulated autonomous driving task. We showed our approach is robust to poorly specified goals, such as goals on the wrong side of the road. We believe our method is broadly applicable in settings where expert demonstrations are available, flexibility to new situations is demanded, and safety is paramount. Future work could investigate methods to handle both observation noise and out-of-distribution observations to enhance the applicability to robust real systems — we expand on this issue in Appendix E. Finally, to facilitate more general planning, future work could extend our approach to explicitly reason about all agents in the environment in order to inform a closed-loop plan for the controlled agent.
176
+
177
+ # ACKNOWLEDGEMENTS
178
+
179
+ This research was supported by ONR N000141712623, DARPA Assured Autonomy, ARL DCIST CRA W911NF-17-2-0181, Google, NVIDIA, and Amazon.
180
+
181
+ # REFERENCES
182
+
183
+ Brandon Amos, Ivan Dario Jimenez Rodriguez, Jacob Sacks, Byron Boots, and Zico Kolter. Differentiable MPC for end-to-end planning and control. In Neural Information Processing Systems (NeurIPS), 2018.
184
+
185
+ Felipe Codevilla, Matthias Miiller, Antonio López, Vladlen Koltun, and Alexey Dosovitskiy. Endto-end driving via conditional imitation learning. In International Conference on Robotics and Automation (ICRA), pp. 1–9. IEEE, 2018.
186
+
187
+ Felipe Codevilla, Eder Santana, Antonio M López, and Adrien Gaidon. Exploring the limitations of behavior cloning for autonomous driving. arXiv preprint arXiv:1904.08980, 2019.
188
+
189
+ Marc Deisenroth and Carl E Rasmussen. PILCO: A model-based and data-efficient approach to policy search. In International Conference on Machine Learning (ICML), pp. 465–472, 2011.
190
+
191
+ Alexey Dosovitskiy and Vladlen Koltun. Learning to act by predicting the future. arXiv preprint arXiv:1611.01779, 2016.
192
+
193
+ Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. CARLA: An open urban driving simulator. In Conference on Robot Learning (CoRL), pp. 1–16, 2017.
194
+
195
+ Leonid Kuvayev and Richard S. Sutton. Model-based reinforcement learning with an approximate, learned model. In Yale Workshop on Adaptive and Learning Systems, pp. 101–105, 1996.
196
+
197
+ Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Neural Information Processing Systems (NeurIPS), pp. 6402–6413, 2017.
198
+
199
+ Steven M LaValle. Planning algorithms. Cambridge University Press, 2006.
200
+
201
+ Sergey Levine. Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909, 2018.
202
+
203
+ Zhihao Li, Toshiyuki Motoyoshi, Kazuma Sasaki, Tetsuya Ogata, and Shigeki Sugano. Rethinking self-driving: Multi-task knowledge for better generalization and accident explanation ability. arXiv preprint arXiv:1809.11100, 2018.
204
+
205
+ Xiaodan Liang, Tairui Wang, Luona Yang, and Eric Xing. CIRL: Controllable imitative reinforcement learning for vision-based self-driving. arXiv preprint arXiv:1807.03776, 2018.
206
+
207
+ Kunal Menda, Katherine Driggs-Campbell, and Mykel J Kochenderfer. DropoutDAgger: A Bayesian approach to safe imitation learning. arXiv preprint arXiv:1709.06166, 2017.
208
+
209
+ Aaron van den Oord, Yazhe Li, Igor Babuschkin, Karen Simonyan, Oriol Vinyals, Koray Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis C Cobo, Florian Stimberg, et al. Parallel WaveNet: Fast high-fidelity speech synthesis. arXiv preprint arXiv:1711.10433, 2017.
210
+
211
+ Brian Paden, Michal Cáp, Sze Zheng Yong, Dmitry Yershov, and Emilio Frazzoli. A survey of ˇ motion planning and control techniques for self-driving urban vehicles. Transactions on Intelligent Vehicles, 1(1):33–55, 2016.
212
+
213
+ Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning (ICML), pp. 1530–1538, 2015.
214
+
215
+ Nicholas Rhinehart, Kris M. Kitani, and Paul Vernaza. R2P2: A reparameterized pushforward policy for diverse, precise generative path forecasting. In European Conference on Computer Vision (ECCV), September 2018.
216
+
217
+ Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Artificial Intelligence and Statistics (AISTATS), pp. 627–635, 2011.
218
+
219
+ Andrey Rudenko, Luigi Palmieri, Michael Herman, Kris M Kitani, Dariu M Gavrila, and Kai O Arras. Human motion trajectory prediction: A survey. arXiv preprint arXiv:1905.06113, 2019.
220
+
221
+ Axel Sauer, Nikolay Savinov, and Andreas Geiger. Conditional affordance learning for driving in urban environments. arXiv preprint arXiv:1806.06498, 2018.
222
+
223
+ Wilko Schwarting, Javier Alonso-Mora, and Daniela Rus. Planning and decision-making for autonomous vehicles. Annual Review of Control, Robotics, and Autonomous Systems, 1:187–210, 2018.
224
+
225
+ Aravind Srinivas, Allan Jabri, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Universal planning networks: Learning generalizable representations for visuomotor control. In International Conference on Machine Learning (ICML), pp. 4739–4748, 2018.
226
+
227
+ Liting Sun, Cheng Peng, Wei Zhan, and Masayoshi Tomizuka. A fast integrated planning and control framework for autonomous driving via imitation learning. In Dynamic Systems and Control Conference. American Society of Mechanical Engineers, 2018.
228
+
229
+ Aviv Tamar, Yi Wu, Garrett Thomas, Sergey Levine, and Pieter Abbeel. Value iteration networks. In Neural Information Processing Systems (NeurIPS), pp. 2154–2162, 2016.
230
+
231
+ Emanuel Todorov. Linearly-solvable Markov decision problems. In Neural Information Processing Systems (NeurIPS), pp. 1369–1376, 2007.
232
+
233
+ Jiakai Zhang and Kyunghyun Cho. Query-efficient imitation learning for end-to-end simulated driving. In Association for the Advancement of Artificial Intelligence (AAAI), pp. 2891–2897, 2017.
234
+
235
+ # A ALGORITHMS
236
+
237
+ In Algorithm 1, we provided pseudocode for receding-horizon control via our imitative model. In Algorithm 2 we provided pesudocode that describes how we plan in the latent space of the trajectory. In Algorithm 3, we detail the speed-based throttle and position-based steering PID controllers.
238
+
239
+ $$
240
+ \mathbf { A l g o r i t h m 3 } \quad \mathbf { P I D C O N T R O L L E R } ( \phi = \left\{ \mathbf { s } _ { 0 } , \mathbf { s } _ { - 1 } , \ldots \right\} , \mathbf { s } _ { 1 : T } ^ { \mathcal { G } } , h , H ; K _ { p } ^ { \dot { s } } , K _ { p } ^ { \alpha } )
241
+ $$
242
+
243
+ 1: $i T - H + h$ {Compute the index of the target position}
244
+ 2: s˙process-speed $ ( \mathbf { s } _ { 0 , x } - \mathbf { s } _ { - 1 , x } )$ {Compute the current forward speed from the observations}
245
+ 3: $s _ { \mathrm { s e t p o i n t - p o s i t i o n } } \mathbf { s } _ { i , x } ^ { \mathcal { G } }$ {Retrieve the target position $\mathbf { X }$ -coordinate from the plan}
246
+ 4: $\dot { s } _ { \mathrm { s e t p o i n t - s p e e d } } s _ { \mathrm { s e t p o i n t - p o s i t i o n } } \Big / i$ {Compute the forward target speed}
247
+ 5: $e _ { \dot { s } } \gets \dot { s } _ { \mathrm { s e t p o i n t - s p e e d } } - \dot { s } _ { \mathrm { p r o c e } }$ ss-speed {Compute the forward speed error} 6: $u _ { \dot { s } } \gets K _ { p } ^ { \dot { s } } e _ { \dot { s } }$ {Compute the accelerator control with a nonzero proportional term} 7: throttle $\iff \mathbb { 1 } ( e > 0 ) \cdot u + \mathbb { 1 } ( e \leq 0 ) \cdot 0$ {Use the control as throttle if the speed error is positive}
248
+ 8: brake $ \mathbb { 1 } ( e > 0 ) \cdot 0 + \mathbb { 1 } ( e \leq 0 ) \cdot u$ {Use the control as brake if the speed error is negative}
249
+ 9: 10: 11: $\boldsymbol { \iota } _ { \mathrm { p r o c e s s } } \gets \arctan ( \mathbf { s } _ { 0 , y } - \mathbf { s } _ { - 1 , y } , \mathbf { s } _ { 0 , x } - \mathbf { s } _ { - 1 , x } )$ {Compute current heading}{Compute target forward heading}g error} $\alpha _ { \mathrm { s e t p o i n t } } \arctan ( \mathbf { s } _ { i , y } ^ { \mathcal { G } } - \mathbf { s } _ { 0 , y } , | \mathbf { s } _ { i , x } ^ { \mathcal { G } } - \mathbf { s } _ { 0 , x } | ) _ { . }$ $e _ { \alpha } \gets \alpha _ { \mathrm { s e t p o i n t } } - \alpha _ { \mathrm { p r o c } }$
250
+ 12: steering $\ L _ { \ S } K _ { p } ^ { \alpha } e _ { \alpha }$ {Compute the steering with a nonzero proportional term}
251
+ 13: $u \gets$ [throttle, steering, brake]
252
+ 14: return $u$
253
+
254
+ # A.1 LATENT PLAN OPTIMIZATION
255
+
256
+ Since $\mathbf { s } _ { 1 : T } = f ( \mathbf { z } _ { 1 : T } )$ in our implementation, and $f$ is differentiable, we can perform gradient descent of the same objective in terms of $\mathbf { z } _ { 1 : T }$ , as shown in Algorithm 2.Since $q$ is trained with $\mathbf { z } _ { 1 : T } \sim \mathcal { N } ( 0 , I )$ , the latent space is likelier to be better numerically conditioned than the space of $\mathbf { s } _ { 1 : T }$ , although we did not compare the two approaches formally. We implemented the following optimizations to improve this procedure’s output and practical run time. 1) We started with $N = 1 2 0$ different $\mathbf { z }$ initializations, optimized them in batch, and returned the highest-scoring value across the entire optimization. 2) We observed the resulting planning procedure to usually converge quickly, so instead of specifying a convergence threshold, we simply ran the optimization for a small number of steps, $M = 1 0$ , and found that we obtained good performance. Better performance could be obtained by performing a larger number of steps.
257
+
258
+ # B GOAL DETAILS
259
+
260
+ # B.1 OPTIMIZING GOAL LIKELIHOODS WITH SET CONSTRAINTS
261
+
262
+ We now derive an approach to optimize our main objective with set constraints. Although we could apply a constrained optimizer, we find that we are able to exploit properties of the model and constraints to derive differentiable objectives that enable approximate optimization of the corresponding closed-form optimization problems. These enable us to use the same straightforward gradient-descent-based optimization approach described in Algorithm 2.
263
+
264
+ Shorthand notation: In this section we omit dependencies on $\phi$ for brevity, and use short hand $\mu _ { t } \doteq \mu _ { \theta } \bigl ( \mathbf { s } _ { 1 : t - 1 } \bigr )$ and $\Sigma _ { t } \doteq \Sigma _ { \theta } \bigl ( \mathbf { s } _ { 1 : t - 1 } \bigr )$ . For example, $q ( \mathbf { s } _ { t } | \mathbf { s } _ { 1 : t - 1 } ) = \mathcal { N } \left( \mathbf { s } _ { t } ; \mu _ { t } , \Sigma _ { t } \right)$ .
265
+
266
+ Let us begin by defining a useful delta function:
267
+
268
+ $$
269
+ \delta _ { \mathbf { s } _ { T } } ( \mathbb { G } ) \doteq { \left\{ \begin{array} { l l } { 1 } & { { \mathrm { i f ~ } } \mathbf { s } _ { T } \in \mathbb { G } } \\ { 0 } & { { \mathrm { i f ~ } } \mathbf { s } _ { T } \notin \mathbb { G } , } \end{array} \right. }
270
+ $$
271
+
272
+ which serves as our goal likelihood when using goal with set constraints: $p ( \mathcal { G } | \mathbf { s } _ { 1 : T } ) \gets \delta _ { S _ { T } } ( \mathbb { G } )$ . We now derive the corresponding maximum a posteriori optimization problem:
273
+
274
+ $$
275
+ \begin{array} { r l } { \mathbf { f } _ { \perp \perp } } & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \{ ( \mathbf { J } _ { \perp \perp } \cdot \boldsymbol { F } _ { \perp } ) \cdot \boldsymbol { F } _ { \perp \perp } ^ { \perp } \} } \\ & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \{ [ \mathbf { S } _ { \parallel } \cdot \mathbf { u } _ { \mathrm { L } } \cdot \boldsymbol { F } _ { \perp } ] \cdot \boldsymbol { F } _ { \perp } ^ { \perp } \} } \\ & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \{ [ \mathbf { J } _ { \perp \perp } \cdot \boldsymbol { F } _ { \perp } ] \cdot \boldsymbol { F } _ { \perp } ^ { \perp } \} } \\ & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \{ [ \mathbf { J } _ { \perp \perp } \cdot \boldsymbol { F } _ { \perp } ] \cdot \boldsymbol { F } _ { \perp } ^ { \perp } \} } \\ & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \exp \lambda _ { \mathrm { R } } \exp \lambda _ { \mathrm { R } } \exp \lambda _ { \mathrm { R } } } \\ & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \{ [ \mathbf { J } _ { \perp \perp } \cdot \boldsymbol { F } _ { \perp } ] \cdot \frac { \boldsymbol { F } _ { \perp } \lambda _ { \mathrm { R } } ^ { \perp } } { \lambda _ { \mathrm { R } } ^ { \perp } \sin { \mathrm { R } } } } \\ & { = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \{ \mathbf { J } _ { \perp \perp } \cdot \boldsymbol { F } _ { \perp } \} } \\ & = \frac { \lambda _ { \mathrm { R } } \tau } { \lambda _ { \mathrm { R } } \tau } \exp \lambda _ { \mathrm { R } } \{ \mathbf { J } _ { \perp } \cdot \mathbf { J } _ { \perp } \end{array}
276
+ $$
277
+
278
+ By exploiting the fact that $q ( \mathbf { s } _ { T } | \mathbf { s } _ { 1 : T - 1 } ) = \mathcal { N } \left( \mathbf { s } _ { T } ; \mu _ { T } , \Sigma _ { T } \right)$ , we can derive closed-form solutions for
279
+
280
+ $$
281
+ \mathbf { s } _ { T } ^ { * } \ = \ \underset { \mathbf { s } _ { T } \in \mathbb { G } } { \arg \operatorname* { m a x } } \ \mathcal { N } \left( \mathbf { s } _ { T } ; \mu _ { T } , \Sigma _ { T } \right)
282
+ $$
283
+
284
+ when $\mathbb { G }$ has special structure, which enables us to apply gradient descent to solve this constrainedoptimization problem (examples below). With a closed form solution to equation 6, we can easily compute equation 5 using unconstrained-optimization as follows:
285
+
286
+ $$
287
+ \begin{array} { r l } & { { \bf s } _ { 1 : T } ^ { * } = \underset { { \bf s } _ { 1 : T - 1 } \in \mathbb { R } ^ { 2 ( T - 1 ) } { \bf s } _ { T } \in \mathbb { G } _ { \mathrm { i n e - s e g m a x } } } { \arg \operatorname* { m a x } } q ( { \bf s } _ { T } | { \bf s } _ { 1 : T - 1 } ) \prod _ { t = 1 } ^ { T - 1 } q ( { \bf s } _ { t } | { \bf s } _ { 1 : t - 1 } ) } \\ & { { \bf s } _ { 1 : T - 1 } ^ { * } = \underset { { \bf s } _ { 1 : T - 1 } \in \mathbb { R } ^ { 2 ( T - 1 ) } } { \arg \operatorname* { m a x } } q ( { \bf s } _ { T } ^ { * } | { \bf s } _ { 1 : t - 1 } ) \prod _ { t = 1 } ^ { T - 1 } q ( { \bf s } _ { t } | { \bf s } _ { 1 : t - 1 } ) . } \end{array}
288
+ $$
289
+
290
+ Note that equation 8 only helps solve equation 5 if equation 6 has a closed-form solution. We detail example of goal-sets with such closed-form solutions in the following subsections.
291
+
292
+ # B.1.1 POINT GOAL-SET
293
+
294
+ The solution to equation 6 in the case of a single desired goal $g \in \mathbb { R } ^ { D }$ is simply:
295
+
296
+ $$
297
+ \begin{array} { r l } { \mathbb { G } _ { \mathrm { p o i n t } } ~ \doteq ~ \{ \mathbf { g } _ { T } \} , } & { } \\ { \mathbf { s } _ { T , \mathrm { p o i n t } } ^ { * } ~ \doteq ~ \mathrm { a r g } \operatorname* { m a x } \mathcal { N } \left( \mathbf { s } _ { T } ; \mu _ { T } , \boldsymbol { \Sigma } _ { T } \right) } & { } \\ & { ~ \mathbf { s } _ { T } \in \mathbb { G } _ { \mathrm { p o i n t } } } \\ { ~ } & { = ~ \mathbf { g } _ { T } . } \end{array}
298
+ $$
299
+
300
+ More generally, multiple point goals help define optional end points for planning: where the agent only need reach one valid end point (see Fig. 8 for examples), formulated as:
301
+
302
+ $$
303
+ \begin{array} { r c l } { \displaystyle \mathbb { G } _ { \mathrm { p o i n t s } } } & { \doteq } & { \displaystyle \{ \mathbf { g } _ { T } ^ { k } \} _ { k = 1 } ^ { K } , } \\ { \displaystyle \mathbf { s } _ { T , \mathrm { p o i n t s } } ^ { * } } & { \stackrel { \cdot } { = } } & { \arg \operatorname* { m a x } _ { T } \mathcal { N } \left( \mathbf { g } _ { T } ^ { k } ; \boldsymbol { \mu } _ { T } , \boldsymbol { \Sigma } _ { T } \right) . } \end{array}
304
+ $$
305
+
306
+ # B.1.2 LINE-SEGMENT GOAL-SET
307
+
308
+ We can form a goal-set as a finite-length line segment, connecting point $\mathbf { a } \in \mathbb { R } ^ { D }$ to point $\mathbf { b } \in \mathbb { R } ^ { D }$ :
309
+
310
+ $$
311
+ \begin{array} { r l } { g _ { \mathrm { l i n e } } ( u ) } & { \doteq \mathbf { a } + u \cdot ( \mathbf { b } - \mathbf { a } ) , ~ u \in \mathbb { R } , } \\ { \mathbb { G } _ { \mathrm { l i n e - s e g m e n t } } ^ { \mathbf { a } \to \mathbf { b } } } & { \doteq \{ g _ { \mathrm { l i n e } } ( u ) : u \in [ 0 , 1 ] \} . } \end{array}
312
+ $$
313
+
314
+ The solution to equation 6 in the case of line-segment goals is:
315
+
316
+ $$
317
+ \begin{array} { r l } & { \mathbf { s } _ { T , \mathrm { l i n e - s e g m e n t } } ^ { * } \ \doteq \ \underset { \mathbf { s } _ { T } \in \mathbb { G } _ { \mathrm { l i n e - s e m e n t } } ^ { \mathrm { a v } } } { \arg \operatorname* { m a x } } \ N \left( \mathbf { s } _ { T } ; \mu _ { T } , \Sigma _ { T } \right) } \\ & { \quad \quad \quad \quad \quad \quad \quad = \ \mathbf { a } + \operatorname* { m i n } \left( 1 , \ \operatorname* { m a x } \left( 0 , \ \frac { ( \mathbf { b } - \mathbf { a } ) ^ { \top } \Sigma _ { T } ^ { - 1 } ( \mu _ { T } - \mathbf { a } ) } { ( \mathbf { b } - \mathbf { a } ) ^ { \top } \Sigma _ { T } ^ { - 1 } ( \mathbf { b } - \mathbf { a } ) } \right) \right) \cdot ( \mathbf { b } - \mathbf { a } ) . } \end{array}
318
+ $$
319
+
320
+ # Proof:
321
+
322
+ To solve equation 15 is to find which point along the line $g _ { \mathrm { l i n e } } ( u )$ maximizes $\mathcal { N } ( \cdot ; \mu _ { T } , \Sigma _ { T } )$ subject to the constraint $0 \leq u \leq 1$ :
323
+
324
+ $$
325
+ \begin{array} { r l } & { u ^ { * } \ \doteq \ \underset { u \in [ 0 , 1 ] } { \arg \operatorname* { m a x } } \ \mathcal { N } \left( g _ { \mathrm { l i n e } } ( u ) ; \boldsymbol { \mu } _ { T } , \Sigma _ { T } \right) ) } \\ & { \quad = \ \underset { u \in [ 0 , 1 ] } { \arg \operatorname* { m i n } } \ \underbrace { \left( g _ { \mathrm { l i n e } } ( u ) - \boldsymbol { \mu } _ { T } \right) ^ { \top } \Sigma _ { T } ^ { - 1 } ( g _ { \mathrm { l i n e } } ( u ) - \boldsymbol { \mu } _ { T } ) } _ { \mathcal { L } _ { u } ( u ) } . } \end{array}
326
+ $$
327
+
328
+ Since $\mathcal { L } _ { u }$ is convex, the optimal value $u ^ { * }$ is value closest to the unconstrained arg max of $\mathcal { L } _ { u } ( u )$ , subject to $0 \leq u \leq 1$ :
329
+
330
+ $$
331
+ \begin{array} { r l } & { u _ { \mathbb { R } } ^ { * } \doteq \underset { u \in \mathbb { R } } { \arg \operatorname* { m a x } } \mathcal { L } _ { u } ( u ) , } \\ & { u ^ { * } = \underset { u \in [ 0 , 1 ] } { \arg \operatorname* { m i n } } \mathcal { L } _ { u } ( u ) } \\ & { \quad = \underset { \quad \operatorname* { m i n } \big ( 1 , \ : \operatorname* { m a x } \big ( 0 , \ : u _ { \mathbb { R } } ^ { * } \big ) \big ) . } { \operatorname* { m i n } } } \end{array}
332
+ $$
333
+
334
+ We now solve for $u _ { \mathbb { R } } ^ { * }$
335
+
336
+ $$
337
+ \begin{array} { r l } & { u _ { \mathbb { R } } ^ { * } = u : 0 = \frac { \mathrm { d } \mathcal { L } ( u ) } { \mathrm { d } u } = \frac { \mathrm { d } \left( \left( g _ { \mathrm { l i n e } } ( u ) - \mu _ { T } \right) ^ { \top } \Sigma _ { T } ^ { - 1 } \left( g _ { \mathrm { l i n e } } ( u ) - \mu _ { T } \right) \right) } { \mathrm { d } u } } \\ & { \phantom { \quad \quad \quad } = 2 \cdot \frac { \mathrm { d } \left( g _ { \mathrm { l i n e } } ( u ) - \mu _ { T } \right) ^ { \top } } { \mathrm { d } u } \Sigma _ { T } ^ { - 1 } ( g _ { \mathrm { l i n e } } ( u ) - \mu _ { T } ) } \\ & { \phantom { \quad \quad \quad \quad } = 2 \cdot \frac { \mathrm { d } \left( \mathbf { a } + u \cdot \left( \mathbf { b } - \mathbf { a } \right) - \mu _ { T } \right) ^ { \top } } { \mathrm { d } u } \Sigma _ { T } ^ { - 1 } ( \mathbf { a } + u \cdot ( \mathbf { b } - \mathbf { a } ) - \mu _ { T } ) } \\ & { \phantom { \quad \quad \quad \quad } = 2 \cdot ( \mathbf { b } - \mathbf { a } ) ^ { \top } \Sigma _ { T } ^ { - 1 } \left( \mathbf { a } + u \cdot ( \mathbf { b } - \mathbf { a } ) - \mu _ { T } \right) , } \\ & { \quad \quad \quad u _ { \mathbb { R } } ^ { * } = \frac { \left( \mathbf { b } - \mathbf { a } \right) ^ { \top } \Sigma _ { T } ^ { - 1 } \left( \mu _ { T } - \mathbf { a } \right) } { \left( \mathbf { b } - \mathbf { a } \right) ^ { \top } \Sigma _ { T } ^ { - 1 } \left( \mathbf { b } - \mathbf { a } \right) } , } \end{array}
338
+ $$
339
+
340
+ which gives us:
341
+
342
+ $$
343
+ \begin{array} { r l } & { \mathbf { s } _ { T , \mathrm { l i n e - s e g m e n t } } ^ { * } \ = \ g _ { \mathrm { l i n e } } ( u ^ { * } ) } \\ & { \ = \ \mathbf { a } + u ^ { * } \cdot ( \mathbf { b } - \mathbf { a } ) } \\ & { \ = \ \mathbf { a } + \operatorname* { m i n } \big ( 1 , \ \operatorname* { m a x } \big ( 0 , \ u _ { \mathtt { R } } ^ { * } \big ) \big ) \cdot ( \mathbf { b } - \mathbf { a } ) } \\ & { \ = \ \mathbf { a } + \operatorname* { m i n } \bigg ( 1 , \ \operatorname* { m a x } \bigg ( 0 , \ \frac { \big ( \mathbf { b } - \mathbf { a } \big ) ^ { \top } \Sigma _ { T } ^ { - 1 } ( \mu _ { T } - \mathbf { a } ) } { \big ( \mathbf { b } - \mathbf { a } \big ) ^ { \top } \Sigma _ { T } ^ { - 1 } ( \mathbf { b } - \mathbf { a } ) } \bigg ) \bigg ) \cdot ( \mathbf { b } - \mathbf { a } ) . } \end{array}
344
+ $$
345
+
346
+ # B.1.3 MULTIPLE-LINE-SEGMENT GOAL-SET:
347
+
348
+ More generally, we can combine multiple line-segments to form piecewise linear “paths” we wish y defining a path that con select the optimal segment $\left( \mathbf { p } _ { 0 } , \mathbf { p } _ { 1 } , . . . , \mathbf { p } _ { N } \right)$ , we can e segment aluate ’s sol $\mathcal { L } _ { u } ^ { i }$ forn to chto
349
+ $\mathbb { G } _ { \mathsf { l i n e - s e o m e n t } } ^ { \mathbf { p } _ { i } \to \mathbf { p } _ { i + 1 } }$ $i ^ { * } = \arg \operatorname* { m a x } _ { i } \mathcal { L } _ { u } ^ { i }$ $i ^ { * }$ $u ^ { * }$ $s _ { T } ^ { * }$
350
+
351
+ # B.1.4 POLYGON GOAL-SET
352
+
353
+ Instead of a route or path, a user (or program) may wish to provide a general region the agent should go to, and state within that region being equally valid. Polygon regions (including both boundary and interior) offer closed form solution to equation 6 and are simple to specify. A polygon can be specified by an ordered sequence of vertices $( { \bf p } _ { 0 } , { \bf p } _ { 1 } , . . . , { \bf p } _ { N } ) \in \bar { \mathbb { R } } ^ { N \times 2 }$ . Edges are then defined as the sequence of line-segments between successive vertices (and a final edge between first and last vertex): $\big ( \big ( \mathbf { p } _ { 0 } , \mathbf { p } _ { 1 } \big ) , . . . , \big ( \mathbf { p } _ { N - 1 } , \mathbf { p } _ { N } \big ) , \big ( \mathbf { p } _ { N } , \mathbf { p } _ { 0 } \big ) \big )$ . Examples shown in Fig. 6 and 7.
354
+
355
+ Solving equation 6 with a polygon has two cases: depending whether $\mu _ { T }$ is inside the polygon, or outside. If $\mu _ { T }$ lies inside the polygon, then the optimal value for $\mathbf { s } _ { T } ^ { * }$ that maximizes $\mathcal { N } ( \mathbf { s } _ { T } ^ { * } ; \mu _ { T } , \boldsymbol { \Sigma _ { T } } )$ is simply $\mu _ { T }$ : the mode of the Gaussian distribution. Otherwise, if $\mu _ { T }$ lies outside the polygon, then the optimal value $\mathbf { s } _ { T } ^ { \ast }$ will lie on one of the polygon’s edges, solved using B.1.3.
356
+
357
+ # B.2 WAYPOINTER DETAILS
358
+
359
+ The waypointer uses the CARLA planner’s provided route to generate waypoints. In the constrainedbased planning goal likelihoods, we use this route to generate waypoints without interpolating between them. In the relaxed goal likelihoods, we interpolate this route to every 2 meters, and use the first 20 waypoints. As mentioned in the main text, one variant of our approach uses a “smart” waypointer. This waypointer simply removes nearby waypoints closer than 5 meters from the vehicle when a green light is observed in the measurements provided by CARLA, to encourage the agent to move forward, and removes far waypoints beyond 5 meters from the vehicle when a red light is observed in the measurements provided by CARLA. Note that the performance differences between our method without the smart waypointer and our method with the smart waypointer are small: the only signal in the metrics is that the smart waypointer improves the vehicle’s ability to stop for red lights, however, it is quite adept at doing so without the smart waypointer.
360
+
361
+ # B.3 CONSTRUCTING GOAL SETS
362
+
363
+ Given the in-lane waypoints generated by CARLA’s route planner, we use these to create Point goal sets, Line-Segment goal sets, and Polygon Goal-Sets, which respectively correspond to the (A) Final-State Indicator, (B) Line-Segment Final-State Indicator, and (C) Final-State Region Indicator described in Section 2.2. For (A), we simply feed the waypoints directly into the Final-State Indicator, which results in a constrained optimization to ensure that the vehicle’s current position in the goal set, in order to allo $S _ { T } \in \mathbb { G } \overset { \cdot } { = } \{ g _ { T } ^ { k } \} _ { k = 1 } ^ { K }$ . We also includeddient-descent based optimization is then formed from combining Eq. 8 with Eq. 12. The gradient to the nearest goal of the final state of the partially-optimized plan encourage the optimization to move the plan closer to that goal. We used $K = 1 0$ . We applied the same procedure to generate the goal set for the (B) Line Segment indicator, as the waypoints returned by the planner are ordered. Finally, for the (C) Final-State Region Indicator (polygon), we used the ordered waypoints as the “skeleton” of a polygon that surrounds. It was created by adding a two vertices for each point $\mathbf { v } _ { t }$ in the skeleton at a distance 1 meter from $\mathbf { v } _ { t }$ perpendicular to the segment connecting the surrounding points $\left( \mathbf { v } _ { t - 1 } , \mathbf { v } _ { t + 1 } \right)$ . This resulted in a goal set $\mathbb { G } _ { \mathrm { p o l y g o n } } \supset \mathbb { G } _ { \mathrm { l i n e - s e g m e n t } } .$ , as it surrounds the line segments. The (F) Gaussian Final-State Mixture goal set was constructed in the same way as (A), and also used when the pothole costs were added.
364
+
365
+ For the methods we implemented, the task is to drive the furthest road location from the vehicle’s initial position. Note that this protocol more difficult than the one used in prior work Codevilla et al. (2018); Liang et al. (2018); Sauer et al. (2018); Li et al. (2018); Codevilla et al. (2019), which has no distance guarantees between start positions and goals, and often results in shorter paths.
366
+
367
+ # C ARCHITECTURE AND TRAINING DETAILS
368
+
369
+ The architecture of $q ( \mathbf { S } | \phi )$ is shown in Table 5.
370
+
371
+ # C.1 PRIOR VISUALIZATION AND STATISTICS
372
+
373
+ We show examples of the priors multimodality in Fig. 13
374
+
375
+ ![](images/165cba554b1e126586e7d95b1c3a2ea09d4d92b423f23288cb25513c6941cb37.jpg)
376
+ Figure 12: Architecture of $m _ { \theta }$ and $\sigma _ { \theta }$ , which parameterize $q _ { \theta } ( \mathbf { S } | \phi = \{ \chi , \mathbf { s } _ { - \tau : 0 } , \lambda \} )$ . Inputs: LIDAR $\chi$ , past-states ${ \bf s } _ { - \tau : 0 }$ , light-state $\lambda$ , and latent noise $\mathbf { Z } _ { 1 : T }$ . Output: trajectory $\mathbf { S } _ { 1 : T }$ . Details in Appendix C.
377
+
378
+ Table 5: Detailed Architecture that implements $\mathbf { s } _ { 1 : T } = f ( \mathbf { z } _ { 1 : T } , \phi )$ . Typically, $T = 4 0$ , $D = 2 , H =$ $W = 2 0 0$ .
379
+
380
+ <table><tr><td></td><td>ComponentInput [dimensionality]Layer or Operation</td><td></td><td>Output [dimensionality]</td><td>Details</td></tr><tr><td colspan="5">Static featurizationofcontext:={x,s:A}.</td></tr><tr><td>MapFeat</td><td>x[H,W,2]</td><td>2D Convolution</td><td>1x[H,W,32]</td><td>3 ×3 stride 1,ReLu</td></tr><tr><td>MapFeat</td><td>1-1x[H,W,32]</td><td>2D Convolution</td><td>x[H,W,32]</td><td>3 × 3 stride 1,ReLu,i∈[2,...,8]</td></tr><tr><td>MapFeat</td><td>8x[H,W,32]</td><td>2D Convolution</td><td>r[H,W,8]</td><td>3 × 3 stride 1,ReLu</td></tr><tr><td>PastRNN</td><td>S-T:0[T+1,D]</td><td>RNN</td><td>[32]</td><td>GRU across time dimension</td></tr><tr><td colspan="5">Dynamic generation via loop:fort∈{0,...,T-1}.</td></tr><tr><td>MapFeat</td><td>s[D]</td><td>Interpolate</td><td>t=F(st)[8]</td><td>Differentiable interpolation</td></tr><tr><td>JointFeat</td><td>t,S0,²n,</td><td>s0²n田a入</td><td>pt [D+50+32+1]</td><td>Concatenate ()</td></tr><tr><td>FutureRNN</td><td>pt[D+50+32+1]</td><td>RNN</td><td>pt[50]</td><td>GRU</td></tr><tr><td>FutureMLP</td><td>1pt[50]</td><td>Affine (FC)</td><td>2pt[200]</td><td>Tanh activation</td></tr><tr><td>FutureMLP</td><td>2pt[200]</td><td>Affine (FC)</td><td>mt [D],εt [D,D]</td><td>Identity activation</td></tr><tr><td>MatrixExp</td><td>[D,D]</td><td></td><td>Tt[D,D]</td><td>Differentiable Matrix Exponential Rhinehart et al. (2018)</td></tr><tr><td>VerletStep</td><td>St,St-1,mt,Ot,Zt</td><td>2st-St-1+mt+OtZt</td><td>St+1[D]</td><td></td></tr></table>
381
+
382
+ # C.1.1 STATISTICS OF PRIOR AND GOAL LIKELIHOODS
383
+
384
+ Following are the values of the planning criterion on $N \approx 8 \cdot 1 0 ^ { 3 }$ rounds from applying the “Gaussian Final-State Mixture” to Town01 Dynamic. Mean of log $q ( \mathbf { s } ^ { * } | \boldsymbol { \phi } ) \approx 1 0 4$ . Mean of $\bar { \log { p ( \mathcal { G } | \mathbf { s } ^ { * } , \boldsymbol { \phi } ) } } = - 4$ . This illustrates that while the prior’s value mostly dominates the values of the final plans, the Gaussian Final-State Goal Mixture likelihood has a moderate amount of influence on the value of the final plan.
385
+
386
+ # C.2 DATASET
387
+
388
+ Before training $q ( \mathbf { S } | \phi )$ , we ran CARLA’s expert in the dynamic world setting of Town01 to collect a dataset of examples. We have prepared the dataset of collected data for public release upon publication. We ran the autopilot in Town01 for over 900 episodes of 100 seconds each in the presence of 100 other vehicles, and recorded the trajectory of every vehicle and the autopilot’s LIDAR observation. We randomized episodes to either train, validation, or test sets. We created sets of 60,701 train, 7586 validation, and 7567 test scenes, each with 2 seconds of past and 4 seconds of future position information at $1 0 \mathrm { H z }$ . The dataset also includes 100 episodes obtained by following the same procedure in Town02.
389
+
390
+ # D BASELINE DETAILS
391
+
392
+ # D.1 CONDITIONAL IMITATION LEARNING OF STATES (CILS):
393
+
394
+ We designed a conditional imitation learning baseline that predicts the setpoint for the PID-controller. Each receives the same scene observations (LIDAR) and is trained with the same set of trajectories as our main method. It uses nearly the same architecture as that of the original CIL, except it outputs setpoints instead of controls, and also observes the traffic light information. We found it very effective for stable control on straightaways. When the model encounters corners, however, prediction is more difficult, as in order to successfully avoid the curbs, the model must implicitly plan a safe path. We found that using the traffic light information allowed it to stop more frequently.
395
+
396
+ ![](images/106d03c1b2c5f19e0b13f53be203f8bf17bd27eb4f8541bef1d198d912953f5c.jpg)
397
+ Figure 13: Left: Samples from the prior, $q ( \mathbf { S } | \phi )$ , go left or right. Right: Samples go forward or right.
398
+
399
+ # D.2 MODEL-BASED REINFORCEMENT LEARNING:
400
+
401
+ Static-world To compare against a purely model-based reinforcement learning algorithm, we propose a model-based reinforcement learning baseline. This baseline first learns a forwards dynamics model $\mathbf { s } _ { t + 1 } = f ( \mathbf { s } _ { t - 3 : t } , \mathbf { a } _ { t } )$ given observed expert data $\cdot { a } _ { t }$ are recorded vehicle actions). We use an MLP with two hidden layers, each 100 units. Note that our forwards dynamics model does not imitate the expert preferred actions, but only models what is physically possible. Together with the same LIDAR map $x$ our method uses to locate obstacles, this baseline uses its dynamics model to plan a reachability tree LaValle (2006) through the free-for the lowest-cost path that ends ncost of a position is determined by $\begin{array} { r } { C ( \mathbf { s } _ { 1 : T } ; \mathbf { g } _ { T } ) = | | \mathbf { s } _ { T } - \mathbf { g } _ { T } | | _ { 2 } + \sum _ { t = 1 } ^ { T } c ( \mathbf { s } _ { t } ) } \end{array}$ $c ( \mathbf { s } _ { t } ) = 1 . 5 \mathbb { 1 } ( \mathbf { s } _ { t } < 1 $ $+ 0 . 7 5 \mathbb { 1 } ( 1 < =$ $\mathbf { s } _ { t } < 2$ meters from any obstacle) $+ \ddot { \mathbf { s } _ { t } }$ .
402
+
403
+ We plan forwards over 20 time steps using a breadth-first search over CARLA steering angle $\{ - 0 . 3 , - 0 . 1 , 0 . , 0 . 1 , 0 . 3 \}$ , noting valid steering angles are normalized to $[ - 1 , 1 ]$ , with constant throttle at 0.5, noting the valid throttle range is [0, 1]. Our search expands each state node by the available actions and retains the 50 closest nodes to the waypoint. The planned trajectory efficiently reaches the waypoint, and can successfully plan around perceived obstacles to avoid getting stuck. To convert the LIDAR images into obstacle maps, we expanded all obstacles by the approximate radius of the car, 1.5 meters.
404
+
405
+ Dynamic-world We use the same setup as the Static-MBRL method, except we add a discrete temporal dimension to the search space (one $\mathbb { R } ^ { 2 }$ spatial dimension per T time steps into the future). All static obstacles remain static, however all LIDAR points that were known to collide with a vehicle are now removed: and replaced at every time step using a constant velocity model of that vehicle. We found that the main failure mode was due to both to inaccuracy in constant velocity prediction as well as the model’s inability to perceive lanes in the LIDAR. The vehicle would sometimes wander into the opposing traffic’s lane, having failed to anticipate an oncoming vehicle blocking its path.
406
+
407
+ # E ROBUSTNESS
408
+
409
+ # E.1 DECOY WAYPOINTS EXPERIMENTS
410
+
411
+ In the decoy waypoints experiment, the perturbation distribution is $\mathcal { N } ( 0 , \sigma = 8 m )$ : each waypoint is perturbed with a standard deviation of 8 meters. One failure mode of this approach is when decoy waypoints lie on a valid off-route path at intersections, which temporarily confuses the planner about the best route. Additional visualizations are shown in Fig. 14.
412
+
413
+ ![](images/d8b13395204615bce46b5db80e8e75041fa8fdfb55f5d3cb5b16d5a4c9f0ca9e.jpg)
414
+ Figure 14: Tolerating bad waypoints. The planner prefers waypoints in the distribution of expert behavior (on the road at a reasonable distance). Columns 1,2: Planning with $^ 1 / 2$ decoy waypoints. Columns 3,4: Planning with all waypoints on the wrong side of the road.
415
+
416
+ # E.2 PLAN RELIABILITY ESTIMATION
417
+
418
+ Besides using our model to make a best-effort attempt to reach a user-specified goal, the fact that our model produces explicit likelihoods can also be leveraged to test the reliability of a plan by evaluating whether reaching particular waypoints will result in human-like behavior or not. This capability can be quite important for real-world safety-critical applications, such as autonomous driving, and can be used to build a degree of fault tolerance into the system. We designed a classification experiment to evaluate how well our model can recognize safe and unsafe plans. We planned our model to known good waypoints (where the expert actually went) and known bad waypoints (off-road) on 1650 held-out test scenes. We used the planning criterion to classify these as good and bad plans and found that we can detect these bad plans with $9 \bar { 7 } . 5 \%$ recall and $9 0 . { \dot { 2 } } \%$ precision. This result indicates imitative models could be effective in estimating the reliability of plans.
419
+
420
+ We determined a threshold on the planning criterion by single-goal planning to the expert’s final location on offline validation data and setting it to the criterion’s mean minus one stddev. Although a more intelligent calibration could be performed by analyzing the information retrieval statistics on the offline validation, we found this simple calibration to yield reasonably good performance. We used 1650 test scenes to perform classification of plans to three different types of waypoints 1) where the expert actually arrived at time $T$ $8 9 . 4 \%$ reliable), 2) waypoints $2 0 \mathrm { m }$ ahead along the waypointer-provided route, which are often near where the expert arrives $7 3 . 8 \%$ reliable) 3) the same waypoints from 2), shifted $2 . 5 \mathrm { m }$ off of the road $( 2 . 5 \%$ reliable). This shows that our learned model exhibits a strong preference for valid waypoints. Therefore, a waypointer that provides expert waypoints via 1) half of the time, and slightly out-of-distribution waypoints via 3) in the other half, an “unreliable” plan classifier achieves $9 \hat { 7 } . 5 \hat { \% }$ recall and $9 0 . 2 \%$ precision.
421
+
422
+ # E.3 OUT-OF-DISTRIBUTION ROBUSTNESS
423
+
424
+ The existence of both (1) observation noise and (2) uncertain/out-of-distribution observations is an important practical issue for autonomous vehicles. Although our current method only conditions on our current observation, several extensions could help mitigate the negative effects of both (1) and (2). For (1), a Bayesian filtering formulation is arguably most ideal, to better estimate (and track) the location of static and dynamic obstacles under noise. However, such high-dimensional filtering are often intractable, and might necessitate approximate Bayesian deep learning techniques, RNNs, or frame stacking, to benefit from multiple observations. Addressing (2) would ideally be done by placing a prior over our neural network weights, to derive some measure of confidence in our density estimation of how expert each plan is, such that unfamiliar scenes generate large uncertainty on our density estimate that we could detect, and react cautiously (pessimistically) to. One way to address the situation if the distributions are very different is to adopt an ensembling approach Lakshminarayanan et al. (2017) in order for the method to determine when the inputs are out of distribution — the ensemble will usually have higher variance (i.e. disagree) when each element of the ensemble is provided with an out-of-distribution input. For instance, this variance could be used as a penalization in the planning criterion.
425
+
426
+ # E.4 TRAFFIC-LIGHT NOISE
427
+
428
+ As discussed, our model assumes access to the traffic-light state provided by the simulator, which we call $\lambda$ . However, access to this state would be noisy in practice, because it relies on a sensor-based (usually image-based) detection and classification module.
429
+
430
+ We performed an experiment to assess robustness to noise in $\lambda$ : we simulated noise in $\lambda$ by “flipping" the light state with $20 \%$ probability, corresponding to a light state detector that has $80 \%$ accuracy on average. “Flipping" means that if the light is green, then changingλ to indicate red, and if the light is red, then changing $\lambda$ to indicate green. We performed this following the experimental method of “Region Final-St. Indicator S.” in dynamic Town02, and ran it with three separate seeds. The means and their standard errors are reported in Table 6. The conclusion we draw is that the approach can still achieve success most of the time, although it tends to violate red-lights more often. Qualitatively, we observed the resulting behavior near intersections to sometimes be “jerky”, with the model alternating between stopping and non-stopping plans. We hypothesize that the model itself could be made more robust if the noise in $\lambda$ was also present in the training data.
431
+
432
+ Table 6: We evaluate the effect of noise in the traffic-light state $( \lambda )$ on CARLA’s Dynamic Navigation task. Noise in the light state predictably degrades overall and red-light performance, but not to the point of preventing the method from operating at all.
433
+
434
+ <table><tr><td>Town02 Dynamic Navigation Method</td><td>Success</td><td>Ran Red Light</td><td>Wrong lane</td><td>Off road</td></tr><tr><td>Region Final-St. Indicator S. (original)</td><td>88%±3.3</td><td>2.57%±0.04</td><td>0.49%±0.32</td><td>2.6%±1.06</td></tr><tr><td>Region Final-St. Indicator S. (noisy λ)</td><td>76%±5.0</td><td>34.8%± 2.4</td><td>0.15%±0.04</td><td>1.79% ±0.34</td></tr></table>
435
+
436
+ # F POTHOLE EXPERIMENT DETAILS
437
+
438
+ We simulated potholes in the environment by randomly inserting them in the cost map near each waypoint $i$ with offsets distributed $\mathcal { N } _ { i } ( \mu { = } [ - 1 5 \mathrm { m } , 0 \mathrm { m } ]$ , $\Sigma = \mathrm { d i a g } ( [ 1 , 0 . 0 1 ] ) )$ , (i.e. mean-centered on the right side of the lane $1 5 \mathrm { m }$ before each waypoint). We inserted pixels of root cost $- 1 e 3$ in the cost map at a single sample of each ${ \mathcal { N } } _ { i }$ , binary-dilated the cost map by $^ 1 / 3$ of the lane-width (spreading the cost to neighboring pixels), and then blurred the cost map by convolving with a normalized truncated Gaussian filter of $\sigma = 1$ and truncation width 1.
439
+
440
+ # G BASELINE VISUALIZATIONS
441
+
442
+ See Fig. 15 for a visualization of our baseline methods.
443
+
444
+ # H HYPERPARAMETERS
445
+
446
+ In order to tune the $\epsilon$ hyperparameter of the unconstrained likelihoods, we undertook the following binary-search procedure. When the prior frequently overwhelmed the posterior, we set $\epsilon \gets 0 . 2 \epsilon$ , to yield tighter covariances, and thus more penalty for failing to satisfy the goals. When the posterior frequently overwhelmed the prior, we set $\epsilon 5 \epsilon$ , to yield looser covariances, and thus less penalty for failing to satisfy the goals. We executed this process three times: once for the “Gaussian Final-State Mixture” experiments (Section 4), once for the “Noise Robustness” Experiments (Section 4.1), and once for the pothole-planning experiments (Section 4.2). Note that the Constrained-Goal Likelihoods introduced no hyperparameters to tune.
447
+
448
+ ![](images/55a6407c4cd42ba8899098a9c834492b60df3c9d00acac3919a53aec20a9e353.jpg)
449
+ Figure 15: Baseline methods we compare against. The red crosses indicate the past 10 positions of the agent. Left: Imitation Learning baseline: the green cross indicates the provided goal, and the yellow plus indicates the predicted setpoint for the controller. Right: Model-based RL baseline: the green regions indicate the model’s predicted reachability, the red regions are post-processed LIDAR used to create its obstacle map.
parse/train/Skl4mRNYDr/Skl4mRNYDr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skl4mRNYDr/Skl4mRNYDr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skl4mRNYDr/Skl4mRNYDr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XPZIaotutsD/XPZIaotutsD.md ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION
2
+
3
+ Pengcheng $\mathbf { H e } ^ { 1 }$ , Xiaodong $\mathbf { L i u ^ { 2 } }$ , Jianfeng $\mathbf { G a o ^ { 2 } }$ , Weizhu Chen1 1 Microsoft Dynamics 365 AI 2 Microsoft Research {penhe,xiaodl,jfgao,wzchen}@microsoft.com
4
+
5
+ # ABSTRACT
6
+
7
+ Recent progress in pre-trained neural language models has significantly improved the performance of many natural language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the disentangled attention mechanism, where each word is represented using two vectors that encode its content and position, respectively, and the attention weights among words are computed using disentangled matrices on their contents and relative positions, respectively. Second, an enhanced mask decoder is used to incorporate absolute positions in the decoding layer to predict the masked tokens in model pre-training. In addition, a new virtual adversarial training method is used for fine-tuning to improve models’ generalization. We show that these techniques significantly improve the efficiency of model pre-training and the performance of both natural language understand (NLU) and natural langauge generation (NLG) downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by $+ 0 . 9 \%$ $9 0 . 2 \%$ vs. $9 1 . 1 \%$ , on SQuAD $\mathrm { v } 2 . 0$ by $+ 2 . 3 \%$ $8 8 . 4 \%$ vs. $9 0 . 7 \% )$ and RACE by $+ 3 . 6 \%$ ( $8 3 . 2 \%$ vs. $8 6 . 8 \%$ ). Notably, we scale up DeBERTa by training a larger version that consists of 48 Transform layers with 1.5 billion parameters. The significant performance boost makes the single DeBERTa model surpass the human performance on the SuperGLUE benchmark (Wang et al., 2019a) for the first time in terms of macro-average score (89.9 versus 89.8), and the ensemble DeBERTa model sits atop the SuperGLUE leaderboard as of January 6, 2021, outperforming the human baseline by a decent margin (90.3 versus 89.8). The pre-trained DeBERTa models and the source code were released at: https://github.com/microsoft/DeBERTa1.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ The Transformer has become the most effective neural network architecture for neural language modeling. Unlike recurrent neural networks (RNNs) that process text in sequence, Transformers apply self-attention to compute in parallel every word from the input text an attention weight that gauges the influence each word has on another, thus allowing for much more parallelization than RNNs for large-scale model training (Vaswani et al., 2017). Since 2018, we have seen the rise of a set of large-scale Transformer-based Pre-trained Language Models (PLMs), such as GPT (Radford et al., 2019; Brown et al., 2020), BERT (Devlin et al., 2019), RoBERTa (Liu et al., 2019c), XLNet (Yang et al., 2019), UniLM (Dong et al., 2019), ELECTRA (Clark et al., 2020), T5 (Raffel et al., 2020), ALUM (Liu et al., 2020), StructBERT (Wang et al., 2019c) and ERINE (Sun et al., 2019) . These PLMs have been fine-tuned using task-specific labels and created new state of the art in many downstream natural language processing (NLP) tasks (Liu et al., 2019b; Minaee et al., 2020; Jiang et al., 2020; He et al., 2019a;b; Shen et al., 2020).
12
+
13
+ In this paper, we propose a new Transformer-based neural language model DeBERTa (Decodingenhanced BERT with disentangled attention), which improves previous state-of-the-art PLMs using two novel techniques: a disentangled attention mechanism, and an enhanced mask decoder.
14
+
15
+ Disentangled attention. Unlike BERT where each word in the input layer is represented using a vector which is the sum of its word (content) embedding and position embedding, each word in DeBERTa is represented using two vectors that encode its content and position, respectively, and the attention weights among words are computed using disentangled matrices based on their contents and relative positions, respectively. This is motivated by the observation that the attention weight of a word pair depends on not only their contents but their relative positions. For example, the dependency between the words “deep” and “learning” is much stronger when they occur next to each other than when they occur in different sentences.
16
+
17
+ Enhanced mask decoder. Like BERT, DeBERTa is pre-trained using masked language modeling (MLM). MLM is a fill-in-the-blank task, where a model is taught to use the words surrounding a mask token to predict what the masked word should be. DeBERTa uses the content and position information of the context words for MLM. The disentangled attention mechanism already considers the contents and relative positions of the context words, but not the absolute positions of these words, which in many cases are crucial for the prediction. Consider the sentence “a new store opened beside the new mall” with the italicized words “store” and “mall” masked for prediction. Although the local contexts of the two words are similar, they play different syntactic roles in the sentence. (Here, the subject of the sentence is “store” not “mall,” for example.) These syntactical nuances depend, to a large degree, upon the words’ absolute positions in the sentence, and so it is important to account for a word’s absolute position in the language modeling process. DeBERTa incorporates absolute word position embeddings right before the softmax layer where the model decodes the masked words based on the aggregated contextual embeddings of word contents and positions.
18
+
19
+ In addition, we propose a new virtual adversarial training method for fine-tuning PLMs to downstream NLP tasks. The method is effective in improving models’ generalization.
20
+
21
+ We show through a comprehensive empirical study that these techniques substantially improve the efficiency of pre-training and the performance of downstream tasks. In the NLU tasks, compared to RoBERTa-Large, a DeBERTa model trained on half the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by $+ 0 . 9 \%$ $9 0 . 2 \%$ vs. $9 1 . 1 \%$ ), on SQuAD v2.0 by $+ 2 . 3 \% ( 8 8 . 4 \%$ vs. $9 0 . 7 \%$ ), and RACE by $+ 3 . 6 \%$ ( $8 3 . 2 \%$ vs. $8 6 . 8 \%$ ). In the NLG tasks, DeBERTa reduces the perplexity from 21.6 to 19.5 on the Wikitext-103 dataset. We further scale up DeBERTa by pre-training a larger model that consists of 48 Transformer layers with 1.5 billion parameters. The single 1.5B-parameter DeBERTa model substantially outperforms T5 with 11 billion parameters on the SuperGLUE benchmark (Wang et al., 2019a) by $0 . 6 \% ( 8 9 . 3 \%$ vs. $8 9 . 9 \%$ ), and surpasses the human baseline (89.9 vs. 89.8) for the first time. The ensemble DeBERTa model sits atop the SuperGLUE leaderboard as of January 6, 2021, outperforming the human baseline by a decent margin (90.3 versus 89.8).
22
+
23
+ # 2 BACKGROUND
24
+
25
+ # 2.1 TRANSFORMER
26
+
27
+ A Transformer-based language model is composed of stacked Transformer blocks (Vaswani et al., 2017). Each block contains a multi-head self-attention layer followed by a fully connected positional feed-forward network. The standard self-attention mechanism lacks a natural way to encode word position information. Thus, existing approaches add a positional bias to each input word embedding so that each input word is represented by a vector whose value depends on its content and position. The positional bias can be implemented using absolute position embedding (Vaswani et al., 2017; Radford et al., 2019; Devlin et al., 2019) or relative position embedding (Huang et al., 2018; Yang et al., 2019). It has been shown that relative position representations are more effective for natural language understanding and generation tasks (Dai et al., 2019; Shaw et al., 2018). The proposed disentangled attention mechanism differs from all existing approaches in that we represent each input word using two separate vectors that encode a word’s content and position, respectively, and attention weights among words are computed using disentangled matrices on their contents and relative positions, respectively.
28
+
29
+ # 2.2 MASKED LANGUAGE MODEL
30
+
31
+ Large-scale Transformer-based PLMs are typically pre-trained on large amounts of text to learn contextual word representations using a self-supervision objective, known as Masked Language Model (MLM) (Devlin et al., 2019). Specifically, given a sequence $X \mathrm { ~ = ~ } \{ x _ { i } \}$ , we corrupt it into $\tilde { X }$ by masking $15 \%$ of its tokens at random and then train a language model parameterized by $\theta$ to reconstruct $\boldsymbol { X }$ by predicting the masked tokens $\tilde { x }$ conditioned on $\tilde { X }$ :
32
+
33
+ $$
34
+ \operatorname* { m a x } _ { \theta } \log p _ { \theta } ( X | \tilde { X } ) = \operatorname* { m a x } _ { \theta } \sum _ { i \in \mathcal { C } } \log p _ { \theta } \big ( \tilde { x } _ { i } = x _ { i } | \tilde { X } \big )
35
+ $$
36
+
37
+ where $\mathcal { C }$ is the index set of the masked tokens in the sequence. The authors of BERT propose to keep $10 \%$ of the masked tokens unchanged, another $10 \%$ replaced with randomly picked tokens and the rest replaced with the [MASK] token.
38
+
39
+ # 3 THE DEBERTA ARCHITECTURE
40
+
41
+ 3.1 DISENTANGLED ATTENTION: A TWO-VECTOR APPROACH TO CONTENT AND POSITIONEMBEDDING
42
+
43
+ For a token at position $i$ in a sequence, we represent it using two vectors, $\left\{ H _ { i } \right\}$ and $\{ P _ { i \mid j } \}$ , which represent its content and relative position with the token at position $j$ , respectively. The calculation of the cross attention score between tokens $i$ and $j$ can be decomposed into four components as
44
+
45
+ $$
46
+ \begin{array} { r l } & { A _ { i , j } = \{ H _ { i } , P _ { i | j } \} \times \{ H _ { j } , P _ { j | i } \} ^ { \intercal } } \\ & { \qquad = H _ { i } H _ { j } ^ { \intercal } + H _ { i } P _ { j | i } ^ { \intercal } + P _ { i | j } H _ { j } ^ { \intercal } + P _ { i | j } P _ { j | i } ^ { \intercal } } \end{array}
47
+ $$
48
+
49
+ That is, the attention weight of a word pair can be computed as a sum of four attention scores using disentangled matrices on their contents and positions as content-to-content, content-to-position, position-to-content, and position-to-position 2.
50
+
51
+ Existing approaches to relative position encoding use a separate embedding matrix to compute the relative position bias in computing attention weights (Shaw et al., 2018; Huang et al., 2018). This is equivalent to computing the attention weights using only the content-to-content and content-toposition terms in equation 2. We argue that the position-to-content term is also important since the attention weight of a word pair depends not only on their contents but on their relative positions, which can only be fully modeled using both the content-to-position and position-to-content terms. Since we use relative position embedding, the position-to-position term does not provide much additional information and is removed from equation 2 in our implementation.
52
+
53
+ Taking single-head attention as an example, the standard self-attention operation (Vaswani et al., 2017) can be formulated as:
54
+
55
+ $$
56
+ \begin{array} { c } { { Q = H W _ { q } , K = H W _ { k } , V = H W _ { v } , A = \frac { Q K ^ { \intercal } } { \sqrt { d } } } } \\ { { H _ { o } = \mathrm { s o f t m a x } ( A ) V } } \end{array}
57
+ $$
58
+
59
+ where ${ \cal H } \in { \cal R } ^ { N \times d }$ represents the input hidden vectors, $H _ { o } \in R ^ { N \times d }$ the output of self-attention, $W _ { q } , W _ { k } , W _ { v } \in R ^ { d \times \hat { d } }$ the projection matrices, $\pmb { A } \in R ^ { N \times N }$ the attention matrix, $N$ the length of the input sequence, and $d$ the dimension of hidden states.
60
+
61
+ Denote $k$ as the maximum relative distance, $\delta ( i , j ) \in [ 0 , 2 k )$ as the relative distance from token $i$ to token $j$ , which is defined as:
62
+
63
+ $$
64
+ \delta ( i , j ) = \left\{ \begin{array} { r l l } { { 0 } } & { { \mathrm { f o r } } } & { { i - j \leqslant - k } } \\ { { 2 k - 1 } } & { { \mathrm { f o r } } } & { { i - j \geqslant k } } \\ { { i - j + k } } & { { \mathrm { o t h e r s . } } } & { { } } \end{array} \right.
65
+ $$
66
+
67
+ We can represent the disentangled self-attention with relative position bias as equation 4, where $Q _ { c } , K _ { c }$ and $V _ { c }$ are the projected content vectors generated using projection matrices $W _ { q , c } , W _ { k , c } , W _ { v , c } \in R ^ { d \times d }$ respectively, $P \in { \cal R } ^ { 2 k \times d }$ represents the relative position embedding vectors shared across all layers (i.e., staying fixed during forward propagation), and $Q _ { r }$ and $K _ { r }$ are projected relative position vectors generated using projection matrices $W _ { q , r } , W _ { k , r } \in R ^ { d \times d }$ , respectively.
68
+
69
+ $$
70
+ \begin{array} { l } { { Q _ { c } = H W _ { q , c } , K _ { c } = H W _ { k , c } , V _ { c } = H W _ { v , c } , Q _ { r } = P W _ { q , r } , K _ { r } = P W _ { k , r } } } \\ { { \tilde { A } _ { i , j } = \underbrace { Q _ { i } ^ { c } K _ { j } ^ { c \top } } _ { \mathrm { ( a ) c o n t e n t - t o - c o n t e n t } } + \underbrace { Q _ { i } ^ { c } K _ { \delta ( i , j ) } ^ { r } } _ { \mathrm { ( b ) c o n t e n t - t o - p o s i i t i o n } } + \underbrace { K _ { j } ^ { c } Q _ { \delta ( j , i ) } ^ { r } } _ { \mathrm { ( c ) p o s i i t i o n - t o r t e n t } } } } \\ { { \tilde { H } _ { o } = \mathrm { s o f t m a x } ( \frac { \tilde { A } } { \sqrt { 3 d } } ) V _ { c } } } \end{array}
71
+ $$
72
+
73
+ $\tilde { A } _ { i , j }$ is the element of attention matrix $\tilde { A }$ , representing the attention score from token $i$ to token $j$ . $Q _ { i } ^ { c }$ is the $i$ -th row of $Q _ { c } . \ K _ { j } ^ { c }$ is the $j$ -th row of $K _ { c }$ . $K _ { \delta ( i , j ) } ^ { r }$ is the $\delta ( i , j )$ -th row of $K _ { r }$ with regarding to relative distance $\delta ( i , j )$ . $Q _ { \delta ( j , i ) } ^ { r }$ is the $\delta ( j , i )$ -th row of $Q _ { r }$ with regarding to relative distance $\delta ( j , i )$ . Note that we use $\delta ( j , i )$ rather than $\delta ( i , j )$ here. This is because for a given position $i$ , position-to-content computes the attention weight of the key content at $j$ with respect to the query position at $i$ , thus the relative distance is $\delta ( j , i )$ . The position-to-content term is calculated as $K _ { j } ^ { c } Q _ { \delta ( j , i ) } ^ { r } { } ^ { \intercal }$ . The content-to-position term is calculated in a similar way.
74
+
75
+ Finally, we apply a scaling factor of $\frac { 1 } { \sqrt { 3 d } }$ on $\tilde { A }$ . The factor is important for stabilizing model training (Vaswani et al., 2017), especially for large-scale PLMs.
76
+
77
+ # Algorithm 1 Disentangled Attention
78
+
79
+ Input: Hidden state $\pmb { H }$ , relative distance embedding $_ { P }$ , relative distance matrix $\delta$ . Content projec
80
+ tion matrix $W _ { k , c }$ , $W _ { q , c }$ , $W _ { v , c }$ , position projection matrix $W _ { k , r }$ , $W _ { q , r }$ .
81
+ 1: $K _ { c } = H W _ { k , c }$ , $Q _ { c } = H W _ { q , c }$ , $V _ { c } = H W _ { v , c }$ , $K _ { r } = P W _ { k , r }$ , $Q _ { r } \overset { = } { = } P W _ { q , r }$
82
+ 2: $A _ { c c } = Q _ { c } K _ { c } ^ { \intercal }$
83
+ 3: for $i = 0 , . . . , N - 1$ do
84
+ 4: $\tilde { A } _ { c p } [ i , : ] = Q _ { c } [ i , : ] { \cal K } _ { r } ^ { \intercal }$
85
+ 5: end for
86
+ 6: for $i = 0 , . . . , N - 1$ do
87
+ 7: for $j = 0 , . . . , N - 1$ do
88
+ 8: $A _ { c p } [ i , j ] = \tilde { A } _ { c p } [ i , \delta [ i , j ] ]$
89
+ 9: end for
90
+ 10: end for
91
+ 11: for $j = 0 , . . . , N - 1$ do
92
+ 12: $\tilde { A } _ { p c } [ : , j ] = K _ { c } [ j , : ] Q _ { r } ^ { \intercal }$
93
+ 13: end for
94
+ 14: for $j = 0 , . . . , N - 1$ do
95
+ 15: for $i = 0 , . . . , N - 1$ do
96
+ 16: $A _ { p c } [ i , j ] = \tilde { A } _ { p c } [ \delta [ j , i ] , j ]$
97
+ 17: end for
98
+ 18: end for
99
+ 19: $\tilde { A } = A _ { c c } + A _ { c p } + A _ { p c }$
100
+ 20: $H _ { o } = \operatorname { s o f t m a x } ( \frac { \tilde { A } } { \sqrt { 3 d } } ) V _ { c }$
101
+ Output: Ho
102
+
103
+ # 3.1.1 EFFICIENT IMPLEMENTATION
104
+
105
+ For an input sequence of length $N$ , it requires a space complexity of $O ( N ^ { 2 } d )$ (Shaw et al., 2018; Huang et al., 2018; Dai et al., 2019) to store the relative position embedding for each token. However, taking content-to-position as an example, we note that since $\delta ( i , j ) \in [ 0 , 2 k )$ and the embeddings of all possible relative positions are always a subset of $K _ { r } \in R ^ { 2 k \times d }$ , then we can reuse $K _ { r }$ in the attention calculation for all the queries.
106
+
107
+ In our experiments, we set the maximum relative distance $k$ to 512 for pre-training. The disentangled attention weights can be computed efficiently using Algorithm 1. Let $\delta$ be the relative position matrix according to equation 3, i.e., $\delta [ i , j ] = \delta ( \overset { . } { i } , j )$ . Instead of allocating a different relative position embedding matrix for each query, we multiply each query vector $Q _ { c } [ i , : ]$ by ${ K } _ { r } ^ { \tau } \in { R } ^ { d \times 2 k }$ , as in line $3 - 5$ . Then, we extract the attention weight using the relative position matrix $\delta$ as the index, as in line $6 - 1 0$ . To compute the position-to-content attention score, we calculate $\tilde { A } _ { p c } [ : , j ]$ , i.e., the column vector of the attention matrix $\tilde { A } _ { p c }$ , by multiplying each key vector $K _ { c } [ j , : ]$ by $Q _ { r } ^ { \intercal }$ , as in line $1 1 - 1 3$ . Finally, we extract the corresponding attention score via the relative position matrix $\pmb { \delta }$ as the index, as in line $1 4 - 1 8$ . In this way, we do not need to allocate memory to store a relative position embedding for each query and thus reduce the space complexity to $O ( k d )$ (for storing $K _ { r }$ and $Q _ { r }$ ).
108
+
109
+ # 3.2 ENHANCED MASK DECODER ACCOUNTS FOR ABSOLUTE WORD POSITIONS
110
+
111
+ DeBERTa is pretrained using MLM, where a model is trained to use the words surrounding a mask token to predict what the masked word should be. DeBERTa uses the content and position information of the context words for MLM. The disentangled attention mechanism already considers the contents and relative positions of the context words, but not the absolute positions of these words, which in many cases are crucial for the prediction.
112
+
113
+ Given a sentence “a new store opened beside the new mall” with the words “store” and “mall” masked for prediction. Using only the local context (e.g., relative positions and surrounding words) is insufficient for the model to distinguish store and mall in this sentence, since both follow the word new with the same relative positions. To address this limitation, the model needs to take into account absolute positions, as complement information to the relative positions. For example, the subject of the sentence is “store” not “mall”. These syntactical nuances depend, to a large degree, upon the words’ absolute positions in the sentence.
114
+
115
+ There are two methods of incorporating absolute positions. The BERT model incorporates absolute positions in the input layer. In DeBERTa, we incorporate them right after all the Transformer layers but before the softmax layer for masked token prediction, as shown in Figure 2. In this way, DeBERTa captures the relative positions in all the Transformer layers and only uses absolute positions as complementary information when decoding the masked words. Thus, we call DeBERTa’s decoding component an Enhanced Mask Decoder (EMD). In the empirical study, we compare these two methods of incorporating absolute positions and observe that EMD works much better. We conjecture that the early incorporation of absolute positions used by BERT might undesirably hamper the model from learning sufficient information of relative positions. In addition, EMD also enables us to introduce other useful information, in addition to positions, for pre-training. We leave it to future work.
116
+
117
+ # 4 SCALE INVARIANT FINE-TUNING
118
+
119
+ This section presents a new virtual adversarial training algorithm, Scale-invariant-Fine-Tuning (SiFT), a variant to the algorithm described in Miyato et al. (2018); Jiang et al. (2020), for fine-tuning.
120
+
121
+ Virtual adversarial training is a regularization method for improving models’ generalization. It does so by improving a model’s robustness to adversarial examples, which are created by making small perturbations to the input. The model is regularized so that when given a task-specific example, the model produces the same output distribution as it produces on an adversarial perturbation of that example.
122
+
123
+ For NLP tasks, the perturbation is applied to the word embedding instead of the original word sequence. However, the value ranges (norms) of the embedding vectors vary among different words and models. The variance gets larger for bigger models with billions of parameters, leading to some instability of adversarial training.
124
+
125
+ Inspired by layer normalization (Ba et al., 2016), we propose the SiFT algorithm that improves the training stability by applying the perturbations to the normalized word embeddings. Specifically, when fine-tuning DeBERTa to a downstream NLP task in our experiments, SiFT first normalizes the word embedding vectors into stochastic vectors, and then applies the perturbation to the normalized embedding vectors. We find that the normalization substantially improves the performance of the fine-tuned models. The improvement is more prominent for larger DeBERTa models. Note that we only apply SiFT to $\mathrm { D e B E R T a } _ { 1 . 5 B }$ on SuperGLUE tasks in our experiments and we will provide a more comprehensive study of SiFT in our future work.
126
+
127
+ # 5 EXPERIMENT
128
+
129
+ This section reports DeBERTa results on various NLU tasks.
130
+
131
+ # 5.1 MAIN RESULTS ON NLU TASKS
132
+
133
+ Following previous studies of PLMs, we report results using large and base models.
134
+
135
+ 5.1.1 PERFORMANCE ON LARGE MODELS
136
+ Table 1: Comparison results on the GLUE development set.
137
+
138
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>CoLAMcc</td><td rowspan=1 colspan=1>|QQPAcc</td><td rowspan=1 colspan=1>MNLI-m/mmAcc</td><td rowspan=1 colspan=1>SST-2|Acc</td><td rowspan=1 colspan=1>STS-BCorr</td><td rowspan=1 colspan=1>QNLI|Acc</td><td rowspan=1 colspan=1>RTEAcc</td><td rowspan=1 colspan=1>MRPCAcc</td><td rowspan=1 colspan=1>Avg.</td></tr><tr><td rowspan=1 colspan=1>BERTlarge</td><td rowspan=1 colspan=1>60.6</td><td rowspan=1 colspan=1>91.3</td><td rowspan=1 colspan=1>86.6/-</td><td rowspan=1 colspan=1>93.2</td><td rowspan=1 colspan=1>90.0</td><td rowspan=1 colspan=1>92.3</td><td rowspan=1 colspan=1>70.4</td><td rowspan=1 colspan=1>88.0</td><td rowspan=1 colspan=1>84.05</td></tr><tr><td rowspan=1 colspan=1>RoBERTalarge</td><td rowspan=1 colspan=1>68.0</td><td rowspan=1 colspan=1>92.2</td><td rowspan=1 colspan=1>90.2/90.2</td><td rowspan=1 colspan=1>96.4</td><td rowspan=1 colspan=1>92.4</td><td rowspan=1 colspan=1>93.9</td><td rowspan=1 colspan=1>86.6</td><td rowspan=1 colspan=1>90.9</td><td rowspan=1 colspan=1>88.82</td></tr><tr><td rowspan=1 colspan=1>XLNetlarge</td><td rowspan=1 colspan=1>69.0</td><td rowspan=1 colspan=1>92.3</td><td rowspan=1 colspan=1>90.8/90.8</td><td rowspan=1 colspan=1>97.0</td><td rowspan=1 colspan=1>92.5</td><td rowspan=1 colspan=1>94.9</td><td rowspan=1 colspan=1>85.9</td><td rowspan=1 colspan=1>90.8</td><td rowspan=1 colspan=1>89.15</td></tr><tr><td rowspan=1 colspan=1>ELECTRAlarge</td><td rowspan=1 colspan=1>69.1</td><td rowspan=1 colspan=1>92.4</td><td rowspan=1 colspan=1>90.9/-</td><td rowspan=1 colspan=1>96.9</td><td rowspan=1 colspan=1>92.6</td><td rowspan=1 colspan=1>95.0</td><td rowspan=1 colspan=1>88.0</td><td rowspan=1 colspan=1>90.8</td><td rowspan=1 colspan=1>89.46</td></tr><tr><td rowspan=1 colspan=1>DeBERTalarge</td><td rowspan=1 colspan=1>70.5</td><td rowspan=1 colspan=1>92.3</td><td rowspan=1 colspan=1>91.1/91.1</td><td rowspan=1 colspan=1>96.8</td><td rowspan=1 colspan=1>92.8</td><td rowspan=1 colspan=1>95.3</td><td rowspan=1 colspan=1>88.3</td><td rowspan=1 colspan=1>91.9</td><td rowspan=1 colspan=1>90.00</td></tr></table>
139
+
140
+ We pre-train our large models following the setting of BERT (Devlin et al., 2019), except that we use the BPE vocabulary of Radford et al. (2019); Liu et al. (2019c). For training data, we use Wikipedia (English Wikipedia dump3; 12GB), BookCorpus (Zhu et al., 2015) (6GB), OPENWEBTEXT (public Reddit content (Gokaslan & Cohen, 2019); 38GB), and STORIES (a subset of CommonCrawl (Trinh & Le, 2018); 31GB). The total data size after data deduplication (Shoeybi et al., 2019) is about 78G. Refer to Appendix A.2 for a detailed description of the pre-training dataset.
141
+
142
+ We use 6 DGX-2 machines (96 V100 GPUs) to train the models. A single model trained with 2K batch size and 1M steps takes about 20 days. Refer to Appendix A for the detailed hyperparamters.
143
+
144
+ We summarize the results on eight NLU tasks of GLUE (Wang et al., 2019b) in Table 1, where DeBERTa is compared DeBERTa with previous Transform-based PLMs of similar structures (i.e. 24 layers with hidden size of 1024) including BERT, RoBERTa, XLNet, ALBERT and ELECTRA. Note that RoBERTa, XLNet and ELECTRA are pre-trained on 160G training data while DeBERTa is pretrained on 78G training data. RoBERTa and XLNet are pre-trained for 500K steps with 8K samples in a step, which amounts to four billion training samples. DeBERTa is pre-trained for one million steps with 2K samples in each step. This amounts to two billion training samples, approximately half of either RoBERTa or XLNet. Table 1 shows that compared to BERT and RoBERTa, DeBERTa performs consistently better across all the tasks. Meanwhile, DeBERTa outperforms XLNet in six out of eight tasks. Particularly, the improvements on MRPC ( $1 . 1 \%$ over XLNet and $1 . 0 \%$ over RoBERTa), RTE $2 . 4 \%$ over XLNet and $1 . 7 \%$ over RoBERTa) and CoLA ( $1 . 5 \%$ over XLNet and $2 . 5 \%$ over RoBERTa) are significant. DeBERTa also outperforms other SOTA PLMs, i.e., ELECTRAlarge and $\mathbf { X L N e t } _ { \mathrm { l a r g e } }$ , in terms of average GLUE score.
145
+
146
+ Among all GLUE tasks, MNLI is most often used as an indicative task to monitor the research progress of PLMs. DeBERTa significantly outperforms all existing PLMs of similar size on MNLI and creates a new state of the art.
147
+
148
+ Table 2: Results on MNLI in/out-domain, SQuAD v1.1, SQuAD v2.0, RACE, ReCoRD, SWAG, CoNLL 2003 NER development set. Note that missing results in literature are signified by “-”.
149
+
150
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=2>MNLI-m/mm|SQuAD v1.1 SQuAD v2.0|RACE|Acc F1/EM F1/EM</td><td rowspan=1 colspan=1>Acc</td><td rowspan=1 colspan=1>ReCoRDF1/EM</td><td rowspan=1 colspan=2>|SWAGNERAcc F1</td></tr><tr><td rowspan=1 colspan=1>BERTlarge</td><td rowspan=1 colspan=1>86.6/-</td><td rowspan=1 colspan=1>90.9/84.1 81.8/79.0</td><td rowspan=1 colspan=1>72.0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>86.6</td><td rowspan=1 colspan=1>92.8</td></tr><tr><td rowspan=1 colspan=1>ALBERTtarge</td><td rowspan=1 colspan=1>86.5/-</td><td rowspan=1 colspan=1>91.8/85.2 84.9/81.8</td><td rowspan=1 colspan=1>75.2</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>RoBERTalarge</td><td rowspan=1 colspan=1>90.2/90.2</td><td rowspan=1 colspan=1>94.6/88.9 89.4/86.5</td><td rowspan=1 colspan=1>83.2</td><td rowspan=1 colspan=1>90.6/90.0</td><td rowspan=1 colspan=1>89.9</td><td rowspan=1 colspan=1>93.4</td></tr><tr><td rowspan=1 colspan=1>XLNetlarge</td><td rowspan=1 colspan=1>90.8/90.8</td><td rowspan=1 colspan=1>95.1/89.7 90.6/87.9</td><td rowspan=1 colspan=1>85.4</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>Megatron336M</td><td rowspan=1 colspan=1>89.7/90.0</td><td rowspan=1 colspan=1>94.2/88.0 88.1/84.8</td><td rowspan=1 colspan=1>83.0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>DeBERTalarge</td><td rowspan=1 colspan=1>91.1/91.1</td><td rowspan=1 colspan=1>95.5/90.1 90.7/88.0</td><td rowspan=1 colspan=1>86.8</td><td rowspan=1 colspan=1>91.4/91.0</td><td rowspan=1 colspan=1>90.8</td><td rowspan=1 colspan=1>93.8</td></tr><tr><td rowspan=1 colspan=1>ALBERTxxlarge</td><td rowspan=1 colspan=1>90.8/-</td><td rowspan=1 colspan=1>94.8/89.3 90.2/87.4</td><td rowspan=1 colspan=1>86.5</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>二</td></tr><tr><td rowspan=1 colspan=1>Megatron1.3B</td><td rowspan=1 colspan=1>90.9/91.0</td><td rowspan=1 colspan=1>94.9/89.1 90.2/87.1</td><td rowspan=1 colspan=1>87.3</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td></tr><tr><td rowspan=1 colspan=1>Megatron3.9B</td><td rowspan=1 colspan=1>91.4/91.4</td><td rowspan=1 colspan=1>95.5/90.0 91.2/88.5</td><td rowspan=1 colspan=1>89.5</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td></tr></table>
151
+
152
+ In addition to GLUE, DeBERTa is evaluated on three categories of NLU benchmarks: (1) Question Answering: SQuAD v1.1 (Rajpurkar et al., 2016), SQuAD v2.0 (Rajpurkar et al., 2018), RACE (Lai et al., 2017), ReCoRD (Zhang et al., 2018) and SWAG (Zellers et al., 2018); (2) Natural Language Inference: MNLI (Williams et al., 2018); and (3) NER: CoNLL-2003. For comparison, we include ALBERTxxlarge (Lan et al., 2019) 4 and Megatron (Shoeybi et al., 2019) with three different model sizes, denoted as Megatron336M, Megatron $\cdot 1 . 3 \mathrm { B }$ and Megatron3.9B, respectively, which are trained using the same dataset as RoBERTa. Note that Megatron336M has a similar model size as other models mentioned above5.
153
+
154
+ We summarize the results in Table 2. Compared to the previous SOTA PLMs with a similar model size (i.e., BERT, RoBERTa, XLNet, ALBERTlarge, and Megatron336M), DeBERTa shows superior performance in all seven tasks. Taking the RACE benchmark as an example, DeBERTa significantly outperforms XLNet by $+ 1 . 4 \%$ $8 6 . 8 \%$ vs. $8 5 . 4 \%$ ). Although Megatron $1 . 3 \mathrm { B }$ is three times larger than DeBERTa, DeBERTa outperforms it in three of the four benchmarks. We further report DeBERTa on text generation tasks in Appendix A.4.
155
+
156
+ # 5.1.2 PERFORMANCE ON BASE MODELS
157
+
158
+ Our setting for base model pre-training is similar to that for large models. The base model structure follows that of the BERT base model, i.e., $L = 1 2 , H = 7 6 8 , A = 1 2$ . We use 4 DGX-2 with 64 V100 GPUs to train the base model. It takes 10 days to finish a single pre-training of 1M training steps with batch size 2048. We train DeBERTa using the same 78G dataset, and compare it to RoBERTa and XLNet trained on 160G text data.
159
+
160
+ We summarize the base model results in Table 3. Across all three tasks, DeBERTa consistently outperforms RoBERTa and XLNet by a larger margin than that in large models. For example, on MNLI-m, $\mathrm { D e B E R T a _ { b a s e } }$ obtains $+ 1 . 2 \%$ $8 8 . 8 \%$ vs. $8 7 . 6 \%$ ) over $\mathrm { R o B E R T a _ { b a s e } }$ , and $+ 2 \%$ $8 8 . 8 \%$ vs. $8 6 . 8 \%$ ) over $\mathbf { X L N e t } _ { \mathrm { b a s e } }$ .
161
+
162
+ Table 3: Results on MNLI in/out-domain $\left( \mathrm { m } / \mathrm { m m } \right)$ ), SQuAD v1.1 and $\mathrm { v } 2 . 0$ development set.
163
+
164
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>MNLI-m/mm (Acc)</td><td rowspan=1 colspan=1>SQuAD v1.1 (F1/EM)</td><td rowspan=1 colspan=1>SQuAD v2.0 (F1/EM)</td></tr><tr><td rowspan=1 colspan=1>RoBERTabase</td><td rowspan=1 colspan=1>87.6/-</td><td rowspan=1 colspan=1>91.5/84.6</td><td rowspan=1 colspan=1>83.7/80.5</td></tr><tr><td rowspan=1 colspan=1>XLNetbase</td><td rowspan=1 colspan=1>86.8/-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-/80.2</td></tr><tr><td rowspan=1 colspan=1>DeBERTabase</td><td rowspan=1 colspan=1>88.8/88.5</td><td rowspan=1 colspan=1>93.1/87.2</td><td rowspan=1 colspan=1>86.2/83.1</td></tr></table>
165
+
166
+ # 5.2 MODEL ANALYSIS
167
+
168
+ In this section, we first present an ablation study to quantify the relative contributions of different components introduced in DeBERTa. Then, we study the convergence property to characterize the model training efficiency. We run experiments for analysis using the base model setting: a model is pre-trained using the Wikipedia $^ +$ Bookcorpus dataset for 1M steps with batch size 256 in 7 days on a DGX-2 machine with 16 V-100 GPUs. Due to space limit, we visualize the different attention patterns of DeBERTa and RoBERTa in Appendix A.7.
169
+
170
+ # 5.2.1 ABLATION STUDY
171
+
172
+ To verify our experimental setting, we pre-train the RoBERTa base model from scratch. The re-pretrained RoBERTa model is denoted as RoBERTa-ReImpbase. To investigate the relative contributions of different components in DeBERTa, we develop three variations:
173
+
174
+ • -EMD is the DeBERTa base model without EMD. • -C2P is the DeBERTa base model without the content-to-position term ((c) in Eq. 4). • -P2C is the DeBERTa base model without the position-to-content term ((b) in Eq. 4). As XLNet also uses the relative position bias, this model is close to XLNet plus EMD.
175
+
176
+ Table 4: Ablation study of the DeBERTa base model.
177
+
178
+ <table><tr><td>Model</td><td>MNLI-m/mm Acc</td><td>SQuAD v1.1 F1/EM</td><td>SQuAD v2.0 F1/EM</td><td>RACE Acc</td></tr><tr><td>BERTbase Devlin et al. (2019) RoBERTabase Liu et al. (2019c)</td><td>84.3/84.7 84.7/-</td><td>88.5/81.0 90.6/-</td><td>76.3/73.7 79.7/-</td><td>65.0 65.6</td></tr><tr><td>XLNetbase Yang et al. (2019) RoBERTa-ReImpbase</td><td>85.8/85.4 84.9/85.1</td><td>-/- 91.1/84.8</td><td>81.3/78.5 79.5/76.0</td><td>66.7 66.8</td></tr><tr><td>DeBERTabase</td><td>86.3/86.2 86.1/86.1</td><td>92.1/86.1</td><td>82.5/79.3</td><td>71.7</td></tr><tr><td>-EMD -C2P</td><td>85.9/85.7</td><td>91.8/85.8 91.6/85.8</td><td>81.3/78.0 81.3/78.3</td><td>70.3 69.3</td></tr><tr><td>-P2C</td><td>86.0/85.8</td><td>91.7/85.7</td><td>80.8/77.6</td><td>69.6</td></tr><tr><td>-(EMD+C2P)</td><td>85.8/85.9</td><td>91.5/85.3</td><td>80.3/77.2</td><td>68.1</td></tr><tr><td>-(EMD+P2C)</td><td>85.8/85.8</td><td>91.3/85.1</td><td>80.2/77.1</td><td>68.5</td></tr></table>
179
+
180
+ Table 4 summarizes the results on four benchmark datasets. First, RoBERTa-ReImp performs similarly to RoBERTa across all benchmark datasets, verfiying that our setting is reasonable. Second, we see that removing any one component in DeBERTa results in a sheer performance drop. For instance, removing EMD (-EMD) results in a loss of $1 . 4 \%$ $7 1 . 7 \%$ vs. $7 0 . 3 \%$ ) on RACE, $0 . 3 \%$ $( 9 2 . 1 \%$ vs. $9 1 . 8 \%$ ) on SQuAD v1.1, $1 . 2 \%$ $8 2 . 5 \%$ vs. $8 1 . 3 \%$ ) on $\mathrm { S Q u A D ~ v } 2 . 0$ , $0 . 2 \%$ ( $8 6 . 3 \%$ vs. $8 6 . 1 \% )$ and $0 . 1 \%$ $8 6 . 2 \%$ vs. $8 6 . 1 \%$ ) on MNLI- $\cdot \mathrm { m } / \mathrm { m m }$ , respectively. Similarly, removing either content-to-position or position-to-content leads to inferior performance in all the benchmarks. As expected, removing two components results in even more substantial loss in performance.
181
+
182
+ # 5.3 SCALE UP TO 1.5 BILLION PARAMETERS
183
+
184
+ Larger pre-trained models have shown better generalization results (Raffel et al., 2020; Brown et al., 2020; Shoeybi et al., 2019). Thus, we have built a larger version of DeBERTa with 1.5 billion parameters, denoted as $\mathrm { D e B E R T a } _ { 1 . 5 B }$ . The model consists of 48 layers with a hidden size of 1,536 and 24 attention heads 6. DeBERTa $_ { 1 . 5 B }$ is trained on a pre-training dataset amounting to 160G, similar to that in Liu et al. (2019c), with a new vocabulary of size 128K constructed using the dataset.
185
+
186
+ To train $\mathrm { D e B E R T a } _ { 1 . 5 B }$ , we optimize the model architecture as follows. First, we share the projection matrices of relative position embedding $W _ { k , r } , W _ { q , r }$ with $W _ { k , c } , W _ { q , c }$ , respectively, in all attention layers to reduce the number of model parameters. Our ablation study in Table 13 on base models shows that the projection matrix sharing reduces the model size while retaining the model performance.
187
+
188
+ Second, a convolution layer is added aside the first Transformer layer to induce n-gram knowledge of sub-word encodings and their outputs are summed up before feeding to the next Transformer layer 7.
189
+
190
+ Table 5 reports the test results of SuperGLUE (Wang et al., 2019a) which is one of the most popular NLU benchmarks. SuperGLUE consists of a wide of NLU tasks, including Question Answering (Clark et al., 2019; Khashabi et al., 2018; Zhang et al., 2018), Natural Language Inference (Dagan et al., 2006; Bar-Haim et al., 2006; Giampiccolo et al., 2007; Bentivogli et al., 2009), Word Sense Disambiguation (Pilehvar & Camacho-Collados, 2019), and Reasoning (Levesque et al., 2011; Roemmele et al., 2011). Since its release in 2019, top research teams around the world have been developing large-scale PLMs that have driven striking performance improvement on SuperGLUE.
191
+
192
+ The significant performance boost due to scaling DeBERTa to a larger model makes the single DeBERTa1.5B surpass the human performance on SuperGLUE for the first time in terms of macroaverage score (89.9 versus 89.8) as of December 29, 2020, and the ensemble DeBERTa model $( \mathrm { D e B E R T a } _ { E n s e m b l e } )$ sits atop the SuperGLUE benchmark rankings as of January 6, 2021, outperforming the human baseline by a decent margin (90.3 versus 89.8). Compared to T5, which consists of 11 billion parameters, the 1.5-billion-parameter DeBERTa is much more energy efficient to train and maintain, and it is easier to compress and deploy to apps of various settings.
193
+
194
+ Table 5: SuperGLUE test set results scored using the SuperGLUE evaluation server. All the results are obtained from https://super.gluebenchmark.com on January 6, 2021.
195
+
196
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>BoolQAcc</td><td rowspan=1 colspan=1>CBF1/Acc</td><td rowspan=1 colspan=1>|COPA|Acc</td><td rowspan=1 colspan=1>MultiRCF1a/EM</td><td rowspan=1 colspan=1>ReCoRDF1/EM</td><td rowspan=1 colspan=1>RTEAcc</td><td rowspan=1 colspan=1>WiCAcc</td><td rowspan=1 colspan=1>Acc</td><td rowspan=1 colspan=1>WSC|AverageScore</td></tr><tr><td rowspan=1 colspan=1>RoBERTalarge</td><td rowspan=1 colspan=1>87.1</td><td rowspan=1 colspan=1>[90.5/95.2</td><td rowspan=1 colspan=1>90.6</td><td rowspan=1 colspan=1>84.4/52.5</td><td rowspan=1 colspan=1>90.6/90.0</td><td rowspan=1 colspan=1>88.2</td><td rowspan=1 colspan=1>69.9</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>84.6</td></tr><tr><td rowspan=1 colspan=1>NEXHA-Plus</td><td rowspan=1 colspan=1>87.8</td><td rowspan=1 colspan=1>94.4/96.0</td><td rowspan=1 colspan=1>93.6</td><td rowspan=1 colspan=1>84.6/55.1</td><td rowspan=1 colspan=1>90.1/89.6</td><td rowspan=1 colspan=1>89.1</td><td rowspan=1 colspan=1>74.6</td><td rowspan=1 colspan=1>93.2</td><td rowspan=1 colspan=1>86.7</td></tr><tr><td rowspan=1 colspan=1>T511B</td><td rowspan=1 colspan=1>91.2</td><td rowspan=1 colspan=1>93.9/96.8</td><td rowspan=1 colspan=1>94.8</td><td rowspan=1 colspan=1>88.1/63.3</td><td rowspan=1 colspan=1>94.1/93.4</td><td rowspan=1 colspan=1>92.5</td><td rowspan=1 colspan=1>76.9</td><td rowspan=1 colspan=1>93.8</td><td rowspan=1 colspan=1>89.3</td></tr><tr><td rowspan=1 colspan=1>T511B+Meena</td><td rowspan=1 colspan=1>91.3</td><td rowspan=1 colspan=1>95.8/97.6</td><td rowspan=1 colspan=1>97.4</td><td rowspan=1 colspan=1>88.3/63.0</td><td rowspan=1 colspan=1>94.2/93.5</td><td rowspan=1 colspan=1>92.7</td><td rowspan=1 colspan=1>77.9</td><td rowspan=1 colspan=1>95.9</td><td rowspan=1 colspan=1>90.2</td></tr><tr><td rowspan=1 colspan=1>Human</td><td rowspan=1 colspan=1>89.0</td><td rowspan=1 colspan=1>95.8/98.9</td><td rowspan=1 colspan=1>100.0</td><td rowspan=1 colspan=1>81.8/51.9</td><td rowspan=1 colspan=1>91.7/91.3</td><td rowspan=1 colspan=1>93.6</td><td rowspan=1 colspan=1>80.0</td><td rowspan=1 colspan=1>100.0</td><td rowspan=1 colspan=1>89.8</td></tr><tr><td rowspan=2 colspan=1>DeBERTa1.5B+SiFTDeBERTaEnsemble</td><td rowspan=2 colspan=1>90.490.4</td><td rowspan=2 colspan=1>94.9/97.295.7/97.6</td><td rowspan=2 colspan=1>96.898.4</td><td rowspan=2 colspan=1>88.2/63.788.2/63.7</td><td rowspan=2 colspan=1>94.5/94.194.5/94.1</td><td rowspan=2 colspan=1>93.293.2</td><td rowspan=1 colspan=1>76.4</td><td rowspan=2 colspan=1>95.995.9</td><td rowspan=2 colspan=1>89.990.3</td></tr><tr><td rowspan=1 colspan=1>77.5</td></tr></table>
197
+
198
+ # 6 CONCLUSIONS
199
+
200
+ This paper presents a new model architecture DeBERTa (Decoding-enhanced BERT with disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the disentangled attention mechanism, where each word is represented using two vectors that encode its content and position, respectively, and the attention weights among words are computed using disentangled matrices on their contents and relative positions, respectively. The second is an enhanced mask decoder which incorporates absolute positions in the decoding layer to predict the masked tokens in model pre-training. In addition, a new virtual adversarial training method is used for fine-tuning to improve model’s generalization on downstream tasks.
201
+
202
+ We show through a comprehensive empirical study that these techniques significantly improve the efficiency of model pre-training and the performance of downstream tasks. The DeBERTa model with 1.5 billion parameters surpasses the human performance on the SuperGLUE benchmark for the first time in terms of macro-average score.
203
+
204
+ DeBERTa surpassing human performance on SuperGLUE marks an important milestone toward general AI. Despite its promising results on SuperGLUE, the model is by no means reaching the human-level intelligence of NLU. Humans are extremely good at leveraging the knowledge learned from different tasks to solve a new task with no or little task-specific demonstration. This is referred to as compositional generalization, the ability to generalize to novel compositions (new tasks) of familiar constituents (subtasks or basic problem-solving skills). Moving forward, it is worth exploring how to make DeBERTa incorporate compositional structures in a more explicit manner, which could allow combining neural and symbolic computation of natural language similar to what humans do.
205
+
206
+ # 7 ACKNOWLEDGMENTS
207
+
208
+ We thank Jade Huang and Nikos Karampatziakis for proofreading the paper and providing insightful comments. We thank Yoyo Liang, Saksham Singhal, Xia Song, and Saurabh Tiwary for their help with large-scale model training. We also thank the anonymous reviewers for valuable discussions.
209
+
210
+ # REFERENCES
211
+
212
+ Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
213
+
214
+ Roy Bar-Haim, Ido Dagan, Bill Dolan, Lisa Ferro, and Danilo Giampiccolo. The second PASCAL recognising textual entailment challenge. In Proceedings of the Second PASCAL Challenges Workshop on Recognising Textual Entailment, 01 2006.
215
+
216
+ Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020.
217
+
218
+ Luisa Bentivogli, Ido Dagan, Hoa Trang Dang, Danilo Giampiccolo, and Bernardo Magnini. The fifth pascal recognizing textual entailment challenge. In In Proc Text Analysis Conference (TAC’09, 2009.
219
+
220
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
221
+
222
+ Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. Semeval-2017 task 1: Semantic textual similarity-multilingual and cross-lingual focused evaluation. arXiv preprint arXiv:1708.00055, 2017.
223
+
224
+ Kezhen Chen, Qiuyuan Huang, Hamid Palangi, Paul Smolensky, Kenneth D Forbus, and Jianfeng Gao. Natural-to formal-language generation using tensor product representations. arXiv preprint arXiv:1910.02339, 2019.
225
+
226
+ Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
227
+
228
+ Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. BoolQ: Exploring the surprising difficulty of natural yes/no questions. In Proceedings of NAACL-HLT 2019, 2019.
229
+
230
+ Kevin Clark, Minh-Thang Luong, Quoc V. Le, and Christopher D. Manning. ELECTRA: Pre-training text encoders as discriminators rather than generators. In ICLR, 2020.
231
+
232
+ Ido Dagan, Oren Glickman, and Bernardo Magnini. The pascal recognising textual entailment challenge. In Proceedings of the First International Conference on Machine Learning Challenges: Evaluating Predictive Uncertainty Visual Object Classification, and Recognizing Textual Entailment, MLCW’05, Berlin, Heidelberg, 2006.
233
+
234
+ Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2978–2988, 2019.
235
+
236
+ Marie-Catherine De Marneffe, Mandy Simons, and Judith Tonhauser. The commitmentbank: Investigating projection in naturally occurring discourse. In proceedings of Sinn und Bedeutung, volume 23, pp. 107–124, 2019.
237
+
238
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, 2019.
239
+
240
+ William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005), 2005.
241
+
242
+ Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. Unified language model pre-training for natural language understanding and generation. In Advances in Neural Information Processing Systems, pp. 13042–13054, 2019.
243
+
244
+ Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and Bill Dolan. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL Workshop on Textual Entailment and Paraphrasing, pp. 1–9, Prague, June 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/W07-1401.
245
+
246
+ Aaron Gokaslan and Vanya Cohen. Openwebtext corpus. http://Skylion007.github.io, 2019.
247
+
248
+ Pengcheng He, Xiaodong Liu, Weizhu Chen, and Jianfeng Gao. A hybrid neural network model for commonsense reasoning. arXiv preprint arXiv:1907.11983, 2019a.
249
+
250
+ Pengcheng He, Yi Mao, Kaushik Chakrabarti, and Weizhu Chen. X-sql: reinforce schema representation with context. arXiv preprint arXiv:1908.08113, 2019b.
251
+
252
+ Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Ian Simon, Curtis Hawthorne, Noam Shazeer, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer: Generating music with long-term structure. 2018.
253
+
254
+ Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Tuo Zhao. SMART: Robust and efficient fine-tuning for pre-trained natural language models through principled regularized optimization. In ACL, July 2020. doi: 10.18653/v1/2020.acl-main.197.
255
+
256
+ Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. Spanbert: Improving pre-training by representing and predicting spans. Transactions of the Association for Computational Linguistics, 8:64–77, 2020.
257
+
258
+ Daniel Khashabi, Snigdha Chaturvedi, Michael Roth, Shyam Upadhyay, and Dan Roth. Looking beyond the surface: A challenge set for reading comprehension over multiple sentences. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 252–262, 2018.
259
+
260
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
261
+
262
+ Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In International Conference on Learning Representations, 2019.
263
+
264
+ Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. Race: Large-scale reading comprehension dataset from examinations. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 785–794, 2017.
265
+
266
+ Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. Albert: A lite bert for self-supervised learning of language representations. In International Conference on Learning Representations, 2019.
267
+
268
+ Hector Levesque, Ernest Davis, and Leora Morgenstern. The winograd schema challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning, 2012.
269
+
270
+ Hector J Levesque, Ernest Davis, and Leora Morgenstern. The Winograd schema challenge. In AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning, volume 46, pp. 47, 2011.
271
+
272
+ Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Jiawei Han. On the variance of the adaptive learning rate and beyond. In International Conference on Learning Representations, 2019a.
273
+
274
+ Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. Multi-task deep neural networks for natural language understanding. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4487–4496, Florence, Italy, July 2019b. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1441.
275
+
276
+ Xiaodong Liu, Hao Cheng, Pengcheng He, Weizhu Chen, Yu Wang, Hoifung Poon, and Jianfeng Gao. Adversarial training for large neural language models. arXiv preprint arXiv:2004.08994, 2020.
277
+
278
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019c.
279
+
280
+ Ilya Loshchilov and Frank Hutter. Fixing weight decay regularization in adam. 2018.
281
+
282
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv, pp. arXiv–1609, 2016.
283
+
284
+ Shervin Minaee, Nal Kalchbrenner, Erik Cambria, Narjes Nikzad, Meysam Chenaghlu, and Jianfeng Gao. Deep learning based text classification: A comprehensive review. arXiv preprint arXiv:2004.03705, 2020.
285
+
286
+ Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979–1993, 2018.
287
+
288
+ Mohammad Taher Pilehvar and Jose Camacho-Collados. Wic: the word-in-context dataset for evaluating context-sensitive meaning representations. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 1267–1273, 2019.
289
+
290
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8), 2019.
291
+
292
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67, 2020. URL http://jmlr.org/papers/v21/20-074.html.
293
+
294
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: $^ { 1 0 0 , 0 0 0 + }$ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, November 2016.
295
+
296
+ Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don’t know: Unanswerable questions for squad. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 784–789, 2018.
297
+
298
+ Melissa Roemmele, Cosmin Adrian Bejan, and Andrew S. Gordon. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In 2011 AAAI Spring Symposium Series, 2011.
299
+
300
+ Imanol Schlag, Paul Smolensky, Roland Fernandez, Nebojsa Jojic, Jürgen Schmidhuber, and Jianfeng Gao. Enhancing the transformer with explicit relational encoding for math problem solving. arXiv preprint arXiv:1910.06611, 2019.
301
+
302
+ Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 464–468, 2018.
303
+
304
+ Tao Shen, Yi Mao, Pengcheng He, Guodong Long, Adam Trischler, and Weizhu Chen. Exploiting structured knowledge in text via graph-guided representation learning. arXiv preprint arXiv:2004.14224, 2020.
305
+
306
+ Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using gpu model parallelism. arXiv preprint arXiv:1909.08053, 2019.
307
+
308
+ Paul Smolensky. Tensor product variable binding and the representation of symbolic structures in connectionist systems. Artificial intelligence, 46(1-2):159–216, 1990.
309
+
310
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
311
+
312
+ Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xin Tian, Danxiang Zhu, Hao Tian, and Hua Wu. Ernie: Enhanced representation through knowledge integration. arXiv preprint arXiv:1904.09223, 2019.
313
+
314
+ Trieu H Trinh and Quoc V Le. A simple method for commonsense reasoning. arXiv preprint arXiv:1806.02847, 2018.
315
+
316
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
317
+
318
+ Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Superglue: A stickier benchmark for general-purpose language understanding systems. In Advances in neural information processing systems, pp. 3266–3280, 2019a.
319
+
320
+ Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In 7th International Conference on Learning Representations, ICLR 2019, 2019b.
321
+
322
+ Wei Wang, Bin Bi, Ming Yan, Chen Wu, Zuyi Bao, Liwei Peng, and Luo Si. Structbert: Incorporating language structures into pre-training for deep language understanding. arXiv preprint arXiv:1908.04577, 2019c.
323
+
324
+ Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471, 2018.
325
+
326
+ Adina Williams, Nikita Nangia, and Samuel Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 1112–1122. Association for Computational Linguistics, 2018. URL http://aclweb.org/anthology/N18-1101.
327
+
328
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in neural information processing systems, pp. 5754–5764, 2019.
329
+
330
+ Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. Swag: A large-scale adversarial dataset for grounded commonsense inference. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 93–104, 2018.
331
+
332
+ Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. ReCoRD: Bridging the gap between human and machine commonsense reading comprehension. arXiv preprint 1810.12885, 2018.
333
+
334
+ Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015.
335
+
336
+ # A APPENDIX
337
+
338
+ A.1 DATASET
339
+ Table 6: Summary information of the NLP application benchmarks.
340
+
341
+ <table><tr><td rowspan=1 colspan=1>Corpus</td><td rowspan=1 colspan=1>Task</td><td rowspan=1 colspan=2>#Train #Dev</td><td rowspan=1 colspan=3>#Test #Label Metrics</td></tr><tr><td rowspan=1 colspan=7>General Language Understanding Evaluation (GLUE)</td></tr><tr><td rowspan=1 colspan=1>CoLA</td><td rowspan=1 colspan=1>Acceptability</td><td rowspan=1 colspan=1>8.5k</td><td rowspan=1 colspan=1>1k</td><td rowspan=1 colspan=1>1k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Matthews corr</td></tr><tr><td rowspan=1 colspan=1>SST</td><td rowspan=1 colspan=1>Sentiment</td><td rowspan=1 colspan=1>67k</td><td rowspan=1 colspan=1>872</td><td rowspan=1 colspan=1>1.8k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>MNLI</td><td rowspan=1 colspan=1>NLI</td><td rowspan=1 colspan=1>393k</td><td rowspan=1 colspan=1>20k</td><td rowspan=1 colspan=1>20k</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>RTE</td><td rowspan=1 colspan=1>NLI</td><td rowspan=1 colspan=1>2.5k</td><td rowspan=1 colspan=1>276</td><td rowspan=1 colspan=1>3k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>WNLI</td><td rowspan=1 colspan=1>NLI</td><td rowspan=1 colspan=1>634</td><td rowspan=1 colspan=1>71</td><td rowspan=1 colspan=1>146</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>QQP</td><td rowspan=1 colspan=1>Paraphrase</td><td rowspan=1 colspan=1>364k</td><td rowspan=1 colspan=1>40k</td><td rowspan=1 colspan=1>391k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy/F1</td></tr><tr><td rowspan=1 colspan=1>MRPC</td><td rowspan=1 colspan=1>Paraphrase</td><td rowspan=1 colspan=1>3.7k</td><td rowspan=1 colspan=1>408</td><td rowspan=1 colspan=1>1.7k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy/F1</td></tr><tr><td rowspan=1 colspan=1>QNLI</td><td rowspan=1 colspan=1>QA/NLI</td><td rowspan=1 colspan=1>108k</td><td rowspan=1 colspan=1>5.7k</td><td rowspan=1 colspan=1>5.7k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>STS-B</td><td rowspan=1 colspan=1>Similarity</td><td rowspan=1 colspan=1>7k</td><td rowspan=1 colspan=1>1.5k</td><td rowspan=1 colspan=1>1.4k</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>Pearson/Spearman corr</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>SuperGLUE</td><td rowspan=1 colspan=3></td></tr><tr><td rowspan=1 colspan=1>WSC</td><td rowspan=1 colspan=1>Coreference</td><td rowspan=1 colspan=1>554k</td><td rowspan=1 colspan=1>104</td><td rowspan=1 colspan=1>146</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>BoolQ</td><td rowspan=1 colspan=1>QA</td><td rowspan=1 colspan=1>9,427</td><td rowspan=1 colspan=1>3,270</td><td rowspan=1 colspan=1>3,245</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>COPA</td><td rowspan=1 colspan=1>QA</td><td rowspan=1 colspan=1>400k</td><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>500</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>CB</td><td rowspan=1 colspan=1>NLI</td><td rowspan=1 colspan=1>250</td><td rowspan=1 colspan=1>57</td><td rowspan=1 colspan=1>250</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Accuracy/F1</td></tr><tr><td rowspan=1 colspan=1>RTE</td><td rowspan=1 colspan=1>NLI</td><td rowspan=1 colspan=1>2.5k</td><td rowspan=1 colspan=1>276</td><td rowspan=1 colspan=1>3k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>WiC</td><td rowspan=1 colspan=1>WSD</td><td rowspan=1 colspan=1>2.5k</td><td rowspan=1 colspan=1>276</td><td rowspan=1 colspan=1>3k</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>ReCoRD</td><td rowspan=1 colspan=1>MRC</td><td rowspan=1 colspan=1>101k</td><td rowspan=1 colspan=1>10k</td><td rowspan=1 colspan=1>10k</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>Exact Match (EM)/F1</td></tr><tr><td rowspan=1 colspan=1>MultiRC</td><td rowspan=1 colspan=1>Multiple choice</td><td rowspan=1 colspan=1>5,100</td><td rowspan=1 colspan=1>953</td><td rowspan=1 colspan=1>1,800</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>Exact Match (EM)/F1</td></tr><tr><td rowspan=1 colspan=7>Question Answering</td></tr><tr><td rowspan=1 colspan=1>SQuAD v1.1</td><td rowspan=1 colspan=1>MRC</td><td rowspan=1 colspan=1>87.6k</td><td rowspan=1 colspan=1>10.5k</td><td rowspan=1 colspan=1>9.5k</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>Exact Match (EM)/F1</td></tr><tr><td rowspan=1 colspan=1>SQuAD v2.0</td><td rowspan=1 colspan=1>MRC</td><td rowspan=1 colspan=1>130.3k</td><td rowspan=1 colspan=1>11.9k</td><td rowspan=1 colspan=1>8.9k</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>ExactMatch (EM)/F1</td></tr><tr><td rowspan=1 colspan=1>RACE</td><td rowspan=1 colspan=1>MRC</td><td rowspan=1 colspan=1>87,866</td><td rowspan=1 colspan=1>4,887</td><td rowspan=1 colspan=1>4,934</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>SWAG</td><td rowspan=1 colspan=1>Multiple choice</td><td rowspan=1 colspan=1>73.5k</td><td rowspan=1 colspan=1>20k</td><td rowspan=1 colspan=1>20k</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=7>Token Classification</td></tr><tr><td rowspan=1 colspan=1>CoNLL 2003</td><td rowspan=1 colspan=1>NER</td><td rowspan=1 colspan=1>14,987</td><td rowspan=1 colspan=1>3,466</td><td rowspan=1 colspan=1>3,684</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>F1</td></tr></table>
342
+
343
+ ‚ GLUE. The General Language Understanding Evaluation (GLUE) benchmark is a collection of nine natural language understanding (NLU) tasks. As shown in Table 6, it includes question answering (Rajpurkar et al., 2016), linguistic acceptability (Warstadt et al., 2018), sentiment analysis (Socher et al., 2013), text similarity (Cer et al., 2017), paraphrase detection (Dolan & Brockett, 2005), and natural language inference (NLI) (Dagan et al., 2006; Bar-Haim et al., 2006; Giampiccolo et al., 2007; Bentivogli et al., 2009; Levesque et al., 2012; Williams et al., 2018). The diversity of the tasks makes GLUE very suitable for evaluating the generalization and robustness of NLU models.
344
+
345
+ ‚ SuperGLUE. SuperGLUE is an extension of the GLUE benchmark, but more difficult, which is a collection of eight NLU tasks. It covers a various of tasks including question answering (Zhang et al., 2018; Clark et al., 2019; Khashabi et al., 2018), natural language inference (Dagan et al., 2006; Bar-Haim et al., 2006; Giampiccolo et al., 2007; Bentivogli et al., 2009; De Marneffe et al., 2019), coreference resolution (Levesque et al., 2012) and word sense disambiguation (Pilehvar & Camacho-Collados, 2019).
346
+
347
+ ‚ RACE is a large-scale machine reading comprehension dataset, collected from English examinations in China, which are designed for middle school and high school students (Lai et al., 2017).
348
+
349
+ ‚ SQuAD v1.1/v2.0 is the Stanford Question Answering Dataset (SQuAD) v1.1 and v2.0 (Rajpurkar et al., 2016; 2018) are popular machine reading comprehension benchmarks. Their passages come from approximately 500 Wikipedia articles and the questions and answers are obtained by crowdsourcing. The SQuAD $\mathrm { v } 2 . 0$ dataset includes unanswerable questions about the same paragraphs.
350
+
351
+ ‚ SWAG is a large-scale adversarial dataset for the task of grounded commonsense inference, which unifies natural language inference and physically grounded reasoning (Zellers et al., 2018). SWAG consists of $1 1 3 \mathrm { k }$ multiple choice questions about grounded situations.
352
+
353
+ ‚ CoNLL 2003 is an English dataset consisting of text from a wide variety of sources. It has 4 types of named entity.
354
+
355
+ # A.2 PRE-TRAINING DATASET
356
+
357
+ For DeBERTa pre-training, we use Wikipedia (English Wikipedia dump8; 12GB), BookCorpus (Zhu et al., 2015) 9 (6GB), OPENWEBTEXT (public Reddit content (Gokaslan & Cohen, 2019); 38GB) and STORIES10 (a subset of CommonCrawl (Trinh & Le, 2018); 31GB). The total data size after data deduplication(Shoeybi et al., 2019) is about 78GB. For pre-training, we also sample $5 \%$ training data as the validation set to monitor the training process. Table 7 compares datasets used in different pre-trained models.
358
+
359
+ Table 7: Comparison of the pre-training data.
360
+
361
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Wiki+Book16GB</td><td rowspan=1 colspan=1>OpenWebText38GB</td><td rowspan=1 colspan=1>Stories31GB</td><td rowspan=1 colspan=1>CC-News76GB</td><td rowspan=1 colspan=1>Giga516GB</td><td rowspan=1 colspan=1>ClueWeb19GB</td><td rowspan=1 colspan=1>Common Crawl110GB</td></tr><tr><td rowspan=1 colspan=1>BERT</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>XLNet</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>(24号</td></tr><tr><td rowspan=1 colspan=1>RoBERTa</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>DeBERTaDeBERTa1.5B</td><td rowspan=1 colspan=1>√√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>广</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr></table>
362
+
363
+ # A.3 IMPLEMENTATION DETAILS
364
+
365
+ Following RoBERTa (Liu et al., 2019c), we adopt dynamic data batching. We also include span masking (Joshi et al., 2020) as an additional masking strategy with the span size up to three. We list the detailed hyperparameters of pre-training in Table 8. For pre-training, we use Adam (Kingma & Ba, 2014) as the optimizer with weight decay (Loshchilov & Hutter, 2018). For fine-tuning, even though we can get better and robust results with RAdam(Liu et al., 2019a) on some tasks, e.g. CoLA, RTE and RACE, we use Adam(Kingma & Ba, 2014) as the optimizer for a fair comparison. For fine-tuning, we train each task with a hyper-parameter search procedure, each run takes about 1-2 hours on a DGX-2 node. All the hyper-parameters are presented in Table 9. The model selection is based on the performance on the task-specific development sets.
366
+
367
+ Our code is implemented based on Huggingface Transformers11, FairSeq12 and Megatron (Shoeybi et al., 2019)13.
368
+
369
+ # A.3.1 PRE-TRAINING EFFICIENCY
370
+
371
+ To investigate the efficiency of model pre-training, we plot the performance of the fine-tuned model on downstream tasks as a function of the number of pre-training steps. As shown in Figure 1, for RoBERTa-ReImpbase and $\mathrm { D e B E R T a } _ { b a s e }$ , we dump a checkpoint every 150K pre-training steps, and then fine-tune the checkpoint on two representative downstream tasks, MNLI and SQuAD v2.0, and then report the accuracy and F1 score, respectively. As a reference, we also report the final model performance of both the original $\mathrm { R o B E R T a } _ { b a s e }$ (Liu et al., 2019c) and $\mathtt { X L N e t } _ { b a s e }$ (Yang et al., 2019). The results show that $\mathrm { D e B E R T a } _ { b a s e }$ consistently outperforms RoBERTa-ReImpbase during the course of pre-training.
372
+
373
+ Table 8: Hyper-parameters for pre-training DeBERTa.
374
+
375
+ <table><tr><td>Hyper-parameter</td><td>|DeBERTa1.5B</td><td>DeBERTalarge</td><td>DeBERTabase</td><td>DeBERTabase-ablation</td></tr><tr><td>Number of Layers</td><td>48</td><td>24</td><td>12</td><td>12</td></tr><tr><td>Hidden size</td><td>1536</td><td>1024</td><td>768</td><td>768</td></tr><tr><td>FNN inner hidden size</td><td>6144</td><td>4096</td><td>3072</td><td>3072</td></tr><tr><td>Attention Heads</td><td>24</td><td>16</td><td>12</td><td>12</td></tr><tr><td>Attention Head size</td><td>64</td><td>64</td><td>64</td><td>64</td></tr><tr><td>Dropout</td><td>0.1</td><td>0.1</td><td>0.1</td><td>0.1</td></tr><tr><td>Warmup Steps</td><td>10k</td><td>10k</td><td>10k</td><td>10k</td></tr><tr><td>Learning Rates</td><td>1.5e-4</td><td>2e-4</td><td>2e-4</td><td>1e-4</td></tr><tr><td>Batch Size</td><td>2k</td><td>2k</td><td>2k</td><td>256</td></tr><tr><td>Weight Decay</td><td>0.01</td><td>0.01</td><td>0.01</td><td>0.01</td></tr><tr><td>Max Steps</td><td>1M</td><td>1M</td><td>1M</td><td>1M</td></tr><tr><td>Learning Rate Decay</td><td>Linear</td><td>Linear</td><td>Linear</td><td>Linear</td></tr><tr><td>Adam ∈</td><td>1e-6</td><td>1e-6</td><td>1e-6</td><td>1e-6</td></tr><tr><td>Adam β1</td><td>0.9</td><td>0.9</td><td>0.9</td><td>0.9</td></tr><tr><td>Adam β2</td><td>0.999</td><td>0.999</td><td>0.999</td><td>0.999</td></tr><tr><td>Gradient Clipping</td><td>1.0</td><td>1.0</td><td>1.0</td><td></td></tr><tr><td>Number ofDGX-2 nodes</td><td>16</td><td>6</td><td></td><td>1.0</td></tr><tr><td>Training Time</td><td>30 days</td><td>20 days</td><td>4 10 days</td><td>1 7 days</td></tr></table>
376
+
377
+ Table 9: Hyper-parameters for fine-tuning DeBERTa on down-streaming tasks.
378
+
379
+ <table><tr><td>Hyper-parameter</td><td>DeBERTa1.5B</td><td>DeBERTalarge</td><td>DeBERTabase</td></tr><tr><td>Dropout of task layer Warmup Steps Learning Rates Batch Size Weight Decay Maximun Training Epochs Learning Rate Decay Adam ∈ Adam β1</td><td>{0,0.15,0.3} {50,100,500,1000] {1e-6,3e-6, 5e-6} {16,32,64} 0.01 10 Linear 1e-6 0.9</td><td>{0,0.1,0.15} {50,100,500,1000} {5e-6,8e-6, 9e-6, 1e-5} {16,32,48,64} 0.01 10 Linear 1e-6</td><td>{0,0.1,0.15} {50,100,500,1000] {1.5e-5,2e-5, 3e-5,4e-5} {16,32,48,64} 10 Linear</td></tr></table>
380
+
381
+ ![](images/652fd2471aba260e4c3ad959ea124f7fa7de8dae5e26aa624be3a8a5b2263b86.jpg)
382
+ Figure 1: Pre-training performance curve between DeBERTa and its counterparts on the MNLI and SQuAD v2.0 development set.
383
+
384
+ # A.4 MAIN RESULTS ON GENERATION TASKS
385
+
386
+ In addition to NLU tasks, DeBERTa can also be extended to handle NLG tasks. To allow DeBERTa operating like an auto-regressive model for text generation, we use a triangular matrix for selfattention and set the upper triangular part of the self-attention mask to $- \infty$ , following Dong et al. (2019).
387
+
388
+ We evaluate DeBERTa on the task of auto-regressive language model (ARLM) using Wikitext103 (Merity et al., 2016). To do so, we train a new version of DeBERTa, denoted as DeBERTa-MT. It is jointly pre-trained using the MLM and ARLM tasks as in UniLM (Dong et al., 2019). The pre-training hyper-parameters follows that of $\mathrm { D e B E R T a } _ { b a s e }$ except that we use fewer training steps (200k). For comparison, we use RoBERTa as baseline, and include GPT-2 and Transformer-XL as additional references. DeBERTa-AP is a variant of DeBERTa where absolute position embeddings are incorporated in the input layer as RoBERTa. For a fair comparison, all these models are base models pre-trained in a similar setting.
389
+
390
+ Table 10: Language model results in perplexity (lower is better) on Wikitext-103 .
391
+
392
+ <table><tr><td rowspan=1 colspan=7>Model |RoBERTa|DeBERTa-AP|DeBERTa|DeBERTa-MT|GPT-2|Transformer-XL</td></tr><tr><td rowspan=1 colspan=1>Dev PPL</td><td rowspan=1 colspan=1>21.6</td><td rowspan=1 colspan=1>20.7</td><td rowspan=1 colspan=1>20.5</td><td rowspan=1 colspan=1>19.5</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>23.1</td></tr><tr><td rowspan=1 colspan=1>Test PPL</td><td rowspan=1 colspan=1>21.6</td><td rowspan=1 colspan=1>20.0</td><td rowspan=1 colspan=1>19.9</td><td rowspan=1 colspan=1>19.5</td><td rowspan=1 colspan=1>37.50</td><td rowspan=1 colspan=1>24</td></tr></table>
393
+
394
+ Table 10 summarizes the results on Wikitext-103. We see that $\mathrm { D e B E R T a _ { b a s e } }$ obtains lower perplexities on both dev and test data, and joint training using MLM and ARLM reduces perplexity further. That DeBERTa-AP is inferior to DeBERTa indicates that it is more effective to incorporate absolute position embeddings of words in the decoding layer as the EMD in DeBERTa than in the input layer as RoBERTa.
395
+
396
+ # A.5 HANDLING LONG SEQUENCE INPUT
397
+
398
+ With relative position bias, we choose to truncate the maximum relative distance to $k$ as in equation 3. Thus in each layer, each token can attend directly to at most $2 ( k - 1 )$ tokens and itself. By stacking Transformer layers, each token in the l´th layer can attend to at most $( 2 k - 1 ) l$ tokens implicitly. Taking $\mathrm { D e B E R T a } _ { l a r g e }$ as an example, where $k = 5 1 2 , L = 2 4$ , in theory, the maximum sequence length that can be handled is 24,528. This is a byproduct benefit of our design choice and we find it beneficial for the RACE task. A comparison of long sequence effect on the RACE task is shown in Table 11.
399
+
400
+ Table 11: The effect of handling long sequence input for RACE task with DeBERTa
401
+
402
+ <table><tr><td rowspan=1 colspan=1>Sequence length |Middle|High| A</td><td rowspan=1 colspan=1>Middle</td><td rowspan=1 colspan=1>High</td><td rowspan=1 colspan=1>|Accuracy</td></tr><tr><td rowspan=2 colspan=1>512768</td><td rowspan=1 colspan=1>88.8</td><td rowspan=1 colspan=1>85.0</td><td rowspan=1 colspan=1>86.3</td></tr><tr><td rowspan=1 colspan=1>88.7</td><td rowspan=1 colspan=1>86.3</td><td rowspan=1 colspan=1>86.8</td></tr></table>
403
+
404
+ Long sequence handling is an active research area. There have been a lot of studies where the Transformer architecture is extended for long sequence handling(Beltagy et al., 2020; Kitaev et al., 2019; Child et al., 2019; Dai et al., 2019). One of our future research directions is to extend DeBERTa to deal with extremely long sequences.
405
+
406
+ # A.6 PERFORMANCE IMPROVEMENTS OF DIFFERENT MODEL SCALES
407
+
408
+ In this subsection, we study the effect of different model sizes applied to large models on GLUE. Table 12 summarizes the results, showing that larger models can obtain a better result and SiFT also improves the model performance consistently.
409
+
410
+ Table 12: Comparison results of DeBERTa models with different sizes on the GLUE development set.
411
+
412
+ <table><tr><td>Model</td><td>CoLA| Mcc</td><td>|QQP Acc</td><td>MNLI-m/mml Acc</td><td>SST-2| Acc</td><td>STS-B Corr</td><td>QNLI Acc</td><td>RTE Acc</td><td>MRPC| Acc</td><td>Avg.</td></tr><tr><td>DeBERTalarge</td><td>70.5</td><td>92.3</td><td>91.1/91.1</td><td>96.8</td><td>92.8</td><td>95.3</td><td>88.3</td><td>91.9</td><td>90.00</td></tr><tr><td>DeBERTa900M</td><td>71.1</td><td>92.3</td><td>91.7/91.6</td><td>97.5</td><td>92.0</td><td>95.8</td><td>93.5</td><td>93.1</td><td>90.86</td></tr><tr><td>DeBERTa1.5B</td><td>72.0</td><td>92.7</td><td>91.7/91.9</td><td>97.2</td><td>92.9</td><td>96.0</td><td>93.9</td><td>92.0</td><td>91.17</td></tr><tr><td>DeBERTa1.5B+SiFT</td><td>73.5</td><td>93.0</td><td>92.0/92.1</td><td>97.5</td><td>93.2</td><td>96.5</td><td>96.5</td><td>93.2</td><td>91.93</td></tr></table>
413
+
414
+ <table><tr><td>Model</td><td>Parameters</td><td>MNLI-m/mm Acc</td><td>SQuAD v1.1 F1/EM</td><td>SQuAD v2.0 F1/EM</td></tr><tr><td>RoBERTa-ReImpbase</td><td>120M</td><td>84.9/85.1</td><td>91.1/84.8</td><td>79.5/76.0</td></tr><tr><td>DeBERTabase</td><td>134M</td><td>86.3/86.2</td><td>92.1/86.1</td><td>82.5/79.3</td></tr><tr><td>+ ShareProjection</td><td>120M</td><td>86.3/86.3</td><td>92.2/86.2</td><td>82.3/79.5</td></tr><tr><td>+ Conv</td><td>122M</td><td>86.3/86.5</td><td>92.5/86.4</td><td>82.5/79.7</td></tr><tr><td>+ 128k Vocab</td><td>190M</td><td>86.7/86.9</td><td>93.1/86.8</td><td>83.0/80.1</td></tr></table>
415
+
416
+ Table 13: Ablation study of the additional modifications in $\mathrm { D e B E R T a } _ { 1 . 5 B }$ and $\mathrm { D e B E R T a _ { 9 0 0 M } }$ models. Note that we progressively add each component on the top of DeBE $\mathrm { R T a } _ { \mathrm { b a s e } }$ .
417
+
418
+ # A.7 MODEL COMPLEXITY
419
+
420
+ With the disentangled attention mechanism, we introduce three additional sets of parameters $W _ { q , r } , W _ { k , r } \in R ^ { d \times d }$ and $P \in R ^ { 2 k \times d }$ . The total increase in model parameters is $2 L \times d ^ { \bar { 2 } } + 2 k \times d$ For the large model $( d = 1 0 2 4 , L = 2 4 , k = 5 1 2 )$ q, this amounts to about $4 9 M$ additional parameters, an increase of $1 3 \%$ . For the base model $( d = 7 6 8 , L = 1 2 , k = 5 1 2 )$ , this amounts to $1 4 M$ additional parameters, an increase of $1 2 \%$ . However, by sharing the projection matrix between content and position embedding, i.e. $W _ { q , r } = W _ { q , c } , W _ { k , r } = W _ { k , c }$ , the number of parameters of DeBERTa is the same as RoBERTa. Our experiment on base model shows that the results are almost the same, as in Table 13.
421
+
422
+ The additional computational complexity is $O ( N k d )$ due to the calculation of the additional positionto-content and content-to-position attention scores. Compared with BERT or RoBERTa, this increases the computational cost by $3 0 \%$ . Compared with XLNet which also uses relative position embedding, the increase of computational cost is about $1 5 \%$ . A further optimization by fusing the attention computation kernel can significantly reduce this additional cost. For $E M D$ , since the decoder in pre-training only reconstructs the masked tokens, it does not introduce additional computational cost for unmasked tokens. In the situation where $1 5 \%$ tokens are masked and we use only two decoder layers, the additional cost is $0 . 1 5 \times 2 / L$ which results in an additional computational cost of only $3 \%$ for base model( $L = 1 2$ ) and $2 \%$ for large model( $L = 2 4$ ) in EMD.
423
+
424
+ # A.8 ADDITIONAL DETAILS OF ENHANCED MASK DECODER
425
+
426
+ The structure of EMD is shown in Figure 2b. There are two inputs for EMD, (i.e., $I , H )$ . $H$ denotes the hidden states from the previous Transformer layer, and $I$ can be any necessary information for decoding, e.g., $H$ , absolute position embedding or output from previous EMD layer. $n$ denotes $n$ stacked layers of EMD where the output of each EMD layer will be the input $I$ for next EMD layer and the output of last EMD layer will be fed to the language model head directly. The $n$ layers can share the same weight. In our experiment we share the same weight for $n = 2$ layers to reduce the number of parameters and use absolute position embedding as $I$ of the first EMD layer. When $I = H$ and $n = 1$ , EMD is the same as the BERT decoder layer. However, EMD is more general and flexible as it can take various types of input information for decoding.
427
+
428
+ # A.9 ATTENTION PATTERNS
429
+
430
+ To visualize how DeBERTa operates differently from RoBERTa, we present in Figure 3 the attention patterns (taken in the last self-attention layers) of RoBERTa, DeBERTa and three DeBERTa variants.
431
+
432
+ ![](images/e717fa563f752c2273db2b0c80b1badbd8f6ac907edf9ffd947fbda30948455a.jpg)
433
+ Figure 2: Comparison of the decoding layer.
434
+
435
+ ![](images/8ae0415bd238e46819832892f3f63332c3206c7e1eda47022b508832813f8d77.jpg)
436
+ Figure 3: Comparison of attention patterns of the last layer among DeBERTa, RoBERTa and DeBERTa variants (i.e., DeBERTa without EMD, C2P and P2C respectively).
437
+
438
+ We observe two differences. First, RoBERTa has a clear diagonal line effect for a token attending to itself. But this effect is not very visible in DeBERTa. This can be attributed to the use of EMD, in which the absolute position embedding is added to the hidden state of content as the query vector, as verified by the attention pattern of DeBERTa-EMD where the diagonal line effect is more visible than that of the original DeBERTa. Second, we observe vertical strips in the attention patterns of RoBERTa, which are mainly caused by high-frequent functional words or tokens (e.g., “a”, “the”, and punctuation). For DeBERTa, the strip only appears in the first column, which represents the [CLS] token. We conjecture that a dominant emphasis on [CLS] is desirable since the feature vector of [CLS] is often used as a contextual representation of the entire input sequence in downstream tasks. We also observe that the vertical strip effect is quite obvious in the patterns of the three DeBERTa variants.
439
+
440
+ We present three additional examples to illustrate the different attention patterns of DeBERTa and RoBERTa in Figures 4 and 5.
441
+
442
+ ![](images/4ded61fc2789380f8e48a344e2832f08e141cde3be4b1e729272294ee12539bd.jpg)
443
+ Figure 4: Comparison on attention patterns of the last layer between DeBERTa and RoBERTa.
444
+
445
+ ![](images/797e974d1df596acf89f11dd99e90820f599208dca3b930e0dc2054ac2ea74aa.jpg)
446
+ Figure 5: Comparison on attention patterns of last layer between DeBERTa and its variants (i.e. DeBERTa without EMD, C2P and P2C respectively).
447
+
448
+ # A.10 ACCOUNT FOR THE VARIANCE IN FINE-TUNING
449
+
450
+ Accounting for the variance of different runs of fine-tuning, in our experiments, we always follow Liu et al. (2019c) to report the results on downstream tasks by averaging over five runs with different random initialization seeds, and perform significance test when comparing results. As the examples shown in Table 14, $\mathrm { D e B E R T a } _ { b a s e }$ significantly outperforms $\mathrm { R o B E R T a } _ { b a s e }$ $\dot { p }$ -value $< 0 . 0 5$ ).
451
+
452
+ Table 14: Comparison of DeBERTa and RoBERTa on MNLI-matched and SQuAD v1.1.
453
+
454
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1> MNLI-matched (Min/Max/Avg)</td><td rowspan=1 colspan=1>SQuAD v1.1 (Min/Max/Avg)</td><td rowspan=1 colspan=1>p-value</td></tr><tr><td rowspan=1 colspan=1>RoBERTabase</td><td rowspan=1 colspan=1>84.7/85.0/84.9</td><td rowspan=1 colspan=1>90.8/91.3/91.1</td><td rowspan=1 colspan=1>0.02</td></tr><tr><td rowspan=1 colspan=1>DeBERTabase</td><td rowspan=1 colspan=1>86.1/86.5/86.3</td><td rowspan=1 colspan=1>91.8/92.2/92.1</td><td rowspan=1 colspan=1>0.01</td></tr></table>
parse/train/XPZIaotutsD/XPZIaotutsD_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XPZIaotutsD/XPZIaotutsD_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XPZIaotutsD/XPZIaotutsD_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/dev/0YXmOFLb1wQ/0.png ADDED

Git LFS Details

  • SHA256: e9568465a0ad5362658be3c8e5ef3a2f0407e917a0a358a94f52abb4c4020c47
  • Pointer size: 131 Bytes
  • Size of remote file: 507 kB
vlm/dev/0YXmOFLb1wQ/1.png ADDED

Git LFS Details

  • SHA256: 4d5f58489cfd40fa93688687eff70a848960eaaf0890415aadb5ba375347e84c
  • Pointer size: 131 Bytes
  • Size of remote file: 540 kB
vlm/dev/0YXmOFLb1wQ/10.png ADDED

Git LFS Details

  • SHA256: b3119c30ccf3ca50b9dd1097b5178cfab196f14488474c6abec9a1d1e5fdc67d
  • Pointer size: 131 Bytes
  • Size of remote file: 552 kB
vlm/dev/0YXmOFLb1wQ/11.png ADDED

Git LFS Details

  • SHA256: 77f37581ac3a4d556cea2a70a514b5fee7cceda5deeb78785f5becdac8d4bcde
  • Pointer size: 131 Bytes
  • Size of remote file: 139 kB
vlm/dev/0YXmOFLb1wQ/12.png ADDED

Git LFS Details

  • SHA256: ff7c8da639608cbcbd0e306325eb58228d510646a76799e56e1594bde68f8ce1
  • Pointer size: 131 Bytes
  • Size of remote file: 430 kB
vlm/dev/0YXmOFLb1wQ/13.png ADDED

Git LFS Details

  • SHA256: ecb24259fa1cc5a1e5abe4b2c0718a680712e51fa1e1d5cb22f9d9a7470eb8e3
  • Pointer size: 131 Bytes
  • Size of remote file: 358 kB
vlm/dev/0YXmOFLb1wQ/14.png ADDED

Git LFS Details

  • SHA256: f77acbaba7507729c227c2404814d1cad0ebe8af501a18a2be44101e1f22ac89
  • Pointer size: 131 Bytes
  • Size of remote file: 267 kB
vlm/dev/0YXmOFLb1wQ/15.png ADDED

Git LFS Details

  • SHA256: a12c685053760aa68d3e42dd6926bc2050504655843c44e82f5a0178913b1de2
  • Pointer size: 131 Bytes
  • Size of remote file: 343 kB
vlm/dev/0YXmOFLb1wQ/2.png ADDED

Git LFS Details

  • SHA256: e2d57e20586c23c3410ed05077dbb26ab05dbf136d15ef35a7d1064a19d34b40
  • Pointer size: 131 Bytes
  • Size of remote file: 513 kB
vlm/dev/0YXmOFLb1wQ/3.png ADDED

Git LFS Details

  • SHA256: 83f86d4b7f60de1d5926965ce64870ffb38abd70cd30fdadd9011d57758e9deb
  • Pointer size: 131 Bytes
  • Size of remote file: 558 kB