ZHANGYUXUAN-zR commited on
Commit
83c995f
·
verified ·
1 Parent(s): 666ab0e

Add files using upload-large-folder tool

Browse files
parse/train/5-GXHFNbq_U/5-GXHFNbq_U.md ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Prototypical Cross-Attention Networks for Multiple Object Tracking and Segmentation
2
+
3
+ Lei $\mathbf { K e } ^ { 1 , 2 }$ Xia Li1 Martin Danelljan1 Yu-Wing Tai3 Chi-Keung Tang2 Fisher ${ \bf { Y } } { \bf { u } } ^ { 1 }$ 1ETH Zürich 2HKUST 3Kuaishou Technology {lkeab,cktang}@cse.ust.hk, {xia.li,martin.danelljan}@vision.ee.ethz.ch yuwing@gmail.com, i@yf.io
4
+
5
+ # Abstract
6
+
7
+ Multiple object tracking and segmentation requires detecting, tracking, and segmenting objects belonging to a set of given classes. Most approaches only exploit the temporal dimension to address the association problem, while relying on single frame predictions for the segmentation mask itself. We propose Prototypical Cross-Attention Network (PCAN), capable of leveraging rich spatio-temporal information for online multiple object tracking and segmentation. PCAN first distills a space-time memory into a set of prototypes and then employs cross-attention to retrieve rich information from the past frames. To segment each object, PCAN adopts a prototypical appearance module to learn a set of contrastive foreground and background prototypes, which are then propagated over time. Extensive experiments demonstrate that PCAN outperforms current video instance tracking and segmentation competition winners on both Youtube-VIS and BDD100K datasets, and shows efficacy to both one-stage and two-stage segmentation frameworks. Code and video resources are available at http://vis.xyz/pub/pcan.
8
+
9
+ # 1 Introduction
10
+
11
+ Multiple object tracking and segmentation (MOTS), also known as Video Instance Segmentation (VIS), is an important problem with many real-world applications, including autonomous driving [10, 26] and video analysis [4, 46]. The task involves tracking and segmenting all objects within a video from a given set of semantic classes. We are witnessing rapidly growing research interest on MOTS thanks to the introduction of large scale benchmarks [46, 50, 37]. State-of-the-art methods [46, 5, 37, 29] for MOTS mainly follow the tracking-by-detection paradigm, where objects are first detected and segmented in individual frames and then associated over time.
12
+
13
+ Although methods based on the popular tracking-by-detection philosophy have shown promising results, temporal modeling is limited to the object association phase [46, 5, 22] and only between two adjacent frames [37, 18]. On the other hand, the temporal dimension carries rich information about the scene. The information encoded in multiple temporal views of an object has the potential of improving the quality of predicted segmentation, localization, and categories. However, effectively and efficiently leveraging the rich temporal information remains a challenge. While sequential modeling has been applied for video processing [40, 41, 9, 28, 12], these methods generally operate directly on the high-resolution deep features, requiring large computational and memory consumption, which greatly limits their use.
14
+
15
+ We propose a Prototypical Cross-Attention Module, termed PCAM, to leverage temporal information for multiple object tracking and segmentation. As illustrated in Figure 1, the module first distills spatiotemporal information into condensed prototypes using clustering based on Expectation Maximization. The resulting prototypes, composed of Gaussian Components, yield a rich and generalizable yet compact representation of the past visual features. Given a deep feature embedding of the current frame, PCAM then employs prototypical cross-attention to read relevant information from prior frames.
16
+
17
+ ![](images/f9dada9f50f662cbde9d5b8cc24676fef8cba7e325d838b30e8e3626365616f6.jpg)
18
+ Figure 1: We propose Prototypical Cross-Attention Network for MOTS, which first condenses the space-time memory and high-resolution frame embeddings into frame-level and instance-level prototypes. These are then employed to retrieve rich temporal information from past frames by our efficient prototypical cross-attention operation.
19
+
20
+ Based on the noise-reduced clustered video features information, we further develop a Prototypical Cross-Attention Network (PCAN) for MOTS, that integrates the general PCAM at two stages in the network: on the frame-level and instance-level. The former reconstructs and aligns temporal past frame features with current frame, while the instance level integrates specific information about each object in the video. For robustness to object appearance change, PCAN represents each object instance by learning sets of contrastive foreground and background prototypes, which are propagated in an online manner. With a limited number of prototypes for each instance or frame, PCAN efficiently performs long-range feature aggregation and propagation in a video with linear complexity. Consequently, our PCAN outperforms standard non-local attention [40] and video transformer [41] on both the large-scale Youtube-VIS and BDD100K MOTS benchmarks.
21
+
22
+ Our main contributions are summarized as follows: (i) We introduce the PCAN module for efficiently utilizing long-term spatio-temporal video information. (ii) We develop a MOTS approach that employs PCAN on frame and instance-level. (iii) We further represent the appearance of each video tracklet with contrastive foreground and background prototypes, which are propagated over time. (iv) We extensively analyze our approach. Our PCAN outperforms previous approaches on the challenging self-driving dataset BDD100K [50] and the semantically diverse YouTube-VIS dataset [46].
23
+
24
+ # 2 Related work
25
+
26
+ Video instance segmentation (VIS) Existing VIS methods [46, 2, 21] widely adapt the twostage paradigm of Mask R-CNN [11] and its variants [13, 15] by adding an additional tracking branch. Thus, their typical pipelines first detect regions of interest (RoIs) and then use the instance features after RoIAlign to regress object mask and associate cross-frame instances. More recent works [5, 18, 22, 48] employ a one-stage instance segmentation method, e.g. the anchor-free FCOS detector [34], which predicts a linear combination of mask bases [3] as its final segmentation. The aforementioned approaches make very limited use of temporal information to enhance the quality of the segmentation, instead relying on single image-based mask prediction, or only model short-term temporal correlation between two consecutive frames [18, 30]. In the context of long-term temporal association, the offline method VisTr [41] adapts vision transformer [6] for VIS, but suffers from a huge computational burden and memory consumption due to the dense pixel-level attention operations over long sequences. Compared to these methods, our PCAN temporally aggregates and propagates the prototypical features with both the long-term benefit and linear complexity.
27
+
28
+ Multiple Object Tracking and Segmentation (MOTS) Similar to VIS, MOTS methods [37, 27, 29] mainly follow the tracking-by-detection paradigm. Objects are first detected and segmented, followed by association between frames. Track R-CNN [37] integrates temporal context feature from two neighboring frames using 3D convolutions. TrackFormer [25] performs joint object detection and tracking by recurrently using Transformers, while Stem-Seg [1] adopts a short 3D convolutional spatio-temporal volume to learn pixel embedding by treating segmentation as a bottom-up grouping. In contrast, our approach clusters appearance features in a long spatio-temporal volume with explicit foreground and background prototypes that are updates online. Besides, the mixture Gaussian components in instance appearance module equips PCAN a stronger modeling ability compared to instance-level average pooling [33, 49] or single Gaussian model [51, 14].
29
+
30
+ Temporal attention models Video understanding usually requires long-range sequential modeling of relations between spatio-temporal locations. Recently, attention-based approaches, such as non-local attention [40, 39, 28, 12] and transformers [8, 35, 16], have been successfully adopted in video classification and action recognition. These tasks [23, 32, 43] involve dense pixel-level attention, leading to quadratic complexity in the sequence length, thus making them excessively expensive for long sequences. Improved temporal attention models mainly include double attention mechanism [7] on image recognition with global-local decomposition, and clustered attention Transformer [38] for language sequence modeling. Besides, recent prototypical methods [19, 45] use the EM algorithm for single-image semantic segmentation or few-shot learning [33]. Unlike these methods, our PCAN uses compact prototypical representation both for temporal feature aggregation and compact instance appearance feature propagation.
31
+
32
+ # 3 Method
33
+
34
+ We propose an approach for Multiple Object Tracking and Segmentation. Given a video sequence, the goal is to detect, track, and segment objects from a predefined set of object categories. Specifically, we consider the online setting, where the predictions only depend on current and past frames.
35
+
36
+ # 3.1 Traditional Cross-Attention
37
+
38
+ To utilize the rich temporal information to improve the segmentation prediction, recent approaches [28, 12] have employed cross-attention. We consider past spatio-temporal information encoded in a memory M, consisting of deep features of size $H \times W \times T \times C$ . The memory encapsulates valuable information about the past appearances and predictions of objects and background in a scene. To attend to the memory, the information is first separately embedded into key $\mathbf { k } ^ { M }$ and value $\mathbf { v } ^ { M }$ feature vectors. The keys are used to address relevant memories whose corresponding values are returned. The standard memory reading process is a non-local operation computed as the weighted sum,
39
+
40
+ $$
41
+ y _ { i } = \frac { 1 } { Z _ { i } } \sum _ { j = 1 } ^ { H \times W \times T } \exp ( \mathbf { k } _ { i } ^ { Q } \cdot \mathbf { k } _ { j } ^ { M } ) \mathbf { v } _ { j } ^ { M } ,
42
+ $$
43
+
44
+ where $\mathbf { k } ^ { Q }$ denotes query key map, which is predicted from the current frame. Further, $i$ and $j$ are the index of each query and the memory location, and $\begin{array} { r } { Z _ { i } = \sum _ { j } \exp ( \mathbf { k } _ { i } ^ { Q } \cdot \mathbf { k } _ { j } ^ { M } ) } \end{array}$ is the normalizing factor.
45
+
46
+ Although proven effective, the standard attention operation (1) is known to suffer from poor computational and memory scaling properties [20]. In particular, since all queries are matched to all keys, it experiences a quadratic scaling $\mathcal { O } ( ( H W ) ^ { 2 } )$ of computations in the spatial size $H W$ of the feature map. This is particularly problematic for segmentation tasks, where fine-grained high-resolution information is desired to improve the quality of the predictions.
47
+
48
+ # 3.2 Prototypical Cross-Attention
49
+
50
+ To address the aforementioned limitations of the standard cross-attention, we introduce the prototypical cross-attention to first condense sets of high-resolution feature vectors in the past frames. Our approach is based on a clustered memory $\mathbf { M } _ { c }$ . We call these clusters prototypes, since they correspond to representative items in the memory. While clustering effectively reduces the number of items in the memory, it also serves to deprecate noisy information, leading to a more generalizable and robust representation of the memory.
51
+
52
+ To employ an attention mechanism, similar to (1), we require a clustering of the memory that generates a principled continuous and differentiable clustering assignment function. We therefore cluster the keys in the memory by fitting a Gaussian Mixture Model (GMM),
53
+
54
+ ![](images/b16e350d7758f3867593885cc547299195adefa0c2ec495c97b222a2328de4e2.jpg)
55
+ Figure 2: Overview of our frame-level prototypical cross-attention. For a frame $\hat { t }$ in the memory we first perform GMM-based clustering to achieve the key $\mathbf { k } _ { \hat { t } j } ^ { \mu }$ and value $\mathbf { v } _ { \hat { t } j } ^ { \mu }$ prototypes. Given the key encoding $\mathbf { k } _ { t }$ of the current frame, we attend to the prototypes to generate the reconstructed feature $\mathbf { y } _ { \hat { t } }$ , which are then aggregated temporally and fused with the current value encoding $\mathbf { v } _ { t }$ .
56
+
57
+ $$
58
+ p ( \mathbf { k } ) = \frac { 1 } { N } \sum _ { j = 1 } ^ { N } p ( \mathbf { k } | z = j ) , \qquad p ( \mathbf { k } | z = j ) = \frac { 1 } { ( 2 \pi \sigma ^ { 2 } ) ^ { \frac { D } { 2 } } } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 } \right)
59
+ $$
60
+
61
+ Here, $N$ denotes the number of Gaussian mixtures, $D$ is the feature dimension of the keys. We use a constant variance parameter $\sigma ^ { 2 }$ and uniform cluster priors $\begin{array} { r } { p ( z = j ) = \frac { 1 } { N } } \end{array}$ , where $z$ denotes the latent cluster assignment variable. The component means $\mathbf { k } ^ { \mu }$ represent the prototype keys in the memory. We generate the clustering (2) using the standard Expectation-Maximization algorithm.
62
+
63
+ The GMM allows us to compute a soft cluster assignment by evaluating the posterior probability of the latent assignment variable $z$ . Using Bayes rule, the probability of a key value $\mathbf { k }$ to be assigned to the $j$ th prototype is derived as,
64
+
65
+ $$
66
+ p ( z = j | \mathbf { k } ) = \frac { p ( \mathbf { k } | z = j ) p ( z = j ) } { \sum _ { l = 1 } ^ { N } p ( \mathbf { k } | z = l ) p ( z = l ) } = \frac { \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 } \right) } { \sum _ { l = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } - \mathbf { k } _ { l } ^ { \mu } \| ^ { 2 } \right) } .
67
+ $$
68
+
69
+ The resulting cluster assignment can thus be written as a SoftMax operation, where the corresponding logits are provided by the negative cluster distance $\| \mathbf { k } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 }$ scaled with a temperature of $2 \sigma ^ { 2 }$ .
70
+
71
+ Since the clustering is performed in the key space of the memory, we next retrieve the corresponding value prototypes. To this end, we employ the key cluster assignment probabilities in (3) to compute the values for each memory prototype,
72
+
73
+ $$
74
+ \mathbf { v } _ { j } ^ { \mu } = \sum _ { l = 1 } ^ { H \times W } p ( z = j | \mathbf { k } _ { l } ^ { M } ) \mathbf { v } _ { l } ^ { M } .
75
+ $$
76
+
77
+ For attending to our clustered memory, we first predict the key encodings We then read from the clustered memory by computing the average over t $\mathbf { k } _ { i } ^ { Q }$ of the query imvalue prototypes $\mathbf { v } _ { j } ^ { \mu }$ weighted with the cluster assignment probabilities,
78
+
79
+ $$
80
+ \mathbf { y } _ { i } = \sum _ { j = 1 } ^ { N } p ( z = j | \mathbf { k } _ { i } ^ { Q } ) \mathbf { v } _ { j } ^ { \mu } = \frac { 1 } { Z _ { i } } \sum _ { j = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } _ { i } ^ { Q } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 } \right) \mathbf { v } _ { j } ^ { \mu } .
81
+ $$
82
+
83
+ The final attention operation has much similarity with the original dot-product cross attention (1). Note that the key-query similarity in our approach is measured by Euclidian distance instead of a dot-product. Importantly, our formulation (5) attends to a reduced set of $N$ prototypes, while the original attention (1) requires attending to the full spatio-temporal memory of size $H \times W \times T$ .
84
+
85
+ # 3.3 Prototypical Cross-Attention Network
86
+
87
+ Here, we propose the Prototypical Cross-Attention Network (PCAN) for MOTS by integrating our prototypical cross-attention module into both the frame-level and instance-level. The former aims to align and aggregate temporal frame features stored in memory, while the latter is for propagating the instance appearance features over time and produce instance cross-attention maps to help segmentation. Besides, we also design a prototypical instance appearance module to represent each video tracklet with contrastive mixture foreground and background prototypes.
88
+
89
+ # 3.3.1 Frame-level Prototypical Cross-Attention
90
+
91
+ In Figure 2, prototypical cross-attention first produces prototypes by fitting a Gaussian mixtures model (2) to the feature in the memory. To provide further flexibility when dynamically updating the memory compute the $\mathbf { M }$ , we first perforkey prototypes wise clustering for each reference frame feature at , and retrieve the corresponding value embeddings $\hat { t }$ $N$ $\{ \mathbf { k } _ { \hat { t } i } ^ { \mu } \} _ { j = 1 } ^ { N }$ $\{ \mathbf { v } _ { \hat { t } j } ^ { \mu } \} _ { j = 1 } ^ { N }$ using (4) for each memory frame $\hat { t }$ independently. The key and value features are predicted using two parallel convolutional layers.
92
+
93
+ Frame-wise prototypical memory attention Given the query key encoding $\mathbf { k } _ { t i } ^ { Q }$ of the current frame $t$ , we perform prototypical cross-attention to each memory frame $\hat { t }$ independently using our formulation (3) as,
94
+
95
+ $$
96
+ { \bf y } _ { \hat { t } i } = \frac { 1 } { Z _ { \hat { t } \hat { t } } } \sum _ { j = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| { \bf k } _ { t i } - { \bf k } _ { \hat { t } j } ^ { \mu } \| ^ { 2 } \right) { \bf v } _ { \hat { t } j } ^ { \mu } , \qquad Z _ { \hat { t } i } = \sum _ { l = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| { \bf k } _ { t i } ^ { Q } - { \bf k } _ { \hat { t } \hat { t } } ^ { \mu } \| ^ { 2 } \right) .
97
+ $$
98
+
99
+ Note that the index $i$ refers to a spatial coordinate in the current frame. The resulting feature map $\mathbf { y } _ { \hat { t } }$ can intuitively be seen as a projection of features from frame $\hat { t }$ to the current frame. This projection essentially aligns the condensed feature information in frame $\hat { t }$ with the current frame.
100
+
101
+ Temporal feature aggregation Since frame-wise attention does not fuse temporal information, we perform a temporal aggregation. The temporal information $\mathbf { y } _ { \hat { t } }$ in (6) from different frames $\hat { t }$ are fused as a linear combination, weighted by the feature similarity with the current frame. Specifically, the temporally aggregated representation is obtained as
102
+
103
+ $$
104
+ \bar { \mathbf { y } } _ { t i } = \sum _ { \hat { t } = 1 } ^ { t } w _ { \hat { t } i } \mathbf { y } _ { \hat { t } i } , \qquad w _ { \hat { t } i } = \frac { \exp ( \mathbf { y } _ { t i } \cdot \mathbf { y } _ { \hat { t } i } ) } { \sum _ { s = 1 } ^ { t } \exp ( \mathbf { y } _ { t i } \cdot \mathbf { y } _ { s i } ) } .
105
+ $$
106
+
107
+ Note that ${ \hat { t } } = t$ in the sum refers to the value embedding $\mathbf { y } _ { t i } = \mathbf { v } _ { t i } ^ { Q }$ extracted from the current frame. The contribution of each frame $\hat { t }$ is thus weighted by the similarity to this current frame prediction using the attention weights $w _ { \hat { t } i }$ . This strategy ensures that incorrect or dissimilar regions are suppressed when computing the final aggregated feature embedding $\bar { \mathbf { y } } _ { t }$ . To handle object with large-scale variation and produce more fine-grained instance mask prediction, we further extend temporal aggregation to multi-level using different levels of the extracted FPN features, as detailed in the supplementary material.
108
+
109
+ # 3.3.2 Instance-level Prototypical Cross-Attention
110
+
111
+ Contrastive foreground and background representation In additional to the condensed frame-level representation, for more accurate segmentation results, we further encode each tracked object with compact and robust appearance prototypes. To further empower our proposed attention mechanism, we utilize the initially detected object mask to identify each foreground instance. We then separately model the extracted foreground and background features using a GMM (2). We denote the resulting foreground prototypes as $\mathbf { k } _ { t j . } ^ { + }$ and background prototypes as $\mathbf { k } _ { t j } ^ { - }$ . The former thus focuses on the appearance of the specific object, creating a rich and dynamic appearance model. When employed in our prototypical cross-attention framework (Section 3.2), it provides fine-grained attention from localized prototypes that naturally learn to focus specific parts of views of the object, as visualized in Fig. 3. Furthermore, the background prototypes $\mathbf { k } _ { t j } ^ { - }$ capture valuable information about the background appearance, which can greatly alleviate the segmentation process. For each object instance we attend to the foreground and background prototypes separately using (3). The results are concatenated together with the initial mask detection to the Temporal Segmentation Head (TSM) for final prediction, as illustrated in Figure 3.
112
+
113
+ ![](images/0d0831e8e286b63817527cb523139e218cd86186d20191f7a86218e7cec18a22.jpg)
114
+ Figure 3: Our instance-level prototypical attention with foreground and background prototypes and temporal propagation. The foreground/background attention maps from (bottom) demonstrate the localized and discriminative appearance representation. Temporal Segmentation Module (TSM) takes the current frame, initial mask, and instance attention maps as input and generates the final mask.
115
+
116
+ Tracklet feature propagation and updating To effectively model the object appearance change and preserve the most relevant information, we design a recurrent instance appearance updating scheme. From the first video frame where object appears, the accumulated prototypes $\bar { \mathbf { k } } _ { t j } ^ { + }$ , $\bar { \mathbf { k } } _ { t j } ^ { - }$ for the instance are propagated to the subsequent frames and updated with new appearance prototypes $\mathbf { k } _ { t j } ^ { + }$ , $\mathbf { k } _ { t j } ^ { - }$ using an update rate $\lambda$ as,
117
+
118
+ $$
119
+ \bar { \mathbf { k } } _ { t j } ^ { + } = ( 1 - \lambda ) \bar { \mathbf { k } } _ { t - 1 , j } ^ { + } + \lambda \mathbf { k } _ { t j } ^ { + } , \qquad \bar { \mathbf { k } } _ { t j } ^ { - } = ( 1 - \lambda ) \bar { \mathbf { k } } _ { t - 1 , j } ^ { - } + \lambda \mathbf { k } _ { t j } ^ { - } .
120
+ $$
121
+
122
+ Figure 3 also reveals the consistency of the attended region of a specific prototype $j$
123
+
124
+ # 4 Experiments
125
+
126
+ Here, we present comprehensive evaluation and analysis of our approach. Experiments are performed on two large scale datasets, namely YouTube-VIS [46] and BDD100K [50].
127
+
128
+ # 4.1 Experiment setup
129
+
130
+ Youtube-VIS YouTube-VIS-2019 [46] dataset contains 2,883 high quality videos with 131k annotated object instances belonging to 40 diverse categories. The task is to simultaneously classifying, segment and track object instances belonging to these categories. The evaluation metrics for this task are an adaptation of the Average Precision (AP) and Average Recall (AR) of image instance segmentation.
131
+
132
+ BDD100K We also evaluate on the large-scale tracking and segmentation dataset of BDD100K [50], which is a challenging self-driving dataset with 154 videos (30,817 images) for training, 32 videos (6,475 images) for validation, and 37 videos (7,484 images) for testing. The dataset provides 8 annotated categories for evaluation, where the images in the tracking set are annotated per 5 FPS with 30 FPS frame rate. We adopt the well-established MOTS metrics [37] to our task.
133
+
134
+ Implementation details We implement PCAN based on two different existing MOTS approaches. For Youtube-VIS, we adopt ResNet with FPN pre-trained on COCO as the backbone, and build our segmentation tracker on the one-stage segmentation model [5]. Both the instance and frame cross-attention is built on the extracted FPN features. Our model is trained with initial learning rate 0.0025 on 4 GPUs using SGD, and executes with a speed of 15.0 FPS on ResNet-50. Similar to [46, 22, 18], we use the input size $3 6 0 \times 6 4 0$ for training. On BDD100K, we build PCAN by extending the two-stage MOT method [29] with our temporal segmentation modules. We follow the same training strategy of QDTrack-mots [29]. More details can be found in supplemental material.
135
+
136
+ Table 1: Comparison with state-of-the-art on the YouTube-VIS validation set. Results are reported in terms of mask accuracy (AP) and recall (AR). Asterisks ∗ denote concurrent works on arXiv.
137
+
138
+ <table><tr><td>Method</td><td>Backbone</td><td>Type</td><td>Online</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>VisTr*[41]</td><td>ResNet-50</td><td>Transformer</td><td>×</td><td>35.6</td><td>56.8</td><td>37.0</td><td>35.2</td><td>40.2</td></tr><tr><td>OSMN [47]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>23.4</td><td>36.5</td><td>25.7</td><td>28.9</td><td>31.1</td></tr><tr><td>FEELVOS [36]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>26.9</td><td>42.0</td><td>29.7</td><td>29.9</td><td>33.4</td></tr><tr><td>DeepSORT[42]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>26.1</td><td>42.9</td><td>26.1</td><td>27.8</td><td>31.3</td></tr><tr><td>MaskTrack R-CNN [46]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>30.3</td><td>51.1</td><td>32.6</td><td>31.0</td><td>35.5</td></tr><tr><td>STEm-Seg[1]</td><td>ResNet-50</td><td> One-stage</td><td></td><td>30.6</td><td>50.7</td><td>33.5</td><td>31.6</td><td>37.1</td></tr><tr><td>SipMask [5]</td><td>ResNet-50</td><td>One-stage</td><td></td><td>32.5</td><td>53.0</td><td>33.3</td><td>33.5</td><td>38.9</td></tr><tr><td>STMask*[18]</td><td>ResNet-50</td><td>One-stage</td><td>x&lt;&gt;</td><td>33.5</td><td>52.1</td><td>36.9</td><td>31.1</td><td>39.2</td></tr><tr><td>SG-Net* [22]</td><td>ResNet-50</td><td>One-stage</td><td>√</td><td>34.8</td><td>56.1</td><td>36.8</td><td>35.8</td><td>40.8</td></tr><tr><td>PCAN (Ours)</td><td>ResNet-50</td><td>One-stage</td><td>√</td><td>36.1</td><td>54.9</td><td>39.4</td><td>36.3</td><td>41.6</td></tr><tr><td>STMask*[18]</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>36.3</td><td>55.2</td><td>39.9</td><td>33.7</td><td>42.0</td></tr><tr><td>SG-Net* [22]</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>36.3</td><td>57.1</td><td>39.6</td><td>35.9</td><td>43.0</td></tr><tr><td>PCAN (Ours)</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>37.6</td><td>57.2</td><td>41.3</td><td>37.2</td><td>43.9</td></tr></table>
139
+
140
+ Table 2: State-of-the-art comparison on the BDD100K segmentation tracking validation set. I: ImageNet. C: COCO. S: Cityscapes. B: BDD100K. "-fix" means adopting the pretrained model from the BDD100K tracking set, fixing the existing parts, and only training the added mask head.
141
+
142
+ <table><tr><td>Method</td><td>Pretrained</td><td>Online</td><td>mMOTSA↑</td><td>mMOTSP↑</td><td>mIDF个</td><td>ID sw.↓</td><td>mAP↑</td></tr><tr><td>SortIoU</td><td>I, C, S</td><td>√</td><td>10.3</td><td>59.9</td><td>21.8</td><td>15951</td><td>22.2</td></tr><tr><td>MaskTrackRCNN [36]</td><td>I, C, S</td><td>√</td><td>12.3</td><td>59.9</td><td>26.2</td><td>9116</td><td>22.0</td></tr><tr><td>STEm-Seg [1]</td><td>1,C, s</td><td>×</td><td>12.2</td><td>58.2</td><td>25.4</td><td>8732</td><td>21.8</td></tr><tr><td>QDTrack-mots [29]</td><td>1, C,S</td><td>√</td><td>22.5</td><td>59.6</td><td>40.8</td><td>1340</td><td>22.4</td></tr><tr><td>QDTrack-mots-fix [29]</td><td>I, B</td><td>√</td><td>23.5</td><td>66.3</td><td>44.5</td><td>973</td><td>25.5</td></tr><tr><td>PCAN (Ours)</td><td>I,B</td><td>√</td><td>27.4</td><td>66.7</td><td>45.1</td><td>876</td><td>26.6</td></tr></table>
143
+
144
+ # 4.2 State-of-the-Art Comparison
145
+
146
+ We compare our approach with the state-of-the-art methods on the aforementioned large-scale MOTS/VIS benchmarks Youtube-VIS and BDD100K, where PCAN outperforms all existing methods without bells and whistles, and shows efficacy to both one-stage and two-stage segmentation frameworks. We follow the official metrics of each benchmark to evaluate our model.
147
+
148
+ Youtube-VIS The results of Youtube-VIS benchmark is in Table 1, where PCAN achieves the best mask AP of $3 6 . 1 \%$ using ResNet-50 and $3 7 . 6 \%$ using ResNet-101 respectively, while being an online method. Our approach consistently surpasses most recent SOTA methods, including STMask [18] and SG-Net [22] by a significant margin. These methods only conduct temporal modeling between two adjacent frames for feature correlation. Compared to our baseline SipMask [5], a single-image based segmentation with object centerness association, PCAN improves the mask AP from $3 2 . 5 \%$ to $3 6 . 1 \%$ , which shows the effectiveness of long-term temporal modeling in helping object tracking and segmentation.
149
+
150
+ BDD100K Table 2 shows our results on BDD100K tracking and segmentation benchmark, where PCAN outperforms the strong baseline methods MaskTrackRCNN [46] and QDTrack-mots [29]. Our approach achieves a large advantage in mMOTSA, with over 3 points gain and around $10 \%$ ID switches decrease. MOTSA measures segmentation as well as tracking quality, while ID Switches can measure the performance of identity consistency. The significant advancements demonstrate that our method with prototypical cross-attention enables more accurate pixel-wise object tracking by effectively exploiting temporal information.
151
+
152
+ # 4.3 Ablation study and analysis
153
+
154
+ We conduct detailed ablation studies on Youtube-VIS validation set, where we investigate the effect of our proposed prototypical cross-attention components for MOTS during training and testing.
155
+
156
+ Effect of frame-level prototypical cross-attention module To study the importance of temporal information amount, we conduct an ablation study on models with different input temporal window lengths in Table 3. A temporal length of 1 thus means that no prior temporal information guidance is used during video instance segmentation. By varying the frame length from 1 to 32, the mask AP increases from $3 2 . 5 \%$ to $3 5 . 4 \%$ , which reveals that richer temporal information with multiple views of a segmented object indeed brings more gain to model performance. For the number of frame-level prototypes, we used 64 during training and testing. The results on YouTube-VIS in Table 8 show that the precision saturates for larger numbers of prototypes.
157
+
158
+ Table 3: Results of varying temporal memory length in our PCAN on YouTube-VIS.
159
+
160
+ <table><tr><td>Length</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>1</td><td>32.5</td><td>53.0</td><td>33.3</td><td>33.5</td><td>38.9</td></tr><tr><td>2</td><td>33.7</td><td>53.8</td><td>35.3</td><td>33.9</td><td>39.5</td></tr><tr><td>4</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr><tr><td>8</td><td>34.2</td><td>53.7</td><td>37.6</td><td>34.4</td><td>40.3</td></tr><tr><td>16</td><td>34.6</td><td>53.7</td><td>38.3</td><td>35.4</td><td>40.5</td></tr><tr><td>32</td><td>35.4</td><td>53.8</td><td>39.1</td><td>35.9</td><td>41.0</td></tr></table>
161
+
162
+ Table 4: Effect of multi-layer prototypical feature fusion with tube length 4 on YouTube-VIS.
163
+
164
+ <table><tr><td>FPN Layer</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>P3</td><td>30.8</td><td>51.7</td><td>32.0</td><td>32.6</td><td>37.0</td></tr><tr><td>P4</td><td>32.0</td><td>51.5</td><td>34.1</td><td>32.6</td><td>37.2</td></tr><tr><td>P5</td><td>32.9</td><td>52.1</td><td>35.9</td><td>33.2</td><td>38.6</td></tr><tr><td>P3-P4</td><td>33.1</td><td>52.3</td><td>35.6</td><td>33.6</td><td>38.5</td></tr><tr><td>P3-P5</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr></table>
165
+
166
+ Table 5: Comparison with non-local attention [39] and transformer [6, 41] on YouTube-VIS.
167
+
168
+ <table><tr><td rowspan="2">Length</td><td colspan="3">Prototypical Cross-Attention</td><td colspan="3">Non-local Attention</td><td colspan="3">Transformer (Multi-Head Self-Attention)</td></tr><tr><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td></tr><tr><td>2</td><td>33.7</td><td>5.8</td><td>323</td><td>33.2</td><td>24.3</td><td>2497</td><td>24.6</td><td>103.8</td><td>5321</td></tr><tr><td>4</td><td>33.9</td><td>12.0</td><td>652</td><td>33.3</td><td>49.1</td><td>4763</td><td>25.8</td><td>387.2</td><td>9844</td></tr><tr><td>8</td><td>34.2</td><td>23.7</td><td>1419</td><td>33.6</td><td>99.6</td><td>9631</td><td>28.3</td><td>1413.3</td><td>18762</td></tr></table>
169
+
170
+ ![](images/c76ee7c6980393304488d4699b6a5c3971b1bb8d922650744576ad064f7e6827.jpg)
171
+ Figure 4: Qualitative impact of our PCAM on YouTube-VIS. Mask colors encode object identity. Our frame-level PCAM (second row) helps provide consistent detections and preserve identities compared to the baseline (first row). The instance-level PCAM (fourth row) provides more accurate masks, while further improving identity consistency compared to not employing our module (third row).
172
+
173
+ Effect of multi-layer temporal aggregation Since we perform temporal feature aggregation on the extracted FPN features, to help deal with objects with partial occlusion and large-scale variation, we also study the effect of using different levels of the extracted FPN features. In Table 4, we select the FPN feature map from P3-P5 layers for (excluding P6 and P7 due to impractical computation cost), and perform prototypical temporal aggregation on each FPN layer. We find that multi-layer information is also important to final model performance.
174
+
175
+ Computation and memory efficiency In Table 5 we analyze different attention mechanisms. Compared to standard space-time memory reading using non-local attention [39, 28] or recent popular transformer [41, 6] with multi-head self-attention layer, the prototypical cross-attention with condensed prototypes not only enjoys high accuracy advantage, but also largely reduces the memory consumption and computation amount. For input tube length 8, the prototypical memory consumption is less than $10 \%$ of the transformer with negligible FLOPs computation due to the small number of representative prototypes in (5).
176
+
177
+ Effect of instance-level prototypical appearance module We analyze the instance-level prototypical cross-attention module, which represents each video tracklet using the contrastive prototypes. In
178
+
179
+ Table 6: Ablation study on number of instancelevel prototypes on YouTube-VIS.
180
+
181
+ <table><tr><td rowspan=1 colspan=1>Pos.Proto.Number丨Neg.Proto.Number</td><td rowspan=1 colspan=1>Pos.Proto.Number丨Neg.Proto.Number</td><td rowspan=1 colspan=1>AP AP50</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>32.5 53.0</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>32.4 52.3</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32.1 52.4</td></tr><tr><td rowspan=2 colspan=1>15</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32.7 52.8</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>33.1 53.6</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>33.9 54.1</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>33.6 53.8</td></tr></table>
182
+
183
+ Table 7: Ablation on instance-level EM feature propagation and updating on YouTube-VIS.
184
+
185
+ <table><tr><td>version</td><td>AP</td><td>AP50</td></tr><tr><td>No instance prototype propagation</td><td>33.5</td><td>53.2</td></tr><tr><td>Using initial instance prototype</td><td>33.0</td><td>52.8</td></tr><tr><td>Update momentum = 0.2</td><td>34.3</td><td>53.8</td></tr><tr><td>Update momentum = 0.5</td><td>34.0</td><td>53.6</td></tr></table>
186
+
187
+ Table 8: Ablation on number of framelevel prototypes on YouTube-VIS.
188
+
189
+ <table><tr><td>Proto.Number</td><td>AP</td><td>AP50</td></tr><tr><td>8</td><td>32.6</td><td>52.8</td></tr><tr><td>16</td><td>33.1</td><td>53.3</td></tr><tr><td>32</td><td>33.9</td><td>53.5</td></tr><tr><td>64</td><td>34.2</td><td>53.7</td></tr><tr><td>128</td><td>34.1</td><td>53.8</td></tr></table>
190
+
191
+ Table 9: Results of varying EM iterations for our PCAN on YouTube-VIS.
192
+
193
+ <table><tr><td>Iteration number</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>1</td><td>33.3</td><td>53.4</td><td>35.8</td><td>33.2</td><td>38.8</td></tr><tr><td>2</td><td>33.7</td><td>53.9</td><td>36.4</td><td>33.6</td><td>39.3</td></tr><tr><td>4</td><td>33.7</td><td>54.1</td><td>36.5</td><td>33.9</td><td>39.5</td></tr><tr><td>6</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr><tr><td>8</td><td>33.6</td><td>53.6</td><td>36.1</td><td>33.7</td><td>39.3</td></tr></table>
194
+
195
+ Table 6, we study the influence of instance prototype number and the effect of foreground-background contrasting. Using both positive and negative prototypes improves AP from $3 2 . 5 \%$ to $3 3 . 9 \%$ . Compared to the single prototype representation, the GMM demonstrate a stronger appearance modeling ability. We further find that the performance saturates when the number is larger than 60. In the Figure 6 and supplementary file, we provide additional instance cross-attention maps visualization to highlight the various attended regions.
196
+
197
+ In Table 7, we investigate the effectiveness of instance prototype (including the both positive and negative ones) propagation in an online manner, and compared it with using the instance prototype in the initial frame or current frame. We find that updating object prototypes recurrently with a momentum of 0.2 improves video segmentation AP of $1 . 3 \%$ .
198
+
199
+ Influence of EM iteration number We study the influence of EM iteration number $T$ during condensing prototypes and the results are shown in Table 9. Using temporal memory length 4, we find that the accuracy gains of PCAN increase with more iterations from 1 to 6, and the improvement starts to saturate when $T \geqslant 6$ . We use the same iteration number during training and test.
200
+
201
+ Ablation study on KITTI-MOTS We also train PCAN on the KITTI-MOTS [37] training set and conduct ablations on the instance and frame PCAMs. In Table 10, PCAN with window size 8 on val set also shows significant improvements compared to the TrackR-CNN [37] (a two-stage tracker based on Mask R-CNN) on the benchmark. Note that many published methods on KITTI-MOTS, such as Vip-DeepLab [31], EagerMOT [17] and MOTSFusion [24], use 3D bounding boxes, LIDAR point clouds, or optical flow (PointTrack [44]). In contrast, our method only relies on RGB images.
202
+
203
+ Qualitative analysis In Figure 4, we showcase qualitative ablation results of PCAN on Youtube-VIS. Compared to the baseline, we see that our model results in more consistent segmentation and better tracking using prototypical cross-attention module. We also provide visual results on BDD100K in Figure 5, where PCAN produces robust tracking and segmentation results even under large object appearance change (first row) or low illumination (second row). In the 3rd row, PCAN has limitations in handling missing detections (the person in the first frame) with limited appearance information under extreme lighting, and produce tracking errors in the second frame when visible parts of the same car is totally different across frame and with low appearance similarity.
204
+
205
+ Cross-Attention Visualization In Figure 6, we visualize instance-level prototypical cross-attention of the interested car for both the corresponding foreground and background regions on three continuous frames on BDD100K, where the attended region of each object prototype reveals the implicit unsupervised temporal consistency. More visualization cases on instance and frame cross-attention maps and relevant analysis are in the supplementary file.
206
+
207
+ Societal impact PCAN has high potential impact in important applications, such as transportation, sports analysis, and self-driving vehicles. However, this powerful technology can be deployed in human monitoring and surveillance as well which raise ethical and privacy issues. Potential negative impact can be avoided by enforcing a strict and secure data privacy regulation such as the GDPR,
208
+
209
+ Table 10: Ablation study of PCAN on KITTI-MOTS [37] validation set.
210
+
211
+ <table><tr><td>Method</td><td>|Car-MOTSA</td><td>Ped-MOTSA</td><td>Car-MOTSP</td><td>Ped-MOTSP</td></tr><tr><td>TrackR-CNN [37]</td><td>87.8</td><td>65.1</td><td>87.2</td><td>75.7</td></tr><tr><td rowspan="3">PCAN w/o frame PCAM PCAN w/o instance PCAM</td><td>87.3</td><td>65.3</td><td>86.9</td><td>75.0</td></tr><tr><td>87.8</td><td>65.8</td><td>87.1</td><td>75.5</td></tr><tr><td>89.6</td><td>66.4</td><td>88.3</td><td>76.1</td></tr></table>
212
+
213
+ ![](images/43f2b11ee05e974f625ef7fa9c6ca494b65750d3481407d6beccb7f126aa5d06.jpg)
214
+ Figure 5: Qualitative results of our method on BDD100K. PCAN produces robust tracking and segmentation results under large motion and appearance changes (1st row) and heavy traffic in low-light conditions (2nd row). In the 3rd row, PCAN misses a detection (the person to the left in 1st frame), and produces tracking errors (2nd frame) when it covers totally different regions of the car with low appearance similarity. Zoom for better view. Video results are in the suppl. file.
215
+
216
+ ![](images/4685f107e82d0332bd9ca6ab4b5b4295cba1dbb068fc8f484d749cefb0c32c5f.jpg)
217
+ Figure 6: Instance cross-attention maps visualization for the car specified by the red dotted bounding box on BDD100K. We select the first four foreground/background prototypes as example, where each one focuses on specific car sub-regions with implicit unsupervised temporal consistency over time. proper technology management education, and having an open dialogue among various stakeholders on how such technology should be deployed and regulated.
218
+
219
+ # 5 Conclusion
220
+
221
+ We present PCAN, a new online method for MOTS. PCAN first distills the space-time memory into a set of frame-level and instance-level prototypes, followed by cross-attention to retrieve rich information from the past frames. In contrast to most previous MOTS methods with limited temporal consideration, PCAN efficiently performs long-term temporal propagation and aggregation, and achieves large performance gain on the two largest MOTS benchmarks with low computation and memory cost. We validate the efficacy of PCAN on both the existing one-stage and two-stage trackers. We believe PCAN will significantly benefit more video understanding tasks in the future.
222
+
223
+ # Acknowledgments and Disclosure of Funding
224
+
225
+ This research is supported in part by the Research Grant Council of the Hong Kong SAR under grant no. 16201818 and Kuaishou Technology.
226
+
227
+ # References
228
+
229
+ [1] Ali Athar, Sabarinath Mahadevan, Aljoša Ošep, Laura Leal-Taixé, and Bastian Leibe. Stem-seg: Spatiotemporal embeddings for instance segmentation in videos. In ECCV, 2020. [2] Gedas Bertasius and Lorenzo Torresani. Classifying, segmenting, and tracking object instances in video with mask propagation. In CVPR, 2020.
230
+ [3] Daniel Bolya, Chong Zhou, Fanyi Xiao, and Yong Jae Lee. Yolact: Real-time instance segmentation. In ICCV, 2019.
231
+ [4] Sergi Caelles, Kevis-Kokitsi Maninis, Jordi Pont-Tuset, Laura Leal-Taixé, Daniel Cremers, and Luc Van Gool. One-shot video object segmentation. In CVPR, 2017.
232
+ [5] Jiale Cao, Rao Muhammad Anwer, Hisham Cholakkal, Fahad Shahbaz Khan, Yanwei Pang, and Ling Shao. Sipmask: Spatial information preservation for fast image and video instance segmentation. In ECCV, 2020.
233
+ [6] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020.
234
+ [7] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. $a ^ { 2 }$ -nets: Double attention networks. In NeurIPS, 2018.
235
+ [8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020.
236
+ [9] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In ICCV, 2019.
237
+ [10] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012.
238
+ [11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In ICCV, 2017.
239
+ [12] Ping Hu, Fabian Caba, Oliver Wang, Zhe Lin, Stan Sclaroff, and Federico Perazzi. Temporally distributed networks for fast video semantic segmentation. In CVPR, 2020.
240
+ [13] Zhaojin Huang, Lichao Huang, Yongchao Gong, Chang Huang, and Xinggang Wang. Mask scoring r-cnn. In CVPR, 2019.
241
+ [14] Joakim Johnander, Martin Danelljan, Emil Brissman, Fahad Shahbaz Khan, and Michael Felsberg. A generative appearance model for end-to-end video object segmentation. In CVPR, 2019.
242
+ [15] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Deep occlusion-aware instance segmentation with overlapping bilayers. In CVPR, 2021.
243
+ [16] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Occlusion-aware video object inpainting. In ICCV, 2021.
244
+ [17] Aleksandr Kim, Aljoša Ošep, and Laura Leal-Taix’e. Eagermot: 3d multi-object tracking via sensor fusion. In IEEE International Conference on Robotics and Automation (ICRA), 2021.
245
+ [18] Minghan Li, Shuai Li, Lida Li, and Lei Zhang. Spatial feature calibration and temporal fusion for effective one-stage video instance segmentation. In CVPR, 2021.
246
+ [19] Xia Li, Zhisheng Zhong, Jianlong Wu, Yibo Yang, Zhouchen Lin, and Hong Liu. Expectation-maximization attention networks for semantic segmentation. In ICCV, 2019.
247
+ [20] Yingwei Li, Xiaojie Jin, Jieru Mei, Xiaochen Lian, Linjie Yang, Cihang Xie, Qihang Yu, Yuyin Zhou, Song Bai, and Alan L Yuille. Neural architecture search for lightweight non-local networks. In CVPR, 2020.
248
+ [21] Chung-Ching Lin, Ying Hung, Rogerio Feris, and Linglin He. Video instance segmentation tracking with a modified vae architecture. In CVPR, 2020.
249
+ [22] Dongfang Liu, Yiming Cui, Wenbo Tan, and Yingjie Chen. Sg-net: Spatial granularity network for one-stage video instance segmentation. In CVPR, 2021.
250
+ [23] Xiankai Lu, Wenguan Wang, Danelljan Martin, Tianfei Zhou, Jianbing Shen, and Van Gool Luc. Video object segmentation with episodic graph memory networks. In ECCV, 2020.
251
+ [24] Jonathon Luiten, Tobias Fischer, and Bastian Leibe. Track to reconstruct and reconstruct to track. IEEE Robotics and Automation Letters, 5(2):1803–1810, 2020.
252
+ [25] Tim Meinhardt, Alexander Kirillov, Laura Leal-Taixe, and Christoph Feichtenhofer. Trackformer: Multiobject tracking with transformers. arXiv preprint arXiv:2101.02702, 2021.
253
+ [26] Anton Milan, Laura Leal-Taixé, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016.
254
+ [27] Anton Milan, Laura Leal-Taixé, Konrad Schindler, and Ian Reid. Joint tracking and segmentation of multiple targets. In CVPR, 2015.
255
+ [28] Seoung Wug Oh, Joon-Young Lee, Ning Xu, and Seon Joo Kim. Video object segmentation using space-time memory networks. In ICCV, 2019.
256
+ [29] Jiangmiao Pang, Linlu Qiu, Xia Li, Haofeng Chen, Qi Li, Trevor Darrell, and Fisher Yu. Quasi-dense similarity learning for multiple object tracking. In CVPR, 2021.
257
+ [30] Jiyang Qi, Yan Gao, Yao Hu, Xinggang Wang, Xiaoyu Liu, Xiang Bai, Serge Belongie, Alan Yuille, Philip Torr, and Song Bai. Occluded video instance segmentation. arXiv preprint arXiv:2102.01558, 2021.
258
+ [31] Siyuan Qiao, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Vip-deeplab: Learning visual perception with depth-aware video panoptic segmentation. In CVPR, 2021.
259
+ [32] Hongje Seong, Junhyuk Hyun, and Euntai Kim. Kernelized memory network for video object segmentation. In ECCV, 2020.
260
+ [33] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017.
261
+ [34] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In ICCV, 2019.
262
+ [35] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
263
+ [36] Paul Voigtlaender, Yuning Chai, Florian Schroff, Hartwig Adam, Bastian Leibe, and Liang-Chieh Chen. Feelvos: Fast end-to-end embedding learning for video object segmentation. In CVPR, 2019.
264
+ [37] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger, and Bastian Leibe. Mots: Multi-object tracking and segmentation. In CVPR, 2019.
265
+ [38] Apoorv Vyas, Angelos Katharopoulos, and François Fleuret. Fast transformers with clustered attention. NeurIPS, 2020.
266
+ [39] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018.
267
+ [40] Xiaolong Wang and Abhinav Gupta. Videos as space-time region graphs. In ECCV, 2018.
268
+ [41] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. arXiv preprint arXiv:2011.14503v1, 2020.
269
+ [42] Nicolai Wojke, Alex Bewley, and Dietrich Paulus. Simple online and realtime tracking with a deep association metric. In IEEE international conference on image processing (ICIP), 2017.
270
+ [43] Haozhe Xie, Hongxun Yao, Shangchen Zhou, Shengping Zhang, and Wenxiu Sun. Efficient regional memory network for video object segmentation. In CVPR, 2021.
271
+ [44] Zhenbo Xu, Wei Zhang, Xiao Tan, Wei Yang, Huan Huang, Shilei Wen, Errui Ding, and Liusheng Huang. Segment as points for efficient online multi-object tracking and segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), 2020.
272
+ [45] Boyu Yang, Chang Liu, Bohao Li, Jianbin Jiao, and Qixiang Ye. Prototype mixture models for few-shot semantic segmentation. In ECCV, 2020.
273
+ [46] Linjie Yang, Yuchen Fan, and Ning Xu. Video instance segmentation. In ICCV, 2019.
274
+ [47] Linjie Yang, Yanran Wang, Xuehan Xiong, Jianchao Yang, and Aggelos K Katsaggelos. Efficient video object segmentation via network modulation. In CVPR, 2018.
275
+ [48] Shusheng Yang, Yuxin Fang, Xinggang Wang, Yu Li, Chen Fang, Ying Shan, Bin Feng, and Wenyu Liu. Crossover learning for fast online video instance segmentation. In ICCV, 2021.
276
+ [49] Zongxin Yang, Yunchao Wei, and Yi Yang. Collaborative video object segmentation by foregroundbackground integration. In ECCV, 2020.
277
+ [50] Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In CVPR, 2020.
278
+ [51] Chi Zhang, Guosheng Lin, Fayao Liu, Rui Yao, and Chunhua Shen. Canet: Class-agnostic segmentation networks with iterative refinement and attentive few-shot learning. In CVPR, 2019.
parse/train/5-GXHFNbq_U/5-GXHFNbq_U_content_list.json ADDED
@@ -0,0 +1,1209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Prototypical Cross-Attention Networks for Multiple Object Tracking and Segmentation ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 233,
8
+ 122,
9
+ 763,
10
+ 174
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Lei $\\mathbf { K e } ^ { 1 , 2 }$ Xia Li1 Martin Danelljan1 Yu-Wing Tai3 Chi-Keung Tang2 Fisher ${ \\bf { Y } } { \\bf { u } } ^ { 1 }$ 1ETH Zürich 2HKUST 3Kuaishou Technology {lkeab,cktang}@cse.ust.hk, {xia.li,martin.danelljan}@vision.ee.ethz.ch yuwing@gmail.com, i@yf.io ",
17
+ "bbox": [
18
+ 191,
19
+ 224,
20
+ 810,
21
+ 282
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": "Multiple object tracking and segmentation requires detecting, tracking, and segmenting objects belonging to a set of given classes. Most approaches only exploit the temporal dimension to address the association problem, while relying on single frame predictions for the segmentation mask itself. We propose Prototypical Cross-Attention Network (PCAN), capable of leveraging rich spatio-temporal information for online multiple object tracking and segmentation. PCAN first distills a space-time memory into a set of prototypes and then employs cross-attention to retrieve rich information from the past frames. To segment each object, PCAN adopts a prototypical appearance module to learn a set of contrastive foreground and background prototypes, which are then propagated over time. Extensive experiments demonstrate that PCAN outperforms current video instance tracking and segmentation competition winners on both Youtube-VIS and BDD100K datasets, and shows efficacy to both one-stage and two-stage segmentation frameworks. Code and video resources are available at http://vis.xyz/pub/pcan. ",
40
+ "bbox": [
41
+ 227,
42
+ 349,
43
+ 766,
44
+ 542
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 566,
55
+ 310,
56
+ 583
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Multiple object tracking and segmentation (MOTS), also known as Video Instance Segmentation (VIS), is an important problem with many real-world applications, including autonomous driving [10, 26] and video analysis [4, 46]. The task involves tracking and segmenting all objects within a video from a given set of semantic classes. We are witnessing rapidly growing research interest on MOTS thanks to the introduction of large scale benchmarks [46, 50, 37]. State-of-the-art methods [46, 5, 37, 29] for MOTS mainly follow the tracking-by-detection paradigm, where objects are first detected and segmented in individual frames and then associated over time. ",
63
+ "bbox": [
64
+ 174,
65
+ 598,
66
+ 825,
67
+ 695
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Although methods based on the popular tracking-by-detection philosophy have shown promising results, temporal modeling is limited to the object association phase [46, 5, 22] and only between two adjacent frames [37, 18]. On the other hand, the temporal dimension carries rich information about the scene. The information encoded in multiple temporal views of an object has the potential of improving the quality of predicted segmentation, localization, and categories. However, effectively and efficiently leveraging the rich temporal information remains a challenge. While sequential modeling has been applied for video processing [40, 41, 9, 28, 12], these methods generally operate directly on the high-resolution deep features, requiring large computational and memory consumption, which greatly limits their use. ",
74
+ "bbox": [
75
+ 174,
76
+ 702,
77
+ 825,
78
+ 825
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We propose a Prototypical Cross-Attention Module, termed PCAM, to leverage temporal information for multiple object tracking and segmentation. As illustrated in Figure 1, the module first distills spatiotemporal information into condensed prototypes using clustering based on Expectation Maximization. The resulting prototypes, composed of Gaussian Components, yield a rich and generalizable yet compact representation of the past visual features. Given a deep feature embedding of the current frame, PCAM then employs prototypical cross-attention to read relevant information from prior frames. ",
85
+ "bbox": [
86
+ 174,
87
+ 832,
88
+ 825,
89
+ 902
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/f9dada9f50f662cbde9d5b8cc24676fef8cba7e325d838b30e8e3626365616f6.jpg",
96
+ "image_caption": [
97
+ "Figure 1: We propose Prototypical Cross-Attention Network for MOTS, which first condenses the space-time memory and high-resolution frame embeddings into frame-level and instance-level prototypes. These are then employed to retrieve rich temporal information from past frames by our efficient prototypical cross-attention operation. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 246,
102
+ 92,
103
+ 750,
104
+ 297
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 382,
114
+ 821,
115
+ 410
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Based on the noise-reduced clustered video features information, we further develop a Prototypical Cross-Attention Network (PCAN) for MOTS, that integrates the general PCAM at two stages in the network: on the frame-level and instance-level. The former reconstructs and aligns temporal past frame features with current frame, while the instance level integrates specific information about each object in the video. For robustness to object appearance change, PCAN represents each object instance by learning sets of contrastive foreground and background prototypes, which are propagated in an online manner. With a limited number of prototypes for each instance or frame, PCAN efficiently performs long-range feature aggregation and propagation in a video with linear complexity. Consequently, our PCAN outperforms standard non-local attention [40] and video transformer [41] on both the large-scale Youtube-VIS and BDD100K MOTS benchmarks. ",
122
+ "bbox": [
123
+ 174,
124
+ 417,
125
+ 825,
126
+ 555
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Our main contributions are summarized as follows: (i) We introduce the PCAN module for efficiently utilizing long-term spatio-temporal video information. (ii) We develop a MOTS approach that employs PCAN on frame and instance-level. (iii) We further represent the appearance of each video tracklet with contrastive foreground and background prototypes, which are propagated over time. (iv) We extensively analyze our approach. Our PCAN outperforms previous approaches on the challenging self-driving dataset BDD100K [50] and the semantically diverse YouTube-VIS dataset [46]. ",
133
+ "bbox": [
134
+ 174,
135
+ 561,
136
+ 825,
137
+ 645
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 Related work ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 174,
147
+ 665,
148
+ 316,
149
+ 681
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "Video instance segmentation (VIS) Existing VIS methods [46, 2, 21] widely adapt the twostage paradigm of Mask R-CNN [11] and its variants [13, 15] by adding an additional tracking branch. Thus, their typical pipelines first detect regions of interest (RoIs) and then use the instance features after RoIAlign to regress object mask and associate cross-frame instances. More recent works [5, 18, 22, 48] employ a one-stage instance segmentation method, e.g. the anchor-free FCOS detector [34], which predicts a linear combination of mask bases [3] as its final segmentation. The aforementioned approaches make very limited use of temporal information to enhance the quality of the segmentation, instead relying on single image-based mask prediction, or only model short-term temporal correlation between two consecutive frames [18, 30]. In the context of long-term temporal association, the offline method VisTr [41] adapts vision transformer [6] for VIS, but suffers from a huge computational burden and memory consumption due to the dense pixel-level attention operations over long sequences. Compared to these methods, our PCAN temporally aggregates and propagates the prototypical features with both the long-term benefit and linear complexity. ",
156
+ "bbox": [
157
+ 174,
158
+ 696,
159
+ 825,
160
+ 876
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Multiple Object Tracking and Segmentation (MOTS) Similar to VIS, MOTS methods [37, 27, 29] mainly follow the tracking-by-detection paradigm. Objects are first detected and segmented, followed by association between frames. Track R-CNN [37] integrates temporal context feature from two neighboring frames using 3D convolutions. TrackFormer [25] performs joint object detection and tracking by recurrently using Transformers, while Stem-Seg [1] adopts a short 3D convolutional spatio-temporal volume to learn pixel embedding by treating segmentation as a bottom-up grouping. In contrast, our approach clusters appearance features in a long spatio-temporal volume with explicit foreground and background prototypes that are updates online. Besides, the mixture Gaussian components in instance appearance module equips PCAN a stronger modeling ability compared to instance-level average pooling [33, 49] or single Gaussian model [51, 14]. ",
167
+ "bbox": [
168
+ 174,
169
+ 882,
170
+ 821,
171
+ 911
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "",
178
+ "bbox": [
179
+ 173,
180
+ 90,
181
+ 825,
182
+ 203
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Temporal attention models Video understanding usually requires long-range sequential modeling of relations between spatio-temporal locations. Recently, attention-based approaches, such as non-local attention [40, 39, 28, 12] and transformers [8, 35, 16], have been successfully adopted in video classification and action recognition. These tasks [23, 32, 43] involve dense pixel-level attention, leading to quadratic complexity in the sequence length, thus making them excessively expensive for long sequences. Improved temporal attention models mainly include double attention mechanism [7] on image recognition with global-local decomposition, and clustered attention Transformer [38] for language sequence modeling. Besides, recent prototypical methods [19, 45] use the EM algorithm for single-image semantic segmentation or few-shot learning [33]. Unlike these methods, our PCAN uses compact prototypical representation both for temporal feature aggregation and compact instance appearance feature propagation. ",
189
+ "bbox": [
190
+ 174,
191
+ 208,
192
+ 825,
193
+ 361
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "3 Method ",
200
+ "text_level": 1,
201
+ "bbox": [
202
+ 174,
203
+ 378,
204
+ 271,
205
+ 396
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "We propose an approach for Multiple Object Tracking and Segmentation. Given a video sequence, the goal is to detect, track, and segment objects from a predefined set of object categories. Specifically, we consider the online setting, where the predictions only depend on current and past frames. ",
212
+ "bbox": [
213
+ 174,
214
+ 409,
215
+ 825,
216
+ 452
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "3.1 Traditional Cross-Attention ",
223
+ "text_level": 1,
224
+ "bbox": [
225
+ 174,
226
+ 467,
227
+ 406,
228
+ 482
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "To utilize the rich temporal information to improve the segmentation prediction, recent approaches [28, 12] have employed cross-attention. We consider past spatio-temporal information encoded in a memory M, consisting of deep features of size $H \\times W \\times T \\times C$ . The memory encapsulates valuable information about the past appearances and predictions of objects and background in a scene. To attend to the memory, the information is first separately embedded into key $\\mathbf { k } ^ { M }$ and value $\\mathbf { v } ^ { M }$ feature vectors. The keys are used to address relevant memories whose corresponding values are returned. The standard memory reading process is a non-local operation computed as the weighted sum, ",
235
+ "bbox": [
236
+ 173,
237
+ 492,
238
+ 826,
239
+ 592
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "equation",
245
+ "img_path": "images/fb353697a8e0eab2e7444438043fd302d2da09a647e6bbe216e08adc1b8988a8.jpg",
246
+ "text": "$$\ny _ { i } = \\frac { 1 } { Z _ { i } } \\sum _ { j = 1 } ^ { H \\times W \\times T } \\exp ( \\mathbf { k } _ { i } ^ { Q } \\cdot \\mathbf { k } _ { j } ^ { M } ) \\mathbf { v } _ { j } ^ { M } ,\n$$",
247
+ "text_format": "latex",
248
+ "bbox": [
249
+ 377,
250
+ 594,
251
+ 619,
252
+ 640
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "where $\\mathbf { k } ^ { Q }$ denotes query key map, which is predicted from the current frame. Further, $i$ and $j$ are the index of each query and the memory location, and $\\begin{array} { r } { Z _ { i } = \\sum _ { j } \\exp ( \\mathbf { k } _ { i } ^ { Q } \\cdot \\mathbf { k } _ { j } ^ { M } ) } \\end{array}$ is the normalizing factor. ",
259
+ "bbox": [
260
+ 174,
261
+ 643,
262
+ 823,
263
+ 678
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Although proven effective, the standard attention operation (1) is known to suffer from poor computational and memory scaling properties [20]. In particular, since all queries are matched to all keys, it experiences a quadratic scaling $\\mathcal { O } ( ( H W ) ^ { 2 } )$ of computations in the spatial size $H W$ of the feature map. This is particularly problematic for segmentation tasks, where fine-grained high-resolution information is desired to improve the quality of the predictions. ",
270
+ "bbox": [
271
+ 174,
272
+ 683,
273
+ 825,
274
+ 753
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "3.2 Prototypical Cross-Attention ",
281
+ "text_level": 1,
282
+ "bbox": [
283
+ 176,
284
+ 767,
285
+ 413,
286
+ 784
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "To address the aforementioned limitations of the standard cross-attention, we introduce the prototypical cross-attention to first condense sets of high-resolution feature vectors in the past frames. Our approach is based on a clustered memory $\\mathbf { M } _ { c }$ . We call these clusters prototypes, since they correspond to representative items in the memory. While clustering effectively reduces the number of items in the memory, it also serves to deprecate noisy information, leading to a more generalizable and robust representation of the memory. ",
293
+ "bbox": [
294
+ 174,
295
+ 792,
296
+ 825,
297
+ 877
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "To employ an attention mechanism, similar to (1), we require a clustering of the memory that generates a principled continuous and differentiable clustering assignment function. We therefore cluster the keys in the memory by fitting a Gaussian Mixture Model (GMM), ",
304
+ "bbox": [
305
+ 174,
306
+ 883,
307
+ 820,
308
+ 911
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "image",
314
+ "img_path": "images/b16e350d7758f3867593885cc547299195adefa0c2ec495c97b222a2328de4e2.jpg",
315
+ "image_caption": [
316
+ "Figure 2: Overview of our frame-level prototypical cross-attention. For a frame $\\hat { t }$ in the memory we first perform GMM-based clustering to achieve the key $\\mathbf { k } _ { \\hat { t } j } ^ { \\mu }$ and value $\\mathbf { v } _ { \\hat { t } j } ^ { \\mu }$ prototypes. Given the key encoding $\\mathbf { k } _ { t }$ of the current frame, we attend to the prototypes to generate the reconstructed feature $\\mathbf { y } _ { \\hat { t } }$ , which are then aggregated temporally and fused with the current value encoding $\\mathbf { v } _ { t }$ . "
317
+ ],
318
+ "image_footnote": [],
319
+ "bbox": [
320
+ 173,
321
+ 90,
322
+ 823,
323
+ 330
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "",
330
+ "bbox": [
331
+ 174,
332
+ 406,
333
+ 678,
334
+ 421
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "equation",
340
+ "img_path": "images/17661c3cb86cc2fb9007908dc47fec9a18fa15456690cfeccf122038c357c9f9.jpg",
341
+ "text": "$$\np ( \\mathbf { k } ) = \\frac { 1 } { N } \\sum _ { j = 1 } ^ { N } p ( \\mathbf { k } | z = j ) , \\qquad p ( \\mathbf { k } | z = j ) = \\frac { 1 } { ( 2 \\pi \\sigma ^ { 2 } ) ^ { \\frac { D } { 2 } } } \\exp \\left( - \\frac { 1 } { 2 \\sigma ^ { 2 } } \\| \\mathbf { k } - \\mathbf { k } _ { j } ^ { \\mu } \\| ^ { 2 } \\right)\n$$",
342
+ "text_format": "latex",
343
+ "bbox": [
344
+ 223,
345
+ 424,
346
+ 772,
347
+ 469
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "Here, $N$ denotes the number of Gaussian mixtures, $D$ is the feature dimension of the keys. We use a constant variance parameter $\\sigma ^ { 2 }$ and uniform cluster priors $\\begin{array} { r } { p ( z = j ) = \\frac { 1 } { N } } \\end{array}$ , where $z$ denotes the latent cluster assignment variable. The component means $\\mathbf { k } ^ { \\mu }$ represent the prototype keys in the memory. We generate the clustering (2) using the standard Expectation-Maximization algorithm. ",
354
+ "bbox": [
355
+ 173,
356
+ 472,
357
+ 826,
358
+ 530
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "The GMM allows us to compute a soft cluster assignment by evaluating the posterior probability of the latent assignment variable $z$ . Using Bayes rule, the probability of a key value $\\mathbf { k }$ to be assigned to the $j$ th prototype is derived as, ",
365
+ "bbox": [
366
+ 173,
367
+ 535,
368
+ 825,
369
+ 577
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "equation",
375
+ "img_path": "images/e38bdefb508089b5362b1531a93ff4dde74635610a08cb37e56470ef0edfe1b6.jpg",
376
+ "text": "$$\np ( z = j | \\mathbf { k } ) = \\frac { p ( \\mathbf { k } | z = j ) p ( z = j ) } { \\sum _ { l = 1 } ^ { N } p ( \\mathbf { k } | z = l ) p ( z = l ) } = \\frac { \\exp \\left( - \\frac { 1 } { 2 \\sigma ^ { 2 } } \\| \\mathbf { k } - \\mathbf { k } _ { j } ^ { \\mu } \\| ^ { 2 } \\right) } { \\sum _ { l = 1 } ^ { N } \\exp \\left( - \\frac { 1 } { 2 \\sigma ^ { 2 } } \\| \\mathbf { k } - \\mathbf { k } _ { l } ^ { \\mu } \\| ^ { 2 } \\right) } .\n$$",
377
+ "text_format": "latex",
378
+ "bbox": [
379
+ 250,
380
+ 580,
381
+ 746,
382
+ 621
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "The resulting cluster assignment can thus be written as a SoftMax operation, where the corresponding logits are provided by the negative cluster distance $\\| \\mathbf { k } - \\mathbf { k } _ { j } ^ { \\mu } \\| ^ { 2 }$ scaled with a temperature of $2 \\sigma ^ { 2 }$ . ",
389
+ "bbox": [
390
+ 174,
391
+ 625,
392
+ 826,
393
+ 654
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "Since the clustering is performed in the key space of the memory, we next retrieve the corresponding value prototypes. To this end, we employ the key cluster assignment probabilities in (3) to compute the values for each memory prototype, ",
400
+ "bbox": [
401
+ 173,
402
+ 659,
403
+ 825,
404
+ 700
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "equation",
410
+ "img_path": "images/26ff9847fd7c9426d5cac7675e39b65d27c1e77fcca26772c4ca5d0ada9b1204.jpg",
411
+ "text": "$$\n\\mathbf { v } _ { j } ^ { \\mu } = \\sum _ { l = 1 } ^ { H \\times W } p ( z = j | \\mathbf { k } _ { l } ^ { M } ) \\mathbf { v } _ { l } ^ { M } .\n$$",
412
+ "text_format": "latex",
413
+ "bbox": [
414
+ 397,
415
+ 704,
416
+ 599,
417
+ 748
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "For attending to our clustered memory, we first predict the key encodings We then read from the clustered memory by computing the average over t $\\mathbf { k } _ { i } ^ { Q }$ of the query imvalue prototypes $\\mathbf { v } _ { j } ^ { \\mu }$ weighted with the cluster assignment probabilities, ",
424
+ "bbox": [
425
+ 173,
426
+ 761,
427
+ 826,
428
+ 804
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "equation",
434
+ "img_path": "images/850abbc01b106ae6b47f48ad4f5aa8328ab66aee6a4dbdef2cf40ed02161d952.jpg",
435
+ "text": "$$\n\\mathbf { y } _ { i } = \\sum _ { j = 1 } ^ { N } p ( z = j | \\mathbf { k } _ { i } ^ { Q } ) \\mathbf { v } _ { j } ^ { \\mu } = \\frac { 1 } { Z _ { i } } \\sum _ { j = 1 } ^ { N } \\exp \\left( - \\frac { 1 } { 2 \\sigma ^ { 2 } } \\| \\mathbf { k } _ { i } ^ { Q } - \\mathbf { k } _ { j } ^ { \\mu } \\| ^ { 2 } \\right) \\mathbf { v } _ { j } ^ { \\mu } .\n$$",
436
+ "text_format": "latex",
437
+ "bbox": [
438
+ 276,
439
+ 808,
440
+ 722,
441
+ 852
442
+ ],
443
+ "page_idx": 3
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "The final attention operation has much similarity with the original dot-product cross attention (1). Note that the key-query similarity in our approach is measured by Euclidian distance instead of a dot-product. Importantly, our formulation (5) attends to a reduced set of $N$ prototypes, while the original attention (1) requires attending to the full spatio-temporal memory of size $H \\times W \\times T$ . ",
448
+ "bbox": [
449
+ 174,
450
+ 854,
451
+ 826,
452
+ 912
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "3.3 Prototypical Cross-Attention Network ",
459
+ "text_level": 1,
460
+ "bbox": [
461
+ 174,
462
+ 90,
463
+ 477,
464
+ 106
465
+ ],
466
+ "page_idx": 4
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "Here, we propose the Prototypical Cross-Attention Network (PCAN) for MOTS by integrating our prototypical cross-attention module into both the frame-level and instance-level. The former aims to align and aggregate temporal frame features stored in memory, while the latter is for propagating the instance appearance features over time and produce instance cross-attention maps to help segmentation. Besides, we also design a prototypical instance appearance module to represent each video tracklet with contrastive mixture foreground and background prototypes. ",
471
+ "bbox": [
472
+ 173,
473
+ 116,
474
+ 825,
475
+ 200
476
+ ],
477
+ "page_idx": 4
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "3.3.1 Frame-level Prototypical Cross-Attention ",
482
+ "text_level": 1,
483
+ "bbox": [
484
+ 173,
485
+ 213,
486
+ 513,
487
+ 229
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "In Figure 2, prototypical cross-attention first produces prototypes by fitting a Gaussian mixtures model (2) to the feature in the memory. To provide further flexibility when dynamically updating the memory compute the $\\mathbf { M }$ , we first perforkey prototypes wise clustering for each reference frame feature at , and retrieve the corresponding value embeddings $\\hat { t }$ $N$ $\\{ \\mathbf { k } _ { \\hat { t } i } ^ { \\mu } \\} _ { j = 1 } ^ { N }$ $\\{ \\mathbf { v } _ { \\hat { t } j } ^ { \\mu } \\} _ { j = 1 } ^ { N }$ using (4) for each memory frame $\\hat { t }$ independently. The key and value features are predicted using two parallel convolutional layers. ",
494
+ "bbox": [
495
+ 173,
496
+ 238,
497
+ 825,
498
+ 329
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "Frame-wise prototypical memory attention Given the query key encoding $\\mathbf { k } _ { t i } ^ { Q }$ of the current frame $t$ , we perform prototypical cross-attention to each memory frame $\\hat { t }$ independently using our formulation (3) as, ",
505
+ "bbox": [
506
+ 174,
507
+ 335,
508
+ 825,
509
+ 382
510
+ ],
511
+ "page_idx": 4
512
+ },
513
+ {
514
+ "type": "equation",
515
+ "img_path": "images/895f0d4babb28ada464806789e5b9fa146f698538aca6a4371b3bda31a86fc04.jpg",
516
+ "text": "$$\n{ \\bf y } _ { \\hat { t } i } = \\frac { 1 } { Z _ { \\hat { t } \\hat { t } } } \\sum _ { j = 1 } ^ { N } \\exp \\left( - \\frac { 1 } { 2 \\sigma ^ { 2 } } \\| { \\bf k } _ { t i } - { \\bf k } _ { \\hat { t } j } ^ { \\mu } \\| ^ { 2 } \\right) { \\bf v } _ { \\hat { t } j } ^ { \\mu } , \\qquad Z _ { \\hat { t } i } = \\sum _ { l = 1 } ^ { N } \\exp \\left( - \\frac { 1 } { 2 \\sigma ^ { 2 } } \\| { \\bf k } _ { t i } ^ { Q } - { \\bf k } _ { \\hat { t } \\hat { t } } ^ { \\mu } \\| ^ { 2 } \\right) .\n$$",
517
+ "text_format": "latex",
518
+ "bbox": [
519
+ 186,
520
+ 387,
521
+ 790,
522
+ 433
523
+ ],
524
+ "page_idx": 4
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "Note that the index $i$ refers to a spatial coordinate in the current frame. The resulting feature map $\\mathbf { y } _ { \\hat { t } }$ can intuitively be seen as a projection of features from frame $\\hat { t }$ to the current frame. This projection essentially aligns the condensed feature information in frame $\\hat { t }$ with the current frame. ",
529
+ "bbox": [
530
+ 174,
531
+ 438,
532
+ 825,
533
+ 483
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "Temporal feature aggregation Since frame-wise attention does not fuse temporal information, we perform a temporal aggregation. The temporal information $\\mathbf { y } _ { \\hat { t } }$ in (6) from different frames $\\hat { t }$ are fused as a linear combination, weighted by the feature similarity with the current frame. Specifically, the temporally aggregated representation is obtained as ",
540
+ "bbox": [
541
+ 173,
542
+ 489,
543
+ 825,
544
+ 546
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "equation",
550
+ "img_path": "images/175ed6d3c9ff5f1a12de50156b9f25f9bfe1b582d61cd10497492c17d3e96461.jpg",
551
+ "text": "$$\n\\bar { \\mathbf { y } } _ { t i } = \\sum _ { \\hat { t } = 1 } ^ { t } w _ { \\hat { t } i } \\mathbf { y } _ { \\hat { t } i } , \\qquad w _ { \\hat { t } i } = \\frac { \\exp ( \\mathbf { y } _ { t i } \\cdot \\mathbf { y } _ { \\hat { t } i } ) } { \\sum _ { s = 1 } ^ { t } \\exp ( \\mathbf { y } _ { t i } \\cdot \\mathbf { y } _ { s i } ) } .\n$$",
552
+ "text_format": "latex",
553
+ "bbox": [
554
+ 325,
555
+ 553,
556
+ 673,
557
+ 598
558
+ ],
559
+ "page_idx": 4
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "Note that ${ \\hat { t } } = t$ in the sum refers to the value embedding $\\mathbf { y } _ { t i } = \\mathbf { v } _ { t i } ^ { Q }$ extracted from the current frame. The contribution of each frame $\\hat { t }$ is thus weighted by the similarity to this current frame prediction using the attention weights $w _ { \\hat { t } i }$ . This strategy ensures that incorrect or dissimilar regions are suppressed when computing the final aggregated feature embedding $\\bar { \\mathbf { y } } _ { t }$ . To handle object with large-scale variation and produce more fine-grained instance mask prediction, we further extend temporal aggregation to multi-level using different levels of the extracted FPN features, as detailed in the supplementary material. ",
564
+ "bbox": [
565
+ 173,
566
+ 606,
567
+ 825,
568
+ 707
569
+ ],
570
+ "page_idx": 4
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "3.3.2 Instance-level Prototypical Cross-Attention ",
575
+ "text_level": 1,
576
+ "bbox": [
577
+ 174,
578
+ 722,
579
+ 526,
580
+ 737
581
+ ],
582
+ "page_idx": 4
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "Contrastive foreground and background representation In additional to the condensed frame-level representation, for more accurate segmentation results, we further encode each tracked object with compact and robust appearance prototypes. To further empower our proposed attention mechanism, we utilize the initially detected object mask to identify each foreground instance. We then separately model the extracted foreground and background features using a GMM (2). We denote the resulting foreground prototypes as $\\mathbf { k } _ { t j . } ^ { + }$ and background prototypes as $\\mathbf { k } _ { t j } ^ { - }$ . The former thus focuses on the appearance of the specific object, creating a rich and dynamic appearance model. When employed in our prototypical cross-attention framework (Section 3.2), it provides fine-grained attention from localized prototypes that naturally learn to focus specific parts of views of the object, as visualized in Fig. 3. Furthermore, the background prototypes $\\mathbf { k } _ { t j } ^ { - }$ capture valuable information about the background appearance, which can greatly alleviate the segmentation process. For each object instance we attend to the foreground and background prototypes separately using (3). The results are concatenated together with the initial mask detection to the Temporal Segmentation Head (TSM) for final prediction, as illustrated in Figure 3. ",
587
+ "bbox": [
588
+ 174,
589
+ 744,
590
+ 825,
591
+ 911
592
+ ],
593
+ "page_idx": 4
594
+ },
595
+ {
596
+ "type": "image",
597
+ "img_path": "images/0d0831e8e286b63817527cb523139e218cd86186d20191f7a86218e7cec18a22.jpg",
598
+ "image_caption": [
599
+ "Figure 3: Our instance-level prototypical attention with foreground and background prototypes and temporal propagation. The foreground/background attention maps from (bottom) demonstrate the localized and discriminative appearance representation. Temporal Segmentation Module (TSM) takes the current frame, initial mask, and instance attention maps as input and generates the final mask. "
600
+ ],
601
+ "image_footnote": [],
602
+ "bbox": [
603
+ 174,
604
+ 98,
605
+ 823,
606
+ 273
607
+ ],
608
+ "page_idx": 5
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "",
613
+ "bbox": [
614
+ 173,
615
+ 353,
616
+ 825,
617
+ 382
618
+ ],
619
+ "page_idx": 5
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "Tracklet feature propagation and updating To effectively model the object appearance change and preserve the most relevant information, we design a recurrent instance appearance updating scheme. From the first video frame where object appears, the accumulated prototypes $\\bar { \\mathbf { k } } _ { t j } ^ { + }$ , $\\bar { \\mathbf { k } } _ { t j } ^ { - }$ for the instance are propagated to the subsequent frames and updated with new appearance prototypes $\\mathbf { k } _ { t j } ^ { + }$ , $\\mathbf { k } _ { t j } ^ { - }$ using an update rate $\\lambda$ as, ",
624
+ "bbox": [
625
+ 174,
626
+ 387,
627
+ 825,
628
+ 463
629
+ ],
630
+ "page_idx": 5
631
+ },
632
+ {
633
+ "type": "equation",
634
+ "img_path": "images/faf3d0422b760fabcc63e2a15959cf23ad4e6fe07b5a5f707b47b76baf2ce61f.jpg",
635
+ "text": "$$\n\\bar { \\mathbf { k } } _ { t j } ^ { + } = ( 1 - \\lambda ) \\bar { \\mathbf { k } } _ { t - 1 , j } ^ { + } + \\lambda \\mathbf { k } _ { t j } ^ { + } , \\qquad \\bar { \\mathbf { k } } _ { t j } ^ { - } = ( 1 - \\lambda ) \\bar { \\mathbf { k } } _ { t - 1 , j } ^ { - } + \\lambda \\mathbf { k } _ { t j } ^ { - } .\n$$",
636
+ "text_format": "latex",
637
+ "bbox": [
638
+ 284,
639
+ 472,
640
+ 712,
641
+ 492
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Figure 3 also reveals the consistency of the attended region of a specific prototype $j$ ",
648
+ "bbox": [
649
+ 171,
650
+ 501,
651
+ 727,
652
+ 516
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "4 Experiments ",
659
+ "text_level": 1,
660
+ "bbox": [
661
+ 174,
662
+ 539,
663
+ 312,
664
+ 556
665
+ ],
666
+ "page_idx": 5
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "Here, we present comprehensive evaluation and analysis of our approach. Experiments are performed on two large scale datasets, namely YouTube-VIS [46] and BDD100K [50]. ",
671
+ "bbox": [
672
+ 174,
673
+ 573,
674
+ 825,
675
+ 602
676
+ ],
677
+ "page_idx": 5
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "4.1 Experiment setup ",
682
+ "text_level": 1,
683
+ "bbox": [
684
+ 174,
685
+ 622,
686
+ 336,
687
+ 636
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Youtube-VIS YouTube-VIS-2019 [46] dataset contains 2,883 high quality videos with 131k annotated object instances belonging to 40 diverse categories. The task is to simultaneously classifying, segment and track object instances belonging to these categories. The evaluation metrics for this task are an adaptation of the Average Precision (AP) and Average Recall (AR) of image instance segmentation. ",
694
+ "bbox": [
695
+ 174,
696
+ 648,
697
+ 825,
698
+ 718
699
+ ],
700
+ "page_idx": 5
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "BDD100K We also evaluate on the large-scale tracking and segmentation dataset of BDD100K [50], which is a challenging self-driving dataset with 154 videos (30,817 images) for training, 32 videos (6,475 images) for validation, and 37 videos (7,484 images) for testing. The dataset provides 8 annotated categories for evaluation, where the images in the tracking set are annotated per 5 FPS with 30 FPS frame rate. We adopt the well-established MOTS metrics [37] to our task. ",
705
+ "bbox": [
706
+ 173,
707
+ 724,
708
+ 825,
709
+ 794
710
+ ],
711
+ "page_idx": 5
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "Implementation details We implement PCAN based on two different existing MOTS approaches. For Youtube-VIS, we adopt ResNet with FPN pre-trained on COCO as the backbone, and build our segmentation tracker on the one-stage segmentation model [5]. Both the instance and frame cross-attention is built on the extracted FPN features. Our model is trained with initial learning rate 0.0025 on 4 GPUs using SGD, and executes with a speed of 15.0 FPS on ResNet-50. Similar to [46, 22, 18], we use the input size $3 6 0 \\times 6 4 0$ for training. On BDD100K, we build PCAN by extending the two-stage MOT method [29] with our temporal segmentation modules. We follow the same training strategy of QDTrack-mots [29]. More details can be found in supplemental material. ",
716
+ "bbox": [
717
+ 173,
718
+ 800,
719
+ 825,
720
+ 911
721
+ ],
722
+ "page_idx": 5
723
+ },
724
+ {
725
+ "type": "table",
726
+ "img_path": "images/4e22145a92621eecf65fa59e7fb7a8dbb3e6c1feabea6612d16618a8a29aeb62.jpg",
727
+ "table_caption": [
728
+ "Table 1: Comparison with state-of-the-art on the YouTube-VIS validation set. Results are reported in terms of mask accuracy (AP) and recall (AR). Asterisks ∗ denote concurrent works on arXiv. "
729
+ ],
730
+ "table_footnote": [],
731
+ "table_body": "<table><tr><td>Method</td><td>Backbone</td><td>Type</td><td>Online</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>VisTr*[41]</td><td>ResNet-50</td><td>Transformer</td><td>×</td><td>35.6</td><td>56.8</td><td>37.0</td><td>35.2</td><td>40.2</td></tr><tr><td>OSMN [47]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>23.4</td><td>36.5</td><td>25.7</td><td>28.9</td><td>31.1</td></tr><tr><td>FEELVOS [36]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>26.9</td><td>42.0</td><td>29.7</td><td>29.9</td><td>33.4</td></tr><tr><td>DeepSORT[42]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>26.1</td><td>42.9</td><td>26.1</td><td>27.8</td><td>31.3</td></tr><tr><td>MaskTrack R-CNN [46]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>30.3</td><td>51.1</td><td>32.6</td><td>31.0</td><td>35.5</td></tr><tr><td>STEm-Seg[1]</td><td>ResNet-50</td><td> One-stage</td><td></td><td>30.6</td><td>50.7</td><td>33.5</td><td>31.6</td><td>37.1</td></tr><tr><td>SipMask [5]</td><td>ResNet-50</td><td>One-stage</td><td></td><td>32.5</td><td>53.0</td><td>33.3</td><td>33.5</td><td>38.9</td></tr><tr><td>STMask*[18]</td><td>ResNet-50</td><td>One-stage</td><td>x&lt;&gt;</td><td>33.5</td><td>52.1</td><td>36.9</td><td>31.1</td><td>39.2</td></tr><tr><td>SG-Net* [22]</td><td>ResNet-50</td><td>One-stage</td><td>√</td><td>34.8</td><td>56.1</td><td>36.8</td><td>35.8</td><td>40.8</td></tr><tr><td>PCAN (Ours)</td><td>ResNet-50</td><td>One-stage</td><td>√</td><td>36.1</td><td>54.9</td><td>39.4</td><td>36.3</td><td>41.6</td></tr><tr><td>STMask*[18]</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>36.3</td><td>55.2</td><td>39.9</td><td>33.7</td><td>42.0</td></tr><tr><td>SG-Net* [22]</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>36.3</td><td>57.1</td><td>39.6</td><td>35.9</td><td>43.0</td></tr><tr><td>PCAN (Ours)</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>37.6</td><td>57.2</td><td>41.3</td><td>37.2</td><td>43.9</td></tr></table>",
732
+ "bbox": [
733
+ 173,
734
+ 126,
735
+ 825,
736
+ 337
737
+ ],
738
+ "page_idx": 6
739
+ },
740
+ {
741
+ "type": "table",
742
+ "img_path": "images/3d488427825de8beb57568817e53c9bc31c84dc899686688845fb1957e087fd8.jpg",
743
+ "table_caption": [
744
+ "Table 2: State-of-the-art comparison on the BDD100K segmentation tracking validation set. I: ImageNet. C: COCO. S: Cityscapes. B: BDD100K. \"-fix\" means adopting the pretrained model from the BDD100K tracking set, fixing the existing parts, and only training the added mask head. "
745
+ ],
746
+ "table_footnote": [],
747
+ "table_body": "<table><tr><td>Method</td><td>Pretrained</td><td>Online</td><td>mMOTSA↑</td><td>mMOTSP↑</td><td>mIDF个</td><td>ID sw.↓</td><td>mAP↑</td></tr><tr><td>SortIoU</td><td>I, C, S</td><td>√</td><td>10.3</td><td>59.9</td><td>21.8</td><td>15951</td><td>22.2</td></tr><tr><td>MaskTrackRCNN [36]</td><td>I, C, S</td><td>���</td><td>12.3</td><td>59.9</td><td>26.2</td><td>9116</td><td>22.0</td></tr><tr><td>STEm-Seg [1]</td><td>1,C, s</td><td>×</td><td>12.2</td><td>58.2</td><td>25.4</td><td>8732</td><td>21.8</td></tr><tr><td>QDTrack-mots [29]</td><td>1, C,S</td><td>√</td><td>22.5</td><td>59.6</td><td>40.8</td><td>1340</td><td>22.4</td></tr><tr><td>QDTrack-mots-fix [29]</td><td>I, B</td><td>√</td><td>23.5</td><td>66.3</td><td>44.5</td><td>973</td><td>25.5</td></tr><tr><td>PCAN (Ours)</td><td>I,B</td><td>√</td><td>27.4</td><td>66.7</td><td>45.1</td><td>876</td><td>26.6</td></tr></table>",
748
+ "bbox": [
749
+ 173,
750
+ 383,
751
+ 825,
752
+ 492
753
+ ],
754
+ "page_idx": 6
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "4.2 State-of-the-Art Comparison ",
759
+ "text_level": 1,
760
+ "bbox": [
761
+ 174,
762
+ 505,
763
+ 415,
764
+ 520
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "We compare our approach with the state-of-the-art methods on the aforementioned large-scale MOTS/VIS benchmarks Youtube-VIS and BDD100K, where PCAN outperforms all existing methods without bells and whistles, and shows efficacy to both one-stage and two-stage segmentation frameworks. We follow the official metrics of each benchmark to evaluate our model. ",
771
+ "bbox": [
772
+ 174,
773
+ 530,
774
+ 825,
775
+ 585
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "Youtube-VIS The results of Youtube-VIS benchmark is in Table 1, where PCAN achieves the best mask AP of $3 6 . 1 \\%$ using ResNet-50 and $3 7 . 6 \\%$ using ResNet-101 respectively, while being an online method. Our approach consistently surpasses most recent SOTA methods, including STMask [18] and SG-Net [22] by a significant margin. These methods only conduct temporal modeling between two adjacent frames for feature correlation. Compared to our baseline SipMask [5], a single-image based segmentation with object centerness association, PCAN improves the mask AP from $3 2 . 5 \\%$ to $3 6 . 1 \\%$ , which shows the effectiveness of long-term temporal modeling in helping object tracking and segmentation. ",
782
+ "bbox": [
783
+ 173,
784
+ 592,
785
+ 825,
786
+ 703
787
+ ],
788
+ "page_idx": 6
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "BDD100K Table 2 shows our results on BDD100K tracking and segmentation benchmark, where PCAN outperforms the strong baseline methods MaskTrackRCNN [46] and QDTrack-mots [29]. Our approach achieves a large advantage in mMOTSA, with over 3 points gain and around $10 \\%$ ID switches decrease. MOTSA measures segmentation as well as tracking quality, while ID Switches can measure the performance of identity consistency. The significant advancements demonstrate that our method with prototypical cross-attention enables more accurate pixel-wise object tracking by effectively exploiting temporal information. ",
793
+ "bbox": [
794
+ 174,
795
+ 709,
796
+ 825,
797
+ 806
798
+ ],
799
+ "page_idx": 6
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "4.3 Ablation study and analysis ",
804
+ "text_level": 1,
805
+ "bbox": [
806
+ 176,
807
+ 823,
808
+ 405,
809
+ 838
810
+ ],
811
+ "page_idx": 6
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "We conduct detailed ablation studies on Youtube-VIS validation set, where we investigate the effect of our proposed prototypical cross-attention components for MOTS during training and testing. ",
816
+ "bbox": [
817
+ 174,
818
+ 848,
819
+ 823,
820
+ 877
821
+ ],
822
+ "page_idx": 6
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "Effect of frame-level prototypical cross-attention module To study the importance of temporal information amount, we conduct an ablation study on models with different input temporal window lengths in Table 3. A temporal length of 1 thus means that no prior temporal information guidance is used during video instance segmentation. By varying the frame length from 1 to 32, the mask AP increases from $3 2 . 5 \\%$ to $3 5 . 4 \\%$ , which reveals that richer temporal information with multiple views of a segmented object indeed brings more gain to model performance. For the number of frame-level prototypes, we used 64 during training and testing. The results on YouTube-VIS in Table 8 show that the precision saturates for larger numbers of prototypes. ",
827
+ "bbox": [
828
+ 171,
829
+ 883,
830
+ 825,
831
+ 911
832
+ ],
833
+ "page_idx": 6
834
+ },
835
+ {
836
+ "type": "table",
837
+ "img_path": "images/bcb0112e66157de79403590b7eb928d2f7b49c33cc3aad824f9b879ed6e14084.jpg",
838
+ "table_caption": [
839
+ "Table 3: Results of varying temporal memory length in our PCAN on YouTube-VIS. "
840
+ ],
841
+ "table_footnote": [],
842
+ "table_body": "<table><tr><td>Length</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>1</td><td>32.5</td><td>53.0</td><td>33.3</td><td>33.5</td><td>38.9</td></tr><tr><td>2</td><td>33.7</td><td>53.8</td><td>35.3</td><td>33.9</td><td>39.5</td></tr><tr><td>4</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr><tr><td>8</td><td>34.2</td><td>53.7</td><td>37.6</td><td>34.4</td><td>40.3</td></tr><tr><td>16</td><td>34.6</td><td>53.7</td><td>38.3</td><td>35.4</td><td>40.5</td></tr><tr><td>32</td><td>35.4</td><td>53.8</td><td>39.1</td><td>35.9</td><td>41.0</td></tr></table>",
843
+ "bbox": [
844
+ 196,
845
+ 126,
846
+ 460,
847
+ 213
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "table",
853
+ "img_path": "images/7b6bb003ab7495967a299ef2696abc44649b0294d8d69832acb947e7ecf90b74.jpg",
854
+ "table_caption": [
855
+ "Table 4: Effect of multi-layer prototypical feature fusion with tube length 4 on YouTube-VIS. "
856
+ ],
857
+ "table_footnote": [],
858
+ "table_body": "<table><tr><td>FPN Layer</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>P3</td><td>30.8</td><td>51.7</td><td>32.0</td><td>32.6</td><td>37.0</td></tr><tr><td>P4</td><td>32.0</td><td>51.5</td><td>34.1</td><td>32.6</td><td>37.2</td></tr><tr><td>P5</td><td>32.9</td><td>52.1</td><td>35.9</td><td>33.2</td><td>38.6</td></tr><tr><td>P3-P4</td><td>33.1</td><td>52.3</td><td>35.6</td><td>33.6</td><td>38.5</td></tr><tr><td>P3-P5</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr></table>",
859
+ "bbox": [
860
+ 516,
861
+ 126,
862
+ 812,
863
+ 207
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "table",
869
+ "img_path": "images/6069b9fec9c152c71a865bfeb6c1d128619450c726f4ef60abc7614300526af4.jpg",
870
+ "table_caption": [
871
+ "Table 5: Comparison with non-local attention [39] and transformer [6, 41] on YouTube-VIS. "
872
+ ],
873
+ "table_footnote": [],
874
+ "table_body": "<table><tr><td rowspan=\"2\">Length</td><td colspan=\"3\">Prototypical Cross-Attention</td><td colspan=\"3\">Non-local Attention</td><td colspan=\"3\">Transformer (Multi-Head Self-Attention)</td></tr><tr><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td></tr><tr><td>2</td><td>33.7</td><td>5.8</td><td>323</td><td>33.2</td><td>24.3</td><td>2497</td><td>24.6</td><td>103.8</td><td>5321</td></tr><tr><td>4</td><td>33.9</td><td>12.0</td><td>652</td><td>33.3</td><td>49.1</td><td>4763</td><td>25.8</td><td>387.2</td><td>9844</td></tr><tr><td>8</td><td>34.2</td><td>23.7</td><td>1419</td><td>33.6</td><td>99.6</td><td>9631</td><td>28.3</td><td>1413.3</td><td>18762</td></tr></table>",
875
+ "bbox": [
876
+ 189,
877
+ 234,
878
+ 808,
879
+ 296
880
+ ],
881
+ "page_idx": 7
882
+ },
883
+ {
884
+ "type": "image",
885
+ "img_path": "images/c76ee7c6980393304488d4699b6a5c3971b1bb8d922650744576ad064f7e6827.jpg",
886
+ "image_caption": [
887
+ "Figure 4: Qualitative impact of our PCAM on YouTube-VIS. Mask colors encode object identity. Our frame-level PCAM (second row) helps provide consistent detections and preserve identities compared to the baseline (first row). The instance-level PCAM (fourth row) provides more accurate masks, while further improving identity consistency compared to not employing our module (third row). "
888
+ ],
889
+ "image_footnote": [],
890
+ "bbox": [
891
+ 176,
892
+ 306,
893
+ 820,
894
+ 523
895
+ ],
896
+ "page_idx": 7
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "",
901
+ "bbox": [
902
+ 174,
903
+ 601,
904
+ 825,
905
+ 684
906
+ ],
907
+ "page_idx": 7
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Effect of multi-layer temporal aggregation Since we perform temporal feature aggregation on the extracted FPN features, to help deal with objects with partial occlusion and large-scale variation, we also study the effect of using different levels of the extracted FPN features. In Table 4, we select the FPN feature map from P3-P5 layers for (excluding P6 and P7 due to impractical computation cost), and perform prototypical temporal aggregation on each FPN layer. We find that multi-layer information is also important to final model performance. ",
912
+ "bbox": [
913
+ 173,
914
+ 690,
915
+ 825,
916
+ 773
917
+ ],
918
+ "page_idx": 7
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "Computation and memory efficiency In Table 5 we analyze different attention mechanisms. Compared to standard space-time memory reading using non-local attention [39, 28] or recent popular transformer [41, 6] with multi-head self-attention layer, the prototypical cross-attention with condensed prototypes not only enjoys high accuracy advantage, but also largely reduces the memory consumption and computation amount. For input tube length 8, the prototypical memory consumption is less than $10 \\%$ of the transformer with negligible FLOPs computation due to the small number of representative prototypes in (5). ",
923
+ "bbox": [
924
+ 174,
925
+ 780,
926
+ 825,
927
+ 877
928
+ ],
929
+ "page_idx": 7
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "Effect of instance-level prototypical appearance module We analyze the instance-level prototypical cross-attention module, which represents each video tracklet using the contrastive prototypes. In ",
934
+ "bbox": [
935
+ 174,
936
+ 883,
937
+ 821,
938
+ 911
939
+ ],
940
+ "page_idx": 7
941
+ },
942
+ {
943
+ "type": "table",
944
+ "img_path": "images/5b86aa82a8ada2efdb2ab963ff1827a4708eb2124ea4d77f7fa8c63f7453c4ae.jpg",
945
+ "table_caption": [
946
+ "Table 6: Ablation study on number of instancelevel prototypes on YouTube-VIS. "
947
+ ],
948
+ "table_footnote": [],
949
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Pos.Proto.Number丨Neg.Proto.Number</td><td rowspan=1 colspan=1>Pos.Proto.Number丨Neg.Proto.Number</td><td rowspan=1 colspan=1>AP AP50</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>32.5 53.0</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>32.4 52.3</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32.1 52.4</td></tr><tr><td rowspan=2 colspan=1>15</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32.7 52.8</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>33.1 53.6</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>33.9 54.1</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>33.6 53.8</td></tr></table>",
950
+ "bbox": [
951
+ 186,
952
+ 126,
953
+ 467,
954
+ 212
955
+ ],
956
+ "page_idx": 8
957
+ },
958
+ {
959
+ "type": "table",
960
+ "img_path": "images/ecf8e1e266f2d357ebe45ecbfc3f59990a17ad1663b68f657d55c0987b952fba.jpg",
961
+ "table_caption": [
962
+ "Table 7: Ablation on instance-level EM feature propagation and updating on YouTube-VIS. "
963
+ ],
964
+ "table_footnote": [],
965
+ "table_body": "<table><tr><td>version</td><td>AP</td><td>AP50</td></tr><tr><td>No instance prototype propagation</td><td>33.5</td><td>53.2</td></tr><tr><td>Using initial instance prototype</td><td>33.0</td><td>52.8</td></tr><tr><td>Update momentum = 0.2</td><td>34.3</td><td>53.8</td></tr><tr><td>Update momentum = 0.5</td><td>34.0</td><td>53.6</td></tr></table>",
966
+ "bbox": [
967
+ 509,
968
+ 126,
969
+ 821,
970
+ 200
971
+ ],
972
+ "page_idx": 8
973
+ },
974
+ {
975
+ "type": "table",
976
+ "img_path": "images/9f74063d4fc94059d8ffba71e7cc21d8c8facb1438460460ea5e6203fa4c778c.jpg",
977
+ "table_caption": [
978
+ "Table 8: Ablation on number of framelevel prototypes on YouTube-VIS. "
979
+ ],
980
+ "table_footnote": [],
981
+ "table_body": "<table><tr><td>Proto.Number</td><td>AP</td><td>AP50</td></tr><tr><td>8</td><td>32.6</td><td>52.8</td></tr><tr><td>16</td><td>33.1</td><td>53.3</td></tr><tr><td>32</td><td>33.9</td><td>53.5</td></tr><tr><td>64</td><td>34.2</td><td>53.7</td></tr><tr><td>128</td><td>34.1</td><td>53.8</td></tr></table>",
982
+ "bbox": [
983
+ 196,
984
+ 251,
985
+ 393,
986
+ 337
987
+ ],
988
+ "page_idx": 8
989
+ },
990
+ {
991
+ "type": "table",
992
+ "img_path": "images/3bf28a9c56516447697ce15b7408d2cf8264dc9d3e1fb5a6c80edf5df18b0701.jpg",
993
+ "table_caption": [
994
+ "Table 9: Results of varying EM iterations for our PCAN on YouTube-VIS. "
995
+ ],
996
+ "table_footnote": [],
997
+ "table_body": "<table><tr><td>Iteration number</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>1</td><td>33.3</td><td>53.4</td><td>35.8</td><td>33.2</td><td>38.8</td></tr><tr><td>2</td><td>33.7</td><td>53.9</td><td>36.4</td><td>33.6</td><td>39.3</td></tr><tr><td>4</td><td>33.7</td><td>54.1</td><td>36.5</td><td>33.9</td><td>39.5</td></tr><tr><td>6</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr><tr><td>8</td><td>33.6</td><td>53.6</td><td>36.1</td><td>33.7</td><td>39.3</td></tr></table>",
998
+ "bbox": [
999
+ 460,
1000
+ 251,
1001
+ 800,
1002
+ 335
1003
+ ],
1004
+ "page_idx": 8
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "Table 6, we study the influence of instance prototype number and the effect of foreground-background contrasting. Using both positive and negative prototypes improves AP from $3 2 . 5 \\%$ to $3 3 . 9 \\%$ . Compared to the single prototype representation, the GMM demonstrate a stronger appearance modeling ability. We further find that the performance saturates when the number is larger than 60. In the Figure 6 and supplementary file, we provide additional instance cross-attention maps visualization to highlight the various attended regions. ",
1009
+ "bbox": [
1010
+ 173,
1011
+ 352,
1012
+ 825,
1013
+ 435
1014
+ ],
1015
+ "page_idx": 8
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "In Table 7, we investigate the effectiveness of instance prototype (including the both positive and negative ones) propagation in an online manner, and compared it with using the instance prototype in the initial frame or current frame. We find that updating object prototypes recurrently with a momentum of 0.2 improves video segmentation AP of $1 . 3 \\%$ . ",
1020
+ "bbox": [
1021
+ 174,
1022
+ 441,
1023
+ 825,
1024
+ 497
1025
+ ],
1026
+ "page_idx": 8
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "Influence of EM iteration number We study the influence of EM iteration number $T$ during condensing prototypes and the results are shown in Table 9. Using temporal memory length 4, we find that the accuracy gains of PCAN increase with more iterations from 1 to 6, and the improvement starts to saturate when $T \\geqslant 6$ . We use the same iteration number during training and test. ",
1031
+ "bbox": [
1032
+ 174,
1033
+ 502,
1034
+ 823,
1035
+ 559
1036
+ ],
1037
+ "page_idx": 8
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "Ablation study on KITTI-MOTS We also train PCAN on the KITTI-MOTS [37] training set and conduct ablations on the instance and frame PCAMs. In Table 10, PCAN with window size 8 on val set also shows significant improvements compared to the TrackR-CNN [37] (a two-stage tracker based on Mask R-CNN) on the benchmark. Note that many published methods on KITTI-MOTS, such as Vip-DeepLab [31], EagerMOT [17] and MOTSFusion [24], use 3D bounding boxes, LIDAR point clouds, or optical flow (PointTrack [44]). In contrast, our method only relies on RGB images. ",
1042
+ "bbox": [
1043
+ 173,
1044
+ 564,
1045
+ 825,
1046
+ 648
1047
+ ],
1048
+ "page_idx": 8
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "Qualitative analysis In Figure 4, we showcase qualitative ablation results of PCAN on Youtube-VIS. Compared to the baseline, we see that our model results in more consistent segmentation and better tracking using prototypical cross-attention module. We also provide visual results on BDD100K in Figure 5, where PCAN produces robust tracking and segmentation results even under large object appearance change (first row) or low illumination (second row). In the 3rd row, PCAN has limitations in handling missing detections (the person in the first frame) with limited appearance information under extreme lighting, and produce tracking errors in the second frame when visible parts of the same car is totally different across frame and with low appearance similarity. ",
1053
+ "bbox": [
1054
+ 173,
1055
+ 654,
1056
+ 825,
1057
+ 765
1058
+ ],
1059
+ "page_idx": 8
1060
+ },
1061
+ {
1062
+ "type": "text",
1063
+ "text": "Cross-Attention Visualization In Figure 6, we visualize instance-level prototypical cross-attention of the interested car for both the corresponding foreground and background regions on three continuous frames on BDD100K, where the attended region of each object prototype reveals the implicit unsupervised temporal consistency. More visualization cases on instance and frame cross-attention maps and relevant analysis are in the supplementary file. ",
1064
+ "bbox": [
1065
+ 174,
1066
+ 780,
1067
+ 825,
1068
+ 849
1069
+ ],
1070
+ "page_idx": 8
1071
+ },
1072
+ {
1073
+ "type": "text",
1074
+ "text": "Societal impact PCAN has high potential impact in important applications, such as transportation, sports analysis, and self-driving vehicles. However, this powerful technology can be deployed in human monitoring and surveillance as well which raise ethical and privacy issues. Potential negative impact can be avoided by enforcing a strict and secure data privacy regulation such as the GDPR, ",
1075
+ "bbox": [
1076
+ 176,
1077
+ 856,
1078
+ 825,
1079
+ 911
1080
+ ],
1081
+ "page_idx": 8
1082
+ },
1083
+ {
1084
+ "type": "table",
1085
+ "img_path": "images/ef8cc758accf1ceae95dc709836fe8cfa88c34d4d11b665e933ececbb35c2552.jpg",
1086
+ "table_caption": [
1087
+ "Table 10: Ablation study of PCAN on KITTI-MOTS [37] validation set. "
1088
+ ],
1089
+ "table_footnote": [],
1090
+ "table_body": "<table><tr><td>Method</td><td>|Car-MOTSA</td><td>Ped-MOTSA</td><td>Car-MOTSP</td><td>Ped-MOTSP</td></tr><tr><td>TrackR-CNN [37]</td><td>87.8</td><td>65.1</td><td>87.2</td><td>75.7</td></tr><tr><td rowspan=\"3\">PCAN w/o frame PCAM PCAN w/o instance PCAM</td><td>87.3</td><td>65.3</td><td>86.9</td><td>75.0</td></tr><tr><td>87.8</td><td>65.8</td><td>87.1</td><td>75.5</td></tr><tr><td>89.6</td><td>66.4</td><td>88.3</td><td>76.1</td></tr></table>",
1091
+ "bbox": [
1092
+ 235,
1093
+ 112,
1094
+ 753,
1095
+ 188
1096
+ ],
1097
+ "page_idx": 9
1098
+ },
1099
+ {
1100
+ "type": "image",
1101
+ "img_path": "images/43f2b11ee05e974f625ef7fa9c6ca494b65750d3481407d6beccb7f126aa5d06.jpg",
1102
+ "image_caption": [
1103
+ "Figure 5: Qualitative results of our method on BDD100K. PCAN produces robust tracking and segmentation results under large motion and appearance changes (1st row) and heavy traffic in low-light conditions (2nd row). In the 3rd row, PCAN misses a detection (the person to the left in 1st frame), and produces tracking errors (2nd frame) when it covers totally different regions of the car with low appearance similarity. Zoom for better view. Video results are in the suppl. file. "
1104
+ ],
1105
+ "image_footnote": [],
1106
+ "bbox": [
1107
+ 181,
1108
+ 193,
1109
+ 816,
1110
+ 400
1111
+ ],
1112
+ "page_idx": 9
1113
+ },
1114
+ {
1115
+ "type": "image",
1116
+ "img_path": "images/4685f107e82d0332bd9ca6ab4b5b4295cba1dbb068fc8f484d749cefb0c32c5f.jpg",
1117
+ "image_caption": [
1118
+ "Figure 6: Instance cross-attention maps visualization for the car specified by the red dotted bounding box on BDD100K. We select the first four foreground/background prototypes as example, where each one focuses on specific car sub-regions with implicit unsupervised temporal consistency over time. proper technology management education, and having an open dialogue among various stakeholders on how such technology should be deployed and regulated. "
1119
+ ],
1120
+ "image_footnote": [],
1121
+ "bbox": [
1122
+ 174,
1123
+ 481,
1124
+ 823,
1125
+ 686
1126
+ ],
1127
+ "page_idx": 9
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "5 Conclusion ",
1132
+ "text_level": 1,
1133
+ "bbox": [
1134
+ 173,
1135
+ 781,
1136
+ 299,
1137
+ 797
1138
+ ],
1139
+ "page_idx": 9
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "We present PCAN, a new online method for MOTS. PCAN first distills the space-time memory into a set of frame-level and instance-level prototypes, followed by cross-attention to retrieve rich information from the past frames. In contrast to most previous MOTS methods with limited temporal consideration, PCAN efficiently performs long-term temporal propagation and aggregation, and achieves large performance gain on the two largest MOTS benchmarks with low computation and memory cost. We validate the efficacy of PCAN on both the existing one-stage and two-stage trackers. We believe PCAN will significantly benefit more video understanding tasks in the future. ",
1144
+ "bbox": [
1145
+ 174,
1146
+ 814,
1147
+ 825,
1148
+ 911
1149
+ ],
1150
+ "page_idx": 9
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "Acknowledgments and Disclosure of Funding ",
1155
+ "text_level": 1,
1156
+ "bbox": [
1157
+ 174,
1158
+ 88,
1159
+ 553,
1160
+ 107
1161
+ ],
1162
+ "page_idx": 10
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "This research is supported in part by the Research Grant Council of the Hong Kong SAR under grant no. 16201818 and Kuaishou Technology. ",
1167
+ "bbox": [
1168
+ 176,
1169
+ 119,
1170
+ 823,
1171
+ 148
1172
+ ],
1173
+ "page_idx": 10
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "References ",
1178
+ "text_level": 1,
1179
+ "bbox": [
1180
+ 174,
1181
+ 166,
1182
+ 266,
1183
+ 183
1184
+ ],
1185
+ "page_idx": 10
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "[1] Ali Athar, Sabarinath Mahadevan, Aljoša Ošep, Laura Leal-Taixé, and Bastian Leibe. Stem-seg: Spatiotemporal embeddings for instance segmentation in videos. In ECCV, 2020. [2] Gedas Bertasius and Lorenzo Torresani. Classifying, segmenting, and tracking object instances in video with mask propagation. In CVPR, 2020. \n[3] Daniel Bolya, Chong Zhou, Fanyi Xiao, and Yong Jae Lee. Yolact: Real-time instance segmentation. In ICCV, 2019. \n[4] Sergi Caelles, Kevis-Kokitsi Maninis, Jordi Pont-Tuset, Laura Leal-Taixé, Daniel Cremers, and Luc Van Gool. One-shot video object segmentation. In CVPR, 2017. \n[5] Jiale Cao, Rao Muhammad Anwer, Hisham Cholakkal, Fahad Shahbaz Khan, Yanwei Pang, and Ling Shao. Sipmask: Spatial information preservation for fast image and video instance segmentation. In ECCV, 2020. \n[6] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020. \n[7] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. $a ^ { 2 }$ -nets: Double attention networks. In NeurIPS, 2018. \n[8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020. \n[9] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In ICCV, 2019. \n[10] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. \n[11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In ICCV, 2017. \n[12] Ping Hu, Fabian Caba, Oliver Wang, Zhe Lin, Stan Sclaroff, and Federico Perazzi. Temporally distributed networks for fast video semantic segmentation. In CVPR, 2020. \n[13] Zhaojin Huang, Lichao Huang, Yongchao Gong, Chang Huang, and Xinggang Wang. Mask scoring r-cnn. In CVPR, 2019. \n[14] Joakim Johnander, Martin Danelljan, Emil Brissman, Fahad Shahbaz Khan, and Michael Felsberg. A generative appearance model for end-to-end video object segmentation. In CVPR, 2019. \n[15] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Deep occlusion-aware instance segmentation with overlapping bilayers. In CVPR, 2021. \n[16] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Occlusion-aware video object inpainting. In ICCV, 2021. \n[17] Aleksandr Kim, Aljoša Ošep, and Laura Leal-Taix’e. Eagermot: 3d multi-object tracking via sensor fusion. In IEEE International Conference on Robotics and Automation (ICRA), 2021. \n[18] Minghan Li, Shuai Li, Lida Li, and Lei Zhang. Spatial feature calibration and temporal fusion for effective one-stage video instance segmentation. In CVPR, 2021. \n[19] Xia Li, Zhisheng Zhong, Jianlong Wu, Yibo Yang, Zhouchen Lin, and Hong Liu. Expectation-maximization attention networks for semantic segmentation. In ICCV, 2019. \n[20] Yingwei Li, Xiaojie Jin, Jieru Mei, Xiaochen Lian, Linjie Yang, Cihang Xie, Qihang Yu, Yuyin Zhou, Song Bai, and Alan L Yuille. Neural architecture search for lightweight non-local networks. In CVPR, 2020. \n[21] Chung-Ching Lin, Ying Hung, Rogerio Feris, and Linglin He. Video instance segmentation tracking with a modified vae architecture. In CVPR, 2020. \n[22] Dongfang Liu, Yiming Cui, Wenbo Tan, and Yingjie Chen. Sg-net: Spatial granularity network for one-stage video instance segmentation. In CVPR, 2021. \n[23] Xiankai Lu, Wenguan Wang, Danelljan Martin, Tianfei Zhou, Jianbing Shen, and Van Gool Luc. Video object segmentation with episodic graph memory networks. In ECCV, 2020. \n[24] Jonathon Luiten, Tobias Fischer, and Bastian Leibe. Track to reconstruct and reconstruct to track. IEEE Robotics and Automation Letters, 5(2):1803–1810, 2020. \n[25] Tim Meinhardt, Alexander Kirillov, Laura Leal-Taixe, and Christoph Feichtenhofer. Trackformer: Multiobject tracking with transformers. arXiv preprint arXiv:2101.02702, 2021. \n[26] Anton Milan, Laura Leal-Taixé, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016. \n[27] Anton Milan, Laura Leal-Taixé, Konrad Schindler, and Ian Reid. Joint tracking and segmentation of multiple targets. In CVPR, 2015. \n[28] Seoung Wug Oh, Joon-Young Lee, Ning Xu, and Seon Joo Kim. Video object segmentation using space-time memory networks. In ICCV, 2019. \n[29] Jiangmiao Pang, Linlu Qiu, Xia Li, Haofeng Chen, Qi Li, Trevor Darrell, and Fisher Yu. Quasi-dense similarity learning for multiple object tracking. In CVPR, 2021. \n[30] Jiyang Qi, Yan Gao, Yao Hu, Xinggang Wang, Xiaoyu Liu, Xiang Bai, Serge Belongie, Alan Yuille, Philip Torr, and Song Bai. Occluded video instance segmentation. arXiv preprint arXiv:2102.01558, 2021. \n[31] Siyuan Qiao, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Vip-deeplab: Learning visual perception with depth-aware video panoptic segmentation. In CVPR, 2021. \n[32] Hongje Seong, Junhyuk Hyun, and Euntai Kim. Kernelized memory network for video object segmentation. In ECCV, 2020. \n[33] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017. \n[34] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In ICCV, 2019. \n[35] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. \n[36] Paul Voigtlaender, Yuning Chai, Florian Schroff, Hartwig Adam, Bastian Leibe, and Liang-Chieh Chen. Feelvos: Fast end-to-end embedding learning for video object segmentation. In CVPR, 2019. \n[37] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger, and Bastian Leibe. Mots: Multi-object tracking and segmentation. In CVPR, 2019. \n[38] Apoorv Vyas, Angelos Katharopoulos, and François Fleuret. Fast transformers with clustered attention. NeurIPS, 2020. \n[39] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. \n[40] Xiaolong Wang and Abhinav Gupta. Videos as space-time region graphs. In ECCV, 2018. \n[41] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. arXiv preprint arXiv:2011.14503v1, 2020. \n[42] Nicolai Wojke, Alex Bewley, and Dietrich Paulus. Simple online and realtime tracking with a deep association metric. In IEEE international conference on image processing (ICIP), 2017. \n[43] Haozhe Xie, Hongxun Yao, Shangchen Zhou, Shengping Zhang, and Wenxiu Sun. Efficient regional memory network for video object segmentation. In CVPR, 2021. \n[44] Zhenbo Xu, Wei Zhang, Xiao Tan, Wei Yang, Huan Huang, Shilei Wen, Errui Ding, and Liusheng Huang. Segment as points for efficient online multi-object tracking and segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. \n[45] Boyu Yang, Chang Liu, Bohao Li, Jianbin Jiao, and Qixiang Ye. Prototype mixture models for few-shot semantic segmentation. In ECCV, 2020. \n[46] Linjie Yang, Yuchen Fan, and Ning Xu. Video instance segmentation. In ICCV, 2019. \n[47] Linjie Yang, Yanran Wang, Xuehan Xiong, Jianchao Yang, and Aggelos K Katsaggelos. Efficient video object segmentation via network modulation. In CVPR, 2018. \n[48] Shusheng Yang, Yuxin Fang, Xinggang Wang, Yu Li, Chen Fang, Ying Shan, Bin Feng, and Wenyu Liu. Crossover learning for fast online video instance segmentation. In ICCV, 2021. \n[49] Zongxin Yang, Yunchao Wei, and Yi Yang. Collaborative video object segmentation by foregroundbackground integration. In ECCV, 2020. \n[50] Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In CVPR, 2020. \n[51] Chi Zhang, Guosheng Lin, Fayao Liu, Rui Yao, and Chunhua Shen. Canet: Class-agnostic segmentation networks with iterative refinement and attentive few-shot learning. In CVPR, 2019. ",
1190
+ "bbox": [
1191
+ 171,
1192
+ 190,
1193
+ 826,
1194
+ 912
1195
+ ],
1196
+ "page_idx": 10
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "",
1201
+ "bbox": [
1202
+ 171,
1203
+ 87,
1204
+ 826,
1205
+ 690
1206
+ ],
1207
+ "page_idx": 11
1208
+ }
1209
+ ]
parse/train/5-GXHFNbq_U/5-GXHFNbq_U_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/5-GXHFNbq_U/5-GXHFNbq_U_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/5NA1PinlGFu/5NA1PinlGFu.md ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COLORIZATION TRANSFORMER
2
+
3
+ Manoj Kumar, Dirk Weissenborn & Nal Kalchbrenner Google Research, Brain Team {mechcoder,diwe,nalk}@google.com
4
+
5
+ # ABSTRACT
6
+
7
+ We present the Colorization Transformer, a novel approach for diverse high fidelity image colorization based on self-attention. Given a grayscale image, the colorization proceeds in three steps. We first use a conditional autoregressive transformer to produce a low resolution coarse coloring of the grayscale image. Our architecture adopts conditional transformer layers to effectively condition grayscale input. Two subsequent fully parallel networks upsample the coarse colored low resolution image into a finely colored high resolution image. Sampling from the Colorization Transformer produces diverse colorings whose fidelity outperforms the previous state-of-the-art on colorising ImageNet based on FID results and based on a human evaluation in a Mechanical Turk test. Remarkably, in more than $60 \%$ of cases human evaluators prefer the highest rated among three generated colorings over the ground truth. The code and pre-trained checkpoints for Colorization Transformer are publicly available at this url.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ ![](images/9a6a450f5746fd01f383ca4742e0830f835b4a60b33476f2d9417aa39d2494bd.jpg)
12
+ Figure 1: Samples of our model showing diverse, high-fidelity colorizations.
13
+
14
+ Image colorization is a challenging, inherently stochastic task that requires a semantic understanding of the scene as well as knowledge of the world. Core immediate applications of the technique include producing organic new colorizations of existing image and video content as well as giving life to originally grayscale media, such as old archival images (Tsaftaris et al., 2014), videos (Geshwind, 1986) and black-and-white cartoons (Sykora et al., 2004; Qu et al., 2006; Cinarel & Zhang, 2017). \` Colorization also has important technical uses as a way to learn meaningful representations without explicit supervision (Zhang et al., 2016; Larsson et al., 2016; Vondrick et al., 2018) or as an unsupervised data augmentation technique, whereby diverse semantics-preserving colorizations of labelled images are produced with a colorization model trained on a potentially much larger set of unlabelled images.
15
+
16
+ The current state-of-the-art in automated colorization are neural generative approaches based on log-likelihood estimation (Guadarrama et al., 2017; Royer et al., 2017; Ardizzone et al., 2019). Probabilistic models are a natural fit for the one-to-many task of image colorization and obtain better results than earlier determinisitic approaches avoiding some of the persistent pitfalls (Zhang et al., 2016). Probabilistic models also have the central advantage of producing multiple diverse colorings that are sampled from the learnt distribution.
17
+
18
+ In this paper, we introduce the Colorization Transformer (ColTran), a probabilistic colorization model composed only of axial self-attention blocks (Ho et al., 2019b; Wang et al., 2020). The main advantages of axial self-attention blocks are the ability to capture a global receptive field with only√ two layers and $\mathcal { O } ( D \sqrt { D } )$ instead of $\mathcal { O } ( D ^ { 2 } )$ complexity. They can be implemented efficiently using matrix-multiplications on modern accelerators such as TPUs (Jouppi et al., 2017). In order to enable colorization of high-resolution grayscale images, we decompose the task into three simpler sequential subtasks: coarse low resolution autoregressive colorization, parallel color and spatial super-resolution. For coarse low resolution colorization, we apply a conditional variant of Axial Transformer (Ho et al., 2019b), a state-of-the-art autoregressive image generation model that does not require custom kernels (Child et al., 2019). While Axial Transformers support conditioning by biasing the input, we find that directly conditioning the transformer layers can improve results significantly. Finally, by leveraging the semi-parallel sampling mechanism of Axial Transformers we are able to colorize images faster at higher resolution than previous work (Guadarrama et al., 2017) and as an effect this results in improved colorization fidelity. Finally, we employ fast parallel deterministic upsampling models to super-resolve the coarsely colorized image into the final high resolution output. In summary, our main contributions are:
19
+
20
+ • First application of transformers for high-resolution $( 2 5 6 \times 2 5 6 )$ image colorization.
21
+ • We introduce conditional transformer layers for low-resolution coarse colorization in Section 4.1. The conditional layers incorporate conditioning information via multiple learnable components that are applied per-pixel and per-channel. We validate the contribution of each component with extensive experimentation and ablation studies.
22
+ We propose training an auxiliary parallel prediction model jointly with the low resolution coarse colorization model in Section 4.2. Improved FID scores demonstrate the usefulness of this auxiliary model.
23
+ • We establish a new state-of-the-art on image colorization outperforming prior methods by a large margin on FID scores and a 2-Alternative Forced Choice (2AFC) Mechanical Turk test. Remarkably, in more than $60 \%$ of cases human evaluators prefer the highest rated among three generated colorings over the ground truth.
24
+
25
+ # 2 RELATED WORK
26
+
27
+ Colorization methods have initially relied on human-in-the-loop approaches to provide hints in the form of scribbles (Levin et al., 2004; Ironi et al., 2005; Huang et al., 2005; Yatziv & Sapiro, 2006; Qu et al., 2006; Luan et al., 2007; Tsaftaris et al., 2014; Zhang et al., 2017; Ci et al., 2018) and exemplar-based techniques that involve identifying a reference source image to copy colors from (Reinhard et al., 2001; Welsh et al., 2002; Tai et al., 2005; Ironi et al., 2005; Pitié et al., 2007; Morimoto et al., 2009; Gupta et al., 2012; Xiao et al., 2020). Exemplar based techniques have been recently extended to video as well (Zhang et al., 2019a). In the past few years, the focus has moved on to more automated, neural colorization methods. The deterministic colorization techniques such as CIC (Zhang et al., 2016), LRAC (Larsson et al., 2016), LTBC (Iizuka et al., 2016), Pix2Pix (Isola et al., 2017) and DC (Cheng et al., 2015; Dahl, 2016) involve variations of CNNs to model per-pixel color information conditioned on the intensity.
28
+
29
+ Generative colorization models typically extend unconditional image generation models to incorporate conditioning information from a grayscale image. Specifically, cINN (Ardizzone et al., 2019) use conditional normalizing flows (Dinh et al., 2014), VAE-MDN (Deshpande et al., 2017; 2015) and SCC-DC (Messaoud et al., 2018) use conditional VAEs (Kingma & Welling, 2013), and cGAN (Cao et al., 2017) use GANs (Goodfellow et al., 2014) for generative colorization. Most closely related to ColTran are other autoregressive approaches such as PixColor (Guadarrama et al., 2017) and PIC (Royer et al., 2017) with PixColor obtaining slightly better results than PIC due to its CNN-based upsampling strategy. ColTran is similar to PixColor in the usage of an autoregressive model for low resolution colorization and parallel spatial upsampling. ColTran differs from PixColor in the following ways. We train ColTran in a completely unsupervised fashion, while the conditioning network in PixColor requires pre-training with an object detection network that provides substantial semantic information. PixColor relies on PixelCNN (Oord et al., 2016) that requires a large depth to model interactions between all pixels. ColTran relies on Axial Transformer (Ho et al., 2019b) and can model all interactions between pixels with just 2 layers. PixColor uses different architectures for conditioning, colorization and super-resolution, while ColTran is conceptually simpler as we use self-attention blocks everywhere for both colorization and superresolution. Finally, we train our autoregressive model on a single coarse channel and a separate color upsampling network that improves fidelity (See: 5.3). The multi-stage generation process in ColTran that upsamples in depth and in size is related to that used in Subscale Pixel Networks (Menick & Kalchbrenner, 2018) for image generation, with differences in the order and representation of bits as well as in the use of fully parallel networks. The self-attention blocks that are the building blocks of ColTran were initially developed for machine translation (Vaswani et al., 2017), but are now widely used in a number of other applications including density estimation (Parmar et al., 2018; Child et al., 2019; Ho et al., 2019a; Weissenborn et al., 2019) and GANs (Zhang et al., 2019b)
30
+
31
+ # 3 BACKGROUND: AXIAL TRANSFORMER
32
+
33
+ # 3.1 ROW AND COLUMN SELF-ATTENTION
34
+
35
+ Self-attention (SA) has become a standard building block in many neural architectures. Although the complexity of self-attention is quadratic with the number of input elements (here pixels), it has become quite popular for image modeling recently (Parmar et al., 2018; Weissenborn et al., 2019) due to modeling innovations that don’t require running global self-attention between all pixels. Following the work of (Ho et al., 2019b) we employ standard qkv self-attention (Vaswani et al., 2017) within rows and columns of an image. By alternating row- and column self-attention we effectively allow global exchange of information between all pixel positions. For the sake of brevity we omit the exact equations for multihead self-attention and refer the interested reader to the Appendix H for more details. Row/column attention layers are the core components of our model. We use them in the autoregressive colorizer, the spatial upsampler and the color upsampler.
36
+
37
+ # 3.2 AXIAL TRANSFORMER
38
+
39
+ Ths Axial Transformer (Ho et al., 2019b) is an autoregressive model that applies (masked) row- and column self-attention operations in a way that efficiently summarizes all past information $\mathbf { x } _ { i , < j }$ and $\mathbf x _ { < i , }$ · to model a distribution over pixel $\mathbf { x } _ { i , j }$ at position $i , j$ . Causal masking is employed by setting all $A _ { m , n } = 0$ where $n > m$ during self-attention (see Eq. 15).
40
+
41
+ Outer decoder. The outer decoder computes a state ${ \bf { s } } _ { o }$ over all previous rows $\mathbf { x } _ { \leq i , }$ · by applying $N$ layers of full row self-attention followed by masked column self-attention. (Eq 2). ${ \bf { s } } _ { o }$ is shifted down by a single row, such that the output context $\mathbf { o } _ { i , j }$ at position $i , j$ only contains information about pixels $\mathbf x _ { < i , }$ · from prior rows. (Eq 3)
42
+
43
+ $$
44
+ \begin{array} { r l } { \mathbf { e } = \mathrm { E m b e d d i n g s } ( \mathbf { x } ) } \\ { \mathbf { s } _ { o } = \mathrm { M a s k e d C o l u m n } ( \mathrm { R o w } ( \mathbf { e } ) ) } \\ { \mathbf { o } = \mathrm { S h i f t D o w n } ( \mathbf { s } _ { o } ) } \end{array} \quad \quad \times N
45
+ $$
46
+
47
+ Inner decoder. The embeddings to the inner decoder are shifted right by a single column to mask the current pixel $\mathbf { x } _ { i , j }$ . The context o from the outer decoder conditions the inner decoder by biasing the shifted embeddings. It then computes a final state $\mathbf { h }$ , by applying $N$ layers of masked row-wise self-attention to infuse additional information from prior pixels of the same row $\mathbf { x } _ { i , < j }$ (Eq 4). $\mathbf { h } _ { i , j }$ comprises information about all past pixels $\mathbf { x } _ { < i }$ and $\mathbf { x } _ { i , < j }$ . A dense layer projects $\mathbf { h }$ into a distribution $p ( \mathbf { x } _ { i j } )$ over the pixel at position $( i , j )$ conditioned on all previous pixels $\mathbf { x } _ { i , < j }$ and $\mathbf { x } _ { < i , \cdot }$ .
48
+
49
+ $$
50
+ \begin{array} { r l } { \mathbf { z } = \mathbf { o } + \mathrm { S h i f t R i g h t } ( \mathbf { e } ) } & { { } } \\ { \mathbf { h } = \mathbf { M a s k e d R o w } ( \mathbf { z } ) } & { { } \times N } \\ { p ( \mathbf { x } _ { i j } ) = \mathrm { D e n s e } ( \mathbf { h } ) } \end{array}
51
+ $$
52
+
53
+ Encoder. As shown above, the outer and inner decoder operate on 2-D inputs, such as a single channel of an image. For multi-channel RGB images, when modeling the "current channel", the Axial Transformer incorporates information from prior channels of an image (as per raster order) with an encoder. The encoder encodes each prior channel independently with a stack of unmasked row/column attention layers. The encoder outputs across all prior channels are summed to output a conditioning context c for the "current channel". The context conditions the outer and inner decoder by biasing the inputs in Eq 1 and Eq 4 respectively.
54
+
55
+ ![](images/a8c8dd7ddc8ca6e460a85a6d44ff8c0af0ead2e934f9ff6bff008ed8feb977cc.jpg)
56
+ Figure 2: Depiction of ColTran. It consists of 3 individual models: an autoregressive colorizer (left), a color upsampler (middle) and a spatial upsampler (right). Each model is optimized independently. The autoregressive colorizer (ColTran core) is an instantiation of Axial Transformer (Sec. 3.2, Ho et al. (2019b)) with conditional transformer layers and an auxiliary parallel head proposed in this work (Sec. 4.1). During training, the groundtruth coarse low resolution image is both the input to the decoder and the target. Masked layers ensure that the conditional distributions for each pixel depends solely on previous ground-truth pixels. (See Appendix G for a recap on autoregressive models). ColTran upsamplers are stacked row/column attention layers that deterministically upsample color and space in parallel. Each attention block (in green) is residual and consists of the following operations: layer-norm multihead self-attention $ \mathrm { M L P } .$
57
+
58
+ Sampling. The Axial Transformer natively supports semi-parallel sampling that avoids reevaluation of the entire network to generate each pixel of a RGB image. The encoder is run once per-channel, the outer decoder is run once per-row and the inner decoder is run once per-pixel. The context from the outer decoder and the encoder is initially zero. The encoder conditions the outer decoder (Eq 1) and the encoder $^ +$ outer decoder condition the inner decoder (Eq 4). The inner decoder then generates a row, one pixel at a time via Eqs. (4) to (6). After generating all pixels in a row, the outer decoder recomputes context via Eqs. (1) to (3) and the inner decoder generates the next row. This proceeds till all the pixels in a channel are generated. The encoder, then recomputes context to generate the next channel.
59
+
60
+ # 4 PROPOSED ARCHITECTURE
61
+
62
+ Image colorization is the task of transforming a grayscale image $x ^ { g } \in \mathbb { R } ^ { H \times W \times 1 }$ into a colored image $\boldsymbol { x } \in \mathbb { R } ^ { H \times W \times 3 }$ . The task is inherently stochastic; for a given grayscale image $x ^ { g }$ , there exists a conditional distribution over $x$ , $p ( x | x ^ { g } )$ . Instead of predicting $x$ directly from $x ^ { g }$ , we instead sequentially predict two intermediate low resolution images $x ^ { s \downarrow }$ and $x ^ { s \downarrow c \downarrow }$ with different color depth first. Besides simplifying the task of high-resolution image colorization into simpler tasks, the smaller resolution allows for training larger models.
63
+
64
+ We obtain $x ^ { s \downarrow }$ , a spatially downsampled representation of $x$ , by standard area interpolation. $x ^ { s \downarrow c \downarrow }$ is a 3 bit per-channel representation of $x ^ { s \downarrow }$ , that is, each color channel has only 8 intensities. Thus, there are $8 ^ { \hat { 3 } } = 5 1 2$ coarse colors per pixel which are predicted directly as a single “color” channel. We rewrite the conditional likelihood $p ( x | x ^ { g } )$ to incorporate the intermediate representations as follows:
65
+
66
+ $$
67
+ \begin{array} { r l } & { p ( x | x ^ { g } ) = p ( x | x ^ { g } ) \cdot 1 = p ( x | x ^ { g } ) \cdot p ( x ^ { s \downarrow c \downarrow } , x ^ { s \downarrow } | x , x ^ { g } ) = p ( x ^ { s \downarrow c \downarrow } , x ^ { s \downarrow } , x | x ^ { g } ) } \\ & { \qquad = p ( x | x ^ { s \ast } , x ^ { g } ) \cdot p ( x ^ { s \downarrow } | x ^ { s \downarrow c \downarrow } , x ^ { g } ) \cdot p ( x ^ { s \downarrow c \downarrow } | x ^ { g } ) } \end{array}
68
+ $$
69
+
70
+ ColTran core (Section 4.1), a parallel color upsampler and a parallel spatial upsampler (Section 4.3) model $p ( x ^ { s _ { \downarrow } c _ { \downarrow } } | x ^ { g } ) , p ( x ^ { s _ { \downarrow } } | x ^ { s _ { \downarrow } \bar { c } _ { \downarrow } } , x ^ { g } )$ and $p ( x | x ^ { s \downarrow } )$ respectively. In the subsections below, we describe
71
+
72
+ <table><tr><td>Component</td><td>Unconditional</td><td>Conditional</td></tr><tr><td>Self-Attention</td><td>y = Softmax( gkT )v V/D</td><td>qck y = Softmax( )vc √D where ∀z=k,q,ν</td></tr><tr><td>MLP</td><td>y = ReLU(xU1+bi)U2 +b2</td><td>Zc =(cU²) z+(cU²) h = ReLU(xU1 +bi)U2 +b2 y=(cUf)h+(cUf)</td></tr><tr><td>Layer Norm</td><td>y = βNorm(x) +γ</td><td>y = βcNorm(x) +γc whereμ= βc,γc C∈RHXWXDC∈RHWXD μ = (u·c)Ua uERHW</td></tr></table>
73
+
74
+ Table 1: We contrast the different components of unconditional self-attention with self-attention conditioned on context $\mathbf { c } \in \mathbb { R } ^ { M \times N \times D }$ . Learnable parameters specific to conditioning are denoted by $\mathbf { u }$ and $U _ { \cdot } \in \mathbb { R } ^ { D \times D }$ .
75
+
76
+ these individual components in detail. From now on we will refer to all low resolutions as $M \times N$ and high resolution as $H \times W$ . An illustration of the overall architecture is shown in Figure 2.
77
+
78
+ # 4.1 COLTRAN CORE
79
+
80
+ In this section, we describe ColTran core, a conditional variant of the Axial Transformer (Ho et al., 2019b) for low resolution coarse colorization. ColTran Core models a distribution $p _ { c } ( x ^ { s \downarrow c \downarrow } | x ^ { g } )$ over 512 coarse colors for every pixel, conditioned on a low resolution grayscale image in addition to the colors from previously predicted pixels as per raster order (Eq. 9).
81
+
82
+ $$
83
+ p _ { c } ( x ^ { s \downarrow c \downarrow } | x ^ { g } ) = \prod _ { i = 1 } ^ { M } \prod _ { j = 1 } ^ { N } p _ { c } ( x _ { i j } ^ { s \downarrow c \downarrow } | x ^ { g } , x _ { < i } ^ { s \downarrow c \downarrow } , x _ { i , < j } ^ { s \downarrow c \downarrow } )
84
+ $$
85
+
86
+ Given a context representation $\mathbf { c } \in \mathbb { R } ^ { M \times N \times D }$ we propose conditional transformer layers in Table 1. Conditional transformer layers have conditional versions of all components within the standard attention block (see Appendix H, Eqs. 14-18).
87
+
88
+ Conditional Self-Attention. For every layer in the decoder, we apply six $1 \times 1$ convolutions to c to obtain three scale and shift vectors which we apply element-wise to q, $\mathbf { k }$ and $\mathbf { v }$ of the self-attention operation (Appendix 3.1), respectively.
89
+
90
+ Conditional MLP. A standard component of the transformer architecture is a two layer pointwise feed-forward network after the self-attention layer. We scale and shift to the output of each MLP conditioned on c as for self-attention.
91
+
92
+ Conditional Layer Norm. Layer normalization (Ba et al., 2016) globally scales and shifts a given normalized input using learnable vectors $\beta , \gamma$ . Instead, we predict $\beta _ { c }$ and $\gamma _ { c }$ as a function of c. We first aggregate c into a global 1-D representation $\overline { { \mathbf { c } } } \in \mathbb { R } ^ { L }$ via a learnable, spatial pooling layer. Spatial pooling is initialized as a mean pooling layer. Similar to 1-D conditional normalization layers (Perez et al., 2017; De Vries et al., 2017; Dumoulin et al., 2016; Huang & Belongie, 2017), we then apply a linear projection on c to predict $\beta _ { c }$ and $\gamma _ { c }$ , respectively.
93
+
94
+ A grayscale encoder consisting of multiple, alternating row and column self-attention layers encodes the grayscale image into the initial conditioning context $\mathbf { c } ^ { g }$ . It serves as both context for the conditional layers and as additional input to the embeddings of the outer decoder. The sum of the outer decoder’s output and $\mathbf { c } ^ { g }$ condition the inner decoder. Figure 2 illustrates how conditioning is applied in the autoregressive core of the ColTran architecture.
95
+
96
+ Conditioning every layer via multiple components allows stronger gradient signals through the encoder and as an effect the encoder can learn better contextual representations. We validate this empirically by outperforming the native Axial Transformer that conditions context states by biasing (See Section 5.2 and Section 5.4).
97
+
98
+ We additionally found it beneficial to train an auxiliary parallel prediction model that models $\widetilde { p } _ { c } ( x ^ { s \downarrow c \downarrow } )$ edirectly on top of representations learned by the grayscale encoder which we found beneficial for regularization (Eq. 10)
99
+
100
+ $$
101
+ \widetilde { p } _ { c } ( x ^ { s \downarrow c \downarrow } | x ^ { g } ) = \prod _ { i = 1 } ^ { M } \prod _ { j = 1 } ^ { N } \widetilde { p } _ { c } ( x _ { i j } ^ { s \downarrow c \downarrow } | x ^ { g } )
102
+ $$
103
+
104
+ Intuitively, this forces the model to compute richer representations and global color structure already at the output of the encoder which can help conditioning and therefore has a beneficial, regularizing effect on learning. We apply a linear projection, $U _ { \mathrm { p a r a l l e l } } \in \mathbb { R } ^ { L \times 5 1 2 }$ on top of $\mathbf { c } ^ { g }$ (the output of the grayscale encoder) into a per-pixel distribution over 512 coarse colors. It was crucial to tune the relative contribution of the autoregressive and parallel predictions to improve performance which we study in Section 5.3
105
+
106
+ # 4.3 COLOR & SPATIAL UPSAMPLING
107
+
108
+ In order to produce high-fidelity colorized images from low resolution, coarse color images and a given high resolution grayscale image, we train color and spatial upsampling models. They share the same architecture while differing in their respective inputs and resolution at which they operate. Similar to the grayscale encoder, the upsamplers comprise of multiple alternating layers of row and column self-attention. The output of the encoder is projected to compute the logits underlying the per pixel color probabilities of the respective upsampler. Figure 2 illustrates the architectures
109
+
110
+ Color Upsampler. We convert the coarse image $x ^ { s \downarrow c \downarrow } \in \mathbb { R } ^ { M \times N \times 1 }$ of 512 colors back into a 3 bit RGB image with 8 symbols per channel. The channels are embedded using separate embedding matrices to $\mathbf { x } _ { k } ^ { s \downarrow c \downarrow } \in \bar { \mathbb { R } } ^ { M \times N \times \bar { D } }$ , where $k \in \{ R , G , B \}$ indicates the channel. We upsample each channel individually conditioning only on the respective channel’s embedding. The channel embedding is summed with the respective grayscale embedding for each pixel and serve as input to the subsequent self-attention layers (encoder). The output of the encoder is further projected to per pixel-channel probability distributions $\widetilde { p } _ { c \uparrow } ( x _ { k } ^ { s _ { \downarrow } } | x ^ { s _ { \downarrow } c _ { \downarrow } } , \dot { x } ^ { g } ) \in \mathbb { R } ^ { M \times N \times 2 5 6 }$ over 256 color intensities for all $k \in \{ R , G , B \}$ (Eq. 11).
111
+
112
+ $$
113
+ \widetilde { p } _ { c \uparrow } ( x ^ { s _ { \downarrow } } | x ^ { g } ) = \prod _ { i = 1 } ^ { M } \prod _ { j = 1 } ^ { N } \widetilde { p } _ { c \uparrow } ( x _ { i j } ^ { s _ { \downarrow } } | x ^ { g } , x ^ { s _ { \downarrow } c _ { \downarrow } } )
114
+ $$
115
+
116
+ Spatial Upsampler. We first naively upsample $\boldsymbol { x } ^ { s _ { \downarrow } } \in \mathbb { R } ^ { M \times N \times 3 }$ into a blurry, high-resolution RGB image using area interpolation. As above, we then embed each channel of the blurry RGB image and run a per-channel encoder exactly the same way as with the color upsampler. The output of the encoder is finally projected to per pixel-channel probability distributions $\bar { \tilde { p } } _ { s \uparrow } ( x _ { k } ^ { - } | x ^ { s \downarrow } , x ^ { g } ) \in \mathbf { \bar { \mathbb { R } } } ^ { H \times W \times 2 5 6 }$ over 256 color intensities for all $k \in \{ R , G , { \bar { B } } \}$ . (Eq. 12)
117
+
118
+ $$
119
+ \widetilde { p } _ { s \uparrow } ( x | x ^ { g } ) = \prod _ { i = 1 } ^ { H } \prod _ { j = 1 } ^ { W } \widetilde { p } _ { s \uparrow } ( x _ { i j } | x ^ { g } , x ^ { s \downarrow } )
120
+ $$
121
+
122
+ In our experiments, similar to (Guadarrama et al., 2017), we found parallel upsampling to be sufficient for high quality colorizations. Parallel upsampling has the huge advantage of fast generation which would be notoriously slow for full autoregressive models on high resolution. To avoid plausible minor color inconsistencies between pixels, instead of sampling each pixel from the predicted distribution in (Eq. 12 and Eq. 11), we just use the argmax. Even though this slightly limits the potential diversity of colorizations, in practice we observe that sampling only coarse colors via ColTran core is enough to produce a great variety of colorizations.
123
+
124
+ Objective. We train our architecture to minimize the negative log-likelihood (Eq. 13) of the data. $p _ { c } / \widetilde { p } _ { c } , \widetilde { p } _ { s \uparrow } , \widetilde { p } _ { c \uparrow }$ are maximized independently and $\lambda$ is a hyperparameter that controls the relative e e econtribution of $p _ { c }$ and $\widetilde { p } _ { c }$
125
+
126
+ $$
127
+ \mathcal { L } = ( 1 - \lambda ) \log p _ { c } + \lambda \log \widetilde { p } _ { c } + \log \widetilde { p } _ { c \uparrow } + \log \widetilde { p } _ { s \uparrow }
128
+ $$
129
+
130
+ ![](images/90c9767e5288df33cebf8ca51f5aaf3619d37fc01871e88c21fd1747bf0c6d8f.jpg)
131
+ Figure 3: Per pixel log-likelihood of coarse colored $6 4 \times 6 4$ images over the validation set as a function of training steps. We ablate the various components of the ColTran core in each plot. Left: ColTran with Conditional Transformer Layers vs a baseline Axial Transformer which conditions via addition (ColTran-B). ColTran-B $2 x$ and ColTran-B $_ { 4 x }$ refer to wider baselines with increased model capacity. Center: Removing each conditional sub-component one at a time (no cLN, no $c M L P$ and no $c A t t$ ). Right: Conditional shifts only (Shift), Conditional scales only (Scale), removal of kq conditioning in cAtt (cAtt, only v) and fixed mean pooling in cLN (cLN, mean pool). See Section 5.2 for more details.
132
+
133
+ # 5 EXPERIMENTS
134
+
135
+ # 5.1 TRAINING AND EVALUATION
136
+
137
+ We evaluate ColTran on colorizing $2 5 6 \times 2 5 6$ grayscale images from the ImageNet dataset (Russakovsky et al., 2015). We train the ColTran core, color and spatial upsamplers independently on 16 TPUv2 chips with a batch-size of 224, 768 and 32 for 600K, 450K and 300K steps respectively. We use 4 axial attention blocks in each component of our architecture, with a hidden size of 512 and 4 heads. We use RMSprop (Tieleman & Hinton, 2012) with a fixed learning rate of $3 e - 4$ . We set apart 10000 images from the training set as a holdout set to tune hyperparameters and perform ablations. To compute FID, we generate 5000 samples conditioned on the grayscale images from this holdout set. We use the public validation set to display qualitative results and report final numbers.
138
+
139
+ # 5.2 ABLATIONS OF COLTRAN CORE
140
+
141
+ The autoregressive core of ColTran models downsampled, coarse-colored images of resolution $6 4 \times 6 4$ with 512 coarse colots, conditioned on the respective grayscale image. In a series of experiments we ablate the different components of the architecture (Figure 3). In the section below, we refer to the conditional self-attention, conditional layer norm and conditional MLP subcomponents as cAtt, cLN and cMLP respectively. We report the per-pixel log-likelihood over 512 coarse colors on the validation set as a function of training steps.
142
+
143
+ Impact of conditional transformer layers. The left side of Figure 3 illustrates the significant improvement in loss that ColTran core (with conditional transformer layers) achieves over the original Axial Transformer (marked ColTran-B). This demonstrates the usefulness of our proposed conditional layers. Because conditional layers introduce a higher number of parameters we additionally compare to and outperform the original Axial Transformer baselines with $2 \mathbf { x }$ and 4x wider MLP dimensions (labeled as ColTran- $. B 2 x$ and ColTran- $B 4 x$ ). Both ColTran- $. B 2 x$ and ColTran- $. B 4 x$ have an increased parameter count which makes for a fair comparison. Our results show that the increased performance cannot be explained solely by the fact that our model has more parameters.
144
+
145
+ Importance of each conditional component. We perform a leave-one-out study to determine the importance of each conditional component. We remove each conditional component one at a time and retrain the new ablated model. The curves no cLN, no cMLP and no $c A t t$ in the middle of Figure 3 quantifies our results. While each conditional component improves final performance, cAtt plays the most important role.
146
+
147
+ Multiplicative vs Additive Interactions. Conditional transformer layers employ both conditional shifts and scales consisting of additive and multiplicative interactions, respectively. The curves Scale and Shift on the right hand side of Figure 3 demonstrate the impact of these interactions via ablated architectures that use conditional shifts and conditional scales only. While both types of interactions are important, multiplicative interactions have a much stronger impact.
148
+
149
+ ![](images/e239801937d32a0132cfc731ccaef0f75b109485f2398e2c4ebba14d9a82f375.jpg)
150
+ Figure 4: Left: FID of generated $6 4 \times 6 4$ coarse samples as a function of training steps for $\lambda = 0 . 0 1$ and $\lambda = 0 . 0$ . Center: Final FID scores as a function of $\lambda$ . Right: FID as a function of log-likelihood.
151
+
152
+ Context-aware dot product attention. Self-attention computes the similarity between pixel representations using a dot product between q and $\mathbf { k }$ (See: Eq 15). cAtt applies conditional shifts and scales on q, k and allow modifying this similarity based on contextual information. The curve $c A t t$ , only $\nu$ on the right of Figure 3 shows that removing this property, by conditioning only on $\mathbf { v }$ leads to worse results.
153
+
154
+ Fixed vs adaptive global representation: cLN aggregates global information with a flexible learnable spatial pooling layer. We experimented with a fixed mean pooling layer forcing all the cLN layers to use the same global representation with the same per-pixel weight. The curve cLN, mean pool on the right of Figure 3 shows that enforcing this constraint causes inferior performance as compared to even having no cLN. This indicates that different aggregations of global representations are important for different cLN layers.
155
+
156
+ # 5.3 OTHER ABLATIONS
157
+
158
+ Auxiliary Parallel Model. We study the effect of the hyperparameter $\lambda$ , which controls the contribution of the auxiliary parallel prediction model described in Section 4.2. For a given $\lambda$ , we now optimize $\hat { p _ { c } } ( \lambda ) = ( 1 - \bar { \lambda } ) \log p _ { c } ( . ) + \lambda \log \widetilde { p } _ { c } ( . )$ instead of just $\log p _ { c } ( . )$ . Note that $\widetilde { p } _ { c } ( . )$ , models e eeach pixel independently, which is more difficult than modelling each pixel conditioned on previous pixels given by $\bar { p } _ { c } ( . )$ . Hence, employing $\hat { p } _ { c } ( \lambda )$ as a holdout metric, would just lead to a trivial soluion at $\lambda = 0$ . Instead, the FID of the generated coarse $6 4 \mathrm { x } 6 4$ samples provides a reliable way to find an optimal value of $\lambda$ . In Figure 4, at $\lambda = 0 . 0 1$ , our model converges to a better FID faster with a marginal but consistent final improvement. At higher values the performance deteriorates quickly.
159
+
160
+ Upsamplers. Upsampling coarse colored, low-resolution images to a higher resolution is much simpler. Given ground truth $6 4 \times 6 4$ coarse images, the ColTran upsamplers map these to fine grained $2 5 6 \times 2 5 6$ images without any visible artifacts and FID of 16.4. For comparison, the FID between two random sets of 5000 samples from our holdout set is 15.5. It is further extremely important to provide the grayscale image as input to each of the individual upsamplers, without which the generated images appear highly smoothed out and the FID drops to 27.0. We also trained a single upsampler for both color and resolution. The FID in this case drops marginally to 16.6.
161
+
162
+ # 5.4 FRECHET INCEPTION DISTANCE
163
+
164
+ We compute FID using colorizations of 5000 grayscale images of resolution $2 5 6 \times 2 5 6$ from the ImageNet validation set as done in (Ardizzone et al., 2019). To compute the FID, we ensure that there is no overlap between the grayscale images that condition ColTran and those in the ground-truth distribution. In addition to ColTran, we report two additional results ColTran-S and ColTran-B. ColTran- $. B$ refers to the baseline Axial Transformer that conditions via addition at the input. PixColor samples smaller $2 8 \times 2 8$ colored images autoregressively as compared to ColTran’s $6 4 \times 6 4$ . As a control experiment, we train an autoregressive model on resolution $2 8 \times 2 8$ (ColTran-S) to disentangle architectural choices and the inherent stochasticity of modelling higher resolution images. ColTran-S and ColTran- $B$ obtains FID scores of 22.06 and 19.98 that significantly improve over the previous best FID of 24.32. Finally, ColTran achieves the best FID score of 19.37. All results are presented in Table 2 left.
165
+
166
+ <table><tr><td>Models</td><td>FID</td></tr><tr><td>ColTran ColTran-B</td><td>19.37 ± 0.09 19.98 ± 0.20</td></tr><tr><td>ColTran-S PixColor[16]</td><td>22.06 ± 0.13 24.32 ± 0.21</td></tr><tr><td>cGAN [3] cINN [1]</td><td>24.41 ± 0.27 25.13 ± 0.3</td></tr><tr><td>VAE-MDN[11]</td><td>25.98 ± 0.28</td></tr><tr><td>Ground truth Grayscale</td><td>14.68 ± 0.15 30.19 ± 0.1</td></tr></table>
167
+
168
+ <table><tr><td>Models</td><td>AMTFooling rate</td></tr><tr><td>ColTran (Oracle) ColTran (Seed 1)</td><td>62.0%±0.99</td></tr><tr><td>ColTran (Seed 2)</td><td>40.5 %± 0.81 42.3 % ± 0.76</td></tr><tr><td>ColTran( (Seed 3)</td><td>41.7 %± 0.83</td></tr><tr><td>PixColor [16] (Oracle)</td><td>38.3%±0.98</td></tr><tr><td>PixColor (Seed 1)</td><td>33.3 %±1.04</td></tr><tr><td>PixColor (Seed 2)</td><td></td></tr><tr><td>PixColor (Seed 3)</td><td>35.4 % ± 1.01</td></tr><tr><td></td><td>33.2 % ± 1.03</td></tr><tr><td>CIC [56]</td><td>29.2 %±0.98</td></tr><tr><td>LRAC [27]</td><td>30.9 % ± 1.02</td></tr><tr><td>LTBC [22]</td><td>25.8 % ± 0.97</td></tr></table>
169
+
170
+ ![](images/43e82d6670b41487a5bb37c210b46ecbade28ac0b5b35475d156285597bda00f.jpg)
171
+ Table 2: We outperform various state-of-the-art colorization models both on FID (left) and human evaluation (right). We obtain the FID scores from (Ardizzone et al., 2019) and the human evaluation results from (Guadarrama et al., 2017). ColTran-B is a baseline Axial Transformer that conditions via addition and ColTran-S is a control experiment where we train ColTran core (See: 4.1) on smaller $2 8 \times 2 8$ colored images.
172
+ Figure 5: We display the per-pixel, maximum predicted probability over 512 colors as a proxy for uncertainty.
173
+
174
+ Correlation between FID and Log-likelihood. For each architectural variant, Figure 4 right illustrates the correlation between the log-likelihood and FID after 150K training steps. There is a moderately positive correlation of 0.57 between the log-likelihood and FID. Importantly, even an absolute improvement on the order of $0 . 0 1 \textrm { - } 0 . 0 2$ can improve FID significantly. This suggests that designing architectures that achieve better log-likelihood values is likely to lead to improved FID scores and colorization fidelity.
175
+
176
+ # 5.5 QUALITATIVE EVALUATION
177
+
178
+ Human Evaluation. For our qualitative assessment, we follow the protocol used in PixColor (Guadarrama et al., 2017). ColTran colorizes 500 grayscale images, with 3 different colorizations per image, denoted as seeds. Human raters assess the quality of these colorizations with a two alternative-forced choice (2AFC) test. We display both the ground-truth and recolorized image sequentially for one second in random order. The raters are then asked to identify the image with fake colors. For each seed, we report the mean fooling rate over 500 colorizations and 5 different raters. For the oracle methods, we use the human rating to pick the best-of-three colorizations. ColTran’s best seed achieves a fooling rate of $4 2 . 3 \%$ compared to the $3 5 . 4 \%$ of PixColor’s best seed. ColTran Oracle achieves a fooling rate of $62 \%$ , indicating that human raters prefer ColTran’s best-of-three colorizations over the ground truth image itself.
179
+
180
+ Visualizing uncertainty. The autoregressive core model of ColTran should be highly uncertain at object boundaries when colors change. Figure 5 illustrates the per-pixel, maximum predicted probability over 512 colors as a proxy for uncertainty. We observe that the model is indeed highly uncertain at edges and within more complicated textures.
181
+
182
+ # 6 CONCLUSION
183
+
184
+ We presented the Colorization Transformer (ColTran), an architecture that entirely relies on selfattention for image colorization. We introduce conditional transformer layers, a novel building block for conditional, generative models based on self-attention. Our ablations show the superiority of employing this mechanism over a number of different baselines. Finally, we demonstrate that ColTran can generate diverse, high-fidelity colorizations on ImageNet, which are largely indistinguishable from the ground-truth even for human raters.
185
+
186
+ # REFERENCES
187
+
188
+ Lynton Ardizzone, Carsten Lüth, Jakob Kruse, Carsten Rother, and Ullrich Köthe. Guided image generation with conditional invertible neural networks. arXiv preprint arXiv:1907.02392, 2019.
189
+
190
+ Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
191
+
192
+ Yun Cao, Zhiming Zhou, Weinan Zhang, and Yong Yu. Unsupervised diverse colorization via generative adversarial networks, 2017.
193
+
194
+ Zezhou Cheng, Qingxiong Yang, and Bin Sheng. Deep colorization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 415–423, 2015.
195
+
196
+ Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
197
+
198
+ Yuanzheng Ci, Xinzhu Ma, Zhihui Wang, Haojie Li, and Zhongxuan Luo. User-guided deep anime line art colorization with conditional adversarial networks. In Proceedings of the 26th ACM international conference on Multimedia, pp. 1536–1544, 2018.
199
+
200
+ Ceyda Cinarel and Byoung-Tak Zhang. Into the colorful world of webtoons: Through the lens of neural networks. In 2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), volume 3, pp. 35–40. IEEE, 2017.
201
+
202
+ Ryan Dahl. Automatic colorization, 2016.
203
+
204
+ Harm De Vries, Florian Strub, Jérémie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Modulating early visual processing by language. In Advances in Neural Information Processing Systems, pp. 6594–6604, 2017.
205
+
206
+ Aditya Deshpande, Jason Rock, and David Forsyth. Learning large-scale automatic image colorization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 567–575, 2015.
207
+
208
+ Aditya Deshpande, Jiajun Lu, Mao-Chuang Yeh, Min Jin Chong, and David Forsyth. Learning diverse image colorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6837–6845, 2017.
209
+
210
+ Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
211
+
212
+ Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. arXiv preprint arXiv:1610.07629, 2016.
213
+
214
+ David M Geshwind. Method for colorizing black and white footage, August 19 1986. US Patent 4,606,625.
215
+
216
+ Ian J Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014.
217
+
218
+ Sergio Guadarrama, Ryan Dahl, David Bieber, Mohammad Norouzi, Jonathon Shlens, and Kevin Murphy. Pixcolor: Pixel recursive colorization. arXiv preprint arXiv:1705.07208, 2017.
219
+
220
+ Raj Kumar Gupta, Alex Yong-Sang Chia, Deepu Rajan, Ee Sin Ng, and Huang Zhiyong. Image colorization using similar images. In Proceedings of the 20th ACM international conference on Multimedia, pp. 369–378, 2012.
221
+
222
+ Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow $^ { + + }$ : Improving flowbased generative models with variational dequantization and architecture design. arXiv preprint arXiv:1902.00275, 2019a.
223
+
224
+ Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019b.
225
+
226
+ Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1501–1510, 2017.
227
+
228
+ Yi-Chin Huang, Yi-Shin Tung, Jun-Cheng Chen, Sung-Wen Wang, and Ja-Ling Wu. An adaptive edge detection based colorization algorithm and its applications. In Proceedings of the 13th annual ACM international conference on Multimedia, pp. 351–354, 2005.
229
+
230
+ Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Let there be color! joint end-to-end learning of global and local image priors for automatic image colorization with simultaneous classification. ACM Transactions on Graphics (ToG), 35(4):1–11, 2016.
231
+
232
+ Revital Ironi, Daniel Cohen-Or, and Dani Lischinski. Colorization by example. In Rendering Techniques, pp. 201–210. Citeseer, 2005.
233
+
234
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125–1134, 2017.
235
+
236
+ Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, Rick Boyle, Pierre luc Cantin, Clifford Chao, Chris Clark, Jeremy Coriell, Mike Daley, Matt Dau, Jeffrey Dean, Ben Gelb, Tara Vazir Ghaemmaghami, Rajendra Gottipati, William Gulland, Robert Hagmann, C. Richard Ho, Doug Hogberg, John Hu, Robert Hundt, Dan Hurt, Julian Ibarz, Aaron Jaffey, Alek Jaworski, Alexander Kaplan, Harshit Khaitan, Andy Koch, Naveen Kumar, Steve Lacy, James Laudon, James Law, Diemthu Le, Chris Leary, Zhuyuan Liu, Kyle Lucke, Alan Lundin, Gordon MacKean, Adriana Maggiore, Maire Mahony, Kieran Miller, Rahul Nagarajan, Ravi Narayanaswami, Ray Ni, Kathy Nix, Thomas Norrie, Mark Omernick, Narayana Penukonda, Andy Phelps, Jonathan Ross, Matt Ross, Amir Salek, Emad Samadiani, Chris Severn, Gregory Sizikov, Matthew Snelham, Jed Souter, Dan Steinberg, Andy Swing, Mercedes Tan, Gregory Thorson, Bo Tian, Horia Toma, Erick Tuttle, Vijay Vasudevan, Richard Walter, Walter Wang, Eric Wilcox, and Doe Hyun Yoon. In-datacenter performance analysis of a tensor processing unit, 2017.
237
+
238
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
239
+
240
+ Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In European conference on computer vision, pp. 577–593. Springer, 2016.
241
+
242
+ Anat Levin, Dani Lischinski, and Yair Weiss. Colorization using optimization. In ACM SIGGRAPH 2004 Papers, pp. 689–694. 2004.
243
+
244
+ Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE international conference on computer vision, pp. 3730–3738, 2015.
245
+
246
+ Qing Luan, Fang Wen, Daniel Cohen-Or, Lin Liang, Ying-Qing Xu, and Heung-Yeung Shum. Natural image colorization. In Proceedings of the 18th Eurographics conference on Rendering Techniques, pp. 309–320, 2007.
247
+
248
+ Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. arXiv preprint arXiv:1812.01608, 2018.
249
+
250
+ Safa Messaoud, David Forsyth, and Alexander G. Schwing. Structural consistency and controllability for diverse colorization. In Proceedings of the European Conference on Computer Vision (ECCV), September 2018.
251
+
252
+ Yuji Morimoto, Yuichi Taguchi, and Takeshi Naemura. Automatic colorization of grayscale images using multiple images on the web. In SIGGRAPH 2009: Talks, pp. 1–1. 2009.
253
+
254
+ Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016.
255
+
256
+ Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018.
257
+
258
+ Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. arXiv preprint arXiv:1709.07871, 2017.
259
+
260
+ François Pitié, Anil C Kokaram, and Rozenn Dahyot. Automated colour grading using colour distribution transfer. Computer Vision and Image Understanding, 107(1-2):123–137, 2007.
261
+
262
+ Yingge Qu, Tien-Tsin Wong, and Pheng-Ann Heng. Manga colorization. ACM Transactions on Graphics (TOG), 25(3):1214–1220, 2006.
263
+
264
+ Erik Reinhard, Michael Adhikhmin, Bruce Gooch, and Peter Shirley. Color transfer between images. IEEE Computer graphics and applications, 21(5):34–41, 2001.
265
+
266
+ Amelie Royer, Alexander Kolesnikov, and Christoph H Lampert. Probabilistic image colorization. arXiv preprint arXiv:1705.04258, 2017.
267
+
268
+ 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.
269
+
270
+ Daniel Sykora, Jan Buriánek, and Ji \` ˇrí Žára. Unsupervised colorization of black-and-white cartoons. In Proceedings of the 3rd international symposium on Non-photorealistic animation and rendering, pp. 121–127, 2004.
271
+
272
+ Yu-Wing Tai, Jiaya Jia, and Chi-Keung Tang. Local color transfer via probabilistic segmentation by expectation-maximization. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), volume 1, pp. 747–754. IEEE, 2005.
273
+
274
+ Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26–31, 2012.
275
+
276
+ Sotirios A Tsaftaris, Francesca Casadio, Jean-Louis Andral, and Aggelos K Katsaggelos. A novel visualization tool for art history and conservation: Automated colorization of black and white archival photographs of works of art. Studies in conservation, 59(3):125–135, 2014.
277
+
278
+ 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.
279
+
280
+ Carl Vondrick, Abhinav Shrivastava, Alireza Fathi, Sergio Guadarrama, and Kevin Murphy. Tracking emerges by colorizing videos. In Proceedings of the European conference on computer vision (ECCV), pp. 391–408, 2018.
281
+
282
+ Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axialdeeplab: Stand-alone axial-attention for panoptic segmentation. arXiv preprint arXiv:2003.07853, 2020.
283
+
284
+ Dirk Weissenborn, Oscar Täckström, and Jakob Uszkoreit. Scaling autoregressive video models. arXiv preprint arXiv:1906.02634, 2019.
285
+
286
+ Tomihisa Welsh, Michael Ashikhmin, and Klaus Mueller. Transferring color to greyscale images. In Proceedings of the 29th annual conference on Computer graphics and interactive techniques, pp. 277–280, 2002.
287
+
288
+ Chufeng Xiao, Chu Han, Zhuming Zhang, Jing Qin, Tien-Tsin Wong, Guoqiang Han, and Shengfeng He. Example-based colourization via dense encoding pyramids. In Computer Graphics Forum, volume 39, pp. 20–33. Wiley Online Library, 2020.
289
+
290
+ Liron Yatziv and Guillermo Sapiro. Fast image and video colorization using chrominance blending. IEEE transactions on image processing, 15(5):1120–1129, 2006.
291
+
292
+ Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015.
293
+
294
+ Bo Zhang, Mingming He, Jing Liao, Pedro V Sander, Lu Yuan, Amine Bermak, and Dong Chen. Deep exemplar-based video colorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8052–8061, 2019a.
295
+
296
+ Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In International Conference on Machine Learning, pp. 7354–7363. PMLR, 2019b.
297
+
298
+ Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European conference on computer vision, pp. 649–666. Springer, 2016.
299
+
300
+ Richard Zhang, Jun-Yan Zhu, Phillip Isola, Xinyang Geng, Angela S Lin, Tianhe Yu, and Alexei A Efros. Real-time user-guided image colorization with learned deep priors. arXiv preprint arXiv:1705.02999, 2017.
301
+
302
+ ![](images/21f05eca9b5c73c889c00c7a222bb67bae333cbea2b1aa76480ccacb1136bccd.jpg)
303
+ Figure 6: Left: FID vs training steps, with and without polyak averaging. Right: The effect of K in top-K sampling on FID. See Appendix B and E
304
+
305
+ # ACKNOWLEDGEMENTS
306
+
307
+ We would like to thank Mohammad Norouzi, Rianne van den Berg, Mostafa Dehghani for their useful comments on the draft and Avital Oliver for assistance in the Mechanical Turk setup.
308
+
309
+ # CHANGELOG
310
+
311
+ • v2: Dataset Sharding fix across multiple TPU workers. This changed the FID scores of ColTran, ColTran-B and ColTran-S from their v1 values of 19.71, 21.6 and 21.9 to their v2 values of 19.37, 19.98 and 22.06 respecitvely.
312
+
313
+ # A CODE, CHECKPOINTS AND TENSORBOARD FILES
314
+
315
+ Our implementation is open-sourced in the google-research framework at https://github.com/googleresearch/google-research/tree/master/coltran with a zip compressed version here. Our full set of hyperparameters are available here.
316
+
317
+ We provide pre-trained checkpoints of the colorizer and upsamplers on ImageNet at https://console.cloud.google.com/storage/browser/gresearch/coltran. Finally, reference tensorboard files for our training runs are available at colorizer tensorboard, color upsampler tensorboard and spatial upsampler tensorboard.
318
+
319
+ # B EXPONENTIAL MOVING AVERAGE
320
+
321
+ We found using an exponential moving average (EMA) of our checkpoints, extremely crucial to generate high quality samples. In Figure 6, we display the FID as a function of training steps, with and without EMA. On applying EMA, our FID score improves steadily over time.
322
+
323
+ # C NUMBER OF PARAMETERS AND INFERENCE SPEED
324
+
325
+ Inference speed. ColTran core can sample a batch of 20 64x64 grayscale images in around 3.5 -5 minutes on a P100 GPU vs PixColor that takes 10 minutes to colorize $2 8 \mathbf { x } 2 8$ grayscale images on a K40 GPU. Sampling 28x28 colorizations takes around 30 seconds. The upsampler networks take in the order of milliseconds.
326
+
327
+ Further, in our naive implementation, we recompute the activations, $\mathbf { c } U _ { s } ^ { z } , \mathbf { c } U _ { b } ^ { z } , \mathbf { c } U _ { s } ^ { f } , \mathbf { c } U _ { b } ^ { f }$ in Table 1 to generate every pixel in the inner decoder. Instead, we can compute these activations once per-grayscale image in the encoder and once per-row in the outer decoder and reuse them. This is likely to speed up sampling even more and we leave this engineering optimization for future work.
328
+
329
+ Number of parameters. ColTran has a total of ColTran core (46M) + Color Upsampler $\left( 1 4 \mathbf { M } \right) +$ Spatial Upsampler $( 1 4 \mathbf { M } ) = 7 4 \mathbf { M }$ parameters. In comparison, PixColor has Conditioning network $( 4 4 \mathbf { M } ) + \mathbf { \Phi }$ Colorizer network $( 1 1 \mathbf { M } ) + 1$ Refinement Network $( 2 8 \mathbf { M } ) = 8 3 \mathbf { M }$ parameters.
330
+
331
+ ![](images/d29ab6052a56ac9d62db75aa52b7c4a71a1a03df3794383fba63a5314878b18d.jpg)
332
+ Figure 7: Ablated models. Gated: Gated conditioning layers as done in (Oord et al., 2016) and $c A t t + c M L P ,$ global: Global conditioning instead of pointwise conditioning in cAtt and cLN.
333
+
334
+ # D LOWER COMPUTE REGIME
335
+
336
+ We retrained the autoregressive colorizer and color upsampler on 4 TPUv2 chips (the lowest configuration) with a reduced-batch size of 56 and 192 each. For the spatial upsampler, we found that a batch-size of 8 was sub-optimal and lead to a large deterioration in loss. We thus used a smaller spatial upsampler with 2 axial attention blocks with a batch-size of 16 and trained it also on 4 TPUv2 chips. The FID drops from 19.71 to 20.9 which is still significantly better than the other models in 2. We note that in this experiment, we use only 12 TPUv2 chips in total while PixColor (Guadarrama et al., 2017) uses a total of 16 GPUs.
337
+
338
+ # E IMPROVED FID WITH TOP-K SAMPLING
339
+
340
+ We can improve colorization fidelity and remove artifacts due to unnatural colors via Top-K sampling at the cost of reduced colorization diversity. In this setting, for a given pixel ColTran generates a color from the top-K colors (instead of 512 colors) as determined by the predicted probabilities. Our results in Figure 6 $K = 4$ and $K = 8$ demonstrate a performance improvement over the baseline ColTran model with $K = 5 1 2$
341
+
342
+ # F ADDITIONAL ABLATIONS:
343
+
344
+ Additional ablations of our conditional transformer layers are in Figure 7 which did not help.
345
+
346
+ • Conditional transformer layers based on Gated layers (Oord et al., 2016) (Gated) • A global conditioning layer instead of pointwise conditioning in cAtt and cLN. $c A t t + c M L P ,$ global
347
+
348
+ # G AUTOREGRESSIVE MODELS
349
+
350
+ Autoregressive models are a family of probabilistic methods that model joint distribution of data $P ( x )$ or a sequence of symbols $\left( x _ { 1 } , x _ { 2 } , \ldots x _ { n } \right)$ as a product of conditionals $\textstyle \prod _ { i = 1 } ^ { N } P ( x _ { i } | { x _ { < i } } )$ . During training, the input to autoregressive models are the entire sequence of ground-truth symbols. Masking ensures that the contribution of all "future" symbols in the sequence are zeroed out. The outputs of the autoregressive model are the corresponding conditional distributions. $P ( x _ { i } | \boldsymbol x _ { < i } )$ . Optimizing the parameters of the autoregressive model proceeds by a standard log-likelihood objective.
351
+
352
+ Generation happens sequentially, symbol-by-symbol. Once a symbol $x _ { i }$ is generated, the entire sequence $( x _ { 1 } , x _ { 2 } , \ldots x _ { i } )$ are fed to the autoregressive model to generate $x _ { i + 1 }$ .
353
+
354
+ In the case of autoregressive image generation symbols typically correspond to the 3 RGB pixelchannel. These are generated sequentially in raster-scan order, channel by channel and pixel by pixel.
355
+
356
+ ![](images/39799c2430abfde17b8a77d5aab243cb4997ac8fc8c5a4201e48ed6b90f52882.jpg)
357
+ Figure 8: We train our colorization model on ImageNet and display high resolution colorizations from LSUN
358
+
359
+ # H ROW/COLUMN SELF-ATTENTION
360
+
361
+ In the following we describe row self-attention, that is, we omit the height dimension as all operations are performed in parallel for each column. Given the representation of a single row within of an image $\mathbf { x } _ { i } ,$ · $\in \mathbb { R } ^ { W \times D }$ , row-wise self-attention block is applied as follows:
362
+
363
+ $$
364
+ \begin{array} { r l r } & { [ \mathbf { q } , \mathbf { k } , \mathbf { v } ] = \mathrm { L N } ( \mathbf { x } _ { i , \cdot } ) U _ { q k v } } & { U _ { q k v } \in \mathbb { R } ^ { D \times 3 D _ { h } } } \\ & { A = \mathrm { s o f t m a x } \left( \mathbf { q } \mathbf { k } ^ { \top } / \sqrt { D _ { h } } \right) } & { A \in \mathbb { R } ^ { W \times W } } \\ & { \mathrm { S A } ( \mathbf { x } _ { i , \cdot } ) = A \mathbf { v } } \\ & { \mathrm { M S A } ( \mathbf { x } _ { i , \cdot } ) = \left[ \mathrm { S A } _ { 1 } ( \mathbf { x } _ { i , \cdot } ) , \mathrm { S A } _ { 2 } ( \mathbf { x } _ { i , \cdot } ) , \cdots , \mathrm { S A } _ { k } ( \mathbf { x } _ { i , \cdot } ) \right] U _ { o u t } } & { U _ { o u t } \in \mathbb { R } ^ { k \cdot D _ { h } \times D } } \end{array}
365
+ $$
366
+
367
+ LN refers to the application of layer normalization (Ba et al., 2016). Finally, we apply residual connections and a feed-forward neural network with a single hidden layer and ReLU activation (MLP) after each self-attention block as it is common practice in transformers.
368
+
369
+ $$
370
+ \begin{array} { r } { \hat { \mathbf { x } } _ { i , \cdot } = \mathrm { M L P } ( \mathrm { L N } ( \mathbf { x } _ { i , \cdot } ^ { \prime } ) ) + \mathbf { x } _ { i , \cdot } ^ { \prime } , \qquad \mathbf { x } _ { i , \cdot } ^ { \prime } = \mathrm { M S A } ( \mathbf { x } _ { i , \cdot } ) + \mathbf { x } _ { i , \cdot } } \end{array}
371
+ $$
372
+
373
+ Column-wise self-attention over $\mathbf { x } _ { \cdot , j } \in \mathbb { R } ^ { H \times D }$ works analogously.
374
+
375
+ # I OUT OF DOMAIN COLORIZATIONS
376
+
377
+ We use our trained colorization model on ImageNet to colorize high-resolution grayscale images from LSUN $2 5 6 \times 2 5 6$ ( $\mathrm { Y u }$ et al., 2015) and low-resolution grayscale images from Celeb-A (Liu
378
+
379
+ ![](images/efd74ac63514505a4a2dbb89d10aceca4cb26084c4c6a44dd2167096096c112e.jpg)
380
+ Figure 9: We train our colorization model on ImageNet and display low resolution colorizations from Celeb-A
381
+
382
+ ![](images/b0eb29eea5fff29b5b9b43f2a725598f0a49496d87b840de250b883064523c4e.jpg)
383
+ Figure 10: Top: Colorizations Bottom: Ground truth. From left to right, our colorizations have a progressively higher fooling rate.
384
+
385
+ et al., 2015) $6 4 \times 6 4$ . Note that these models were trained only on ImageNet and not finetuned on Celeb-A or LSUN.
386
+
387
+ # J NUMBER OF AXIAL ATTENTION BLOCKS
388
+
389
+ We did a very small hyperparameter sweep using the baseline axial transformer (no conditional layers) with the following configurations:
390
+
391
+ • hidden size $= 5 1 2$ , number of blocks $= 4$ • hidden size $= 1 0 2 4$ , number of blocks $= 2$ • hidden size $= 5 1 2$ , number of blocks $= 2$
392
+
393
+ Once we found the optimal configuration, we fixed this for all future architecture design.
394
+
395
+ # K ANALYSIS OF MTURK RATINGS
396
+
397
+ ![](images/3c90190e75a06959b50c737768e4dde22f6d004be425387ac08f2126056c7481.jpg)
398
+ Figure 11: In each column, we display the ground truth followed by 3 samples. Left: Diverse and real. Center: Realism improves from left to right. Right: Failure cases
399
+
400
+ ![](images/ce6292bc699bf1ba5886fcd3bd9ecbe4547a55f6fa07ddb0b137707604ac6fd1.jpg)
401
+ Figure 12: We display the per-pixel, maximum predicted probability over 512 colors as a proxy for uncertainty.
402
+
403
+ We analyzed our samples on the basis of the MTurk ratings in Figure 11. To the left, we show images, where all the samples have a fool rate $> 6 0 \%$ . Our model is able to show diversity in color for both high-level structure and low-level details. In the center, we display samples that have a high variance in MTurk ratings, with a difference of $80 \%$ between the best and the worst sample. All of these are complex objects, that our model is able to colorize reasonably well given multiple attempts. To the right of Figure 11, we show failure cases where all samples have a fool rate of $0 \%$ , For these cases, our model is unable to colorize highly complex structure, that would arguably be difficult even for a human.
404
+
405
+ # L MORE PROBABILITY MAPS
406
+
407
+ We display additional probability maps to visualize uncertainty as done in 5.5.
408
+
409
+ # M MORE SAMPLES
410
+
411
+ We display a wide-diversity of colorizations from ColTran that were not cherry-picked.
412
+
413
+ ![](images/e4663e2169ce540e494e8a589cb0a8b0ff9a1d085405fd1674d7e0dfad270572.jpg)
414
+
415
+ ![](images/17494eac5674b7693f554003e51f02f09f6d9fcb64ed950b7580b9bb8d98f424.jpg)
416
+
417
+ ![](images/a3b1ad736b793ee02a779d1d870888999a502e932e68698299cc3e1d8de8ec77.jpg)
418
+
419
+ ![](images/58dabeca5b6789276315c401b00c13dc34b5a62e53b473059da4e85bfd49437e.jpg)
420
+
421
+ ![](images/c0f5788577940ff8a8d08899ef711dea1a372670f4513f4bce866654ffc5af5d.jpg)
parse/train/5NA1PinlGFu/5NA1PinlGFu_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/5NA1PinlGFu/5NA1PinlGFu_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/5NA1PinlGFu/5NA1PinlGFu_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gdF34FvS/H1gdF34FvS.md ADDED
@@ -0,0 +1,471 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADVANTAGE-WEIGHTED REGRESSION: SIMPLE ANDSCALABLE OFF-POLICY REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ In this paper, we aim to develop a simple and scalable reinforcement learning algorithm that uses standard supervised learning methods as subroutines. Our goal is an algorithm that utilizes only simple and convergent maximum likelihood loss functions, while also being able to leverage off-policy data. Our proposed approach, which we refer to as advantage-weighted regression (AWR), consists of two standard supervised learning steps: one to regress onto target values for a value function, and another to regress onto weighted target actions for the policy. The method is simple and general, can accommodate continuous and discrete actions, and can be implemented in just a few lines of code on top of standard supervised learning methods. We provide a theoretical motivation for AWR and analyze its properties when incorporating off-policy data from experience replay. We evaluate AWR on a suite of standard OpenAI Gym benchmark tasks, and show that it achieves competitive performance compared to a number of well-established state-of-the-art RL algorithms. AWR is also able to acquire more effective policies than most off-policy algorithms when learning from purely static datasets with no additional environmental interactions. Furthermore, we demonstrate our algorithm on challenging continuous control tasks with highly complex simulated characters. (Video1)
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Model-free reinforcement learning can be a general and effective methodology for training agents to acquire sophisticated behaviors with minimal assumptions on the underlying task (Mnih et al., 2015; Heess et al., 2017; Pathak et al., 2017). However, reinforcement learning algorithms can be substantially more complex to implement and tune than standard supervised learning methods. Arguably the simplest reinforcement learning methods are policy gradient algorithms (Sutton et al., 2000), which directly differentiate the expected return and perform gradient ascent. Unfortunately, these methods can be notoriously unstable and are typically on-policy (or nearly on-policy), often requiring a substantial number of samples to learn effective behaviors. Our goal is to develop a reinforcement learning algorithm that is simple, easy to implement, and can readily incorporate off-policy experience data.
12
+
13
+ In this work, we propose advantage-weighted regression (AWR), a simple off-policy algorithm for model-free RL. Each iteration of the AWR algorithm simply consists of two supervised regression steps: one for training a value function baseline via regression onto cumulative rewards, and another for training the policy via weighted regression. The complete algorithm is shown in Algorithm 1.
14
+
15
+ ![](images/be9cc8884d7c585ed0e5cc88b13e783f687863d697b30476c85bd754446ef475.jpg)
16
+
17
+ Figure 1: Complex simulated character trained using advantage-weighted regression. Left: Humanoid performing a spinkick. Right: Dog performing a canter.
18
+
19
+ AWR can accommodate continuous and discrete actions, and can be implemented in just a few lines of code on top of standard supervised learning methods. Despite its simplicity, we find that AWR achieves competitive results when compared to commonly used on-policy and off-policy RL algorithms, and can effectively incorporate fully off-policy data, which has been a challenge for other RL algorithms. Our derivation presents an interpretation of AWR as a constrained policy optimization procedure, and provides a theoretical analysis of the use of off-policy data with experience replay.
20
+
21
+ We first revisit the original formulation of reward-weighted regression, an on-policy RL method that utilizes supervised learning to perform policy updates, and then propose a number of new design decisions that significantly improve performance on a suite of standard continuous control benchmark tasks. We then provide a theoretical analysis of AWR, including the capability to incorporate off-policy data with experience replay. Although the design of AWR involves only a few simple design decisions, we show experimentally that these additions provide for a large improvement over previous methods for regression-based policy search, such as reward-weighted regression (RWR) (Peters & Schaal, 2007), while also being substantially simpler than more modern methods, such as MPO (Abdolmaleki et al., 2018). We show that AWR achieves competitive performance when compared to several well-established state-of-the-art on-policy and off-policy algorithms. We further demonstrate our algorithm on challenging control tasks with complex simulated characters.
22
+
23
+ # 2 PRELIMINARIES
24
+
25
+ In reinforcement learning, the objective is to learn a control policy that enables an agent to maximize its expected return for a given task. At each time step $t$ , the agent observes the state of the environment $\mathbf { s } _ { t } \in \cal { S }$ , and samples an action $\mathbf { a } _ { t } \in \mathcal { A }$ from a policy $\mathbf { a } _ { t } \sim \pi ( \mathbf { a } _ { t } | \mathbf { s } _ { t } )$ . The agent then applies that action, which results in a new state $\mathbf { s } _ { t + 1 }$ and a scalar reward $r _ { t } = r ( \mathbf { s } _ { t } , \mathbf { a } _ { t } )$ . The goal is to learn an optimal policy that maximizes the agent’s expected discounted return $J ( \pi )$ ,
26
+
27
+ $$
28
+ J ( \pi ) = \mathbb { E } _ { \tau \sim p _ { \pi } ( \tau ) } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \right] = \mathbb { E } _ { \mathbf { s } \sim d _ { \pi } ( \mathbf { s } ) } \mathbb { E } _ { a \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ r ( \mathbf { s } , \mathbf { a } ) \right] ,
29
+ $$
30
+
31
+ whicy e, $p _ { \pi } ( \tau )$ nts the likelihood of a tr is the discount factor. $\tau = \{ ( \mathbf { s } _ { 0 } , \mathbf { a } _ { 0 } , r _ { 0 } ) , ( \mathbf { s } _ { 1 } , \mathbf { a } _ { 1 } , r _ { 1 } ) , \ldots \}$ $\pi$ $\gamma \in [ 0 , 1 )$ $\begin{array} { r } { d _ { \pi } ( \mathbf { s } ) = \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } p ( \mathbf { s } _ { t } = \mathbf { s } | \pi ) } \end{array}$ $\pi$ $p ( \mathbf { s } _ { t } = \mathbf { s } | \boldsymbol { \pi } )$ is the likelihood of the agent being in state s after following $\pi$ for $t$ timesteps. A popular class of algorithms for solving this problem is policy gradient (PG) methods, which directly estimates the gradient of the expected return with respect to the policy parameters $\nabla _ { \pi } J ( \pi )$ , and then updates the policy with gradient ascent. Basic PG algorithms are generally on-policy methods, which require the data to be sampled from the same policy that is being optimized. This can result in poor sample efficiency, but PG algorithms can be modified to utilize off-policy data.
32
+
33
+ An alternative class of RL methods is expectation-maximization algorithms. Instead of estimating the gradient of the expected return, EM algorithms first construct an estimate of the optimal policy using a dataset of experiences (E-step), and then projects this estimate onto the space of parameterized policies (M-step). An early example of an EM-based RL algorithm is reward-weighted regression (RWR) (Peters et al., 2010). At each iteration, the $\mathrm { E }$ -step constructs an estimate of the optimal policy according to $\pi ^ { * } ( \mathbf { a } | \mathbf { s } ) \propto \pi _ { k } ( \mathbf { a } | \mathbf { s } ) \mathrm { e x p } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } / \beta \right)$ , where $\boldsymbol { \mathcal { U } } _ { k }$ represents the policy at the kth iteration of the algorithm, $\begin{array} { r } { \mathcal { R } _ { \mathbf { s } , \mathbf { a } } = \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } } \end{array}$ is the return, and $\cdot$ is a temperature parameter. Then the M-step projects $\cdot$ onto the space of parameterized policies by solving a supervised regression problem:
34
+
35
+ $$
36
+ \pi _ { k + 1 } = \arg \operatorname* { m a x } _ { \pi } \quad \mathbb { E } _ { \mathbf { s } \sim d _ { \pi _ { k } } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi _ { k } ( \mathbf { a } | \mathbf { s } ) } \left[ \log \pi ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \mathcal { R } _ { \mathbf { s } , \mathbf { a } } \right) \right] .
37
+ $$
38
+
39
+ The RWR update can be interpreted as fitting a new policy $\pi _ { k + 1 }$ to samples collected under the current policy $\pi _ { k }$ , where the likelihood of each action is weighted by the exponentiated return received for that action. Since EM algorithms do not directly estimate the gradient of the expected return with respect to the current policy, they can be more amenable to learning from off-policy data.
40
+
41
+ # Algorithm 1 Advantage-Weighted Regression
42
+
43
+ <table><tr><td colspan="2">1:π1 ← random policy 2:D←@</td></tr><tr><td colspan="2">3: for iteration = 1,.., kmax do</td></tr><tr><td colspan="2">4: add trajectories {Ti} sampled via πk to D</td></tr><tr><td>5:</td><td>V ← arg minv Es,a~D[|/Ra - V(s)l²]</td></tr><tr><td>7: end for</td><td>6:Tk+1←argmaxEs,aD[gπ(as)exp((R-V(s)]</td></tr></table>
44
+
45
+ # 3 ADVANTAGE-WEIGHTED REGRESSION
46
+
47
+ In this work, we present advantage-weighted regression (AWR), a simple off-policy RL algorithm based on reward-weighted regression. We first provide an overview of the complete advantageweighted regression algorithm, and then describe its theoretical motivation and analyze its properties. The complete AWR algorithm is summarized in Algorithm 1. Each iteration $k$ of AWR consists of the following simple steps. First, the current policy $\pi _ { k } ( \mathbf { a } | \mathbf { s } )$ is used to sample a batch of trajectories $\{ \tau _ { i } \}$ that are then stored in the replay buffer $\mathcal { D }$ , which is structured as a first-in first-out (FIFO) queue, as is common for off-policy reinforcement learning algorithms (Mnih et al., 2015; Lillicrap et al., 2016). Then, the entire buffer $\mathcal { D }$ is used to fit a value function $\dot { V } _ { k } ^ { \mathcal { D } } ( { \bf s } )$ to the trajectories in the replay buffer, which can be done with simple Monte Carlo return estimates $\begin{array} { r } { \mathcal { R } _ { { \bf s } , { \bf a } } ^ { \mathcal { D } } = \sum _ { t = 0 } ^ { T } \gamma ^ { t } r _ { t } } \end{array}$ . Finally, the same buffer is used to fit a new policy using advantage-weighted regression, where each state-action pair in the buffer is weighted according to the exponentiated advantage $\begin{array} { r } { \exp ( \frac { 1 } { \beta } A ^ { D } ( { \bf s } , { \bf a } ) ) } \end{array}$ , with the advantage given by $A ^ { \mathcal { D } } ( \mathbf { s } , \mathbf { a } ) = \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mathcal { D } } - V ^ { \mathcal { D } } ( \mathbf { s } )$ and $\beta$ is a hyperparameter. AWR uses only supervised regression as learning subroutines, making the algorithm very simple to implement. In the following subsections, we first motivate the algorithm as an approximation to a constrained policy search problem, and then extend our analysis to incorporate experience replay.
48
+
49
+ # 3.1 DERIVATION
50
+
51
+ In this section, we derive the AWR algorithm as an approximate optimization of a constrained policy search problem. Our goal is to find a policy that maximizes the expected improvement $\mathsf { \bar { \eta } } ( \pi ) \mathsf { \bar { = } } J ( \pi ) \bar { - } J ( \mu )$ over a sampling policy $\mu ( \mathbf { a } | \mathbf { s } )$ . We first derive AWR for the setting where the sampling policy is a single Markovian policy. Then, in the next section, we extend our result to the setting where the data is collected from multiple policies, as in the case of experience replay that we use in practice. The expected improvement $\eta ( \pi )$ can be expressed in terms of the advantage Schu $A ^ { \mu } ( \mathbf { s } , \mathbf { a } ) = \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } )$ with respect to the sampling policy $\mu$ (Kakade & Langford, 2002;
52
+
53
+ $$
54
+ \begin{array} { r } { \eta ( \pi ) = \mathbb { E } _ { \mathbf { s } \sim d _ { \pi } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ A ^ { \mu } ( \mathbf { s } , \mathbf { a } ) \right] = \mathbb { E } _ { \mathbf { s } \sim d _ { \pi } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] , } \end{array}
55
+ $$
56
+
57
+ where $\mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu }$ denotes the return obtained by performing action a in state s and following $\mu$ for the following timesteps, and $\begin{array} { r } { V ^ { \mu } ( \mathbf { s } ) = \int _ { a } \mu ( \mathbf { a } | \mathbf { s } ) \mathcal { R } _ { \mathbf { s } } ^ { \mathbf { a } } } \end{array}$ da corresponds to the value function of $\mu$ . This objective differs from the ones used in the derivations of related algorithms, such as RWR and REPS (Peters & Schaal, 2007; Peters et al., 2010; Abdolmaleki et al., 2018), which maximize the expected return $J ( \pi )$ instead of the expected improvement. The expected improvement directly gives rise to an objective that involves the advantage. We will see later that this yields weights for the policy update that differ in a subtle but important way from standard reward-weighted regression. As we show in our experiments, this difference results in a large empirical improvement.
58
+
59
+ The objective in Equation 3 can be difficult to optimize due to the dependency between $d _ { \pi } ( \mathbf { s } )$ and $\pi$ , as well as the need to collect samples from $\pi$ . Following Schulman et al. (2015), we can instead optimize an approximation $\hat { \eta } ( \pi )$ of $\eta ( \pi )$ using the state distribution of $\mu$ :
60
+
61
+ $$
62
+ \begin{array} { r } { \hat { \eta } ( \pi ) = \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] . } \end{array}
63
+ $$
64
+
65
+ Here, $\hat { \eta } ( \pi )$ matches $\eta ( \pi )$ to first order (Kakade & Langford, 2002), and provides a good estimate of $\eta$ if $\pi$ and $\mu$ are close in terms of the KL-divergence (Schulman et al., 2015). Using this objective,
66
+
67
+ we can formulate the following constrained policy search problem:
68
+
69
+ $$
70
+ \begin{array} { r l } { \underset { \pi } { \arg \operatorname* { m a x } } } & { \displaystyle \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] d \mathbf { a } d \mathbf { s } } \\ { \mathrm { s . t . } } & { \displaystyle \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | \mathbf { s } ) | | \mu ( \cdot | \mathbf { s } ) \right) d \mathbf { s } \leq \epsilon . } \end{array}
71
+ $$
72
+
73
+ The constraint in Equation 6 ensures that the new policy $\pi$ is close to the data distribution of $\mu$ , and therefore the surrogate objective $\hat { \eta } ( \pi )$ remains a reasonable approximation to $\eta ( \pi )$ . We refer the reader to Schulman et al. (2015) for a detailed derivation and an error bound.
74
+
75
+ We can derive AWR as an approximate solution to this constrained optimization. This derivation follows a similar procedure as Peters et al. (2010), and begins by forming the Langrangian of the constrained optimization problem presented above,
76
+
77
+ $$
78
+ \mathcal { L } ( \pi , \beta ) = \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] d \mathbf { a } d \mathbf { s } + \beta \left( \epsilon - \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | \mathbf { s } ) | | \mu ( \cdot | \mathbf { s } ) \right) d \mathbf { s } \right)
79
+ $$
80
+
81
+ where $\beta$ is a Lagrange multiplier. Differentiating ${ \mathcal { L } } ( \pi , \beta )$ with respect to $\pi ( \mathbf { a } | \mathbf { s } )$ and solving for the optimal policy $\pi ^ { * }$ results in the following expression for the optimal policy
82
+
83
+ $$
84
+ \pi ^ { * } ( \mathbf { a } | \mathbf { s } ) = \frac { 1 } { Z ( \mathbf { s } ) } \mu ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right) ,
85
+ $$
86
+
87
+ with $Z ( \mathbf { s } )$ being the partition function. A detailed derivation is available in Appendix A. If $\pi$ is represented by a function approximator (e.g., a neural network), a new policy can be obtained by projecting $\pi ^ { * }$ onto the manifold of parameterized policies,
88
+
89
+ $$
90
+ \begin{array} { r l } { \underset { \pi } { \arg \operatorname* { m i n } } } & { \mathbb { E } _ { \mathbf { s } \sim \mathcal { D } } \left[ \mathrm { D } _ { \mathrm { K L } } \left( \pi ^ { * } ( \cdot | \mathbf { s } ) | | \pi ( \cdot | \mathbf { s } ) \right) \right] } \\ & { = \underset { \pi } { \arg \operatorname* { m a x } } } & { \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \mu ( \mathbf { a } | \mathbf { s } ) } \left[ \log \pi ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right) \right] . } \end{array}
91
+ $$
92
+
93
+ While this derivation for AWR largely follows the derivations used in prior work (Peters et al., 2010; Abdolmaleki et al., 2018), our expected improvement objective introduces a baseline $V ^ { \mu } ( \mathbf { s } )$ to the policy update, which as we show in our experiments, is a crucial component for an effective algorithm. A similar advantage-weighting scheme has been previously used for fitted Q-iteration (Neumann & Peters, 2009), where the policy is given by $-$ . In this definition, the likelihood of an action does not depend on its likelihood under the sampling distribution, and therefore does not enforce a trust region with respect to the sampling distribution. Next, we extend AWR to incorporate experience replay for off-policy training, where the sampling policy is no longer a single policy, but rather a mixture of policies from past iterations.
94
+
95
+ # 3.2 EXPERIENCE REPLAY AND OFF-POLICY LEARNING
96
+
97
+ A crucial design decision of AWR is the choice of sampling policy $\mu ( \mathbf { a } | \mathbf { s } )$ . Standard implementations of RWR typically follow an on-policy approach, where the sampling policy is selected to be the current policy $\mu ( \mathbf { a } | \mathbf { s } ) = \pi _ { k } ( \mathbf { a } | \mathbf { s } )$ at iteration $k$ . This can be sample inefficient, as data collected at each iteration of the algorithms are discarded after a single update iteration. Importance sampling can be incorporated into RWR to reuse data from previous iterations, but at the cost of larger variance from the importance sampling estimator (Kober & Peters, 2009). Instead, we can improve sample efficiency of AWR by incorporating experience replay and explicitly accounting for training data from a mixture of multiple prior policies. As described in Algorithm 1, at each iteration, AWR collects a batch of data using the latest policy $\pi _ { k }$ , and then stores this data in a replay buffer $\mathcal { D }$ , which also contains data collected from previous policies $\{ \pi _ { 1 } , \cdots , \pi _ { k } \}$ . The value function and pdated using samples drawn from icy as a mixture of policies from p $\mathcal { D }$ . Thvious replay stterations odeling, where $\begin{array} { r } { \mu _ { k } ( \tau ) = \sum _ { i = 1 } ^ { k } w _ { i } \pi _ { i } ( \tau ) } \end{array}$ $\pi _ { i } ( \tau ) \stackrel { - } { = } p ( \stackrel { - } { \tau } | \stackrel { - } { \pi } _ { i } )$ $\tau$ $\pi _ { i }$ $i$
98
+ and the weights $\textstyle \sum _ { i } w _ { i } = 1$ specify the probabilities of selecting each policy $\pi _ { i }$ .
99
+
100
+ We now extend the derivation from the previous section to the off-policy setting with experience replay, and show that Algorithm 1 indeed optimizes the expected improvement over a sampling policy modeled by the replay buffer. Given a replay buffer consisting of trajectories from past policies, the joint state-action distribution of $\mu$ is given by $\begin{array} { r } { \mu ( \mathbf { s } , \mathbf { a } ) = \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \pi _ { i } ( \mathbf { a } | \mathbf { s } ) } \end{array}$ , and similarly for the marginal state distribution $\begin{array} { r } { d _ { \mu } ( \mathbf { s } ) = \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) } \end{array}$ . The expected improvement can now be expressed with respect to the set of sampling policies in the replay buffer: $\begin{array} { r } { \hat { \eta ( \pi ) } = J ( \pi ) - \sum _ { i } w _ { i } J ( \pi _ { i } ) } \end{array}$ . Similar to Equation 3, $\eta ( \pi )$ can be expressed in terms of the advantage $A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) = \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } - V ^ { \pi _ { i } } ( \mathbf { s } )$ of each sampling policies,
101
+
102
+ $$
103
+ \eta ( \pi ) = J ( \pi ) - \sum _ { i } w _ { i } J ( \pi _ { i } ) = \mathbb { E } _ { \mathbf { s } \sim d _ { \pi } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \sum _ { i } w _ { i } A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) \right] .
104
+ $$
105
+
106
+ As before, we can optimize an approximation $\hat { \eta } ( \pi )$ of $\eta ( \pi )$ using the state distribution of $\mu$
107
+
108
+ $$
109
+ \hat { \eta } ( \pi ) = \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) \right] = \sum _ { i = 1 } ^ { k } w _ { i } \left( \mathbb { E } _ { \mathbf { s } \sim d _ { \pi _ { i } } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) \right] \right)
110
+ $$
111
+
112
+ In Appendix $\mathbf { B }$ , we show that the update procedure in Algorithm 1 optimizes the following objective:
113
+
114
+ $$
115
+ \begin{array} { r l } { \arg \operatorname* { m a x } } & { \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } \left( \mathbb { E } _ { \mathbf { s } \sim d _ { \pi _ { i } } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) \right] \right) } \\ { \mathbf { s . t . } } & { \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \left[ \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | \mathbf { s } ) | | \boldsymbol { \mu } ( \cdot | \mathbf { s } ) \right) \right] \leq \epsilon , } \end{array}
116
+ $$
117
+
118
+ where $\begin{array} { r } { \mu ( \mathbf { a } | \mathbf { s } ) = \frac { \mu ( \mathbf { s } , \mathbf { a } ) } { d _ { \mu } ( \mathbf { s } ) } = \frac { \sum _ { i } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \pi _ { i } ( \mathbf { a } | \mathbf { s } ) } { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } } \end{array}$ represents the conditional action distribution defined by the replay buffer. This objective can be solved via the Lagrangian to yield the following update:
119
+
120
+ $$
121
+ \begin{array} { r l } { \underset { \pi } { \arg \frac { \operatorname* { m a x } } { \operatorname* { m a x } } } } & { \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } \mathbb { E } _ { \mathbf { s } \sim d _ { \pi _ { i } } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi _ { i } ( \mathbf { a } | \mathbf { s } ) } \left[ \log \pi ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } - \frac { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) V ^ { \pi _ { j } } ( \mathbf { s } ) } { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } \right) \right) \right] , } \end{array}
122
+ $$
123
+
124
+ where the expectations can be approximated by simply sampling from $\mathcal { D }$ following Line 6 of Algorithm 1. A detailed derivation is available in Appendix B. Note, the baseline in the exponent now consists of an average of the value functions of the different policies. One approach for estimating this quantity would be to fit separate value functions $V ^ { \pi _ { i } }$ for each policy. However, if only a small amount of data is available from each policy, then $V ^ { \pi _ { i } }$ could be highly inaccurate ( $\mathrm { F u }$ et al., 2019). Therefore, instead of learning separate value functions, we fit a single mean value function $\bar { V } ( \mathbf { s } )$ that directly estimates the weighted average of $V ^ { \pi _ { i } }$ ’s,
125
+
126
+ $$
127
+ \bar { V } = \underset { V } { \arg \operatorname* { m i n } } \sum _ { i } w _ { i } \mathbb { E } _ { { \mathbf { s } } , \sim d _ { \pi _ { i } } ( { \mathbf { s } } ) } \mathbb { E } _ { { \mathbf { a } } \sim \pi _ { i } ( { \mathbf { a } } | { \mathbf { s } } ) } \big [ | | \mathcal { R } _ { { \mathbf { s } } , { \mathbf { a } } } ^ { \pi _ { i } } - V ( { \mathbf { s } } ) | | ^ { 2 } \big ]
128
+ $$
129
+
130
+ This loss can also be approximated by simply sampling from the replay buffer following Line 5 of Algorithm 1. The optimal solution $\begin{array} { r } { \bar { V } ( \mathbf { s } ) = \bar { \frac { - \sum _ { i } w _ { i } d _ { \pi _ { i } } ^ { - } ( \mathbf { s } ) \bar { V } ^ { \pi _ { i } } ( \mathbf { s } ) } { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } } } \end{array}$ is exactly the baseline in Equation 15.
131
+
132
+ # 3.3 IMPLEMENTATION DETAILS
133
+
134
+ Finally, we discuss several design decisions that are important for a practical implementation of AWR. An overview of AWR is provided in Algorithm 1. The policy update in Equation 10 requires sampling states from the discounted state distribution $d _ { \mu } ( \mathbf { s } )$ . However, we found that simply sampling states uniformly from $\mathcal { D }$ was also effective, and simpler to implement. This is a common strategy used in standard implementations of RL algorithms (Dhariwal et al., 2017). When updating the value function and policy, Monte Carlo estimates can be used to approximate the expected return $\mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mathcal { D } }$ of samples in $\mathcal { D }$ , but this can result in a high-variance estimate. Instead, we opt to approximate $\mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mathcal { D } }$ using $\mathrm { T D } ( \lambda )$ to obtain a lower-variance estimate (Sutton & Barto, 1998). $\mathrm { T D } ( \lambda )$ is applied by bootstrapping with the value function $V _ { k - 1 } ^ { \mathcal { D } } ( { \mathbf s } )$ from the previous iteration. A simple Monte Carlo return estimator can also be used though, as shown in our experiments, but this produces somewhat worse results. To further simplify the algorithm, instead of adaptively updating the Lagrange multiplier $\beta$ , as is done in previous methods (Peters & Schaal, 2007; Peters et al., 2010; Abdolmaleki et al., 2018), we find that simply using a fixed constant for $\beta$ is also effective. The weights $\begin{array} { r } { \omega _ { \mathbf { s } , \mathbf { a } } ^ { \mathcal { D } } = \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mathcal { D } } - V ^ { \mathcal { D } } ( \mathbf { s } ) \right) \right) } \end{array}$ used to update the policy can occasionally assume excessively large values, which can cause gradients to explode. We therefore apply weight clipping $\hat { \omega } _ { \mathbf { s } , \mathbf { a } } ^ { D } = \overline { { \operatorname* { m i n } \left( \omega _ { \mathbf { s } , \mathbf { a } } ^ { D } , \omega _ { \operatorname* { m a x } } \right) } }$ with a threshold $\omega _ { \mathrm { m a x } }$ to mitigate issues due to exploding weights.
135
+
136
+ # 4 RELATED WORK
137
+
138
+ Existing RL methods can be broadly categorized into on-policy and off-policy algorithms (Sutton & Barto, 1998). On-policy algorithms generally update the policy using data collected from the same policy. A popular class of on-policy algorithms is policy gradient methods (Williams, 1992; Sutton et al., 2000), which have been shown to be effective for a diverse array of complex tasks (Heess et al., 2017; Pathak et al., 2017; Peng et al., 2018; Rajeswaran et al., 2018). However, on-policy algorithms are typically data inefficient, requiring a large number of interactions with the environment. Offpolicy algorithms improve sample efficiency by enabling a policy to be trained using data from other sources, such as data collected from different agents or data from previous iterations of the algorithm. Importance sampling is a simple strategy for incorporating off-policy data (Sutton & Barto, 1998; Meuleau et al., 2000; Hachiya et al., 2009), but can introduce optimization instabilities due to the potentially large variance of the importance sampling estimator. Dynamic programming methods based on Q-function learning can also leverage off-policy data (Precup et al., 2001; Mnih et al., 2015; Lillicrap et al., 2016; Gu et al., 2016; Haarnoja et al., 2018b). But these methods can be notoriously unstable, and in practice, require a variety of stabilization techniques to ensure more consistent performance (Hasselt et al., 2016; Wang et al., 2016; Munos et al., 2016; Hessel et al., 2017; Fujimoto et al., 2018; Nachum et al., 2018; Fu et al., 2019). Furthermore, it can be difficult to apply these methods to learn from fully off-policy data, where an agent is unable to collect additional environmental interactions (Fujimoto et al., 2019; Kumar et al., 2019).
139
+
140
+ Alternatively, policy search can also be formulated under an expectation-maximization framework. This approach has lead to a variety of EM-based RL algorithms (Peters et al., 2010; Neumann, 2011; Abdolmaleki et al., 2018), an early example of which is reward-weighted regression (RWR) (Peters & Schaal, 2007). RWR presents a simple on-policy RL algorithm that casts policy search as a supervised regression problem. A similar algorithm, relative entropy policy search (REPS) (Peters et al., 2010), can also be derived from the dual formulation of a constrained policy search problem. RWR has a number appealing properties: it has a very simple update rule, and since each iteration corresponds to supervised learning, it can be more stable and easier to implement than many of the previously mentioned RL methods. Despite these advantages, RWR has not been shown to be an effective RL algorithm when combined with neural network function approximators, as demonstrated in prior work and our own experiments (Schulman et al., 2015; Duan et al., 2016). In this work, we propose a number of modifications to the formulation of RWR to produce an effective off-policy deep RL algorithm, while still retaining much of the simplicity of previous methods.
141
+
142
+ Policy updates using supervised regression have been used in a number of prior work. The optimization problem being solved in REPS is similar to AWR (Peters et al., 2010), but REPS optimizes the expected return instead of the expected improvement. The weights in REPS also contains a Bellman error term that superficially resembles advantages, but are computed using a linear value function derived from a feature matching constraint. Learning the REPS value function requires minimization of a dual function, which is a complex function of the Bellman error, while the value function in AWR can be learned with simple supervised regression. More recently, Abdolmaleki et al. (2018) proposed MPO, a deep RL variant of REPS, which applies a partial EM algorithm for policy optimization. The method first fits a Q-function of the current policy via bootstrapping, and then performs a policy improvement step with respect to this Q-function under a trust region constraint that penalizes large policy changes. MPO uses off-policy data for training a Q-function critic via bootstrapping and employs Retrace $( \lambda )$ for off-policy correction (Munos et al., 2016). In contrast, AWR is substantially simpler, as it can simply fit a value function to the observed returns in a replay buffer, and performs weighted supervised regression on the actions to fit the policy. Oh et al. (2018) proposed self-imitation learning (SIL), which augments policy gradient algorithms with an auxiliary behaviour cloning loss to reuse samples from past experiences. In contrast to SIL, AWR is a standalone algorithm, and does not need to be combined with an auxiliary RL algorithm. Neumann & Peters (2009) proposed LAWER, a kernel-based fitted Q-iteration algorithm where the Bellman error is weighted by the normalized advantage of each state-action pair. This was then followed by a soft-policy improvement step. Similar to Neumann & Peters (2009), our method also uses exponentiated advantages during policy updates, but their definition of the policy is different from the one in AWR and does not enforce a trust region constraint. Furthermore, AWR does not perform fitted Q-iteration, and instead utilizes off-policy data in a simple constrained policy search procedure. Wang et al. (2018) applied a similar advantage-weighting scheme for imitation learning, but the method was not demonstrated for the RL setting. In this work, we propose several design decisions that are vital for an effective RL algorithm. We also provide a theoretical analysis of AWR when combined with experience replay, and show that the algorithm indeed optimizes the expected improvement with respect to a trajectory-level mixture of past policies modeled by a replay buffer.
143
+
144
+ ![](images/fab865d698b9112997e4ffb83f63887936ada264e90afa19409ff73212b662c9.jpg)
145
+ Figure 2: Snapshots of AWR policies trained on OpenAI Gym tasks. Our simple algorithm learns effective policies for a diverse set of discrete and continuous control tasks.
146
+
147
+ # 5 EXPERIMENTS
148
+
149
+ Our experiments aim to comparatively evaluate the performance of AWR to commonly used onpolicy and off-policy deep RL algorithms. We evaluate our method on the OpenAI Gym benchmarks (Brockman et al., 2016), consisting of discrete and continuous control tasks. We also evaluate our method on complex motion imitation tasks with high-dimensional simulated characters, including a 34 DoF humanoid and 64 DoF dog (Peng et al., 2018). We then demonstrate the effectiveness of AWR on fully off-policy learning, by training on static datasets of demonstrations collected from demo policies. Behaviors learned by the policies are best seen in the supplementary video1. Code for our implementation of AWR is available at sites.google.com/view/awr-supp/. At each iteration, the agent collects a batch of approximately 2000 samples, which are stored in the replay buffer $\mathcal { D }$ along with samples from previous iterations. The replay buffer stores 50k of the most recent samples. Updates to the value function and policy are performed by uniformly sampling minibatches of 256 samples from $\mathcal { D }$ . The value function is updated with 200 gradient steps per iteration, and the policy is updated with 1000 steps. Detailed hyperparameter settings are provided in Appendix C.
150
+
151
+ # 5.1 BENCHMARKS
152
+
153
+ We compare AWR to a number of state-of-the-art RL algorithms, including on-policy algorithms, such as TRPO (Schulman et al., 2015) and PPO (Schulman et al., 2017), off-policy algorithms, such as DDPG (Lillicrap et al., 2016), TD3 (Fujimoto et al., 2018), and SAC (Haarnoja et al., 2018a), as well as RWR (Peters & Schaal, 2007), which we include for comparison due to its similarity to AWR.2 TRPO and PPO use the implementations from OpenAI baselines (Dhariwal et al., 2017). DDPG, TD3, and SAC uses the implementations from RLkit (Pong, 2019). RWR is a custom implementation following the algorithm described by Peters & Schaal (2007).
154
+
155
+ Snapshots of the AWR policies are shown in Figure 2. Learning curves comparing the different algorithms on the OpenAI Gym benchmarks are shown in Figure 3, and Table 1 summarizes the average returns of the final policies across 5 training runs initialized with different random seeds. Overall, AWR shows competitive performance with the state-of-the-art deep RL algorithms. It significantly outperforms on-policy methods such as PPO and TRPO in both sample efficiency and asymptotic performance. While it is not yet as sample efficient as current state-of-the-art off-policy methods, such SAC and TD3, it is generally able to achieve a similar asymptotic performance, despite using only simple supervised regression for both policy and value function updates. The complex Humanoid-V2 task proved to be the most challenging case for AWR, and its performance still lags well behind SAC. Note that RWR generally does not perform well on any of these tasks. This sug
156
+
157
+ ![](images/211410c56d1a7dc91af043893da3c7b9ffa19eebba1a869ebaf31930e3cd8cf4.jpg)
158
+ Figure 3: Learning curves of the various algorithms when applied to OpenAI Gym tasks. Results are averaged across 5 random seeds. AWR is generally competitive with the best current methods.
159
+
160
+ <table><tr><td rowspan=1 colspan=1>Task</td><td rowspan=1 colspan=1>TRPO</td><td rowspan=1 colspan=1>PPO</td><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=1>TD3</td><td rowspan=1 colspan=1>SAC</td><td rowspan=1 colspan=1>RWR</td><td rowspan=1 colspan=1>AWR(Ours)</td></tr><tr><td rowspan=1 colspan=1>Ant-v2</td><td rowspan=1 colspan=1>2901±85</td><td rowspan=1 colspan=1>1161±389</td><td rowspan=1 colspan=1>72± 1550</td><td rowspan=1 colspan=1>4285±671</td><td rowspan=1 colspan=1>5909±371</td><td rowspan=1 colspan=1>181±19</td><td rowspan=1 colspan=1>5067± 256</td></tr><tr><td rowspan=1 colspan=1>HalfCheetah-v2</td><td rowspan=1 colspan=1>3302 ± 428</td><td rowspan=1 colspan=1>4920±429</td><td rowspan=1 colspan=1>10563±382</td><td rowspan=1 colspan=1>4309±1238</td><td rowspan=1 colspan=1>9297 ±1206</td><td rowspan=1 colspan=1>1400±370</td><td rowspan=1 colspan=1>9136±184</td></tr><tr><td rowspan=1 colspan=1>Hopper-v2</td><td rowspan=1 colspan=1>1880±337</td><td rowspan=1 colspan=1>1391 ± 304</td><td rowspan=1 colspan=1>855±282</td><td rowspan=1 colspan=1>935±489</td><td rowspan=1 colspan=1>2769±552</td><td rowspan=1 colspan=1>605±114</td><td rowspan=1 colspan=1>3405±121</td></tr><tr><td rowspan=1 colspan=1>Humanoid-v2</td><td rowspan=1 colspan=1>552±9</td><td rowspan=1 colspan=1>695±59</td><td rowspan=1 colspan=1>4382 ± 423</td><td rowspan=1 colspan=1>81 ±17</td><td rowspan=1 colspan=1>8048±700</td><td rowspan=1 colspan=1>509±18</td><td rowspan=1 colspan=1>4996 ± 697</td></tr><tr><td rowspan=1 colspan=1>LunarLander-v2</td><td rowspan=1 colspan=1>104± 94</td><td rowspan=1 colspan=1>121± 49</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>185±23</td><td rowspan=1 colspan=1>229±2</td></tr><tr><td rowspan=1 colspan=1>Walker2d-v2</td><td rowspan=1 colspan=1>2765±168</td><td rowspan=1 colspan=1>2617 ±362</td><td rowspan=1 colspan=1>401± 470</td><td rowspan=1 colspan=1>4212 ± 427</td><td rowspan=1 colspan=1>5805±587</td><td rowspan=1 colspan=1>406±64</td><td rowspan=1 colspan=1>5813±483</td></tr></table>
161
+
162
+ Table 1: Final returns for different algorithms on the OpenAI Gym tasks, with $\pm$ corresponding to one standard deviation of the average return across 5 random seeds. In terms of final performance, AWR generally performs comparably or better than prior methods.
163
+
164
+ gests that, although AWR is simple and easy to implement, the particular modifications it makes compared to standard RWR are critical for effective performance. To illustrate AWR’s generality on tasks with discrete actions, we compare AWR to TRPO, PPO, and RWR on LunarLander-v2. DDPG, TD3, and SAC are not easily applicable to discrete action spaces due to their need to backpropagate from the Q-function to the policy. On this discrete control task, AWR also shows strong performance compared to the other algorithms.
165
+
166
+ # 5.2 ABLATION EXPERIMENTS
167
+
168
+ To determine the effects of various design decisions, we evaluate the performance of AWR when key components of the algorithm have been removed. The experiments include an on-policy version of AWR (On-Policy), where only data collected from the latest policy is used to perform updates. We also compare with a version of AWR without the baseline $V ( \mathbf { s } )$ (No Baseline), which corresponds to using the standard RWR weights $\begin{array} { r } { \omega _ { \mathbf { s } , \mathbf { a } } = \exp ( \frac { 1 } { \beta } \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ) } \end{array}$ , and another version that uses Monte Carlo return estimates instead of $\mathrm { T D } ( \lambda )$ $\left( \mathrm { N o } \mathrm { T D } ( \lambda ) \right)$ ). The effects of these components are illustrated in Figure 4. Overall, these design decisions appear to be vital for an effective algorithm, with the most crucial components being the use of experience replay and a baseline. Updates using only on-policy data can lead to instabilities and result in noticeable degradation in performance, which may be due to overfitting on a smaller dataset. This issue might be mitigated by collecting a larger batch of on-policy data per iteration, but this can also negatively impact sample efficiency. Removing the baseline also noticeably hampers performance. Using simple Monte Carlo return estimates instead of $\mathrm { T D } ( \lambda )$ seems to be a viable alternative, and the algorithm still achieves competitive performance on some tasks. When combined, these different components yield substantial performance gains over standard RWR.
169
+
170
+ To better evaluate the effect of experience replay on AWR, we compare the performance of policies trained with different capacities for the replay buffer. Figure 4 illustrates the learning curves for buffers of size 5k, 20k, 50k, $1 0 0 \mathrm { k }$ , and $5 0 0 \mathrm { k }$ , with $5 0 \mathrm { k }$ being the default buffer size in our experiments. The size of the replay buffer appears to have a significant impact on overall performance. Smaller buffer sizes can result in instabilities during training, which again may be an effect of overfitting to a smaller dataset. As the buffer size increases, AWR remains stable even when the dataset is dominated by off-policy data from previous iterations. In fact, performance over the course of training appears more stable with larger replay buffers, but progress can also become slower. Since the sampling policy $\mu ( \mathbf { a } | \mathbf { s } )$ is modeled by the replay buffer, a larger buffer can limit the rate at which $\mu$ changes by maintaining older data for more iterations. Due to the trust region penalty in Equation 7, a slower changing $\mu$ also prevents the policy $\pi$ from changing quickly. The replay buffer therefore provides a simple mechanism to trade-off between stability and learning speed.
171
+
172
+ ![](images/de2a1f11df41f74beb8bb3833cd2fb2d5dc70b5e87a8fc0ef7a28ea8daa760fc.jpg)
173
+ Figure 4: Left: Learning curves comparing AWR with various components removed. Each component appears to contribute to improvements in performance, with the best performance achieved when all components are combined. Right: Learning curves comparing AWR with different capacity replay buffers. AWR remains stable with large replay buffers containing primarily off-policy data from previous iterations of the algorithm.
174
+
175
+ ![](images/4647881a8e42007940db372bd1562db4ccebe82ad1eeb3d579e52d0ede9a745d.jpg)
176
+ Figure 5: Snapshots of $3 4 ~ \mathrm { D o F }$ humanoid and $6 4 ~ \mathrm { D o F }$ dog trained with AWR to imitate reference motion recorded from real world subjects. AWR is able to learn sophisticated skills with characters with large numbers of degrees of freedom.
177
+
178
+ # 5.3 MOTION IMITATION
179
+
180
+ The Gym benchmarks present relatively low-dimensional tasks. In this section, we study how AWR can solve higher-dimensional tasks with complex simulated characters, including a $3 4 ~ \mathrm { D o F }$ humanoid and 64 DoF dog. The objective of the tasks is to imitate reference motion clips recorded using motion capture from real world subjects. The experimental setup follows the motion imitation framework proposed by Peng et al. (2018). Motion clips are collected from publicly available datasets (CMU; SFU; Zhang et al., 2018). The skills include highly dynamics motions, such as spinkicks and canters (i.e. running), and motions that requires more coordinated movements of the character’s body, such as a cartwheel. Snapshots of the behaviors learned by the AWR policies are available in Figure 5. Table 2 compares the performance of AWR to RWR and the highly-tuned PPO implementation from Peng et al. (2018). Learning curves for the different algorithms are shown in Figure 6. AWR performs well across the set of challenging skills, consistently achieving comparable or better performance than PPO. RWR struggles with controlling the humanoid, but exhibits stronger performance on the dog. This performance difference may be due to the more dynamic and acrobatic skills of the humanoid, compared to the more standard locomotion skills of the dog.
181
+
182
+ # 5.4 OFF-POLICY LEARNING WITH STATIC DATASETS
183
+
184
+ Since AWR is an off-policy RL algorithm, it has the advantage of being able to leverage data from other sources. This not only accelerates the learning process on standard tasks, as discussed above, but also allows us to apply AWR in a fully off-policy setting, where the algorithm is provided with a static dataset of transitions, and then tasked with learning the best possible policy. To evaluate our method in this setting, we use the off-policy tasks proposed by Kumar et al. (2019). The objective of these tasks is to learn policies solely from static datasets, without collecting any additional data from the policy that is being trained. The dataset consists of trajectories $\tau \stackrel { - } { = } \{ \left( { \bf s } _ { 0 } , { \bf a } _ { 0 } , r _ { 0 } \right) , \left( { \bf s } _ { 1 } , { \bf a } _ { 1 } , r _ { 1 } \right) , \ldots \}$ from rollouts of a demo policy. Unlike standard imitation learning tasks, which only observes the states and actions from the demo policy, the dataset also provides the reward received by the demo policy at each step. The demo policies are trained using SAC on various OpenAI Gym tasks. A dataset of 1 million timesteps is collected for each task.
185
+
186
+ <table><tr><td rowspan=1 colspan=1>Task</td><td rowspan=1 colspan=1>PPO</td><td rowspan=1 colspan=1>RWR</td><td rowspan=1 colspan=1>AWR (Ours)</td></tr><tr><td rowspan=1 colspan=1>Humanoid:Cartwheel</td><td rowspan=1 colspan=1>0.76±0.02</td><td rowspan=1 colspan=1>0.03 ±0.01</td><td rowspan=1 colspan=1>0.78±0.07</td></tr><tr><td rowspan=1 colspan=1>Humanoid:Spinkick</td><td rowspan=1 colspan=1>0.70±0.02</td><td rowspan=1 colspan=1>0.05± 0.03</td><td rowspan=1 colspan=1>0.77 ± 0.04</td></tr><tr><td rowspan=1 colspan=1>Dog:Canter</td><td rowspan=1 colspan=1>0.76±0.03</td><td rowspan=1 colspan=1>0.78±0.04</td><td rowspan=1 colspan=1>0.86±0.01</td></tr><tr><td rowspan=1 colspan=1>Dog:Trot</td><td rowspan=1 colspan=1>0.86±0.01</td><td rowspan=1 colspan=1>0.86±0.01</td><td rowspan=1 colspan=1>0.86±0.03</td></tr><tr><td rowspan=1 colspan=1>Dog:Turn</td><td rowspan=1 colspan=1>0.75±0.02</td><td rowspan=1 colspan=1>0.75±0.03</td><td rowspan=1 colspan=1>0.82±0.03</td></tr></table>
187
+
188
+ Table 2: Performance statistics of algorithms on the motion imitation tasks. Returns are normalized between the minimum and maximum possible returns per episode.
189
+
190
+ ![](images/677f1e98c59f147e5f6fc74ee463dd49ddd47f19ee3ca6d6810ff22d09d01b47.jpg)
191
+ Figure 6: Learning curves on motion imitation tasks. On these challenging tasks, AWR generally learns faster than PPO and RWR.
192
+
193
+ ![](images/a9dc8c171f33c4cb27f2edf99f5edf00f4ce449ba235fe530bb6af422f842961.jpg)
194
+ Figure 7: Performance of various algorithms on off-policy learning tasks with static datasets. AWR is able to learn policies that are comparable or better than the original demo policies.
195
+
196
+ For AWR, we simply treat the dataset as the replay buffer $\mathcal { D }$ and directly apply the algorithm without additional modifications. Figure 7 compares AWR with other algorithms when applied to the datasets. We include comparisons to the performance of the original demo policy used to generate the dataset (Demo) and a behavioral cloning policy (BC). The comparisons also include recent off-policy methods: batch-constrained Q-learning (BCQ) (Fujimoto et al., 2019) and bootstrapping error accumulation reduction (BEAR) (Kumar et al., 2019), which have shown strong performance on off-policy learning with static datasets. Note that both of these prior methods are modifications to existing off-policy RL methods, such as TD3 and SAC, which are already quite complex. In contrast, AWR is simple and requires no modifications for the fully off-policy setting. Despite not collecting any additional data, AWR is able to learn effective policies from these fully off-policy datasets, achieving comparable or better performance than the original demo policies. On-policy methods, such as PPO performs poorly in this off-policy setting. Q-function based methods, such as TD3 and SAC, can in principle handle off-policy data but, as discussed in prior work, tend to struggle in this setting in practice (Fujimoto et al., 2019; Kumar et al., 2019). Indeed, standard behavioral cloning (BC) often outperforms these standard RL methods. In this fully off-policy setting, AWR can be interpreted as an advantage-weighted form of behavioral cloning, which assigns higher likelihoods to demonstration actions that receive higher advantages. Unlike Q-function based methods, AWR is less susceptible to issues from out-of-distribution actions as the policy is always trained on observed actions from the behaviour data (Kumar et al., 2019). AWR also shows comparable performance to BEAR and BCQ, which are specifically designed for this off-policy setting and introduce considerable algorithmic overhead.
197
+
198
+ # 6 DISCUSSION AND FUTURE WORK
199
+
200
+ We presented advantage-weighted regression, a simple off-policy reinforcement learning algorithm, where policy updates are performed using standard supervised learning methods. Despite its simplicity, our algorithm is able to solve challenging control tasks with complex simulated agents, and achieve competitive performance on standard benchmarks compared to a number of well-established RL algorithms. Our derivation introduces several new design decisions, and our experiments verify the importance of these components. AWR is also able to learn from fully off-policy datasets, demonstrating comparable performance to state-of-the-art off-policy methods. While AWR is effective for a diverse suite of tasks, it is not yet as sample efficient as the most efficient off-policy algorithms. We believe that exploring techniques for improving sample efficiency and performance on fully off-policy learning can open opportunities to deploy these methods in real world domains. We are also interested in exploring applications that are particularly suitable for these regression-based RL algorithms, as compared to other classes of RL techniques. A better theoretical understanding of the convergence properties of these algorithms, especially when combined with experience replay, could also be valuable for the development of future algorithms.
201
+
202
+ # REFERENCES
203
+
204
+ Abbas Abdolmaleki, Jost Tobias Springenberg, Yuval Tassa, Remi Munos, Nicolas Heess, and Martin Riedmiller. Maximum a posteriori policy optimisation. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ S1ANxQW0b.
205
+
206
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016.
207
+
208
+ CMU. Cmu graphics lab motion capture database. http://mocap.cs.cmu.edu/.
209
+
210
+ Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plappert, Alec Radford, John Schulman, Szymon Sidor, Yuhuai Wu, and Peter Zhokhov. Openai baselines. https: //github.com/openai/baselines, 2017.
211
+
212
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In ICML, pp. 1329–1338, 2016. URL http: //proceedings.mlr.press/v48/duan16.html.
213
+
214
+ Justin Fu, Aviral Kumar, Matthew Soh, and Sergey Levine. Diagnosing bottlenecks in deep qlearning algorithms. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 2021–2030, Long Beach, California, USA, 09–15 Jun 2019. PMLR. URL http://proceedings.mlr.press/v97/fu19a.html.
215
+
216
+ Scott Fujimoto, Herke van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1587–1596, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings.mlr.press/v80/fujimoto18a.html.
217
+
218
+ Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 2052–2062, Long Beach, California, USA, 09–15 Jun 2019. PMLR. URL http: //proceedings.mlr.press/v97/fujimoto19a.html.
219
+
220
+ Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In Maria Florina Balcan and Kilian Q. Weinberger (eds.), Proceedings of The 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pp. 2829–2838, New York, New York, USA, 20–22 Jun 2016. PMLR. URL http://proceedings.mlr.press/v48/gu16.html.
221
+
222
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1861–1870, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018a. PMLR. URL http://proceedings.mlr.press/ $\mathtt { v 8 0 }$ /haarnoja18b.html.
223
+
224
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1861–1870, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018b. PMLR. URL http://proceedings.mlr.press/ v80/haarnoja18b.html.
225
+
226
+ Hirotaka Hachiya, Takayuki Akiyama, Masashi Sugiayma, and Jan Peters. Adaptive importance sampling for value function approximation in off-policy reinforcement learning. Neural Netw., 22(10):1399–1410, December 2009. ISSN 0893-6080. doi: 10.1016/j.neunet.2009.01.002. URL http://dx.doi.org/10.1016/j.neunet.2009.01.002.
227
+
228
+ 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. AAAI Press, 2016. URL http://dl.acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 3016100.3016191.
229
+
230
+ Nicolas Heess, Dhruva TB, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, S. M. Ali Eslami, Martin A. Riedmiller, and David Silver. Emergence of locomotion behaviours in rich environments. CoRR, abs/1707.02286, 2017. URL http: //arxiv.org/abs/1707.02286.
231
+
232
+ Matteo Hessel, Joseph Modayil, Hado van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Daniel Horgan, Bilal Piot, Mohammad Gheshlaghi Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. CoRR, abs/1710.02298, 2017. URL http:// arxiv.org/abs/1710.02298.
233
+
234
+ Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In Proceedings of the Nineteenth International Conference on Machine Learning, ICML ’02, pp. 267–274, San Francisco, CA, USA, 2002. Morgan Kaufmann Publishers Inc. ISBN 1-55860- 873-7. URL http://dl.acm.org/citation.cfm?id $\cdot ^ { = }$ 645531.656005.
235
+
236
+ Jens Kober and Jan R. Peters. Policy search for motor primitives in robotics. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou (eds.), Advances in Neural Information Processing Systems 21, pp. 849–856. Curran Associates, Inc., 2009. URL http://papers.nips.cc/paper/ 3545-policy-search-for-motor-primitives-in-robotics.pdf.
237
+
238
+ Aviral Kumar, Justin Fu, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. CoRR, abs/1906.00949, 2019. URL http://arxiv.org/ abs/1906.00949.
239
+
240
+ Timothy P. Lillicrap, Jonathan J. Hunt, Alexander Pritzel, Nicolas Manfred Otto Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. ICLR, 2016.
241
+
242
+ Nicolas Meuleau, Leonid Peshkin, Leslie P. Kaelbling, and Kee eung Kim. Off-policy policy search. Technical report, 2000.
243
+
244
+ 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, February 2015. ISSN 00280836. URL http://dx.doi.org/10.1038/nature14236.
245
+
246
+ Remi Munos, Thomas Stepleton, Anna Harutyunyan, and Marc G. Bellemare. Safe and efficient off-´ policy reinforcement learning. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16, pp. 1054–1062, USA, 2016. Curran Associates Inc. ISBN 978-1-5108-3881-9. URL http://dl.acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 3157096. 3157214.
247
+
248
+ Ofir Nachum, Mohammad Norouzi, George Tucker, and Dale Schuurmans. Learning gaussian policies from smoothed action value functions, 2018. URL https://openreview.net/ forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ B1nLkl-0Z.
249
+
250
+ Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on International Conference on Machine Learning, ICML’10, pp. 807–814, USA, 2010. Omnipress. ISBN 978-1-60558-907-7. URL http://dl.acm.org/citation.cfm?id=3104322.3104425.
251
+
252
+ Gerhard Neumann. Variational inference for policy search in changing situations. In Proceedings of the 28th International Conference on International Conference on Machine Learning, ICML’11, pp. 817–824, USA, 2011. Omnipress. ISBN 978-1-4503-0619-5. URL http://dl.acm. org/citation.cfm?id=3104482.3104585.
253
+
254
+ Gerhard Neumann and Jan R. Peters. Fitted q-iteration by advantage weighted regression. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou (eds.), Advances in Neural Information Processing Systems 21, pp. 1177–1184. Curran Associates, Inc., 2009. URL http://papers.nips.cc/paper/ 3501-fitted-q-iteration-by-advantage-weighted-regression.pdf.
255
+
256
+ Junhyuk Oh, Yijie Guo, Satinder Singh, and Honglak Lee. Self-imitation learning. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 3878–3887, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings.mlr.press/ v80/oh18b.html.
257
+
258
+ Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, July 2017.
259
+
260
+ Xue Bin Peng, Pieter Abbeel, Sergey Levine, and Michiel van de Panne. Deepmimic: Exampleguided deep reinforcement learning of physics-based character skills. ACM Trans. Graph., 37 (4):143:1–143:14, July 2018. ISSN 0730-0301. doi: 10.1145/3197517.3201311. URL http: //doi.acm.org/10.1145/3197517.3201311.
261
+
262
+ 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, pp. 745–750, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-793-3. doi: 10.1145/ 1273496.1273590. URL http://doi.acm.org/10.1145/1273496.1273590.
263
+
264
+ Jan Peters, Katharina Mulling, and Yasemin Alt ¨ un. Relative entropy policy search. In ¨ Proceedings of the Twenty-Fourth AAAI Conference on Artificial Intelligence, AAAI’10, pp. 1607–1612. AAAI Press, 2010. URL http://dl.acm.org/citation.cfm?id=2898607.2898863.
265
+
266
+ Vitchyr Pong. Rlkit. https://github.com/vitchyr/rlkit, 2019.
267
+
268
+ Doina Precup, Richard S. Sutton, and Sanjoy Dasgupta. Off-policy temporal difference learning with function approximation. In Proceedings of the Eighteenth International Conference on Machine Learning, ICML ’01, pp. 417–424, San Francisco, CA, USA, 2001. Morgan Kaufmann Publishers Inc. ISBN 1-55860-778-1. URL http://dl.acm.org/citation.cfm?i $\mathtt { d } = 6 4 5 5 3 0$ . 655817.
269
+
270
+ Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, Giulia Vezzani, John Schulman, Emanuel Todorov, and Sergey Levine. Learning Complex Dexterous Manipulation with Deep Reinforcement Learning and Demonstrations. In Proceedings of Robotics: Science and Systems (RSS), 2018.
271
+
272
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Francis Bach and David Blei (eds.), Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp. 1889–1897, Lille, France, 07–09 Jul 2015. PMLR. URL http://proceedings.mlr. press/v37/schulman15.html.
273
+
274
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. CoRR, abs/1707.06347, 2017. URL http://arxiv.org/abs/ 1707.06347.
275
+
276
+ SFU. Sfu motion capture database. http://mocap.cs.sfu.ca/.
277
+
278
+ Richard S. Sutton and Andrew G. Barto. Introduction to Reinforcement Learning. MIT Press, Cambridge, MA, USA, 1st edition, 1998. ISBN 0262193981.
279
+
280
+ Richard S Sutton, David A. McAllester, Satinder P. Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In S. A. Solla, T. K. Leen, and K. Muller (eds.), ¨ Advances in Neural Information Processing Systems 12, pp. 1057–1063. MIT Press, 2000.
281
+
282
+ Qing Wang, Jiechao Xiong, Lei Han, peng sun, Han Liu, and Tong Zhang. Exponentially weighted imitation learning for batched historical data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 6288–6297. Curran Associates, Inc., 2018.
283
+
284
+ Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, and ´ Nando de Freitas. Sample efficient actor-critic with experience replay. CoRR, abs/1611.01224, 2016. URL http://arxiv.org/abs/1611.01224.
285
+
286
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Mach. Learn., 8(3-4):229–256, May 1992. ISSN 0885-6125. doi: 10.1007/ BF00992696. URL https://doi.org/10.1007/BF00992696.
287
+
288
+ He Zhang, Sebastian Starke, Taku Komura, and Jun Saito. Mode-adaptive neural networks for quadruped motion control. ACM Trans. Graph., 37(4):145:1–145:11, July 2018. ISSN 0730-0301. doi: 10.1145/3197517.3201366. URL http://doi.acm.org/10.1145/ 3197517.3201366.
289
+
290
+ # A AWR DERIVATION
291
+
292
+ In this section, we derive the AWR algorithm as an approximate optimization of a constrained policy search problem. Our goal is to find a policy that maximize the expected improvement $\eta ( \pi ) ~ =$ $J ( \pi ) \stackrel { - } { - } J ( \mu )$ over a sampling policy $\mu ( \mathbf { a } | \mathbf { s } )$ . We start with a lemma from Kakade & Langford (2002), which shows that the expected improvement can be expressed in terms of the advantage $A ^ { \mu } ( \mathbf { s } , \mathbf { a } ) = \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } )$ with respect to the sampling policy $\mu$ , where $\mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu }$ denotes the return obtained by performing action a in state s and following $\mu$ for the following timesteps, and $V ^ { \mu } ( \mathbf { s } ) =$ $\int _ { \mathbf { a } } \mu ( \mathbf { a } | \mathbf { s } ) \dot { \mathcal { R } } _ { \mathbf { s } } ^ { \mathbf { a } }$ da corresponds to the value function of $\mu$ ,
293
+
294
+ $$
295
+ \begin{array} { r l } & { \mathbb { E } _ { \tau \sim p _ { \tau } ( \tau ) } \left[ \displaystyle \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } A ^ { \mu } ( s _ { t } , \mathbf { a } _ { t } ) \right] } \\ & { = \mathbb { E } _ { \tau \sim p _ { \tau } ( \tau ) } \left[ \displaystyle \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \left( \tau ( s _ { t } , \mathbf { a } _ { t } ) + \gamma V ^ { \mu } ( s _ { t + 1 } ) - V ^ { \mu } ( s _ { t } ) \right) \right] } \\ & { = \mathbb { E } _ { \tau \sim p _ { \tau } ( \tau ) } \left[ - V ^ { \mu } ( \mathbf { a } _ { 0 } ) + \displaystyle \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , \mathbf { a } _ { t } ) \right] } \\ & { = - \mathbb { E } _ { s _ { 0 } \sim p ( \mathbf { s } _ { 0 } ) } \left[ V ^ { \mu } ( \mathbf { s } _ { 0 } ) \right] + \mathbb { E } _ { \tau \sim p _ { \tau } ( \tau ) } \left[ \displaystyle \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , \mathbf { a } _ { t } ) \right] } \\ & { = - J ( \mu ) + J ( \pi ) } \end{array}
296
+ $$
297
+
298
+ We can rewrite Equation 22 with an expectation over states instead of trajectories:
299
+
300
+ $$
301
+ \begin{array} { r l } & { \displaystyle \eta ( \boldsymbol { \pi } ) = \mathbb { E } _ { \boldsymbol { \tau } \sim p _ { \boldsymbol { \pi } } ( \boldsymbol { \tau } ) } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } A ^ { \mu } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) \right] } \\ & { \qquad = \displaystyle \sum _ { t = 0 } ^ { \infty } \int _ { \mathbf { s } } p ( \mathbf { s } _ { t } = \mathbf { s } | \pi ) \int _ { \mathbf { a } } \boldsymbol { \pi } ( \mathbf { a } | \mathbf { s } ) \gamma ^ { t } A ^ { \mu } ( \mathbf { s } , \mathbf { a } ) d \mathbf { a } \ d \mathbf { s } } \\ & { \qquad = \displaystyle \int _ { \mathbf { s } } \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } p ( \mathbf { s } _ { t } = \mathbf { s } | \pi ) \int _ { \mathbf { a } } \boldsymbol { \pi } ( \mathbf { a } | \mathbf { s } ) A ^ { \mu } ( \mathbf { s } , \mathbf { a } ) d \mathbf { a } d \mathbf { s } } \\ & { \qquad = \displaystyle \int _ { \mathbf { s } } d \boldsymbol { \pi } ( \mathbf { s } ) \int _ { \mathbf { a } } \boldsymbol { \pi } ( \mathbf { a } | \mathbf { s } ) \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] \ d \mathbf { a } d \mathbf { s } , } \end{array}
302
+ $$
303
+
304
+ where $\begin{array} { r } { d _ { \pi } ( \mathbf { s } ) \ = \ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } p ( \mathbf { s } _ { t } \ = \ \mathbf { s } | \pi ) } \end{array}$ represents the unnormalized discounted state distribution induced by the policy $\pi$ (Sutton & Barto, 1998), and $p ( \mathbf { s } _ { t } = \mathbf { s } | \boldsymbol { \pi } )$ is the likelihood of the agent being in state s after following $\pi$ for $t$ timesteps.
305
+
306
+ The objective in Equation 25 can be difficult to optimize due to the dependency between $d _ { \pi } ( \mathbf { s } )$ and $\pi$ , as well as the need to collect samples from $\pi$ . Following Schulman et al. (2015), we can optimize an approximation $\hat { \eta } ( \pi )$ of $\eta ( \pi )$ using the state distribution of $\mu$ ,
307
+
308
+ $$
309
+ \widehat { \eta } ( \pi ) = \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] d \mathbf { a } d \mathbf { s } .
310
+ $$
311
+
312
+ $\hat { \eta } ( \pi )$ matches $\eta ( \pi )$ to first order (Kakade $\&$ Langford, 2002), and provides a reasonable estimate of $\eta$ if $\pi$ and $\mu$ are similar. Using this objective, we can formulate the following constrained policy search problem:
313
+
314
+ $$
315
+ \begin{array} { r l } { \arg \operatorname* { m a x } } & { \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] d \mathbf { a } d \mathbf { s } } \\ { \mathrm { s . t . } } & { \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | \mathbf { s } ) | | \mu ( \cdot | \mathbf { s } ) \right) \leq \epsilon , \quad \forall \mathbf { s } } \\ & { \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) d \mathbf { a } = 1 , \quad \forall \mathbf { s } . } \end{array}
316
+ $$
317
+
318
+ Since enforcing the pointwise $\mathrm { K L }$ constraint in Equation 28 at all states is intractable, we relax the constraint by enforcing it only in expectation $\begin{array} { r } { \int _ { \bf s } d _ { \mu } ( { \bf s } ) \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | { \bf s } ) | | \mu ( \cdot | { \bf s } ) \right) d { \bf s } \leq \epsilon } \end{array}$ . To further
319
+
320
+ simplify the optimization problem, we relax the hard KL constraint by converting it into a soft constraint with coefficient $\beta$ ,
321
+
322
+ $$
323
+ \begin{array} { r l } { \underset { \pi } { \operatorname { r g m a x } } } & { ( \displaystyle \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) [ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) ] d \mathbf { a } d \mathbf { s } ) + \beta ( \epsilon - \displaystyle \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \mathrm { D } _ { \mathrm { K L } } ( \pi ( \cdot | \mathbf { s } ) ) | | \mu ( \cdot | \mathbf { s } ) ) d \mathbf { s } ) } \\ { \mathrm { s . t . ~ } } & { \displaystyle \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) d \mathbf { a } = 1 , \quad \forall \mathbf { s } . } \end{array}
324
+ $$
325
+
326
+ Next we form the Lagrangian,
327
+
328
+ $$
329
+ \begin{array} { l } { { \displaystyle \left. \pi , \beta , \alpha \right. = \left( \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right] d \mathbf { a } d \mathbf { s } \right) + \beta \left( \epsilon - \int _ { \mathbf { s } } d _ { \mu } ( \mathbf { s } ) \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | \mathbf { s } ) \right| | \mu ( \cdot | \mathbf { s } ) \right) d \mathbf { s } \ , } } \\ { { \displaystyle \qquad + \int _ { \mathbf { s } } \alpha _ { \mathbf { s } } \left( 1 - \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) d \mathbf { a } \right) d \mathbf { s } , \ } } \end{array}
330
+ $$
331
+
332
+ with $\beta$ and $\alpha = \{ \alpha _ { \mathbf { s } } \mid \forall \mathbf { s } \in S \}$ corresponding to the Lagrange multipliers. Differentiating $\mathcal { L } ( \pi , \beta , \alpha )$ with respect to $\pi ( \mathbf { a } | \mathbf { s } )$ results in
333
+
334
+ $$
335
+ \frac { \partial \mathcal { L } } { \partial \pi ( \mathbf { a } | \mathbf { s } ) } = d _ { \mu } ( \mathbf { s } ) \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) - \beta d _ { \mu } ( \mathbf { s } ) \log \pi ( \mathbf { a } | \mathbf { s } ) + \beta d _ { \mu } ( \mathbf { s } ) \log \mu ( \mathbf { a } | \mathbf { s } ) - \beta d _ { \mu } ( \mathbf { s } ) - \alpha _ { \mathbf { s } } .
336
+ $$
337
+
338
+ Setting to zero and solving for $\pi ( \mathbf { a } | \mathbf { s } )$ gives
339
+
340
+ $$
341
+ \log \pi ( \mathbf { a } | \mathbf { s } ) = \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) + \log \mu ( \mathbf { a } | \mathbf { s } ) - 1 - \frac { 1 } { d _ { \mu } ( \mathbf { s } ) } \frac { \alpha _ { \mathbf { s } } } { \beta }
342
+ $$
343
+
344
+ $$
345
+ \pi ( \mathbf { a } | \mathbf { s } ) = \mu ( \mathbf { a } | \mathbf { s } ) \mathrm { e x p } \left( { \frac { 1 } { \beta } } \left( { \mathcal { R } } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right) \mathrm { e x p } \left( - { \frac { 1 } { d _ { \mu } ( \mathbf { s } ) } } { \frac { \alpha _ { \mathbf { s } } } { \beta } } - 1 \right)
346
+ $$
347
+
348
+ Since $\begin{array} { r } { \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) ~ d \mathbf { a } = 1 } \end{array}$ , the second exponential term is the partition function $Z ( \mathbf { s } )$ that normalizes the conditional action distribution,
349
+
350
+ $$
351
+ Z ( \mathbf { s } ) = \exp \left( \frac { 1 } { d _ { \mu } ( \mathbf { s } ) } \frac { \alpha _ { \mathbf { s } } } { \beta } + 1 \right) = \int _ { \mathbf { a } ^ { \prime } } \mu ( \mathbf { a } ^ { \prime } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } ^ { \prime } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right) d \mathbf { a } ^ { \prime } .
352
+ $$
353
+
354
+ The optimal policy is therefore given by,
355
+
356
+ $$
357
+ \pi ^ { \ast } ( \mathbf { a } | \mathbf { s } ) = \frac { 1 } { Z ( \mathbf { s } ) } \mu ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right)
358
+ $$
359
+
360
+ If $\pi$ is represented by a function approximator, the optimal policy $\pi ^ { * }$ can be projected onto the manifold of parameterized policies by solving the following supervised regression problem
361
+
362
+ $$
363
+ \begin{array} { r l } & { \underset { \pi } { \arg \operatorname* { m i n } } \quad \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \left[ \mathrm { D } _ { \mathrm { K L } } \left( \pi ^ { * } ( \cdot | \mathbf { s } ) | | \pi ( \cdot | \mathbf { s } ) \right) \right] } \\ & { = \underset { \pi } { \arg \operatorname* { m i n } } \quad \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \left[ \mathrm { D } _ { \mathrm { K L } } \left( \frac { 1 } { Z ( \mathbf { s } ) } \mu ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right) \bigg | \bigg | \pi ( \cdot | \mathbf { s } ) \right) \right] } \\ & { = \underset { \pi } { \arg \operatorname* { m a x } } \quad \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \mu ( \mathbf { a } | \mathbf { s } ) } \left[ \log \pi ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mu } - V ^ { \mu } ( \mathbf { s } ) \right) \right) \right] , } \end{array}
364
+ $$
365
+
366
+ # B AWR DERIVATION WITH EXPERIENCE REPLAY
367
+
368
+ In this section, we extend the derivation presented in Appendix A to incorporate experience replay using a replay buffer containing data from previous policies. To recap, the sampling distribution is a mixture of $k$ past policies $\{ \pi _ { 1 } , \cdots , \pi _ { k } \}$ , where the mixture is performed at the trajectory level. First, we define the trajectory distribution $\mu ( \tau )$ , marginal state-action distribution $\mu ( \mathbf { s } , \mathbf { a } )$ , and marginal state distribution $d _ { \mu } ( \mathbf { s } )$ of the replay buffer according to:
369
+
370
+ $$
371
+ \mu ( \tau ) = \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \tau ) , \qquad \mu ( \mathbf { s } , \mathbf { a } ) = \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \pi _ { i } ( \mathbf { a } | \mathbf { s } ) , \quad d _ { \mu } ( \mathbf { s } ) = \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } )
372
+ $$
373
+
374
+ where the weights $\textstyle \sum _ { i } w _ { i } = 1$ specify the probabilities of selecting each policy $\pi _ { i }$ . The conditional action distribution $\mu ( \mathbf { a } | \mathbf { s } )$ induced by the replay buffer is given by:
375
+
376
+ $$
377
+ \mu ( \mathbf { a } | \mathbf { s } ) = \frac { \mu ( \mathbf { s } , \mathbf { a } ) } { d _ { \mu } ( \mathbf { s } ) } = \frac { \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \pi _ { i } ( \mathbf { a } | \mathbf { s } ) } { \sum _ { j = 1 } ^ { k } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } .
378
+ $$
379
+
380
+ Next, using Lemma 6.1 from Kakade & Langford (2002) (also derived in Appendix A), the expected improvement of $\pi$ over each policy $\pi _ { i }$ satisfies
381
+
382
+ $$
383
+ J ( \pi ) = J ( \pi _ { i } ) + \mathbb { E } _ { \mathbf { s } \sim d _ { \pi } ( \mathbf { s } ) , a \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) \right]
384
+ $$
385
+
386
+ The expected improvement over the mixture can then be expressed with respect to the individual policies,
387
+
388
+ $$
389
+ \begin{array} { r l } { { \eta ( \boldsymbol { \pi } ) = J ( \boldsymbol { \pi } ) - J ( \boldsymbol { \mu } ) } } \\ & { = J ( \boldsymbol { \pi } ) - \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } J ( \pi _ { i } ) } \\ & { = \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } ( J ( \boldsymbol { \pi } ) - J ( \pi _ { i } ) ) } \\ & { = \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } ( \mathbb { E } _ { \mathbf { s } \sim d _ { \boldsymbol { \pi } } ( \mathbf { s } ) , \mathbf { a } \sim \boldsymbol { \pi } ( \mathbf { a } \mid \mathbf { s } ) } [ A ^ { \pi _ { i } } ( \mathbf { s } , \mathbf { a } ) ] ) } \end{array}
390
+ $$
391
+
392
+ In order to ensure that the policy $\pi$ is similar to the past policies, we constrain $\pi$ against the conditional action distributions of the replay buffer,
393
+
394
+ $$
395
+ \begin{array} { r } { \mathbb { E } _ { \mathbf { s } \sim \mu ( \mathbf { s } ) } \left[ \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \mathbf { a } | \mathbf { s } ) \Big | \Big | \mu ( \mathbf { a } | \mathbf { s } ) \right) \right] \leq \varepsilon . } \end{array}
396
+ $$
397
+
398
+ Note that constraining $\pi$ against $\mu ( \mathbf { a } | \mathbf { s } )$ has a number of desirable properties. First, the constraint prevents the policy $\pi$ from choosing actions that are vastly different from all of the policies $\{ \pi _ { 1 } , \cdots , \pi _ { k } \}$ . Second, the mixture weight assigned to each $\pi _ { i }$ in the definition of $\mu$ depends on the marginal state density $d _ { \pi _ { i } } ( \mathbf { s } )$ for the particular policy. This property is desirable as the policy $\pi$ is now constrained to be similar to $\pi _ { i }$ only at states that are likely to be visited by $\pi _ { i }$ . This then yields the following constrained objective:
399
+
400
+ $$
401
+ \begin{array} { r l } { \arg \operatorname* { m a x } } & { \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } \mathbb { E } _ { { \mathbf { s } } \sim d _ { \pi _ { i } } ( { \mathbf { s } } ) } \mathbb { E } _ { { \mathbf { a } } \sim \pi ( { \mathbf { a } } | { \mathbf { s } } ) } \left[ \mathcal { R } _ { { \mathbf { s } } , { \mathbf { a } } } ^ { \pi _ { i } } - V ^ { \pi _ { i } } ( { \mathbf { s } } ) \right] } \\ { \mathrm { s . t . } } & { \mathbb { E } _ { { \mathbf { s } } \sim d _ { \mu } ( { \mathbf { s } } ) } \left[ \mathrm { D } _ { { \mathrm { K L } } } \left( \pi ( \cdot | { \mathbf { s } } ) | | \mu ( \cdot | { \mathbf { s } } ) \right) \right] \leq \epsilon , } \\ & { \displaystyle \int _ { { \mathbf { a } } } \pi ( { \mathbf { a } } | { \mathbf { s } } ) d { \mathbf { a } } = 1 , \quad \forall { \mathbf { s } } . } \end{array}
402
+ $$
403
+
404
+ The Lagrangian of the above objective is given by:
405
+
406
+ $$
407
+ \begin{array} { r l } & { \mathcal { L } ( \pi , \beta , \boldsymbol { \alpha } ) = \left( \displaystyle \sum _ { i } w _ { i } \mathbb { E } _ { \mathbf { s } \sim d _ { \pi _ { i } } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi ( \mathbf { a } | \mathbf { s } ) } \left[ \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } - V ^ { \pi _ { i } } ( \mathbf { s } ) \right] \right) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad + \beta \left( \epsilon - \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \mathrm { D } _ { \mathrm { K L } } \left( \pi ( \cdot | \mathbf { s } ) \bigg | \bigg | \frac { \sum _ { i = 1 } ^ { k } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \pi _ { i } ( \cdot | \mathbf { s } ) } { \sum _ { j = 1 } ^ { k } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } \right) \right) } \\ & { \quad \quad \quad \quad \quad \quad + \displaystyle \int _ { \mathbf { s } } \alpha _ { \mathbf { s } } \left( 1 - \int _ { \mathbf { a } } \pi ( \mathbf { a } | \mathbf { s } ) d \mathbf { a } \right) d \mathbf { s } , } \end{array}
408
+ $$
409
+
410
+ Solving the Lagrangian following the same procedure as Appendix A leads to an optimal policy of the following form:
411
+
412
+ $$
413
+ \pi ^ { \ast } ( \mathbf { a } | \mathbf { s } ) = \frac { 1 } { Z ( \mathbf { s } ) } \mu ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \frac { \sum _ { i } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } - V ^ { \pi _ { i } } ( \mathbf { s } ) \right) } { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } \right)
414
+ $$
415
+
416
+ Finally, if $\pi$ is represented by a function approximator, the optimal policy $\pi ^ { * }$ can be projected onto the manifold of parameterized policies by solving the following supervised regression problem
417
+
418
+ $$
419
+ \begin{array} { r l r } { \underset { \pi } { \arg \operatorname* { m i n } } } & { \mathbb { E } _ { \mathbf { s } , \sim d _ { \mu } ( \mathbf { s } ) } \left[ \mathrm { D } _ { \mathbf { K L } } \left( \pi ^ { * } ( \cdot | \mathbf { s } ) | | \pi ( \cdot | \mathbf { s } ) \right) \right] } & { \left. ( 5 3 ) \right. } \\ & { = \underset { \pi } { \arg \operatorname* { m i n } } } & { \mathbb { E } _ { \mathbf { s } \sim d _ { \mu } ( \mathbf { s } ) } \left[ \mathrm { D } _ { \mathbf { K L } } \left( \frac { 1 } { Z ( \mathbf { s } ) } \left. \mu ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \frac { \sum _ { i } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \left. \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } - V ^ { \pi _ { i } } ( \mathbf { s } ) \right) \right)} { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } \right| \right| \pi ( \cdot | \mathbf { s } ) \right) \right] } \end{array}
420
+ $$
421
+
422
+ One of the challenges of optimizing the objective in Equation 54 is that computing the expected return in the exponent requires rolling out multiple policies starting from the same state, which would require the environment to be resettable to any given state. Therefore, to obtain a more practical objective, we approximate the expected return across policies using a single rollout from the replay buffer,
423
+
424
+ $$
425
+ \frac { \sum _ { i } w _ { i } d _ { \pi _ { i } } ( \mathbf { s } ) \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } } { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } \approx \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \mathcal { D } } \mathrm { ~ s u c h ~ t h a t ~ } ( \mathbf { s } , \mathbf { a } ) \in \mathcal { D }
426
+ $$
427
+
428
+ This single-sample estimator results in a biased estimate of the exponentiated advantage, because the expectation with respect to the mixture weights appears in the exponent. But in practice, we find this biased estimator to be effective for our experiments. Therefore, the objective used in practice is given by:
429
+
430
+ $$
431
+ \begin{array} { r l } { \underset { \pi } { \arg \operatorname* { m a x } } } & { ~ \displaystyle \sum _ { i = 1 } ^ { k } w _ { i } \mathbb { E } _ { \mathbf { s } \sim d _ { \pi _ { i } } ( \mathbf { s } ) } \mathbb { E } _ { \mathbf { a } \sim \pi _ { i } ( \mathbf { a } | \mathbf { s } ) } \left[ \log \pi ( \mathbf { a } | \mathbf { s } ) \exp \left( \frac { 1 } { \beta } \left( \mathcal { R } _ { \mathbf { s } , \mathbf { a } } ^ { \pi _ { i } } - \frac { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) V ^ { \pi _ { j } } ( \mathbf { s } ) } { \sum _ { j } w _ { j } d _ { \pi _ { j } } ( \mathbf { s } ) } \right) \right) \right] , } \end{array}
432
+ $$
433
+
434
+ where the expectations can be approximated by simply sampling from $\mathcal { D }$ following Line 6 of Algorithm 1. Note, the baseline in the exponent now consists of an average of the value functions of the different policies. One approach for estimating this quantity would be to fit separate value functions $V ^ { \pi _ { i } }$ for each policy. However, if only a small amount of data is available from each policy, then $V ^ { \pi _ { i } }$ could be highly inaccurate. Therefore, instead of learning separate value functions, we fit a single mean value function $\bar { V } ( \mathbf { s } )$ that directly estimates the weighted average of $V ^ { \pi _ { i } }$ ’s,
435
+
436
+ $$
437
+ \bar { V } = \underset { V } { \arg \operatorname* { m i n } } \sum _ { i } w _ { i } \mathbb { E } _ { { \mathbf { s } } , \sim d _ { \pi _ { i } } ( { \mathbf { s } } ) } \mathbb { E } _ { { \mathbf { a } } \sim \pi _ { i } ( { \mathbf { a } } | { \mathbf { s } } ) } \big [ | | \mathcal { R } _ { { \mathbf { s } } , { \mathbf { a } } } ^ { \pi _ { i } } - V ( { \mathbf { s } } ) | | ^ { 2 } \big ]
438
+ $$
439
+
440
+ This loss can also be approximated by simply sampling from the replay buffer following Line 5 of Algorithm 1. The optimal solution V¯ (s) = Pi widπi (s)VP πi (s)w d (s) i s exactly the baseline in Equation 56.
441
+
442
+ # C EXPERIMENTAL SETUP
443
+
444
+ In our experiments, the policy is represented by a fully-connected network with 2 hidden layers consisting of 128 and 64 ReLU units respectively (Nair & Hinton, 2010), followed by a linear output layer. The value function is modeled by a separate network with a similar architecture, but consists of a single linear output unit for the value. Stochastic gradient descent with momentum is used to update both the policy and value function. The stepsize of the policy and value function are $5 \times 1 0 ^ { - 5 }$ and $1 \times 1 0 ^ { - 4 }$ respectively, and a momentum of 0.9 is used for both. The temperature is set to $\beta = 0 . 0 5$ for all experiments, and $\lambda = 0 . 9 5$ is used for $\mathrm { T D } ( \lambda )$ . The weight clipping threshold $\omega _ { \mathrm { m a x } }$ is set to 20. At each iteration, the agent collects a batch of approximately 2000 samples, which are stored in the replay buffer $\mathcal { D }$ along with samples from previous iterations. The replay buffer stores $5 0 \mathrm { k }$ of the most recent samples. Updates to the value function and policy are performed by uniformly sampling minibatches of 256 samples from $\mathcal { D }$ . The value function is updated with 200 gradient steps per iteration, and the policy is updated with 1000 gradient steps.
445
+
446
+ # D SIMILARITIES TO POLICY GRADIENTS
447
+
448
+ On the surface, the AWR policy update bears striking similarities to a conventional policy gradient (PG) update (Sutton et al., 2000):
449
+
450
+ $$
451
+ \_
452
+ $$
453
+
454
+ However, there are a number of subtle but important differences between the two. First, basic policy gradient algorithms are on-policy methods, which requires the data to be sampled from the same policy $\cdot$ that is being optimized s $\sim d _ { \pi } ( \mathbf { s } )$ and a $\sim \pi ( \mathbf { a } | \mathbf { s } )$ , whereas AWR can in principle learn using data from any sampling distribution $\cdot$ . This requirement for policy gradient methods is because PG directly differentiates through the sampling distribution to compute the gradient of the expected return with respect to the policy parameters. But with AWR and other EM algorithms, they first construct an estimate of the optimal action distribution at each state, and then projects that action distribution onto the space of parameterized policies. Therefore AWR does not need to differentiate through the sampling distribution, which is a critical feature for settings such as batch RL, where the sampling distribution (e.g. demo policy) may not be available to the agent. In AWR, the log probability of an action $\cdot$ is weighted by the exponentiated advantage $\cdot$ , while in PG the log probability is weighted just by the advantage $\cdot$ without the exponential. Since the exponentiated advantage is non-negative, the objective used in the AWR update is a maximum likelihood objective that tries to maximize the likelihood of all actions, but to varying amounts depending on the exponentiated advantage. In the case of PG, the advantage can be both positive and negative, therefore PG updates decrease the likelihood of actions with negative advantages, and thus it is not a conventional maximum likelihood objective. In practice, negative TD updates are often a source of instability when applying PG to off-policy data.
455
+
456
+ # E ADDITIONAL EXPERIMENTS
457
+
458
+ A comprehensive comparison of AWR with prior methods on all of the tasks considered are available in Figure 8 and 9.
459
+
460
+ ![](images/eb7c004ed33b7ef589df2ac42592fc38383231129cdf2e8793a2236cab8f0eed.jpg)
461
+ Figure 8: Learning curves of the various algorithms when applied to OpenAI Gym tasks. Results are averaged over 5 random seeds. AWR is generally competitive with the best current methods.
462
+
463
+ ![](images/277c752c7962cd5a47332a81b208418cc735353728cc3d81e50cca5473f1ad21.jpg)
464
+ Figure 9: Learning curves on motion imitation tasks. On these challenging tasks, AWR generally learns faster than PPO and RWR.
465
+
466
+ # E.1 WEIGHT CLIPPING
467
+
468
+ To analyze the effects of weight clipping on the stability of AWR, we compare learning curves of policies trained with weight clipping using a threshold of $\cdot$ , and policies trained without weight clipping. Figure 10 compares the learning curves with and without clipping. 5 separate AWR runs with different random seeds are visualized separately. With weight clipping, performance remains stable throughout training. Policies trained without weight clipping are substantially more unstable, exhibiting drastic fluctuations in performance as a result of exploding gradients from excessively large weights. Some training runs without clipping are terminated early due to exploding gradients causing the networks to output NaNs. These experiments suggest that weight clipping is vital for ensuring stable training with AWR.
469
+
470
+ ![](images/fd539da7d9b0b9f1430da053974eaaa103d6b3fb6d8e87ea29bb282c278d0947.jpg)
471
+ Figure 10: Learning curves comparing AWR policies trained with and without weight clipping. Weight clipping is vital for ensuring stable training with AWR. Policies trained without weight clipping are susceptible to exploding gradients due to excessively large weights.
parse/train/H1gdF34FvS/H1gdF34FvS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gdF34FvS/H1gdF34FvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gdF34FvS/H1gdF34FvS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jpm1AfJucwt/jpm1AfJucwt.md ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REVISITING LOSS MODELLING FOR UNSTRUCTURED PRUNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ By removing parameters from deep neural networks, unstructured pruning methods aim at cutting down memory footprint and computational cost, while maintaining prediction accuracy. In order to tackle this otherwise intractable problem, many of these methods model the loss landscape using first or second order Taylor expansions to identify which parameters can be discarded. We revisit loss modelling for unstructured pruning: we show the importance of ensuring locality of the pruning steps, and systematically compare first and second order Taylor expansions. Finally, we show that better preserving the original network function does not necessarily transfer to better performing networks after fine-tuning, suggesting that only considering the impact of pruning on the loss might not be a sufficient objective to design good pruning criteria.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Neural networks are getting bigger, requiring more and more computational resources not only for training, but also when used for inference. However, resources are sometimes limited, especially on mobile devices and low-power chips. In unstructured pruning, the goal is to remove some parameters (i.e. setting them to zeros), while still maintaining good prediction performances. This is fundamentally a combinatorial optimization problem which is intractable even for small scale neural networks, and thus various heuristics have been developed to prune the model either before training (Lee et al., 2019b; Wang et al., 2020), during training (Louizos et al., 2017; Molchanov et al., 2017; Ding et al., 2019), or in an iterative training/fine-tuning fashion (LeCun et al., 1990; Hassibi & Stork, 1993; Han et al., 2015; Frankle & Carbin, 2018; Renda et al., 2020).
12
+
13
+ Early pruning work Optimal Brain Damage (OBD) (LeCun et al., 1990), and later Optimal Brain Surgeon (OBS) (Hassibi & Stork, 1993), proposed to estimate the importance of each parameter by approximating the effect of removing it, using the second order term of a Taylor expansion of the loss function around converged parameters. This type of approach involves computing the Hessian, which is challenging to compute since it scales quadratically with the number of parameters in the network. Several approximations have thus been explored in the literature (LeCun et al., 1990; Hassibi & Stork, 1993; Heskes, 2000; Zeng & Urtasun, 2019; Wang et al., 2019). However, state-ofthe-art unstructured pruning methods typically rely on Magnitude Pruning (MP) (Han et al., 2015), a simple and computationally cheap criterion based on weight magnitude, that works extremely well in practice (Renda et al., 2020).
14
+
15
+ This paper revisits linear and diagonal quadratic models of the local loss landscape for unstructured pruning. In particular, since these models are local approximations and thus assume that pruning steps correspond to small vectors in parameter space, we propose to investigate how this locality assumption affects their performance. Moreover, we show that the convergence assumption behind OBD and OBS, which is overlooked and violated in current methods, can be relaxed by maintaining the gradient term in the quadratic model. Finally, to prevent having to compute second order information, we propose to compare diagonal quadratic models to simpler linear models.
16
+
17
+ While our empirical study demonstrates that pruning criteria based on linear and quadratic loss models are good at preserving the training loss, it also shows that this benefit does not necessarily transfer to better networks after fine-tuning, suggesting that preserving the loss might not be the best objective to optimize for. Our contributions can be summarized as follows:
18
+
19
+ 1. We present pruning criteria based on both linear and diagonal quadratic models of the loss, and show how they compare at preserving training loss compared to OBD and MP.
20
+
21
+ 2. We study two strategies to better enforce locality in the pruning steps, pruning in several stages and regularising the step size, and show how they improve the quality of the criteria. 3. We show that using pruning criteria that are better at preserving the loss does not necessarily transfer to better fine-tuned networks, raising questions about the adequacy of such criteria.
22
+
23
+ # 2 BACKGROUND: UNSTRUCTURED PRUNING
24
+
25
+ # 2.1 UNSTRUCTURED PRUNING PROBLEM FORMULATION
26
+
27
+ For a given architecture, neural networks are a family of functions $f _ { \pmb \theta } : \mathcal { X } \mathcal { Y }$ from an input space $\mathcal { X }$ to an output space $\mathcal { V }$ , where $\pmb \theta \in \mathbb { R } ^ { D }$ is the vector that contains all the parameters of the network. Neural networks are usually trained by seeking parameters $\pmb { \theta }$ that minimize the empirical risk $\begin{array} { r } { \mathcal { L } ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { i } \ell \left( f _ { \pmb { \theta } } \left( x _ { i } \right) , t _ { i } \right) } \end{array}$ of a loss function $\ell$ on a training dataset $\mathcal { D } = \{ ( x _ { i } , t _ { i } ) \} _ { 1 \leq i \leq N } ^ { - }$ composed of $N$ (example, target) pairs.
28
+
29
+ The goal of unstructured pruning is to find a step $\Delta \theta$ to add to the current parameters $\pmb { \theta }$ such that $\lVert \pmb { \theta } + \bar { \Delta } \pmb { \theta } \rVert _ { 0 } = ( 1 - \kappa ) D$ , i.e. the parameter vector after pruning is of desired sparsity $\kappa \in [ 0 , 1 ]$ . While doing so, the performance of the pruned network should be maintained, so $\mathcal { L } ( \pmb { \theta } + \Delta \pmb { \theta } )$ should not differ much from $\mathcal { L } ( \pmb { \theta } )$ . Unstructured pruning thus amounts to the following minimization problem:
30
+
31
+ $$
32
+ \begin{array} { r l } { \underset { \mathbf { \sigma } \times \mathbf { \sigma } } { \mathrm { m i n i m i z e } } } & { { } \Delta \mathcal { L } ( \theta , \Delta \theta ) \overset { \mathrm { d e f } } { = } | \mathcal { L } ( \theta + \Delta \theta ) - \mathcal { L } ( \theta ) | \qquad \mathrm { s . t . } \quad \| \theta + \Delta \theta \| _ { 0 } = ( 1 - \kappa ) D } \end{array}
33
+ $$
34
+
35
+ Directly solving this problem would require evaluating $\mathcal { L } ( \pmb { \theta } + \Delta \pmb { \theta } )$ for all possible values of $\Delta \theta$ , which is prohibitively expensive, so one needs to rely on heuristics to find good solutions.
36
+
37
+ # 2.2 OPTIMAL BRAIN DAMAGE CRITERION
38
+
39
+ Optimal Brain Damage (OBD) (LeCun et al., 1990) proposes to use a quadratic modelling of $\mathcal { L } ( \pmb { \theta } + \Delta \pmb { \theta } )$ , leading to the following approximation of $\bar { \Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } ) }$ :
40
+
41
+ $$
42
+ \Delta \mathcal { L } ^ { Q M } ( \pmb { \theta } , \Delta \pmb { \theta } ) = \left| \frac { \partial \mathcal { L } ( \pmb { \theta } ) } { \partial \pmb { \theta } } ^ { \top } \Delta \pmb { \theta } + \frac { 1 } { 2 } \Delta \pmb { \theta } ^ { \top } \mathbf { H } ( \pmb { \theta } ) \Delta \pmb { \theta } \right|
43
+ $$
44
+
45
+ where $\mathbf { H } ( \pmb \theta )$ is the Hessian of $\mathcal { L } ( \pmb \theta )$ . $\mathbf { H } ( \pmb \theta )$ being intractable, even for small-scale networks, its Generalized Gauss-Newton approximation $\mathbf { G } ( \pmb { \theta } )$ (Schraudolph, 2002) is used in practice, as detailed in Appendix A.1 Then, two more approximations are made: first, it assumes the training of the network has converged, thus the gradient of the loss wrt $\pmb \theta$ is $0$ , which makes the linear term vanish. Then, it neglects the interactions between parameters, which corresponds to a diagonal approximation of $\mathbf { G } ( \pmb { \theta } )$ , leading to the following model:
46
+
47
+ $$
48
+ \Delta \mathcal { L } ^ { O B D } ( \pmb { \theta } , \Delta \pmb { \theta } _ { k } ) \approx \frac { 1 } { 2 } \mathbf { G } _ { k k } ( \pmb { \theta } ) \Delta \pmb { \theta } _ { k } ^ { 2 } \qquad \Rightarrow \qquad s _ { k } ^ { \mathrm { O B D } } = \frac { 1 } { 2 } \mathbf { G } _ { k k } ( \pmb { \theta } ) \pmb { \theta } _ { k } ^ { 2 }
49
+ $$
50
+
51
+ $s _ { k } ^ { \mathrm { O B D } }$ is the saliuned, so if parameter, estimating how much the loss will change if that parameter. Parameters can thus be ranked by order of importance, and the ones $\Delta \theta _ { k } = - \theta _ { k }$ with the smallest saliencies (i.e. the least influence on the loss) are pruned, while the ones with the biggest saliencies are kept unchanged. This can be interpreted as finding and applying a binary mask $\mathbf { m } \in \{ 0 , 1 \} ^ { D }$ to the parameters such that $\pmb { \theta } + \Delta \pmb { \theta } = \pmb { \theta } \odot \mathbf { m }$ , where $\odot$ is the element-wise product.
52
+
53
+ # 2.3 MAGNITUDE PRUNING CRITERION
54
+
55
+ Magnitude Pruning (MP) (Han et al., 2015), is a popular pruning criterion in which the saliency is simply based on the norm of the parameter:
56
+
57
+ $$
58
+ s _ { k } ^ { \mathrm { M P } } = \pmb { \theta } _ { k } ^ { 2 }
59
+ $$
60
+
61
+ Despite its simplicity, MP works extremely well in practice (Gale et al., 2019), and is used in current state-of-the-art methods (Renda et al., 2020). We use global MP as baseline in all our experiments.
62
+
63
+ # 2.4 OPTIMAL BRAIN SURGEON
64
+
65
+ Optimal Brain Surgeon (OBS) (Hassibi & Stork, 1993) also relies on the quadratic model in Equation 2 to solve the minimization problem given in Equation 1, but uses the Lagrangian formulation to include the constraint to the solution of the minimization problem. Since OBS requires to compute the inverse of $\mathbf { H } ( \pmb \theta )$ , several approximations have been explored in the literature, including diagonal, as in the original OBS, Kronecker-factored (Martens & Grosse, 2015) as in ML-Prune (Zeng & Urtasun, 2019), or diagonal, but in an Kronecker-factored Eigenbasis (George et al., 2018), as in EigenDamage (Wang et al., 2019). While we use OBD in our demonstrations and experimental setup, everything presented in this paper can also be used in OBS-based methods. We leave that for future work.
66
+
67
+ # 3 REVISITING LOSS MODELLING FOR UNSTRUCTURED PRUNING
68
+
69
+ In this work, we investigate linear and diagonal quadratic models of the loss function and their performance when used for pruning neural networks. In our empirical study, we aim at answering the following questions:
70
+
71
+ 1. How do criteria based on weight magnitude, or linear or quadratic models compare at preserving training loss (i.e. at solving the minimization problem in Equation 1)? 2. How does the locality assumption behind criteria based on linear and quadratic models affect their performances? 3. Do pruning criteria that are better at preserving the loss lead to better fine-tuned networks?
72
+
73
+ We now describe the linear and quadratic models we use, as well as the strategies to enforce locality of the pruning steps.
74
+
75
+ # 3.1 LINEAR AND QUADRATIC MODELS
76
+
77
+ In current training strategies, regularization techniques such as early stopping or dropout (Srivastava et al., 2014) are often used to counteract overfitting. In these setups, there is no reason to assume that the training has converged, implying that the linear term in the Taylor expansion should not be neglected. Thus, one can build a pruning criterion similar to OBD that includes the gradient term in the quadratic model from Equation 2, leading to the following saliencies:2
78
+
79
+ $$
80
+ \Delta \mathcal { L } ^ { Q M } ( \pmb { \theta } , \Delta \pmb { \theta } _ { k } ) \approx \left| \frac { \partial \mathcal { L } ( \pmb { \theta } ) } { \partial \pmb { \theta } _ { k } } ^ { \top } \Delta \pmb { \theta } _ { k } + \frac { 1 } { 2 } \mathbf { G } _ { k k } ( \pmb { \theta } ) \Delta \pmb { \theta } _ { k } ^ { 2 } \right| \Rightarrow s _ { k } ^ { \mathrm { Q M } } = \left| - \frac { \partial \mathcal { L } ( \pmb { \theta } ) } { \partial \pmb { \theta } _ { k } } \pmb { \theta } _ { k } + \frac { 1 } { 2 } \mathbf { G } _ { k k } ( \pmb { \theta } ) \pmb { \theta } _ { k } ^ { 2 } \right|
81
+ $$
82
+
83
+ Recall the constraint $\Delta \theta _ { k } \in \{ - \theta _ { k } , 0 \}$ , hence the saliencies. This criterion generalizes OBD for networks that are not at convergence, and provides similar saliencies for networks that have converged.
84
+
85
+ To avoid the computational cost associated with computing second order information, which is prohibitive for large scale neural networks, one can use a simpler linear model (LM) instead of a quadratic one to approximate $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ , leading to the following approximation and saliencies:
86
+
87
+ $$
88
+ \Delta \mathcal { L } ^ { L M } ( \pmb { \theta } , \Delta \pmb { \theta } ) = \left| \frac { \partial \mathcal { L } ( \pmb { \theta } ) } { \partial \pmb { \theta } } ^ { \top } \Delta \pmb { \theta } \right| \quad \Rightarrow \quad s _ { k } ^ { \mathrm { L M } } = \left| \frac { \partial \mathcal { L } ( \pmb { \theta } ) } { \partial \pmb { \theta } _ { k } } \pmb { \theta } _ { k } \right|
89
+ $$
90
+
91
+ The saliencies of the linear model are very related to the criterion used in Single-shot Network Pruning (Lee et al., 2019b), as demonstrated by Wang et al. (2020).
92
+
93
+ # 3.2 ENFORCING LOCALITY
94
+
95
+ One important point to keep in mind is that linear and quadratic models (whether diagonal or not) are local approximations, and are generally only faithful in a small neighbourhood of the current parameters. Explicitly showing the terms that are neglected, we have:
96
+
97
+ $$
98
+ \Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } ) = \Delta \mathcal { L } ^ { L M } ( \pmb { \theta } , \Delta \pmb { \theta } ) + \mathcal { O } ( \| \Delta \pmb { \theta } \| _ { 2 } ^ { 2 } ) = \Delta \mathcal { L } ^ { Q M } ( \pmb { \theta } , \Delta \pmb { \theta } ) + \mathcal { O } ( \| \Delta \pmb { \theta } \| _ { 2 } ^ { 3 } )
99
+ $$
100
+
101
+ So when approximating $\Delta \mathcal { L }$ with $\Delta \mathcal { L } ^ { L M }$ we neglect the terms in $\mathcal { O } ( \| \Delta \theta \| _ { 2 } ^ { 2 } )$ , and when approximating $\Delta \mathcal { L }$ with $\Delta \mathcal { L } ^ { Q M }$ we neglect the terms in $\mathcal { O } ( \bar { \| } \Delta \theta \| _ { 2 } ^ { 3 } )$ . Both approximations are thus only valid in a small neighbourhood of $\pmb \theta$ , and are extremely likely to be wrong when $\| \Delta \pmb { \theta } \| _ { 2 }$ is large. We list here different tricks to prevent this from happening.
102
+
103
+ Performing the Pruning in several Stages $\| \Delta \pmb { \theta } \| _ { 2 }$ can be large when a large portion of the parameters is pruned at once. An easy fix typically used to mitigate this issue is to perform the pruning in several stages, re-estimating the model at each stage. The number of stages, which we denote by $\pi$ , is typically overlooked (e.g. both Zeng & Urtasun (2019) and Wang et al. (2019) use only 6 stages of pruning). Our experiments, in upcoming Section 5, show that it has a drastic impact on the performances. Note that, without fine-tuning phases between the different pruning stages, this strategy violates the convergence assumption behind OBD and OBS, since after the first stage of pruning the network is no more at convergence.
104
+
105
+ The sparsity at each stage can be increased following either a linear schedule, where each step prunes the same number of parameter, or an exponential schedule, where the number of parameters pruned at each stage gets smaller and smaller. The later is typically used in the literature (Zeng & Urtasun, 2019; Wang et al., 2019; Frankle & Carbin, 2018; Renda et al., 2020). We compare them in Section 5.
106
+
107
+ Constraining the Step Size As is often done when using quadratic models (e.g. Nocedal & Wright (2006)), one can penalize the model when it decides to take steps that are too large, in order to stay in a region where we can trust the model. This can be done by simply adding the norm penalty $\frac { \lambda } { 2 } \left\| \pmb { \theta } _ { k } \right\| _ { 2 } ^ { 2 }$ to the saliencies computed by any criterion (Equations 3, 5 or 6), where $\lambda$ is a hyper-parameter that controls the strength of the constraint: a small value of $\lambda$ leaves the saliencies unchanged, and a large value of $\lambda$ transforms the pruning criterion into MP (Equation 4).
108
+
109
+ Other Considerations $\| \Delta \pmb { \theta } \| _ { 2 }$ can be large if $\pmb { \theta }$ is large itself. This is dependent on the training procedure of the network, but can be easily mitigated by constraining the norm of the weights, which can be done using $L _ { 2 }$ regularisation or weight decay. Since nowadays weight decay is almost systematically used by default when training networks (e.g. He et al. (2016b); Xie et al. (2017); Devlin et al. (2018)), we do not investigate this further.
110
+
111
+ # 4 METHODOLOGY
112
+
113
+ We follow the main recommendations from Blalock et al. (2020). For fair comparison between criteria, all experiments are from our own PyTorch (Paszke et al., 2017) re-implementation, and ran on V100 GPUs.We use 5 different random seeds, and both mean and standard deviations are reported. We experiment with a MLP on MNIST, and with both VGG11 (Simonyan & Zisserman, 2014) and a pre-activation residual network 18 (He et al., 2016b) on CIFAR10 (Krizhevsky et al., 2009), to have variability in architectures, while using networks with good performance to number of parameters ratio. We further validate our findings on ImageNet (Deng et al., 2009) using a residual network 50 (He et al., 2016a). Although MNIST is not considered a good benchmark for pruning (Blalock et al., 2020), it can still be used to compare the ability of different criteria to solve the minimization problem in Equation 1. See Appendix B for details about splits, data augmentation and hyper-parameters.
114
+
115
+ Pruning Framework Algorithm 1 presents the pruning framework used in this work: we first train the network, then perform several stages of pruning, and finally perform a single phase of fine-tuning, using the same hyper-parameters as for the original training. Global pruning is used for all the criteria. Note that because of their convergence assumption, OBD and OBS advocate for fine-tuning after each stage of pruning. Since LM and QM are not based on this assumption, they should perform well in this proposed framework. While the fine tuning-phase would require hyper-parameters optimisation, Renda et al. (2020) showed that using the same ones as for the original training usually leads to good results. The hyper-parameters used in our experiments are provided in Appendix B.
116
+
117
+ Performance Metrics The performances of the pruning criteria are measured using two metrics: First, we use $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } ) = \bar { | \mathcal { L } ( \pmb { \theta } + \Delta \pmb { \theta } ) - \mathcal { L } ( \pmb { \theta } ) | }$ , which is the quantity that the pruning criteria
118
+
119
+ # Algorithm 1 Pruning Framework
120
+
121
+ Require: Network $f _ { \theta }$ with $\pmb \theta \in \mathbb { R } ^ { D }$ , dataset $\mathcal { D }$ , number of pruning iterations $\pi$ , and sparsity $\kappa$ .
122
+ 1: fθ ← Training(fθ, D)
123
+ 2: $\kappa _ { 0 } \gets 0$
124
+ 3: m ← 1 D
125
+ 4: for 5: κi ← κi−1 + (κ−κ0) or $i = 1$ to $\pi$ do $\kappa _ { i } \gets \kappa _ { i - 1 } + ( \kappa - \kappa _ { 0 } ) ^ { i / \pi }$ . Compute sparsity for iteration $i$
126
+ 6: s ← Saliencies(fθ m, D) $\triangleright$ Compute saliencies (Equation 3, 4, 5 or 6).
127
+ 7: m[argsort(s)[: κiD]] ← 0 . Mask the parameters with smallest saliencies.
128
+ 8: $f _ { \pmb { \theta } ( \odot \mathbf { m } } \gets \mathrm { T r a i n i n g } ( f _ { \pmb { \theta } ( \odot \mathbf { m } ) } \mathcal { D } )$ . Optional fine-tuning
129
+ 9: return fθ m, m
130
+
131
+ are designed to minimize (recall Equation 1). Second, we use the validation error gap before/after fine-tuning, which is the metric we ultimately care about when designing pruning methods.
132
+
133
+ # 5 PERFORMANCES BEFORE FINE-TUNING
134
+
135
+ We evaluate the impact of enforcing locality in the LM, QM and OBS criteria. For each criterion, Figure 1 reports $\bar { \Delta \mathcal { L } } ( \theta , \Delta \theta )$ as a function of $\lambda$ , for different number of pruning stages $\pi$ , using the exponential pruning schedule, and Figure 5 in Appendix show the same results for the linear pruning schedule. A typical usage of these criteria would be with a regularisation strength $\lambda = 0$ and a number of pruning stages $\pi \approx 1$ . MP, the baseline, which is invariant to both $\lambda$ and $\pi$ , is also reported in dashed black. For reference, the networks reached a validation error rate before pruning of $1 . 4 7 \pm 0 . 0 4 \%$ for the MLP, $1 0 . 1 6 \pm 0 . 2 9 \%$ for VGG11 and $4 . 8 7 \pm 0 . 0 4 \%$ for the PreActResNet18.
136
+
137
+ ![](images/e81a03aca9cafb1bba4491576583d8d54878eea30220a2029997b58266974c89.jpg)
138
+ Figure 1: $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ for different number of pruning stages $\pi$ , as a function of $\lambda$ , the step size constraint strength, using either (left) LM, (middle) QM or (right) OBD criteria. MP, which is invariant to $\lambda$ and to the number of pruning stages, is displayed in dashed black. The curves are the mean and the error bars the standard deviation over 5 random seeds. OBD with $\pi = 1$ and $\lambda = 0$ diverged for all of the 5 seeds. Increasing the number of pruning stages drastically reduces $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . A $\lambda > 0$ can also help improving performances. Figure 6 in Appendix contains the same plots, but displaying the validation gap before/after pruning.
139
+
140
+ # 5.1 IMPACT OF THE ASSUMPTIONS BEHIND THE DIFFERENT CRITERIA
141
+
142
+ Locality Assumption Figure 1 shows that increasing the number of pruning stages can drastically reduce $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ when using LM, QM and OBS criteria. It demonstrates the importance of applying local steps when pruning. Constraining the steps size through ${ \frac { \lambda } { 2 } } \left\| \pmb { \theta } _ { k } \right\| _ { 2 } ^ { 2 }$ can also reduce $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ , on CIFAR10 in particular. The trend, however, is less pronounced on MNIST. We hypothesize that it is due to the pruning step size: the MLP contains $2 6 0 \mathrm { k }$ parameters, vs 9.7M for VGG11, so the number of parameters pruned at each stage in VGG11 is still large, even with $\pi = 1 4 0$ . This translates to a bigger $\| \Delta \pmb { \theta } \| _ { 2 }$ that needs to be controlled by the regularisation constraint.
143
+
144
+ Convergence Assumption When performing the pruning in several stages, we also observe that LM and QM can reach better performances than OBD. Without retraining phases between pruning stages, we violate the convergence assumption of OBD. This is however not the case for LM and QM, since they are not based on this assumption. Note that OBD still works reasonably well on VGG11. This could be be related to the depth of VGG11: VGG11 is deeper than the MLP, but not equipped with residual connections like the PreActResNet18.
145
+
146
+ # 5.2 LOSS-PRESERVATION CAPABILITIES OF THE DIFFERENT CRITERIA
147
+
148
+ Table 1 contains the best $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ for each of the networks and pruning criteria. Our main observation is that the criteria that model the loss (LM and QM in particular) are better at preserving the loss than MP. Similarly to Table 1, Table 3 in Appendix contains the best validation error gap before/after pruning, where we can observe similar tendencies.
149
+
150
+ Table 1: Summary of the best $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ across values of $\lambda$ for different networks and pruning criteria, with $\pi = 1 4 0$ . QM achieves better loss-preservation than other criteria. OBD performs worse than QM, since we violate its convergence assumption when pruning in several stages.
151
+
152
+ <table><tr><td rowspan="3">Network</td><td colspan="4">△C(0,△0)</td></tr><tr><td>MP</td><td>OBD</td><td>LM</td><td>QM</td></tr><tr><td>MLP on MNIST</td><td>2.02 ± 0.10</td><td>1.83 ± 0.11</td><td>1.17 ± 0.03</td><td>1.05 ± 0.04</td></tr><tr><td>VGG11 on CIFAR10</td><td>1.84 ± 0.44</td><td>0.89 ± 0.24</td><td>0.90 ± 0.21</td><td>0.86 ± 0.22</td></tr><tr><td>PreActResNet18 on CIFAR10</td><td>2.23 ± 0.14</td><td>1.95 ± 0.46</td><td>1.36 ± 0.18</td><td>1.22 ± 0.31</td></tr></table>
153
+
154
+ # 5.3 LINEAR VS EXPONENTIAL PRUNING SCHEDULE
155
+
156
+ Figure 2 compares the impact of $\| \Delta \pmb { \theta } \| _ { 2 }$ and reports the training error gap when pruning VGG11 on CIFAR10 in several stages, using either the linear or the exponential pruning schedule. We also compare against one-shot pruning, as reference. The exponential schedule allows to maintain a more constant $\bar { \| \Delta \pmb { \theta } \| _ { 2 } }$ throughout the pruning procedure, which limits the maximum size of $\| \Delta \pmb { \theta } \| _ { 2 }$ , and thus better satisfies the locality assumption.
157
+
158
+ ![](images/2c13ab73b3938327a3371c4d01cab4a9b5a3d081ba7f795a3d1ba4243eff17d0.jpg)
159
+ Figure 2: Linear vs exponential schedule using QM on VGG11. Left: $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ vs sparsity, zoomed on the end. Markers denote the 14 pruning stages. Middle: $\| \Delta \pmb { \theta } \| _ { 2 }$ at each stage. Right: Same as Figure 1, but comparing exponential (solid) and linear (dotted) schedules at $9 5 . 6 \%$ sparsity, with $\pi \in \{ 1 4 , 1 4 0 \}$ . We get smaller $\| \Delta \pmb { \theta } \| _ { 2 }$ per pruning stage when using exponential instead of linear schedule, resulting in a smaller $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . It is advantageous to use that schedule when the pruning budged is limited, i.e. when $\pi$ is small. This advantage vanishes for larger values of $\pi$ .
160
+
161
+ # 6 PERFORMANCES AFTER FINE-TUNING
162
+
163
+ We now fine-tune the pruned networks using the same hyper-parameters and number of epochs than for the original training. Table 2 shows the validation error gap between the non-pruned networks and the pruned networks after fine-tuning, for all considered criteria. LM performs better than MP on both the MLP and VGG11 ( $0 . 5 \%$ difference), but all criteria perform similarly on the PreActResNet18. These results are consistent with the observations of Blalock et al. (2020). As reference, global random pruning resulted in validation error rate of $4 7 . 1 8 \pm 6 . 8 \%$ for the MLP, and resulted in non-retrainable networks on CIFAR10 (with $90 \%$ error rate).
164
+
165
+ Table 2: Best validation error gap of the fine-tuned networks (lower is better), for different pruning criteria, across values of $\lambda$ and $\pi$ . LM is better than MP on the MLP and VGG11. All the methods reach similar levels of performance on the PreActResNet18.
166
+ 6.1 CORRELATION BETWEEN LOSS-PRESERVATION AND PERFORMANCES AFTER FINE-TUNING
167
+
168
+ <table><tr><td rowspan="2">Network</td><td colspan="4">Gap of Validation Error (%)</td></tr><tr><td>MP</td><td>OBD</td><td>LM</td><td>QM</td></tr><tr><td>MLP on MNIST</td><td>2.4± 0.3</td><td>2.0 ± 0.1</td><td>1.9 ± 0.3</td><td>1.9 ± 0.2</td></tr><tr><td>VGG11 on CIFAR10</td><td>0.2 ± 0.2</td><td>-0.1 ± 0.2</td><td>-0.3 ± 0.1</td><td>-0.1 ± 0.1</td></tr><tr><td>PreActResNet18 on CIFAR10</td><td>0.2± 0.2</td><td>0.2± 0.2</td><td>0.1 ± 0.1</td><td>0.2±0.2</td></tr></table>
169
+
170
+ An important observation is that the hyper-parameters $\lambda$ and $\pi$ that give the best performing criteria in terms of $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ in Table 1 are not the same as the ones that give the best performing criteria after fine-tuning in Table 2. We display in Figure 3 scatter plots of all the experiments we ran, to observe how well loss-preservation correlates with performance after fine-tuning.
171
+
172
+ ![](images/2f748e21cf61b0a1c0c79bbf4633e16b738695d5bfe4c3379ea3784df08f0da6.jpg)
173
+ Figure 3: Gap of validation error after fine-tuning as a function of $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . Each point is one experiment, i.e. one one random seed, one $\pi$ and one $\lambda$ . $\rho$ is the Spearman’s rank correlation coefficient computed on all the data points. Except for the MLP on MNIST, there is only a weak correlation between $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ and the gap of validation after fine-tuning. Thus, the performance after pruning cannot be explained solely by the loss-preserving abilities of the pruning criteria.
174
+
175
+ Quite surprisingly, although we are able to obtain networks with smaller $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ , and thus better performing networks right after pruning, the performances after fine-tuning do not correlate significantly with the gap. Except for the MLP on MNIST, whose Spearman’s rank correlation coefficient is $\rho = 0 . 6 7$ , there is only a weak correlation between $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ and the validation error gap after fine-tuning $\mathrm { \Delta \rho = 0 . 2 7 }$ for VGG11 and $\rho = 0 . 2 0$ for PreActResNet18). Figure 10 in Appendix contains the same scatter plots, but showing $\mathcal { L } ( \pmb { \theta } \odot \mathbf { m } )$ after fine-tuning instead of the validation error gap, and similar trends can be observed. Figure 11, also in Appendix, shows similar scatter plots, but for different sparsity levels on VGG11. Finally, Figure 9 in Appendix contains the same scatter plots but displaying the validation error gap before fine-tuning versus the validation error gap before fine-tuning.
176
+
177
+ To verify that these observations are not due to a specific choice of fine-tuning hyper-parameters, we perform a hyper-parameter grid search and report similar results in Appendix C.2. Also, we show in Figure 15 in Appendix C.3 the fine-tuning curves of networks pruned using MP and our best QM criteria. We observe that, except for MNIST, the difference in training loss right after pruning disappears after only one epoch of fine-tuning, erasing the advantage of QM over MP.
178
+
179
+ # 6.2 DISCUSSION
180
+
181
+ These results highlight an important issue: minimizing $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ , no matter what model is used, might be used to design better pruning criteria, but it does not necessarily transfer to a better pruning method when fine-tuning is involved. The performance after fine-tuning cannot be explained solely by the local loss-preserving abilities of the criteria, and other mechanisms might be at play. Thus, the effect of fine-tuning should also be taken into account when designing pruning criteria.
182
+
183
+ For instance, Lee et al. (2019a) and Wang et al. (2020) proposed different heuristics to take into account gradient propagation in the context of foresight pruning, i.e. pruning untrained networks right after initialisation. Wang et al. (2020) argues that minimizing $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ in that context makes little sense, since the network is producing random predictions. In Appendix C.4 we compare our results to two pruning methods based on preserving the gradient flow, GraSP (Wang et al., 2020) and SynFlow (Tanaka et al., 2020), and show that they comply with our observations above.
184
+
185
+ Finally, several recent articles are looking further into the impact of various pruning criteria on subsequent training or fine-tuning (Lubana & Dick, 2020; Evci et al., 2020; Frankle et al., 2020).
186
+
187
+ # 7 SCALING UP TO IMAGENET
188
+
189
+ To investigate whether our observations also hold on larger datasets, we perform similar experiments with LM, QM and OBD on the ResNet50 on ImageNet. Before pruning, the network reached $7 6 . 4 1 \%$ validation accuracy. Figure 4 presents results at $70 \%$ sparsity, in a similar fashion as Figure 1 and Figure 3. We observe a similar trend: The best loss-preserving models are not necessarily the best models after fine-tuning. See Appendix B for the detailed experimental setting, and see Figure 17 for results at $90 \%$ sparsity.
190
+
191
+ ![](images/f617932654c676e9116fcae300e371d606ccb24af3d42ec7381ec75ea6a1723b.jpg)
192
+ Figure 4: Same as Figure 1 and Figure 3, for the ResNet50 on ImageNet, with a sparsity of $70 \%$ . Increasing the number of pruning stages and constraining the step size reduce $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . However, the best-loss preserving criteria, which maximize the validation accuracy right after pruning, do not produce better networks after fine-tuning. They perform similarly if their validation accuracy after pruning is $> 2 0 \%$ . Criteria that outperform MP right after pruning do not achieve better performance after fine-tuning.
193
+
194
+ # 8 CONCLUSION
195
+
196
+ In this paper, we revisited loss modelling for unstructured pruning. We showed that keeping the gradient term in the diagonal quadratic model allows to relax the convergence assumption behind
197
+
198
+ OBS and OBD. We also showed the importance of locality when using loss models for pruning: increasing the number of pruning stages and constraining the step size are two improvements that produce better loss-preserving pruning criteria and that should be added to the recommendation list of Blalock et al. (2020). Finally we observed that the loss right after pruning does not always correlate with the performances after fine-tuning, suggesting that a better loss before fine-tuning is not solely responsible for the performances after fine-tuning. Thus, future research should focus on ways to model the actual effect of subsequent fine-tuning when designing pruning criteria.
199
+
200
+ # REFERENCES
201
+
202
+ Davis Blalock, Jose Javier Gonzalez Ortiz, Jonathan Frankle, and John Guttag. What is the state of neural network pruning? arXiv preprint arXiv:2003.03033, 2020.
203
+
204
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition. Ieee, 2009.
205
+
206
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
207
+
208
+ Xiaohan Ding, Xiangxin Zhou, Yuchen Guo, Jungong Han, Ji Liu, et al. Global sparse momentum sgd for pruning very deep neural networks. In NeurIPS, 2019.
209
+
210
+ Utku Evci, Yani A Ioannou, Cem Keskin, and Yann Dauphin. Gradient flow in sparse neural networks and how lottery tickets win. arXiv preprint arXiv:2010.03533, 2020.
211
+
212
+ Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In ICLR, 2018.
213
+
214
+ Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. Pruning neural networks at initialization: Why are we missing the mark? arXiv preprint arXiv:2009.08576, 2020.
215
+
216
+ Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574, 2019.
217
+
218
+ Thomas George, César Laurent, Xavier Bouthillier, Nicolas Ballas, and Pascal Vincent. Fast approximate natural gradient descent in a kronecker factored eigenbasis. In NIPS, 2018.
219
+
220
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010.
221
+
222
+ Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
223
+
224
+ Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In NIPS. 2015.
225
+
226
+ Babak Hassibi and David G Stork. Second order derivatives for network pruning: Optimal brain surgeon. In NIPS, 1993.
227
+
228
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015.
229
+
230
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016a.
231
+
232
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In ECCV, 2016b.
233
+
234
+ Tom Heskes. On “natural” learning and pruning in multilayered perceptrons. Neural Computation, 2000.
235
+
236
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. URL http://proceedings.mlr.press/ v37/ioffe15.html.
237
+
238
+ Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
239
+
240
+ Yann LeCun. Who is afraid of convex optimization? NIPS - Workshop on Efficient Learning, 2007. URL https://cs.nyu.edu/\~yann/talks/lecun-20071207-nonconvex.pdf.
241
+
242
+ Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In NIPS, 1990.
243
+
244
+ Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
245
+
246
+ Namhoon Lee, Thalaiyasingam Ajanthan, Stephen Gould, and Philip HS Torr. A signal propagation perspective for pruning neural networks at initialization. arXiv preprint arXiv:1906.06307, 2019a.
247
+
248
+ Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: Single-Shot Network Pruning based on Connection Sensitivity. In ICLR, 2019b. URL https://openreview.net/forum?id $=$ B1VZqjAcYX.
249
+
250
+ Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through l_0 regularization. arXiv preprint arXiv:1712.01312, 2017.
251
+
252
+ Ekdeep Singh Lubana and Robert P. Dick. A gradient flow framework for analyzing network pruning, 2020.
253
+
254
+ James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In ICML, 2015.
255
+
256
+ Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. In ICML, 2017.
257
+
258
+ Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019.
259
+
260
+ Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010.
261
+
262
+ Jorge Nocedal and Stephen Wright. Numerical optimization. Springer Science & Business Media, 2006.
263
+
264
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.
265
+
266
+ Alex Renda, Jonathan Frankle, and Michael Carbin. Comparing rewinding and fine-tuning in neural network pruning. In ICLR, 2020. URL https://openreview.net/forum?id= S1gSj0NKvB.
267
+
268
+ Nicol N Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural computation, 2002.
269
+
270
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
271
+
272
+ Sidak Pal Singh and Dan Alistarh. Woodfisher: Efficient second-order approximations for model compression. arXiv preprint arXiv:2004.14340, 2020.
273
+
274
+ Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 2014.
275
+
276
+ Hidenori Tanaka, Daniel Kunin, Daniel LK Yamins, and Surya Ganguli. Pruning neural networks without any data by iteratively conserving synaptic flow. arXiv preprint arXiv:2006.05467, 2020.
277
+
278
+ Chaoqi Wang, Roger Grosse, Sanja Fidler, and Guodong Zhang. Eigendamage: Structured pruning in the kronecker-factored eigenbasis. arXiv preprint arXiv:1905.05934, 2019.
279
+
280
+ Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In ICLR, 2020. URL https://openreview.net/forum?id $=$ SkgsACVKPH.
281
+
282
+ Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In CVPR, 2017.
283
+
284
+ Wenyuan Zeng and Raquel Urtasun. MLPrune: Multi-layer pruning for automated neural network compression, 2019. URL https://openreview.net/forum?id $\equiv$ r1g5b2RcKm.
285
+
286
+ # APPENDIX
287
+
288
+ # A GENERALIZED GAUSS-NEWTON
289
+
290
+ Having to compute $\mathbf { H } ( \pmb \theta )$ is an obvious drawback of quadratic models, and thus a common first step is to approximate $\mathbf { H } ( \pmb \theta )$ using the Generalized Gauss-Newton approximation (Schraudolph, 2002):
291
+
292
+ $$
293
+ \begin{array} { r l } & { \mathbf { H } ( \theta ) = \underbrace { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \frac { \partial f _ { \theta } \left( x _ { i } \right) ^ { \top } } { \partial \theta } \nabla _ { u = f _ { \theta } \left( x _ { i } \right) } ^ { 2 } \ell \left( u , t _ { i } \right) \frac { \partial f _ { \theta } \left( x _ { i } \right) } { \partial \theta } } _ { \mathbf { G } ( \theta ) , \mathrm { t h e G e n e r a l i z e d ~ G a u s . N e w i o n } } + \underbrace { \sum _ { k } ^ { K } \frac { \partial \ell \left( u , t _ { i } \right) } { \partial u _ { k } } \Big | _ { u = f _ { \theta } \left( x _ { i } \right) } \frac { \partial ^ { 2 } f _ { \theta } \left( x _ { i } \right) _ { k } } { \partial \theta ^ { 2 } } } _ { \approx 0 } } \\ & { \approx \mathbf { G } ( \theta ) } \end{array}
294
+ $$
295
+
296
+ where $\mathrm { K }$ is the number of outputs of the network. $\mathbf { G } ( \pmb { \theta } )$ has the advantage of being easier to compute and is also positive semi-definite by construction.
297
+
298
+ # B DETAILS ON THE EXPERIMENTAL SETUP
299
+
300
+ # B.1 SETUP
301
+
302
+ Datasets We use the MNIST dataset (LeCun et al., 1998), and hold-out 10000 examples randomly sampled from the training set for validation. We also use CIFAR10 (Krizhevsky et al., 2009), where the last 5000 examples of the training set are used for validation, and we apply standard data augmentation (random cropping and flipping, as in He et al. (2016b)) during training phases. For ImageNet (Deng et al., 2009), we follow the experimental setting of Goyal et al. (2017).
303
+
304
+ Network Architectures On MNIST, we use a MLP of dimensions 784-300-100-10, with Tanh activation functions. On CIFAR10, we use both: a VGG11 (Simonyan & Zisserman, 2014), equipped with ReLUs (Nair & Hinton, 2010), but no Batch Normalisation (Ioffe & Szegedy, 2015); and the PreActResNet18, which is the 18-layer pre-activation variant of residual networks (He et al., 2016b). MLP leverages Glorot & Bengio (2010) as initialization while the the weights of VGG11 and PreActResNet18 are initialized following He et al. (2015), and the biases are initialized to 0. On ImageNet (Deng et al., 2009), we use a ResNet-50 (He et al., 2016a) with Batch Normalization, and follow the initialization strategy described in (Goyal et al., 2017).
305
+
306
+ # B.2 EXPERIMENTS
307
+
308
+ For the MNIST and CIFAR10 experiments, the network is first trained for a fixed number of epochs, using early stopping on the validation set to select the best performing network.The hyper-parameters used for training are selected via grid search (before even considering pruning). Then we prune a large fraction of the parameters. For OBD, LM and QM, we randomly select, at each iteration of pruning, 1000 examples (10 mini-batches) from the training set to compute the gradients and second order terms of the models.3 Finally, we retrain the network using exactly the same hyper-parameters as for the initial training.
309
+
310
+ For ImageNet, we uses the exact same hyper-parameters than Goyal et al. (2017).
311
+
312
+ MLP on MNIST We train the network for 400 epochs, using SGD with learning rate of 0.01, momentum factor of 0.9, l2 regularisation of 0.0005 and a mini-batch size of 100. We prune $9 8 . 8 5 \%$ of the parameters.
313
+
314
+ VGG11 on CIFAR10 We train the network for 300 epoch, using SGD with a learning rate of 0.01, momentum factor of 0.9, a l2 regularisation of 0.0005 and a mini-batch size of 100. The learning rate is divided by 10 every 60 epochs. We prune $9 5 . 6 \%$ of the parameters.
315
+
316
+ PreActResNet18 on CIFAR10 We train the network for 200 epochs, using SGD with a learning rate of 0.1, momentum factor of 0.9, a l2 regularisation of 0.0005 and a mini-batch size of 100. The learning rate is divided by 10 every 70 epochs. We prune $9 5 . 6 \%$ of the parameters.
317
+
318
+ ResNet50 on ImageNet For ImageNet, we train a ResNet50 using 8 V100 GPUs. The total minibatch size is 256, and we train our baseline network for 90 epochs. The learning rate schedule is identical to Goyal et al. (2017): a linear warm-up in the first 5 epochs and decay by a factor of 10 at epochs 30, 60 and 80. We then prune $70 \%$ of the parameters. After pruning, we fine-tune the models for 90 epochs using a learning rate of $1 e ^ { - 3 }$ . For LM, QM, OBD, we investigates the following hyper-parameter values: $\pi \in \{ 1 , 1 0 0 \}$ $\vert \} , \lambda \in \{ 1 e ^ { - 3 } , 1 e ^ { - 1 } , 0 , 1 0 , \}$ . 1600 examples are used to compute the first and second order terms of the linear and quadratic models.
319
+
320
+ # C SUPPLEMENTARY RESULTS
321
+
322
+ # C.1 PERFORMANCES BEFORE FINE-TUNING
323
+
324
+ Validation error Table Table 3 is the same as Table 1, but containing the best validation error gap before/after pruning instead of $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . We can observe a similar trend as in Table 1: LM and QM give better performances than MP, and OBD performs poorly, since the convergence assumption is not respected.
325
+
326
+ Table 3: Best validation error gap before/after pruning for different networks and pruning criteria.
327
+
328
+ <table><tr><td rowspan="3">Network</td><td colspan="4">Gap of Validation Error (%)</td></tr><tr><td>MP</td><td>OBD</td><td>LM</td><td>QM</td></tr><tr><td>MLP onMNIST</td><td>72.09 ± 3.72</td><td>64.89 ± 5.74</td><td>16.35 ± 0.77</td><td>15.22 ± 0.62</td></tr><tr><td>VGG11 on CIFAR10</td><td>56.19 ± 17.9</td><td>18.84 ± 5.54</td><td>5.89 ± 1.52</td><td>5.92 ± 2.14</td></tr><tr><td>PreActResNet18 on CIFAR10</td><td>74.13 ± 4.59</td><td>49.08 ± 8.18</td><td>26.79 ± 8.61</td><td>21.48 ± 5.96</td></tr></table>
329
+
330
+ Linear pruning schedule Figure 5 contains the same experiments than Figure 5, but using the linear schedule instead of the exponential one. There is a drastic difference in performances: One need roughly $1 0 \mathrm { x }$ more stages of pruning with the linear schedule to reach the training gap of the exponential schedule.
331
+
332
+ # C.2 PERFORMANCES AFTER FINE-TUNING
333
+
334
+ Validation error figures Figures 8 and 7 contain the same experiments than Figure 5, but displaying the validation error gap, for linear and exponential schedules, respectively. For completeness, Figure 6 shows the validation error gap before fine-tuning.
335
+
336
+ ![](images/dd1f1f7b5325949049111d7e45836b2a283a17299e5225a8cb7f075dab6f40af.jpg)
337
+ Figure 5: Same as Figure 1, but using equally spaced pruning steps. Note the difference in number of pruning iterations.
338
+
339
+ ![](images/60d1145cd1186e1188db38a441ce3ead99513dc4e0ea6e0c0f21302e1b11bfe3.jpg)
340
+ Figure 6: Same as Figure 1, but displaying the validation error gap before fine-tuning. With proper number of pruning stages and step size regularization, LM and QM can produce pruned networks that are drastically better than the ones pruned using MP.
341
+
342
+ Validation gap before and after fine-tuning Figure 9 is the same as Figure 3, but showing the validation error gap after fine-tuning as a function of the validation error gap before fine-tuning. As for Figure 3, we do not observe much correlation between the validation error before and after the fine-tuning.
343
+
344
+ ![](images/075ba47289a1ec7a6392525f55659407c125aa462ef8c4059d583bc32a7a6aa1.jpg)
345
+ Figure 7: Same as Figure 1, but displaying the validation error gap after fine-tuning.
346
+
347
+ ![](images/37756eb69c89faa24949b2b122ee0e75c3705f83434e6381bb2749667f68d539.jpg)
348
+ Figure 8: Same as Figure 7, but using equally spaced pruning steps. Note the difference in number of pruning stages.
349
+
350
+ Training loss after fine-tuning Figure 10 is the same as Figure 3 but showing $\mathcal { L } ( \pmb { \theta } _ { } ( \mathbf { \cdot } ) \mathbf { m } )$ after finetuning as a function of $\Delta \mathcal { L } ( \theta , \Delta \theta )$ . It has a similar trend as Figure 3: there is not much correlation between the loss before and after fine-tuning, except on MNIST.
351
+
352
+ Different sparsity levels Figure 11 shows the performances of different criteria on VGG11 on CIFAR10, for different sparsity levels. When the sparsity is low $( 8 9 . 3 \% )$ , the network has enough capacity to return to its original performances after fine-tuning. When the sparsity is too high $( 9 8 . 6 \% )$ , then all criteria produce networks with random predictions. There might be a sweet spot in between, but one would require more powerful model to verify this supposition.
353
+
354
+ ![](images/b0a7e9a8f65d3ed9ac115b813b349afa2bb26854c8af252070869684e668a21b.jpg)
355
+ Figure 9: Same as Figure 3, but showing the validation error gap after fine-tuning as a function of the validation error gap before fine-tuning. Networks with drastically different performance before fine-tuning can still produce similar performances after fine-tuning.
356
+
357
+ ![](images/74bdb68f366c7d70a16232e28f02b397952f1de891d3f7dea858dc261a9db705.jpg)
358
+ Figure 10: Same as Figure 3, but showing $\mathcal { L } ( \pmb { \theta } \odot \mathbf { m } )$ after fine-tuning as a function of $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . Except for the MLP on MNIST, there is only a weak correlation between $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ and $\mathcal { L } ( \pmb { \theta } \odot \mathbf { m } )$ after fine-tuning.
359
+
360
+ ![](images/dcb61fd6831e77417f4cc1a85735599f9a4eb3667d5ea86570f52af4de978f02.jpg)
361
+ Figure 11: Same as Figure 3, but for different sparsity levels on the VGG11 on CIFAR10. When the sparsity is low, the network has enough capacity to return to its original performances after fine-tuning. When the sparsity is too high, then all criteria produce networks with random predictions.
362
+
363
+ Hyper-parameters optimisation Figure 13 shows the impact of hyper-parameter optimization for the fine-tuning phase. We performed a grid search with three different learning rate (0.1, 0.01, 0.03)
364
+
365
+ ![](images/230893cc41dd29f62b5b36abeac3ddc171d17c79ab303bd071ce2f41641f476e.jpg)
366
+ Figure 12: Same as Figure 11 (left), but zoomed on smaller values of $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$
367
+
368
+ and three different l2-regularisation (0, 5e-4, 5e-5). All 9 sets of hyper-parameters were tested on LM, QM and MP on 5 different random seeds. In this set of experiments, we used $\lambda \in \{ 0 , 0 . 0 1 , 0 . 1 , 1 \}$ and $\pi \in \{ 1 4 , 1 4 0 \}$ . Optimizing hyper-parameters for fine-tuning can lead to better performance after fine-tuning, but does not increases the correlation between the performances after fine-tuning and $\Delta \mathcal { L } ( \theta , \Delta \bar { \theta } )$ . The lack of correlation can thus not be explained by bad fine-tuning hyper-parameters.
369
+
370
+ ![](images/91b97b65a962e6f1d9aa115580c31954005cc1508a0275375b790df6a6d9ebe8.jpg)
371
+ Figure 13: Left: Using the same hyper-parameters for fine-tuning as the ones of the original training. Right: Performing hyper-parameters optimisation for the fine-tuning. This figure shows that optimizing the hyper-parameters for fine-tuning can improve the performances of the network after pruning. However, it reduces the correlation between the performances after fine-tuning and $\Delta \mathcal { L } ( \bar { \theta } , \Delta \theta )$ . The lack of correlation can thus not be explained by poor fine-tuning hyper-parameters.
372
+
373
+ ![](images/9dac7633e26af92b2d725d7f2ee684f8b6f8c38e69ab099b7fd07e1185c56236.jpg)
374
+ Figure 14: Same as Figure 3, but zooming on the best performing networks in terms of $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$
375
+
376
+ # C.3 FINE-TUNING CURVES
377
+
378
+ To investigate whether one of the networks is suffering from optimization issues during fine-tuning, we show in Figure 15 the fine-tuning curves of networks pruned using MP and our best QM criteria. We observe that, except for MNIST, the difference in training loss right after pruning disappears after only one epoch of fine-tuning, erasing the advantage of QM over MP.
379
+
380
+ ![](images/bf37ca11bc53a699a1ecfd28de8866539613d0862438937feb3168b1b9f9ed21.jpg)
381
+ Figure 15: Fine-tuning losses (dotted is training, solid is validation) of networks pruned using MP and QM criteria. All the curves are the average over the 5 seeds. We do not show the standard deviation for clarity. Left: MLP, middle: VGG11 and right: PreActResNet18. Except for MNIST, the difference in loss right after pruning (i.e. at epoch 0) disappears after one epoch of fine-tuning.
382
+
383
+ # C.4 RESULTS USING GRASP AND SYNFLOW
384
+
385
+ We compare our results with two additional pruning methods that focus on preserving the flow of the gradient in the network instead of preserving the loss: GraSP (Wang et al., 2020), a datadependant method, and SynFlow (Tanaka et al., 2020), a data-agnostic one. Both methods were design to be applied at initialisation, so we investigate here their use on trained networks. We use $\pi \in { \bar { \{ 1 , 1 0 0 , 1 0 0 0 \} } }$ , and added our proposed step size constraint $\lambda$ to the pruning criteria as well.
386
+
387
+ Figure 16 shows the scatter plot of the preservation of the loss vs the performance after fine-tuning. Similarly to what we observed before, there is no clear evidence that better preserving the loss lead to better performance after fine-tuning.
388
+
389
+ ![](images/9ded736cc7a921570fc4349a32c14093f959c94ad5c240e45efa726fcdf9888c.jpg)
390
+ Figure 16: Same as Figure 3 showing GraSP and SynFlow on VGG11 (left) and the PreActResnet18 (right). This Figure shows that one can observe a large $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ and yet obtain very good performance after fine-tuning. This is especially true in the case of GraSP for VGG11. Furthermore, we can observe similar behaviour on PreActResNet18 where two different methods can lead to similar performance after fine-tuning while having completely different $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ : GraSP with $\Delta \mathcal { L } ( \pmb { \theta } , \hat { \Delta } \pmb { \theta } ) \approx 1 0 ^ { 8 }$ has fine-tuning performance similar to MP with $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } ) < 1 0 ^ { 1 }$ .
391
+
392
+ # C.5 RESULTS ON IMAGENET
393
+
394
+ Figure 17 is the same as Figure 4, but with $90 \%$ sparsity. At that sparsity level, the validation accuracy right after pruning is close to random for all the pruning criteria. There is however quite a big variation in performances after fine-tuning: at equal performance before fine-tuning, some models achieve $70 \%$ validation accuracy after fine-tuning, while others only reach $60 \%$ .
395
+
396
+ ![](images/ad0a9bac4f7b2a7dd40f0d69884b2157159b58621055d9d4d67640e9c0d75566.jpg)
397
+ Figure 17: Same as Figure 4, but with $90 \%$ sparsity. Increasing the number of pruning stages and constraining the step size reduce $\Delta \mathcal { L } ( \pmb { \theta } , \Delta \pmb { \theta } )$ . However, the best-loss preserving criteria, which maximize the validation accuracy right after pruning, do not produce better networks after fine-tuning.
parse/train/jpm1AfJucwt/jpm1AfJucwt_content_list.json ADDED
@@ -0,0 +1,2082 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "REVISITING LOSS MODELLING FOR UNSTRUCTURED PRUNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 145
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "By removing parameters from deep neural networks, unstructured pruning methods aim at cutting down memory footprint and computational cost, while maintaining prediction accuracy. In order to tackle this otherwise intractable problem, many of these methods model the loss landscape using first or second order Taylor expansions to identify which parameters can be discarded. We revisit loss modelling for unstructured pruning: we show the importance of ensuring locality of the pruning steps, and systematically compare first and second order Taylor expansions. Finally, we show that better preserving the original network function does not necessarily transfer to better performing networks after fine-tuning, suggesting that only considering the impact of pruning on the loss might not be a sufficient objective to design good pruning criteria. ",
40
+ "bbox": [
41
+ 233,
42
+ 268,
43
+ 766,
44
+ 421
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 452,
55
+ 336,
56
+ 468
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Neural networks are getting bigger, requiring more and more computational resources not only for training, but also when used for inference. However, resources are sometimes limited, especially on mobile devices and low-power chips. In unstructured pruning, the goal is to remove some parameters (i.e. setting them to zeros), while still maintaining good prediction performances. This is fundamentally a combinatorial optimization problem which is intractable even for small scale neural networks, and thus various heuristics have been developed to prune the model either before training (Lee et al., 2019b; Wang et al., 2020), during training (Louizos et al., 2017; Molchanov et al., 2017; Ding et al., 2019), or in an iterative training/fine-tuning fashion (LeCun et al., 1990; Hassibi & Stork, 1993; Han et al., 2015; Frankle & Carbin, 2018; Renda et al., 2020). ",
63
+ "bbox": [
64
+ 174,
65
+ 484,
66
+ 825,
67
+ 611
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Early pruning work Optimal Brain Damage (OBD) (LeCun et al., 1990), and later Optimal Brain Surgeon (OBS) (Hassibi & Stork, 1993), proposed to estimate the importance of each parameter by approximating the effect of removing it, using the second order term of a Taylor expansion of the loss function around converged parameters. This type of approach involves computing the Hessian, which is challenging to compute since it scales quadratically with the number of parameters in the network. Several approximations have thus been explored in the literature (LeCun et al., 1990; Hassibi & Stork, 1993; Heskes, 2000; Zeng & Urtasun, 2019; Wang et al., 2019). However, state-ofthe-art unstructured pruning methods typically rely on Magnitude Pruning (MP) (Han et al., 2015), a simple and computationally cheap criterion based on weight magnitude, that works extremely well in practice (Renda et al., 2020). ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 756
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "This paper revisits linear and diagonal quadratic models of the local loss landscape for unstructured pruning. In particular, since these models are local approximations and thus assume that pruning steps correspond to small vectors in parameter space, we propose to investigate how this locality assumption affects their performance. Moreover, we show that the convergence assumption behind OBD and OBS, which is overlooked and violated in current methods, can be relaxed by maintaining the gradient term in the quadratic model. Finally, to prevent having to compute second order information, we propose to compare diagonal quadratic models to simpler linear models. ",
85
+ "bbox": [
86
+ 174,
87
+ 763,
88
+ 825,
89
+ 861
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "While our empirical study demonstrates that pruning criteria based on linear and quadratic loss models are good at preserving the training loss, it also shows that this benefit does not necessarily transfer to better networks after fine-tuning, suggesting that preserving the loss might not be the best objective to optimize for. Our contributions can be summarized as follows: ",
96
+ "bbox": [
97
+ 176,
98
+ 868,
99
+ 823,
100
+ 922
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "1. We present pruning criteria based on both linear and diagonal quadratic models of the loss, and show how they compare at preserving training loss compared to OBD and MP. ",
107
+ "bbox": [
108
+ 207,
109
+ 103,
110
+ 825,
111
+ 132
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2. We study two strategies to better enforce locality in the pruning steps, pruning in several stages and regularising the step size, and show how they improve the quality of the criteria. 3. We show that using pruning criteria that are better at preserving the loss does not necessarily transfer to better fine-tuned networks, raising questions about the adequacy of such criteria. ",
118
+ "bbox": [
119
+ 205,
120
+ 127,
121
+ 826,
122
+ 188
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 BACKGROUND: UNSTRUCTURED PRUNING",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 173,
132
+ 207,
133
+ 562,
134
+ 223
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "2.1 UNSTRUCTURED PRUNING PROBLEM FORMULATION",
141
+ "text_level": 1,
142
+ "bbox": [
143
+ 173,
144
+ 237,
145
+ 581,
146
+ 252
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "For a given architecture, neural networks are a family of functions $f _ { \\pmb \\theta } : \\mathcal { X } \\mathcal { Y }$ from an input space $\\mathcal { X }$ to an output space $\\mathcal { V }$ , where $\\pmb \\theta \\in \\mathbb { R } ^ { D }$ is the vector that contains all the parameters of the network. Neural networks are usually trained by seeking parameters $\\pmb { \\theta }$ that minimize the empirical risk $\\begin{array} { r } { \\mathcal { L } ( \\pmb { \\theta } ) = \\frac { 1 } { N } \\sum _ { i } \\ell \\left( f _ { \\pmb { \\theta } } \\left( x _ { i } \\right) , t _ { i } \\right) } \\end{array}$ of a loss function $\\ell$ on a training dataset $\\mathcal { D } = \\{ ( x _ { i } , t _ { i } ) \\} _ { 1 \\leq i \\leq N } ^ { - }$ composed of $N$ (example, target) pairs. ",
153
+ "bbox": [
154
+ 173,
155
+ 262,
156
+ 825,
157
+ 335
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "The goal of unstructured pruning is to find a step $\\Delta \\theta$ to add to the current parameters $\\pmb { \\theta }$ such that $\\lVert \\pmb { \\theta } + \\bar { \\Delta } \\pmb { \\theta } \\rVert _ { 0 } = ( 1 - \\kappa ) D$ , i.e. the parameter vector after pruning is of desired sparsity $\\kappa \\in [ 0 , 1 ]$ . While doing so, the performance of the pruned network should be maintained, so $\\mathcal { L } ( \\pmb { \\theta } + \\Delta \\pmb { \\theta } )$ should not differ much from $\\mathcal { L } ( \\pmb { \\theta } )$ . Unstructured pruning thus amounts to the following minimization problem: ",
164
+ "bbox": [
165
+ 173,
166
+ 342,
167
+ 825,
168
+ 398
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "equation",
174
+ "img_path": "images/1778221686a137be0d3f81e4e59ef2a715c5d7bb52af59ff3d1d784529306388.jpg",
175
+ "text": "$$\n\\begin{array} { r l } { \\underset { \\mathbf { \\sigma } \\times \\mathbf { \\sigma } } { \\mathrm { m i n i m i z e } } } & { { } \\Delta \\mathcal { L } ( \\theta , \\Delta \\theta ) \\overset { \\mathrm { d e f } } { = } | \\mathcal { L } ( \\theta + \\Delta \\theta ) - \\mathcal { L } ( \\theta ) | \\qquad \\mathrm { s . t . } \\quad \\| \\theta + \\Delta \\theta \\| _ { 0 } = ( 1 - \\kappa ) D } \\end{array}\n$$",
176
+ "text_format": "latex",
177
+ "bbox": [
178
+ 217,
179
+ 401,
180
+ 779,
181
+ 424
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Directly solving this problem would require evaluating $\\mathcal { L } ( \\pmb { \\theta } + \\Delta \\pmb { \\theta } )$ for all possible values of $\\Delta \\theta$ , which is prohibitively expensive, so one needs to rely on heuristics to find good solutions. ",
188
+ "bbox": [
189
+ 173,
190
+ 431,
191
+ 825,
192
+ 460
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "2.2 OPTIMAL BRAIN DAMAGE CRITERION ",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 176,
202
+ 476,
203
+ 482,
204
+ 489
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Optimal Brain Damage (OBD) (LeCun et al., 1990) proposes to use a quadratic modelling of $\\mathcal { L } ( \\pmb { \\theta } + \\Delta \\pmb { \\theta } )$ , leading to the following approximation of $\\bar { \\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) }$ : ",
211
+ "bbox": [
212
+ 174,
213
+ 501,
214
+ 823,
215
+ 530
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "equation",
221
+ "img_path": "images/41f5cc9d8c681ec1b3064de9f8c48a9e3ab9b19d7a70e2ec538322cc6b89fc2f.jpg",
222
+ "text": "$$\n\\Delta \\mathcal { L } ^ { Q M } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) = \\left| \\frac { \\partial \\mathcal { L } ( \\pmb { \\theta } ) } { \\partial \\pmb { \\theta } } ^ { \\top } \\Delta \\pmb { \\theta } + \\frac { 1 } { 2 } \\Delta \\pmb { \\theta } ^ { \\top } \\mathbf { H } ( \\pmb { \\theta } ) \\Delta \\pmb { \\theta } \\right|\n$$",
223
+ "text_format": "latex",
224
+ "bbox": [
225
+ 325,
226
+ 532,
227
+ 673,
228
+ 575
229
+ ],
230
+ "page_idx": 1
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "where $\\mathbf { H } ( \\pmb \\theta )$ is the Hessian of $\\mathcal { L } ( \\pmb \\theta )$ . $\\mathbf { H } ( \\pmb \\theta )$ being intractable, even for small-scale networks, its Generalized Gauss-Newton approximation $\\mathbf { G } ( \\pmb { \\theta } )$ (Schraudolph, 2002) is used in practice, as detailed in Appendix A.1 Then, two more approximations are made: first, it assumes the training of the network has converged, thus the gradient of the loss wrt $\\pmb \\theta$ is $0$ , which makes the linear term vanish. Then, it neglects the interactions between parameters, which corresponds to a diagonal approximation of $\\mathbf { G } ( \\pmb { \\theta } )$ , leading to the following model: ",
235
+ "bbox": [
236
+ 173,
237
+ 577,
238
+ 825,
239
+ 661
240
+ ],
241
+ "page_idx": 1
242
+ },
243
+ {
244
+ "type": "equation",
245
+ "img_path": "images/b93ecc96f17d6beb6fa5566f626088a681e95851ee99586d3a2e2c1c463e428e.jpg",
246
+ "text": "$$\n\\Delta \\mathcal { L } ^ { O B D } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } _ { k } ) \\approx \\frac { 1 } { 2 } \\mathbf { G } _ { k k } ( \\pmb { \\theta } ) \\Delta \\pmb { \\theta } _ { k } ^ { 2 } \\qquad \\Rightarrow \\qquad s _ { k } ^ { \\mathrm { O B D } } = \\frac { 1 } { 2 } \\mathbf { G } _ { k k } ( \\pmb { \\theta } ) \\pmb { \\theta } _ { k } ^ { 2 }\n$$",
247
+ "text_format": "latex",
248
+ "bbox": [
249
+ 266,
250
+ 662,
251
+ 733,
252
+ 694
253
+ ],
254
+ "page_idx": 1
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "$s _ { k } ^ { \\mathrm { O B D } }$ is the saliuned, so if parameter, estimating how much the loss will change if that parameter. Parameters can thus be ranked by order of importance, and the ones $\\Delta \\theta _ { k } = - \\theta _ { k }$ with the smallest saliencies (i.e. the least influence on the loss) are pruned, while the ones with the biggest saliencies are kept unchanged. This can be interpreted as finding and applying a binary mask $\\mathbf { m } \\in \\{ 0 , 1 \\} ^ { D }$ to the parameters such that $\\pmb { \\theta } + \\Delta \\pmb { \\theta } = \\pmb { \\theta } \\odot \\mathbf { m }$ , where $\\odot$ is the element-wise product. ",
259
+ "bbox": [
260
+ 174,
261
+ 696,
262
+ 825,
263
+ 767
264
+ ],
265
+ "page_idx": 1
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "2.3 MAGNITUDE PRUNING CRITERION ",
270
+ "text_level": 1,
271
+ "bbox": [
272
+ 176,
273
+ 782,
274
+ 455,
275
+ 797
276
+ ],
277
+ "page_idx": 1
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "Magnitude Pruning (MP) (Han et al., 2015), is a popular pruning criterion in which the saliency is simply based on the norm of the parameter: ",
282
+ "bbox": [
283
+ 173,
284
+ 808,
285
+ 823,
286
+ 837
287
+ ],
288
+ "page_idx": 1
289
+ },
290
+ {
291
+ "type": "equation",
292
+ "img_path": "images/11603f6b1b79d07a2d0cf04133a91de4b4ca755e71cdea320eca11086890b781.jpg",
293
+ "text": "$$\ns _ { k } ^ { \\mathrm { M P } } = \\pmb { \\theta } _ { k } ^ { 2 }\n$$",
294
+ "text_format": "latex",
295
+ "bbox": [
296
+ 465,
297
+ 839,
298
+ 532,
299
+ 858
300
+ ],
301
+ "page_idx": 1
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "Despite its simplicity, MP works extremely well in practice (Gale et al., 2019), and is used in current state-of-the-art methods (Renda et al., 2020). We use global MP as baseline in all our experiments. ",
306
+ "bbox": [
307
+ 174,
308
+ 861,
309
+ 825,
310
+ 890
311
+ ],
312
+ "page_idx": 1
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "2.4 OPTIMAL BRAIN SURGEON ",
317
+ "text_level": 1,
318
+ "bbox": [
319
+ 176,
320
+ 103,
321
+ 405,
322
+ 117
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "Optimal Brain Surgeon (OBS) (Hassibi & Stork, 1993) also relies on the quadratic model in Equation 2 to solve the minimization problem given in Equation 1, but uses the Lagrangian formulation to include the constraint to the solution of the minimization problem. Since OBS requires to compute the inverse of $\\mathbf { H } ( \\pmb \\theta )$ , several approximations have been explored in the literature, including diagonal, as in the original OBS, Kronecker-factored (Martens & Grosse, 2015) as in ML-Prune (Zeng & Urtasun, 2019), or diagonal, but in an Kronecker-factored Eigenbasis (George et al., 2018), as in EigenDamage (Wang et al., 2019). While we use OBD in our demonstrations and experimental setup, everything presented in this paper can also be used in OBS-based methods. We leave that for future work. ",
329
+ "bbox": [
330
+ 173,
331
+ 128,
332
+ 825,
333
+ 241
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "3 REVISITING LOSS MODELLING FOR UNSTRUCTURED PRUNING ",
340
+ "text_level": 1,
341
+ "bbox": [
342
+ 174,
343
+ 261,
344
+ 730,
345
+ 277
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "In this work, we investigate linear and diagonal quadratic models of the loss function and their performance when used for pruning neural networks. In our empirical study, we aim at answering the following questions: ",
352
+ "bbox": [
353
+ 176,
354
+ 292,
355
+ 825,
356
+ 335
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "1. How do criteria based on weight magnitude, or linear or quadratic models compare at preserving training loss (i.e. at solving the minimization problem in Equation 1)? 2. How does the locality assumption behind criteria based on linear and quadratic models affect their performances? 3. Do pruning criteria that are better at preserving the loss lead to better fine-tuned networks? ",
363
+ "bbox": [
364
+ 212,
365
+ 342,
366
+ 825,
367
+ 412
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "We now describe the linear and quadratic models we use, as well as the strategies to enforce locality of the pruning steps. ",
374
+ "bbox": [
375
+ 174,
376
+ 417,
377
+ 823,
378
+ 448
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "3.1 LINEAR AND QUADRATIC MODELS ",
385
+ "text_level": 1,
386
+ "bbox": [
387
+ 174,
388
+ 463,
389
+ 457,
390
+ 478
391
+ ],
392
+ "page_idx": 2
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "In current training strategies, regularization techniques such as early stopping or dropout (Srivastava et al., 2014) are often used to counteract overfitting. In these setups, there is no reason to assume that the training has converged, implying that the linear term in the Taylor expansion should not be neglected. Thus, one can build a pruning criterion similar to OBD that includes the gradient term in the quadratic model from Equation 2, leading to the following saliencies:2 ",
397
+ "bbox": [
398
+ 174,
399
+ 489,
400
+ 825,
401
+ 560
402
+ ],
403
+ "page_idx": 2
404
+ },
405
+ {
406
+ "type": "equation",
407
+ "img_path": "images/3b525eec52c137e98154c5fefbdc25fc27295be1e455cd2814eb0cc0a587e3a7.jpg",
408
+ "text": "$$\n\\Delta \\mathcal { L } ^ { Q M } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } _ { k } ) \\approx \\left| \\frac { \\partial \\mathcal { L } ( \\pmb { \\theta } ) } { \\partial \\pmb { \\theta } _ { k } } ^ { \\top } \\Delta \\pmb { \\theta } _ { k } + \\frac { 1 } { 2 } \\mathbf { G } _ { k k } ( \\pmb { \\theta } ) \\Delta \\pmb { \\theta } _ { k } ^ { 2 } \\right| \\Rightarrow s _ { k } ^ { \\mathrm { Q M } } = \\left| - \\frac { \\partial \\mathcal { L } ( \\pmb { \\theta } ) } { \\partial \\pmb { \\theta } _ { k } } \\pmb { \\theta } _ { k } + \\frac { 1 } { 2 } \\mathbf { G } _ { k k } ( \\pmb { \\theta } ) \\pmb { \\theta } _ { k } ^ { 2 } \\right|\n$$",
409
+ "text_format": "latex",
410
+ "bbox": [
411
+ 181,
412
+ 565,
413
+ 799,
414
+ 609
415
+ ],
416
+ "page_idx": 2
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "Recall the constraint $\\Delta \\theta _ { k } \\in \\{ - \\theta _ { k } , 0 \\}$ , hence the saliencies. This criterion generalizes OBD for networks that are not at convergence, and provides similar saliencies for networks that have converged. ",
421
+ "bbox": [
422
+ 171,
423
+ 614,
424
+ 826,
425
+ 645
426
+ ],
427
+ "page_idx": 2
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "To avoid the computational cost associated with computing second order information, which is prohibitive for large scale neural networks, one can use a simpler linear model (LM) instead of a quadratic one to approximate $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ , leading to the following approximation and saliencies: ",
432
+ "bbox": [
433
+ 174,
434
+ 650,
435
+ 825,
436
+ 694
437
+ ],
438
+ "page_idx": 2
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/fe86eca17fcc16f378d1b4e2957d4d9126669094c959a040a106255fc593e866.jpg",
443
+ "text": "$$\n\\Delta \\mathcal { L } ^ { L M } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) = \\left| \\frac { \\partial \\mathcal { L } ( \\pmb { \\theta } ) } { \\partial \\pmb { \\theta } } ^ { \\top } \\Delta \\pmb { \\theta } \\right| \\quad \\Rightarrow \\quad s _ { k } ^ { \\mathrm { L M } } = \\left| \\frac { \\partial \\mathcal { L } ( \\pmb { \\theta } ) } { \\partial \\pmb { \\theta } _ { k } } \\pmb { \\theta } _ { k } \\right|\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 299,
447
+ 699,
448
+ 700,
449
+ 742
450
+ ],
451
+ "page_idx": 2
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "The saliencies of the linear model are very related to the criterion used in Single-shot Network Pruning (Lee et al., 2019b), as demonstrated by Wang et al. (2020). ",
456
+ "bbox": [
457
+ 173,
458
+ 748,
459
+ 826,
460
+ 776
461
+ ],
462
+ "page_idx": 2
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "3.2 ENFORCING LOCALITY ",
467
+ "text_level": 1,
468
+ "bbox": [
469
+ 174,
470
+ 792,
471
+ 377,
472
+ 808
473
+ ],
474
+ "page_idx": 2
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "One important point to keep in mind is that linear and quadratic models (whether diagonal or not) are local approximations, and are generally only faithful in a small neighbourhood of the current parameters. Explicitly showing the terms that are neglected, we have: ",
479
+ "bbox": [
480
+ 174,
481
+ 819,
482
+ 825,
483
+ 862
484
+ ],
485
+ "page_idx": 2
486
+ },
487
+ {
488
+ "type": "equation",
489
+ "img_path": "images/c03856da250b02010e8fe4bb1e0a637f87ec567d1bcb52bbb238ac71814046e0.jpg",
490
+ "text": "$$\n\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) = \\Delta \\mathcal { L } ^ { L M } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) + \\mathcal { O } ( \\| \\Delta \\pmb { \\theta } \\| _ { 2 } ^ { 2 } ) = \\Delta \\mathcal { L } ^ { Q M } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) + \\mathcal { O } ( \\| \\Delta \\pmb { \\theta } \\| _ { 2 } ^ { 3 } )\n$$",
491
+ "text_format": "latex",
492
+ "bbox": [
493
+ 241,
494
+ 867,
495
+ 756,
496
+ 887
497
+ ],
498
+ "page_idx": 2
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "So when approximating $\\Delta \\mathcal { L }$ with $\\Delta \\mathcal { L } ^ { L M }$ we neglect the terms in $\\mathcal { O } ( \\| \\Delta \\theta \\| _ { 2 } ^ { 2 } )$ , and when approximating $\\Delta \\mathcal { L }$ with $\\Delta \\mathcal { L } ^ { Q M }$ we neglect the terms in $\\mathcal { O } ( \\bar { \\| } \\Delta \\theta \\| _ { 2 } ^ { 3 } )$ . Both approximations are thus only valid in a small neighbourhood of $\\pmb \\theta$ , and are extremely likely to be wrong when $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ is large. We list here different tricks to prevent this from happening. ",
503
+ "bbox": [
504
+ 174,
505
+ 102,
506
+ 825,
507
+ 160
508
+ ],
509
+ "page_idx": 3
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Performing the Pruning in several Stages $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ can be large when a large portion of the parameters is pruned at once. An easy fix typically used to mitigate this issue is to perform the pruning in several stages, re-estimating the model at each stage. The number of stages, which we denote by $\\pi$ , is typically overlooked (e.g. both Zeng & Urtasun (2019) and Wang et al. (2019) use only 6 stages of pruning). Our experiments, in upcoming Section 5, show that it has a drastic impact on the performances. Note that, without fine-tuning phases between the different pruning stages, this strategy violates the convergence assumption behind OBD and OBS, since after the first stage of pruning the network is no more at convergence. ",
514
+ "bbox": [
515
+ 174,
516
+ 176,
517
+ 825,
518
+ 287
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "The sparsity at each stage can be increased following either a linear schedule, where each step prunes the same number of parameter, or an exponential schedule, where the number of parameters pruned at each stage gets smaller and smaller. The later is typically used in the literature (Zeng & Urtasun, 2019; Wang et al., 2019; Frankle & Carbin, 2018; Renda et al., 2020). We compare them in Section 5. ",
525
+ "bbox": [
526
+ 174,
527
+ 295,
528
+ 825,
529
+ 352
530
+ ],
531
+ "page_idx": 3
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "Constraining the Step Size As is often done when using quadratic models (e.g. Nocedal & Wright (2006)), one can penalize the model when it decides to take steps that are too large, in order to stay in a region where we can trust the model. This can be done by simply adding the norm penalty $\\frac { \\lambda } { 2 } \\left\\| \\pmb { \\theta } _ { k } \\right\\| _ { 2 } ^ { 2 }$ to the saliencies computed by any criterion (Equations 3, 5 or 6), where $\\lambda$ is a hyper-parameter that controls the strength of the constraint: a small value of $\\lambda$ leaves the saliencies unchanged, and a large value of $\\lambda$ transforms the pruning criterion into MP (Equation 4). ",
536
+ "bbox": [
537
+ 173,
538
+ 368,
539
+ 825,
540
+ 454
541
+ ],
542
+ "page_idx": 3
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "Other Considerations $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ can be large if $\\pmb { \\theta }$ is large itself. This is dependent on the training procedure of the network, but can be easily mitigated by constraining the norm of the weights, which can be done using $L _ { 2 }$ regularisation or weight decay. Since nowadays weight decay is almost systematically used by default when training networks (e.g. He et al. (2016b); Xie et al. (2017); Devlin et al. (2018)), we do not investigate this further. ",
547
+ "bbox": [
548
+ 174,
549
+ 472,
550
+ 825,
551
+ 541
552
+ ],
553
+ "page_idx": 3
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "4 METHODOLOGY ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 176,
561
+ 564,
562
+ 339,
563
+ 579
564
+ ],
565
+ "page_idx": 3
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "We follow the main recommendations from Blalock et al. (2020). For fair comparison between criteria, all experiments are from our own PyTorch (Paszke et al., 2017) re-implementation, and ran on V100 GPUs.We use 5 different random seeds, and both mean and standard deviations are reported. We experiment with a MLP on MNIST, and with both VGG11 (Simonyan & Zisserman, 2014) and a pre-activation residual network 18 (He et al., 2016b) on CIFAR10 (Krizhevsky et al., 2009), to have variability in architectures, while using networks with good performance to number of parameters ratio. We further validate our findings on ImageNet (Deng et al., 2009) using a residual network 50 (He et al., 2016a). Although MNIST is not considered a good benchmark for pruning (Blalock et al., 2020), it can still be used to compare the ability of different criteria to solve the minimization problem in Equation 1. See Appendix B for details about splits, data augmentation and hyper-parameters. ",
570
+ "bbox": [
571
+ 174,
572
+ 595,
573
+ 825,
574
+ 750
575
+ ],
576
+ "page_idx": 3
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "Pruning Framework Algorithm 1 presents the pruning framework used in this work: we first train the network, then perform several stages of pruning, and finally perform a single phase of fine-tuning, using the same hyper-parameters as for the original training. Global pruning is used for all the criteria. Note that because of their convergence assumption, OBD and OBS advocate for fine-tuning after each stage of pruning. Since LM and QM are not based on this assumption, they should perform well in this proposed framework. While the fine tuning-phase would require hyper-parameters optimisation, Renda et al. (2020) showed that using the same ones as for the original training usually leads to good results. The hyper-parameters used in our experiments are provided in Appendix B. ",
581
+ "bbox": [
582
+ 174,
583
+ 766,
584
+ 825,
585
+ 878
586
+ ],
587
+ "page_idx": 3
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "Performance Metrics The performances of the pruning criteria are measured using two metrics: First, we use $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) = \\bar { | \\mathcal { L } ( \\pmb { \\theta } + \\Delta \\pmb { \\theta } ) - \\mathcal { L } ( \\pmb { \\theta } ) | }$ , which is the quantity that the pruning criteria ",
592
+ "bbox": [
593
+ 174,
594
+ 895,
595
+ 821,
596
+ 924
597
+ ],
598
+ "page_idx": 3
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "Algorithm 1 Pruning Framework ",
603
+ "text_level": 1,
604
+ "bbox": [
605
+ 174,
606
+ 103,
607
+ 395,
608
+ 118
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "Require: Network $f _ { \\theta }$ with $\\pmb \\theta \\in \\mathbb { R } ^ { D }$ , dataset $\\mathcal { D }$ , number of pruning iterations $\\pi$ , and sparsity $\\kappa$ . \n1: fθ ← Training(fθ, D) \n2: $\\kappa _ { 0 } \\gets 0$ \n3: m ← 1 D \n4: for 5: κi ← κi−1 + (κ−κ0) or $i = 1$ to $\\pi$ do $\\kappa _ { i } \\gets \\kappa _ { i - 1 } + ( \\kappa - \\kappa _ { 0 } ) ^ { i / \\pi }$ . Compute sparsity for iteration $i$ \n6: s ← Saliencies(fθ\fm, D) $\\triangleright$ Compute saliencies (Equation 3, 4, 5 or 6). \n7: m[argsort(s)[: κiD]] ← 0 . Mask the parameters with smallest saliencies. \n8: $f _ { \\pmb { \\theta } ( \\odot \\mathbf { m } } \\gets \\mathrm { T r a i n i n g } ( f _ { \\pmb { \\theta } ( \\odot \\mathbf { m } ) } \\mathcal { D } )$ . Optional fine-tuning \n9: return fθ\fm, m ",
615
+ "bbox": [
616
+ 176,
617
+ 123,
618
+ 825,
619
+ 272
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "are designed to minimize (recall Equation 1). Second, we use the validation error gap before/after fine-tuning, which is the metric we ultimately care about when designing pruning methods. ",
626
+ "bbox": [
627
+ 174,
628
+ 297,
629
+ 823,
630
+ 327
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "5 PERFORMANCES BEFORE FINE-TUNING ",
637
+ "text_level": 1,
638
+ "bbox": [
639
+ 174,
640
+ 347,
641
+ 534,
642
+ 363
643
+ ],
644
+ "page_idx": 4
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "We evaluate the impact of enforcing locality in the LM, QM and OBS criteria. For each criterion, Figure 1 reports $\\bar { \\Delta \\mathcal { L } } ( \\theta , \\Delta \\theta )$ as a function of $\\lambda$ , for different number of pruning stages $\\pi$ , using the exponential pruning schedule, and Figure 5 in Appendix show the same results for the linear pruning schedule. A typical usage of these criteria would be with a regularisation strength $\\lambda = 0$ and a number of pruning stages $\\pi \\approx 1$ . MP, the baseline, which is invariant to both $\\lambda$ and $\\pi$ , is also reported in dashed black. For reference, the networks reached a validation error rate before pruning of $1 . 4 7 \\pm 0 . 0 4 \\%$ for the MLP, $1 0 . 1 6 \\pm 0 . 2 9 \\%$ for VGG11 and $4 . 8 7 \\pm 0 . 0 4 \\%$ for the PreActResNet18. ",
649
+ "bbox": [
650
+ 173,
651
+ 377,
652
+ 826,
653
+ 476
654
+ ],
655
+ "page_idx": 4
656
+ },
657
+ {
658
+ "type": "image",
659
+ "img_path": "images/e81a03aca9cafb1bba4491576583d8d54878eea30220a2029997b58266974c89.jpg",
660
+ "image_caption": [
661
+ "Figure 1: $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ for different number of pruning stages $\\pi$ , as a function of $\\lambda$ , the step size constraint strength, using either (left) LM, (middle) QM or (right) OBD criteria. MP, which is invariant to $\\lambda$ and to the number of pruning stages, is displayed in dashed black. The curves are the mean and the error bars the standard deviation over 5 random seeds. OBD with $\\pi = 1$ and $\\lambda = 0$ diverged for all of the 5 seeds. Increasing the number of pruning stages drastically reduces $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . A $\\lambda > 0$ can also help improving performances. Figure 6 in Appendix contains the same plots, but displaying the validation gap before/after pruning. "
662
+ ],
663
+ "image_footnote": [],
664
+ "bbox": [
665
+ 179,
666
+ 488,
667
+ 813,
668
+ 803
669
+ ],
670
+ "page_idx": 4
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "5.1 IMPACT OF THE ASSUMPTIONS BEHIND THE DIFFERENT CRITERIA ",
675
+ "text_level": 1,
676
+ "bbox": [
677
+ 173,
678
+ 103,
679
+ 673,
680
+ 117
681
+ ],
682
+ "page_idx": 5
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "Locality Assumption Figure 1 shows that increasing the number of pruning stages can drastically reduce $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ when using LM, QM and OBS criteria. It demonstrates the importance of applying local steps when pruning. Constraining the steps size through ${ \\frac { \\lambda } { 2 } } \\left\\| \\pmb { \\theta } _ { k } \\right\\| _ { 2 } ^ { 2 }$ can also reduce $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ , on CIFAR10 in particular. The trend, however, is less pronounced on MNIST. We hypothesize that it is due to the pruning step size: the MLP contains $2 6 0 \\mathrm { k }$ parameters, vs 9.7M for VGG11, so the number of parameters pruned at each stage in VGG11 is still large, even with $\\pi = 1 4 0$ . This translates to a bigger $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ that needs to be controlled by the regularisation constraint. ",
687
+ "bbox": [
688
+ 173,
689
+ 131,
690
+ 826,
691
+ 232
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Convergence Assumption When performing the pruning in several stages, we also observe that LM and QM can reach better performances than OBD. Without retraining phases between pruning stages, we violate the convergence assumption of OBD. This is however not the case for LM and QM, since they are not based on this assumption. Note that OBD still works reasonably well on VGG11. This could be be related to the depth of VGG11: VGG11 is deeper than the MLP, but not equipped with residual connections like the PreActResNet18. ",
698
+ "bbox": [
699
+ 174,
700
+ 251,
701
+ 826,
702
+ 334
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "5.2 LOSS-PRESERVATION CAPABILITIES OF THE DIFFERENT CRITERIA ",
709
+ "text_level": 1,
710
+ "bbox": [
711
+ 176,
712
+ 354,
713
+ 673,
714
+ 369
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "Table 1 contains the best $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ for each of the networks and pruning criteria. Our main observation is that the criteria that model the loss (LM and QM in particular) are better at preserving the loss than MP. Similarly to Table 1, Table 3 in Appendix contains the best validation error gap before/after pruning, where we can observe similar tendencies. ",
721
+ "bbox": [
722
+ 174,
723
+ 382,
724
+ 825,
725
+ 439
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "table",
731
+ "img_path": "images/e04782268d20c7fcc331ffc99e3e8f677ade2a4e2287a0dab84ab436df63c5fe.jpg",
732
+ "table_caption": [
733
+ "Table 1: Summary of the best $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ across values of $\\lambda$ for different networks and pruning criteria, with $\\pi = 1 4 0$ . QM achieves better loss-preservation than other criteria. OBD performs worse than QM, since we violate its convergence assumption when pruning in several stages. "
734
+ ],
735
+ "table_footnote": [],
736
+ "table_body": "<table><tr><td rowspan=\"3\">Network</td><td colspan=\"4\">△C(0,△0)</td></tr><tr><td>MP</td><td>OBD</td><td>LM</td><td>QM</td></tr><tr><td>MLP on MNIST</td><td>2.02 ± 0.10</td><td>1.83 ± 0.11</td><td>1.17 ± 0.03</td><td>1.05 ± 0.04</td></tr><tr><td>VGG11 on CIFAR10</td><td>1.84 ± 0.44</td><td>0.89 ± 0.24</td><td>0.90 ± 0.21</td><td>0.86 ± 0.22</td></tr><tr><td>PreActResNet18 on CIFAR10</td><td>2.23 ± 0.14</td><td>1.95 ± 0.46</td><td>1.36 ± 0.18</td><td>1.22 ± 0.31</td></tr></table>",
737
+ "bbox": [
738
+ 225,
739
+ 508,
740
+ 769,
741
+ 595
742
+ ],
743
+ "page_idx": 5
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "5.3 LINEAR VS EXPONENTIAL PRUNING SCHEDULE ",
748
+ "text_level": 1,
749
+ "bbox": [
750
+ 174,
751
+ 627,
752
+ 547,
753
+ 641
754
+ ],
755
+ "page_idx": 5
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "Figure 2 compares the impact of $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ and reports the training error gap when pruning VGG11 on CIFAR10 in several stages, using either the linear or the exponential pruning schedule. We also compare against one-shot pruning, as reference. The exponential schedule allows to maintain a more constant $\\bar { \\| \\Delta \\pmb { \\theta } \\| _ { 2 } }$ throughout the pruning procedure, which limits the maximum size of $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ , and thus better satisfies the locality assumption. ",
760
+ "bbox": [
761
+ 173,
762
+ 654,
763
+ 825,
764
+ 724
765
+ ],
766
+ "page_idx": 5
767
+ },
768
+ {
769
+ "type": "image",
770
+ "img_path": "images/2c13ab73b3938327a3371c4d01cab4a9b5a3d081ba7f795a3d1ba4243eff17d0.jpg",
771
+ "image_caption": [
772
+ "Figure 2: Linear vs exponential schedule using QM on VGG11. Left: $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ vs sparsity, zoomed on the end. Markers denote the 14 pruning stages. Middle: $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ at each stage. Right: Same as Figure 1, but comparing exponential (solid) and linear (dotted) schedules at $9 5 . 6 \\%$ sparsity, with $\\pi \\in \\{ 1 4 , 1 4 0 \\}$ . We get smaller $\\| \\Delta \\pmb { \\theta } \\| _ { 2 }$ per pruning stage when using exponential instead of linear schedule, resulting in a smaller $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . It is advantageous to use that schedule when the pruning budged is limited, i.e. when $\\pi$ is small. This advantage vanishes for larger values of $\\pi$ . "
773
+ ],
774
+ "image_footnote": [],
775
+ "bbox": [
776
+ 176,
777
+ 742,
778
+ 820,
779
+ 813
780
+ ],
781
+ "page_idx": 5
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "6 PERFORMANCES AFTER FINE-TUNING ",
786
+ "text_level": 1,
787
+ "bbox": [
788
+ 174,
789
+ 102,
790
+ 522,
791
+ 118
792
+ ],
793
+ "page_idx": 6
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "We now fine-tune the pruned networks using the same hyper-parameters and number of epochs than for the original training. Table 2 shows the validation error gap between the non-pruned networks and the pruned networks after fine-tuning, for all considered criteria. LM performs better than MP on both the MLP and VGG11 ( $0 . 5 \\%$ difference), but all criteria perform similarly on the PreActResNet18. These results are consistent with the observations of Blalock et al. (2020). As reference, global random pruning resulted in validation error rate of $4 7 . 1 8 \\pm 6 . 8 \\%$ for the MLP, and resulted in non-retrainable networks on CIFAR10 (with $90 \\%$ error rate). ",
798
+ "bbox": [
799
+ 173,
800
+ 132,
801
+ 825,
802
+ 231
803
+ ],
804
+ "page_idx": 6
805
+ },
806
+ {
807
+ "type": "table",
808
+ "img_path": "images/cbf8a04c2dc802c35b1806bc1f11975fe872a689902529575413cf0c5fae9b45.jpg",
809
+ "table_caption": [
810
+ "Table 2: Best validation error gap of the fine-tuned networks (lower is better), for different pruning criteria, across values of $\\lambda$ and $\\pi$ . LM is better than MP on the MLP and VGG11. All the methods reach similar levels of performance on the PreActResNet18. ",
811
+ "6.1 CORRELATION BETWEEN LOSS-PRESERVATION AND PERFORMANCES AFTER FINE-TUNING "
812
+ ],
813
+ "table_footnote": [],
814
+ "table_body": "<table><tr><td rowspan=\"2\">Network</td><td colspan=\"4\">Gap of Validation Error (%)</td></tr><tr><td>MP</td><td>OBD</td><td>LM</td><td>QM</td></tr><tr><td>MLP on MNIST</td><td>2.4± 0.3</td><td>2.0 ± 0.1</td><td>1.9 ± 0.3</td><td>1.9 ± 0.2</td></tr><tr><td>VGG11 on CIFAR10</td><td>0.2 ± 0.2</td><td>-0.1 ± 0.2</td><td>-0.3 ± 0.1</td><td>-0.1 ± 0.1</td></tr><tr><td>PreActResNet18 on CIFAR10</td><td>0.2± 0.2</td><td>0.2± 0.2</td><td>0.1 ± 0.1</td><td>0.2±0.2</td></tr></table>",
815
+ "bbox": [
816
+ 246,
817
+ 296,
818
+ 745,
819
+ 383
820
+ ],
821
+ "page_idx": 6
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "An important observation is that the hyper-parameters $\\lambda$ and $\\pi$ that give the best performing criteria in terms of $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ in Table 1 are not the same as the ones that give the best performing criteria after fine-tuning in Table 2. We display in Figure 3 scatter plots of all the experiments we ran, to observe how well loss-preservation correlates with performance after fine-tuning. ",
826
+ "bbox": [
827
+ 173,
828
+ 445,
829
+ 825,
830
+ 502
831
+ ],
832
+ "page_idx": 6
833
+ },
834
+ {
835
+ "type": "image",
836
+ "img_path": "images/2f748e21cf61b0a1c0c79bbf4633e16b738695d5bfe4c3379ea3784df08f0da6.jpg",
837
+ "image_caption": [
838
+ "Figure 3: Gap of validation error after fine-tuning as a function of $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . Each point is one experiment, i.e. one one random seed, one $\\pi$ and one $\\lambda$ . $\\rho$ is the Spearman’s rank correlation coefficient computed on all the data points. Except for the MLP on MNIST, there is only a weak correlation between $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ and the gap of validation after fine-tuning. Thus, the performance after pruning cannot be explained solely by the loss-preserving abilities of the pruning criteria. "
839
+ ],
840
+ "image_footnote": [],
841
+ "bbox": [
842
+ 176,
843
+ 513,
844
+ 818,
845
+ 686
846
+ ],
847
+ "page_idx": 6
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "Quite surprisingly, although we are able to obtain networks with smaller $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ , and thus better performing networks right after pruning, the performances after fine-tuning do not correlate significantly with the gap. Except for the MLP on MNIST, whose Spearman’s rank correlation coefficient is $\\rho = 0 . 6 7$ , there is only a weak correlation between $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ and the validation error gap after fine-tuning $\\mathrm { \\Delta \\rho = 0 . 2 7 }$ for VGG11 and $\\rho = 0 . 2 0$ for PreActResNet18). Figure 10 in Appendix contains the same scatter plots, but showing $\\mathcal { L } ( \\pmb { \\theta } \\odot \\mathbf { m } )$ after fine-tuning instead of the validation error gap, and similar trends can be observed. Figure 11, also in Appendix, shows similar scatter plots, but for different sparsity levels on VGG11. Finally, Figure 9 in Appendix contains the same scatter plots but displaying the validation error gap before fine-tuning versus the validation error gap before fine-tuning. ",
852
+ "bbox": [
853
+ 174,
854
+ 785,
855
+ 825,
856
+ 924
857
+ ],
858
+ "page_idx": 6
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "To verify that these observations are not due to a specific choice of fine-tuning hyper-parameters, we perform a hyper-parameter grid search and report similar results in Appendix C.2. Also, we show in Figure 15 in Appendix C.3 the fine-tuning curves of networks pruned using MP and our best QM criteria. We observe that, except for MNIST, the difference in training loss right after pruning disappears after only one epoch of fine-tuning, erasing the advantage of QM over MP. ",
863
+ "bbox": [
864
+ 174,
865
+ 103,
866
+ 825,
867
+ 174
868
+ ],
869
+ "page_idx": 7
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "6.2 DISCUSSION ",
874
+ "text_level": 1,
875
+ "bbox": [
876
+ 174,
877
+ 190,
878
+ 302,
879
+ 205
880
+ ],
881
+ "page_idx": 7
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "These results highlight an important issue: minimizing $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ , no matter what model is used, might be used to design better pruning criteria, but it does not necessarily transfer to a better pruning method when fine-tuning is involved. The performance after fine-tuning cannot be explained solely by the local loss-preserving abilities of the criteria, and other mechanisms might be at play. Thus, the effect of fine-tuning should also be taken into account when designing pruning criteria. ",
886
+ "bbox": [
887
+ 174,
888
+ 217,
889
+ 825,
890
+ 287
891
+ ],
892
+ "page_idx": 7
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "For instance, Lee et al. (2019a) and Wang et al. (2020) proposed different heuristics to take into account gradient propagation in the context of foresight pruning, i.e. pruning untrained networks right after initialisation. Wang et al. (2020) argues that minimizing $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ in that context makes little sense, since the network is producing random predictions. In Appendix C.4 we compare our results to two pruning methods based on preserving the gradient flow, GraSP (Wang et al., 2020) and SynFlow (Tanaka et al., 2020), and show that they comply with our observations above. ",
897
+ "bbox": [
898
+ 174,
899
+ 294,
900
+ 825,
901
+ 378
902
+ ],
903
+ "page_idx": 7
904
+ },
905
+ {
906
+ "type": "text",
907
+ "text": "Finally, several recent articles are looking further into the impact of various pruning criteria on subsequent training or fine-tuning (Lubana & Dick, 2020; Evci et al., 2020; Frankle et al., 2020). ",
908
+ "bbox": [
909
+ 174,
910
+ 385,
911
+ 825,
912
+ 414
913
+ ],
914
+ "page_idx": 7
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "7 SCALING UP TO IMAGENET ",
919
+ "text_level": 1,
920
+ "bbox": [
921
+ 176,
922
+ 434,
923
+ 434,
924
+ 450
925
+ ],
926
+ "page_idx": 7
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "To investigate whether our observations also hold on larger datasets, we perform similar experiments with LM, QM and OBD on the ResNet50 on ImageNet. Before pruning, the network reached $7 6 . 4 1 \\%$ validation accuracy. Figure 4 presents results at $70 \\%$ sparsity, in a similar fashion as Figure 1 and Figure 3. We observe a similar trend: The best loss-preserving models are not necessarily the best models after fine-tuning. See Appendix B for the detailed experimental setting, and see Figure 17 for results at $90 \\%$ sparsity. ",
931
+ "bbox": [
932
+ 173,
933
+ 467,
934
+ 825,
935
+ 550
936
+ ],
937
+ "page_idx": 7
938
+ },
939
+ {
940
+ "type": "image",
941
+ "img_path": "images/f617932654c676e9116fcae300e371d606ccb24af3d42ec7381ec75ea6a1723b.jpg",
942
+ "image_caption": [
943
+ "Figure 4: Same as Figure 1 and Figure 3, for the ResNet50 on ImageNet, with a sparsity of $70 \\%$ . Increasing the number of pruning stages and constraining the step size reduce $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . However, the best-loss preserving criteria, which maximize the validation accuracy right after pruning, do not produce better networks after fine-tuning. They perform similarly if their validation accuracy after pruning is $> 2 0 \\%$ . Criteria that outperform MP right after pruning do not achieve better performance after fine-tuning. "
944
+ ],
945
+ "image_footnote": [],
946
+ "bbox": [
947
+ 179,
948
+ 564,
949
+ 815,
950
+ 734
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "8 CONCLUSION ",
957
+ "text_level": 1,
958
+ "bbox": [
959
+ 176,
960
+ 863,
961
+ 318,
962
+ 880
963
+ ],
964
+ "page_idx": 7
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "In this paper, we revisited loss modelling for unstructured pruning. We showed that keeping the gradient term in the diagonal quadratic model allows to relax the convergence assumption behind ",
969
+ "bbox": [
970
+ 173,
971
+ 895,
972
+ 823,
973
+ 924
974
+ ],
975
+ "page_idx": 7
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "OBS and OBD. We also showed the importance of locality when using loss models for pruning: increasing the number of pruning stages and constraining the step size are two improvements that produce better loss-preserving pruning criteria and that should be added to the recommendation list of Blalock et al. (2020). Finally we observed that the loss right after pruning does not always correlate with the performances after fine-tuning, suggesting that a better loss before fine-tuning is not solely responsible for the performances after fine-tuning. Thus, future research should focus on ways to model the actual effect of subsequent fine-tuning when designing pruning criteria. ",
980
+ "bbox": [
981
+ 174,
982
+ 103,
983
+ 825,
984
+ 202
985
+ ],
986
+ "page_idx": 8
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "REFERENCES ",
991
+ "text_level": 1,
992
+ "bbox": [
993
+ 174,
994
+ 223,
995
+ 285,
996
+ 238
997
+ ],
998
+ "page_idx": 8
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "Davis Blalock, Jose Javier Gonzalez Ortiz, Jonathan Frankle, and John Guttag. What is the state of neural network pruning? arXiv preprint arXiv:2003.03033, 2020. ",
1003
+ "bbox": [
1004
+ 173,
1005
+ 246,
1006
+ 825,
1007
+ 275
1008
+ ],
1009
+ "page_idx": 8
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition. Ieee, 2009. ",
1014
+ "bbox": [
1015
+ 173,
1016
+ 285,
1017
+ 823,
1018
+ 327
1019
+ ],
1020
+ "page_idx": 8
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. ",
1025
+ "bbox": [
1026
+ 173,
1027
+ 338,
1028
+ 823,
1029
+ 367
1030
+ ],
1031
+ "page_idx": 8
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "Xiaohan Ding, Xiangxin Zhou, Yuchen Guo, Jungong Han, Ji Liu, et al. Global sparse momentum sgd for pruning very deep neural networks. In NeurIPS, 2019. ",
1036
+ "bbox": [
1037
+ 173,
1038
+ 376,
1039
+ 823,
1040
+ 405
1041
+ ],
1042
+ "page_idx": 8
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Utku Evci, Yani A Ioannou, Cem Keskin, and Yann Dauphin. Gradient flow in sparse neural networks and how lottery tickets win. arXiv preprint arXiv:2010.03533, 2020. ",
1047
+ "bbox": [
1048
+ 171,
1049
+ 415,
1050
+ 825,
1051
+ 445
1052
+ ],
1053
+ "page_idx": 8
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In ICLR, 2018. ",
1058
+ "bbox": [
1059
+ 171,
1060
+ 454,
1061
+ 823,
1062
+ 483
1063
+ ],
1064
+ "page_idx": 8
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. Pruning neural networks at initialization: Why are we missing the mark? arXiv preprint arXiv:2009.08576, 2020. ",
1069
+ "bbox": [
1070
+ 171,
1071
+ 492,
1072
+ 825,
1073
+ 522
1074
+ ],
1075
+ "page_idx": 8
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Trevor Gale, Erich Elsen, and Sara Hooker. The state of sparsity in deep neural networks. arXiv preprint arXiv:1902.09574, 2019. ",
1080
+ "bbox": [
1081
+ 174,
1082
+ 531,
1083
+ 823,
1084
+ 560
1085
+ ],
1086
+ "page_idx": 8
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "Thomas George, César Laurent, Xavier Bouthillier, Nicolas Ballas, and Pascal Vincent. Fast approximate natural gradient descent in a kronecker factored eigenbasis. In NIPS, 2018. ",
1091
+ "bbox": [
1092
+ 173,
1093
+ 570,
1094
+ 823,
1095
+ 599
1096
+ ],
1097
+ "page_idx": 8
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010. ",
1102
+ "bbox": [
1103
+ 173,
1104
+ 609,
1105
+ 823,
1106
+ 638
1107
+ ],
1108
+ "page_idx": 8
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. ",
1113
+ "bbox": [
1114
+ 176,
1115
+ 647,
1116
+ 823,
1117
+ 691
1118
+ ],
1119
+ "page_idx": 8
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In NIPS. 2015. ",
1124
+ "bbox": [
1125
+ 174,
1126
+ 700,
1127
+ 825,
1128
+ 729
1129
+ ],
1130
+ "page_idx": 8
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "Babak Hassibi and David G Stork. Second order derivatives for network pruning: Optimal brain surgeon. In NIPS, 1993. ",
1135
+ "bbox": [
1136
+ 173,
1137
+ 739,
1138
+ 825,
1139
+ 768
1140
+ ],
1141
+ "page_idx": 8
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015. ",
1146
+ "bbox": [
1147
+ 173,
1148
+ 779,
1149
+ 825,
1150
+ 808
1151
+ ],
1152
+ "page_idx": 8
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016a. ",
1157
+ "bbox": [
1158
+ 173,
1159
+ 818,
1160
+ 823,
1161
+ 847
1162
+ ],
1163
+ "page_idx": 8
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In ECCV, 2016b. ",
1168
+ "bbox": [
1169
+ 173,
1170
+ 856,
1171
+ 823,
1172
+ 885
1173
+ ],
1174
+ "page_idx": 8
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "Tom Heskes. On “natural” learning and pruning in multilayered perceptrons. Neural Computation, 2000. ",
1179
+ "bbox": [
1180
+ 174,
1181
+ 895,
1182
+ 823,
1183
+ 922
1184
+ ],
1185
+ "page_idx": 8
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. URL http://proceedings.mlr.press/ v37/ioffe15.html. ",
1190
+ "bbox": [
1191
+ 176,
1192
+ 103,
1193
+ 823,
1194
+ 146
1195
+ ],
1196
+ "page_idx": 9
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. ",
1201
+ "bbox": [
1202
+ 176,
1203
+ 155,
1204
+ 826,
1205
+ 170
1206
+ ],
1207
+ "page_idx": 9
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Yann LeCun. Who is afraid of convex optimization? NIPS - Workshop on Efficient Learning, 2007. URL https://cs.nyu.edu/\\~yann/talks/lecun-20071207-nonconvex.pdf. ",
1212
+ "bbox": [
1213
+ 173,
1214
+ 178,
1215
+ 825,
1216
+ 208
1217
+ ],
1218
+ "page_idx": 9
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In NIPS, 1990. ",
1223
+ "bbox": [
1224
+ 174,
1225
+ 215,
1226
+ 745,
1227
+ 232
1228
+ ],
1229
+ "page_idx": 9
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
1234
+ "bbox": [
1235
+ 173,
1236
+ 239,
1237
+ 821,
1238
+ 268
1239
+ ],
1240
+ "page_idx": 9
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "Namhoon Lee, Thalaiyasingam Ajanthan, Stephen Gould, and Philip HS Torr. A signal propagation perspective for pruning neural networks at initialization. arXiv preprint arXiv:1906.06307, 2019a. ",
1245
+ "bbox": [
1246
+ 171,
1247
+ 276,
1248
+ 823,
1249
+ 306
1250
+ ],
1251
+ "page_idx": 9
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: Single-Shot Network Pruning based on Connection Sensitivity. In ICLR, 2019b. URL https://openreview.net/forum?id $=$ B1VZqjAcYX. ",
1256
+ "bbox": [
1257
+ 174,
1258
+ 314,
1259
+ 823,
1260
+ 357
1261
+ ],
1262
+ "page_idx": 9
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through l_0 regularization. arXiv preprint arXiv:1712.01312, 2017. ",
1267
+ "bbox": [
1268
+ 171,
1269
+ 366,
1270
+ 825,
1271
+ 395
1272
+ ],
1273
+ "page_idx": 9
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Ekdeep Singh Lubana and Robert P. Dick. A gradient flow framework for analyzing network pruning, 2020. ",
1278
+ "bbox": [
1279
+ 173,
1280
+ 402,
1281
+ 825,
1282
+ 433
1283
+ ],
1284
+ "page_idx": 9
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In ICML, 2015. ",
1289
+ "bbox": [
1290
+ 173,
1291
+ 440,
1292
+ 823,
1293
+ 469
1294
+ ],
1295
+ "page_idx": 9
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. In ICML, 2017. ",
1300
+ "bbox": [
1301
+ 171,
1302
+ 478,
1303
+ 823,
1304
+ 507
1305
+ ],
1306
+ "page_idx": 9
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. ",
1311
+ "bbox": [
1312
+ 174,
1313
+ 515,
1314
+ 823,
1315
+ 559
1316
+ ],
1317
+ "page_idx": 9
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. ",
1322
+ "bbox": [
1323
+ 171,
1324
+ 566,
1325
+ 825,
1326
+ 597
1327
+ ],
1328
+ "page_idx": 9
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "Jorge Nocedal and Stephen Wright. Numerical optimization. Springer Science & Business Media, 2006. ",
1333
+ "bbox": [
1334
+ 173,
1335
+ 604,
1336
+ 825,
1337
+ 633
1338
+ ],
1339
+ "page_idx": 9
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. ",
1344
+ "bbox": [
1345
+ 174,
1346
+ 642,
1347
+ 825,
1348
+ 685
1349
+ ],
1350
+ "page_idx": 9
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Alex Renda, Jonathan Frankle, and Michael Carbin. Comparing rewinding and fine-tuning in neural network pruning. In ICLR, 2020. URL https://openreview.net/forum?id= S1gSj0NKvB. ",
1355
+ "bbox": [
1356
+ 174,
1357
+ 693,
1358
+ 826,
1359
+ 737
1360
+ ],
1361
+ "page_idx": 9
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Nicol N Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural computation, 2002. ",
1366
+ "bbox": [
1367
+ 173,
1368
+ 744,
1369
+ 823,
1370
+ 773
1371
+ ],
1372
+ "page_idx": 9
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
1377
+ "bbox": [
1378
+ 174,
1379
+ 782,
1380
+ 821,
1381
+ 811
1382
+ ],
1383
+ "page_idx": 9
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Sidak Pal Singh and Dan Alistarh. Woodfisher: Efficient second-order approximations for model compression. arXiv preprint arXiv:2004.14340, 2020. ",
1388
+ "bbox": [
1389
+ 174,
1390
+ 819,
1391
+ 821,
1392
+ 849
1393
+ ],
1394
+ "page_idx": 9
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 2014. ",
1399
+ "bbox": [
1400
+ 176,
1401
+ 857,
1402
+ 821,
1403
+ 887
1404
+ ],
1405
+ "page_idx": 9
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "Hidenori Tanaka, Daniel Kunin, Daniel LK Yamins, and Surya Ganguli. Pruning neural networks without any data by iteratively conserving synaptic flow. arXiv preprint arXiv:2006.05467, 2020. ",
1410
+ "bbox": [
1411
+ 176,
1412
+ 895,
1413
+ 823,
1414
+ 924
1415
+ ],
1416
+ "page_idx": 9
1417
+ },
1418
+ {
1419
+ "type": "text",
1420
+ "text": "Chaoqi Wang, Roger Grosse, Sanja Fidler, and Guodong Zhang. Eigendamage: Structured pruning in the kronecker-factored eigenbasis. arXiv preprint arXiv:1905.05934, 2019. ",
1421
+ "bbox": [
1422
+ 173,
1423
+ 103,
1424
+ 823,
1425
+ 132
1426
+ ],
1427
+ "page_idx": 10
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In ICLR, 2020. URL https://openreview.net/forum?id $=$ SkgsACVKPH. ",
1432
+ "bbox": [
1433
+ 174,
1434
+ 145,
1435
+ 825,
1436
+ 188
1437
+ ],
1438
+ "page_idx": 10
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In CVPR, 2017. ",
1443
+ "bbox": [
1444
+ 173,
1445
+ 200,
1446
+ 825,
1447
+ 229
1448
+ ],
1449
+ "page_idx": 10
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "Wenyuan Zeng and Raquel Urtasun. MLPrune: Multi-layer pruning for automated neural network compression, 2019. URL https://openreview.net/forum?id $\\equiv$ r1g5b2RcKm. ",
1454
+ "bbox": [
1455
+ 174,
1456
+ 242,
1457
+ 823,
1458
+ 271
1459
+ ],
1460
+ "page_idx": 10
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "APPENDIX ",
1465
+ "text_level": 1,
1466
+ "bbox": [
1467
+ 176,
1468
+ 301,
1469
+ 264,
1470
+ 318
1471
+ ],
1472
+ "page_idx": 10
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "A GENERALIZED GAUSS-NEWTON ",
1477
+ "text_level": 1,
1478
+ "bbox": [
1479
+ 176,
1480
+ 335,
1481
+ 478,
1482
+ 353
1483
+ ],
1484
+ "page_idx": 10
1485
+ },
1486
+ {
1487
+ "type": "text",
1488
+ "text": "Having to compute $\\mathbf { H } ( \\pmb \\theta )$ is an obvious drawback of quadratic models, and thus a common first step is to approximate $\\mathbf { H } ( \\pmb \\theta )$ using the Generalized Gauss-Newton approximation (Schraudolph, 2002): ",
1489
+ "bbox": [
1490
+ 173,
1491
+ 369,
1492
+ 825,
1493
+ 398
1494
+ ],
1495
+ "page_idx": 10
1496
+ },
1497
+ {
1498
+ "type": "equation",
1499
+ "img_path": "images/0ed1356d1418e367d9be9d988cf9b5d911b6cd7b59bab9e2d9fd2eabf26b506e.jpg",
1500
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { H } ( \\theta ) = \\underbrace { \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\frac { \\partial f _ { \\theta } \\left( x _ { i } \\right) ^ { \\top } } { \\partial \\theta } \\nabla _ { u = f _ { \\theta } \\left( x _ { i } \\right) } ^ { 2 } \\ell \\left( u , t _ { i } \\right) \\frac { \\partial f _ { \\theta } \\left( x _ { i } \\right) } { \\partial \\theta } } _ { \\mathbf { G } ( \\theta ) , \\mathrm { t h e G e n e r a l i z e d ~ G a u s . N e w i o n } } + \\underbrace { \\sum _ { k } ^ { K } \\frac { \\partial \\ell \\left( u , t _ { i } \\right) } { \\partial u _ { k } } \\Big | _ { u = f _ { \\theta } \\left( x _ { i } \\right) } \\frac { \\partial ^ { 2 } f _ { \\theta } \\left( x _ { i } \\right) _ { k } } { \\partial \\theta ^ { 2 } } } _ { \\approx 0 } } \\\\ & { \\approx \\mathbf { G } ( \\theta ) } \\end{array}\n$$",
1501
+ "text_format": "latex",
1502
+ "bbox": [
1503
+ 187,
1504
+ 406,
1505
+ 790,
1506
+ 492
1507
+ ],
1508
+ "page_idx": 10
1509
+ },
1510
+ {
1511
+ "type": "text",
1512
+ "text": "where $\\mathrm { K }$ is the number of outputs of the network. $\\mathbf { G } ( \\pmb { \\theta } )$ has the advantage of being easier to compute and is also positive semi-definite by construction. ",
1513
+ "bbox": [
1514
+ 173,
1515
+ 497,
1516
+ 826,
1517
+ 526
1518
+ ],
1519
+ "page_idx": 10
1520
+ },
1521
+ {
1522
+ "type": "text",
1523
+ "text": "B DETAILS ON THE EXPERIMENTAL SETUP ",
1524
+ "text_level": 1,
1525
+ "bbox": [
1526
+ 174,
1527
+ 549,
1528
+ 547,
1529
+ 565
1530
+ ],
1531
+ "page_idx": 10
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "B.1 SETUP ",
1536
+ "text_level": 1,
1537
+ "bbox": [
1538
+ 174,
1539
+ 582,
1540
+ 264,
1541
+ 597
1542
+ ],
1543
+ "page_idx": 10
1544
+ },
1545
+ {
1546
+ "type": "text",
1547
+ "text": "Datasets We use the MNIST dataset (LeCun et al., 1998), and hold-out 10000 examples randomly sampled from the training set for validation. We also use CIFAR10 (Krizhevsky et al., 2009), where the last 5000 examples of the training set are used for validation, and we apply standard data augmentation (random cropping and flipping, as in He et al. (2016b)) during training phases. For ImageNet (Deng et al., 2009), we follow the experimental setting of Goyal et al. (2017). ",
1548
+ "bbox": [
1549
+ 174,
1550
+ 608,
1551
+ 825,
1552
+ 679
1553
+ ],
1554
+ "page_idx": 10
1555
+ },
1556
+ {
1557
+ "type": "text",
1558
+ "text": "Network Architectures On MNIST, we use a MLP of dimensions 784-300-100-10, with Tanh activation functions. On CIFAR10, we use both: a VGG11 (Simonyan & Zisserman, 2014), equipped with ReLUs (Nair & Hinton, 2010), but no Batch Normalisation (Ioffe & Szegedy, 2015); and the PreActResNet18, which is the 18-layer pre-activation variant of residual networks (He et al., 2016b). MLP leverages Glorot & Bengio (2010) as initialization while the the weights of VGG11 and PreActResNet18 are initialized following He et al. (2015), and the biases are initialized to 0. On ImageNet (Deng et al., 2009), we use a ResNet-50 (He et al., 2016a) with Batch Normalization, and follow the initialization strategy described in (Goyal et al., 2017). ",
1559
+ "bbox": [
1560
+ 174,
1561
+ 695,
1562
+ 825,
1563
+ 808
1564
+ ],
1565
+ "page_idx": 10
1566
+ },
1567
+ {
1568
+ "type": "text",
1569
+ "text": "B.2 EXPERIMENTS ",
1570
+ "text_level": 1,
1571
+ "bbox": [
1572
+ 174,
1573
+ 827,
1574
+ 318,
1575
+ 842
1576
+ ],
1577
+ "page_idx": 10
1578
+ },
1579
+ {
1580
+ "type": "text",
1581
+ "text": "For the MNIST and CIFAR10 experiments, the network is first trained for a fixed number of epochs, using early stopping on the validation set to select the best performing network.The hyper-parameters used for training are selected via grid search (before even considering pruning). Then we prune a large fraction of the parameters. For OBD, LM and QM, we randomly select, at each iteration of pruning, 1000 examples (10 mini-batches) from the training set to compute the gradients and second order terms of the models.3 Finally, we retrain the network using exactly the same hyper-parameters as for the initial training. ",
1582
+ "bbox": [
1583
+ 174,
1584
+ 853,
1585
+ 825,
1586
+ 924
1587
+ ],
1588
+ "page_idx": 10
1589
+ },
1590
+ {
1591
+ "type": "text",
1592
+ "text": "",
1593
+ "bbox": [
1594
+ 173,
1595
+ 103,
1596
+ 823,
1597
+ 132
1598
+ ],
1599
+ "page_idx": 11
1600
+ },
1601
+ {
1602
+ "type": "text",
1603
+ "text": "For ImageNet, we uses the exact same hyper-parameters than Goyal et al. (2017). ",
1604
+ "bbox": [
1605
+ 176,
1606
+ 138,
1607
+ 707,
1608
+ 154
1609
+ ],
1610
+ "page_idx": 11
1611
+ },
1612
+ {
1613
+ "type": "text",
1614
+ "text": "MLP on MNIST We train the network for 400 epochs, using SGD with learning rate of 0.01, momentum factor of 0.9, l2 regularisation of 0.0005 and a mini-batch size of 100. We prune $9 8 . 8 5 \\%$ of the parameters. ",
1615
+ "bbox": [
1616
+ 174,
1617
+ 170,
1618
+ 826,
1619
+ 212
1620
+ ],
1621
+ "page_idx": 11
1622
+ },
1623
+ {
1624
+ "type": "text",
1625
+ "text": "VGG11 on CIFAR10 We train the network for 300 epoch, using SGD with a learning rate of 0.01, momentum factor of 0.9, a l2 regularisation of 0.0005 and a mini-batch size of 100. The learning rate is divided by 10 every 60 epochs. We prune $9 5 . 6 \\%$ of the parameters. ",
1626
+ "bbox": [
1627
+ 174,
1628
+ 229,
1629
+ 825,
1630
+ 272
1631
+ ],
1632
+ "page_idx": 11
1633
+ },
1634
+ {
1635
+ "type": "text",
1636
+ "text": "PreActResNet18 on CIFAR10 We train the network for 200 epochs, using SGD with a learning rate of 0.1, momentum factor of 0.9, a l2 regularisation of 0.0005 and a mini-batch size of 100. The learning rate is divided by 10 every 70 epochs. We prune $9 5 . 6 \\%$ of the parameters. ",
1637
+ "bbox": [
1638
+ 173,
1639
+ 290,
1640
+ 823,
1641
+ 333
1642
+ ],
1643
+ "page_idx": 11
1644
+ },
1645
+ {
1646
+ "type": "text",
1647
+ "text": "ResNet50 on ImageNet For ImageNet, we train a ResNet50 using 8 V100 GPUs. The total minibatch size is 256, and we train our baseline network for 90 epochs. The learning rate schedule is identical to Goyal et al. (2017): a linear warm-up in the first 5 epochs and decay by a factor of 10 at epochs 30, 60 and 80. We then prune $70 \\%$ of the parameters. After pruning, we fine-tune the models for 90 epochs using a learning rate of $1 e ^ { - 3 }$ . For LM, QM, OBD, we investigates the following hyper-parameter values: $\\pi \\in \\{ 1 , 1 0 0 \\}$ $\\vert \\} , \\lambda \\in \\{ 1 e ^ { - 3 } , 1 e ^ { - 1 } , 0 , 1 0 , \\}$ . 1600 examples are used to compute the first and second order terms of the linear and quadratic models. ",
1648
+ "bbox": [
1649
+ 173,
1650
+ 349,
1651
+ 825,
1652
+ 448
1653
+ ],
1654
+ "page_idx": 11
1655
+ },
1656
+ {
1657
+ "type": "text",
1658
+ "text": "C SUPPLEMENTARY RESULTS ",
1659
+ "text_level": 1,
1660
+ "bbox": [
1661
+ 176,
1662
+ 469,
1663
+ 436,
1664
+ 486
1665
+ ],
1666
+ "page_idx": 11
1667
+ },
1668
+ {
1669
+ "type": "text",
1670
+ "text": "C.1 PERFORMANCES BEFORE FINE-TUNING ",
1671
+ "text_level": 1,
1672
+ "bbox": [
1673
+ 176,
1674
+ 502,
1675
+ 490,
1676
+ 516
1677
+ ],
1678
+ "page_idx": 11
1679
+ },
1680
+ {
1681
+ "type": "text",
1682
+ "text": "Validation error Table Table 3 is the same as Table 1, but containing the best validation error gap before/after pruning instead of $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . We can observe a similar trend as in Table 1: LM and QM give better performances than MP, and OBD performs poorly, since the convergence assumption is not respected. ",
1683
+ "bbox": [
1684
+ 174,
1685
+ 529,
1686
+ 825,
1687
+ 585
1688
+ ],
1689
+ "page_idx": 11
1690
+ },
1691
+ {
1692
+ "type": "table",
1693
+ "img_path": "images/aa23e60b541c18335888a9148a8711966fbd7e7bfa42169faf6d5df6381a7220.jpg",
1694
+ "table_caption": [
1695
+ "Table 3: Best validation error gap before/after pruning for different networks and pruning criteria. "
1696
+ ],
1697
+ "table_footnote": [],
1698
+ "table_body": "<table><tr><td rowspan=\"3\">Network</td><td colspan=\"4\">Gap of Validation Error (%)</td></tr><tr><td>MP</td><td>OBD</td><td>LM</td><td>QM</td></tr><tr><td>MLP onMNIST</td><td>72.09 ± 3.72</td><td>64.89 ± 5.74</td><td>16.35 ± 0.77</td><td>15.22 ± 0.62</td></tr><tr><td>VGG11 on CIFAR10</td><td>56.19 ± 17.9</td><td>18.84 ± 5.54</td><td>5.89 ± 1.52</td><td>5.92 ± 2.14</td></tr><tr><td>PreActResNet18 on CIFAR10</td><td>74.13 ± 4.59</td><td>49.08 ± 8.18</td><td>26.79 ± 8.61</td><td>21.48 ± 5.96</td></tr></table>",
1699
+ "bbox": [
1700
+ 210,
1701
+ 626,
1702
+ 782,
1703
+ 713
1704
+ ],
1705
+ "page_idx": 11
1706
+ },
1707
+ {
1708
+ "type": "text",
1709
+ "text": "Linear pruning schedule Figure 5 contains the same experiments than Figure 5, but using the linear schedule instead of the exponential one. There is a drastic difference in performances: One need roughly $1 0 \\mathrm { x }$ more stages of pruning with the linear schedule to reach the training gap of the exponential schedule. ",
1710
+ "bbox": [
1711
+ 174,
1712
+ 739,
1713
+ 825,
1714
+ 795
1715
+ ],
1716
+ "page_idx": 11
1717
+ },
1718
+ {
1719
+ "type": "text",
1720
+ "text": "C.2 PERFORMANCES AFTER FINE-TUNING ",
1721
+ "text_level": 1,
1722
+ "bbox": [
1723
+ 178,
1724
+ 814,
1725
+ 480,
1726
+ 829
1727
+ ],
1728
+ "page_idx": 11
1729
+ },
1730
+ {
1731
+ "type": "text",
1732
+ "text": "Validation error figures Figures 8 and 7 contain the same experiments than Figure 5, but displaying the validation error gap, for linear and exponential schedules, respectively. For completeness, Figure 6 shows the validation error gap before fine-tuning. ",
1733
+ "bbox": [
1734
+ 176,
1735
+ 840,
1736
+ 823,
1737
+ 883
1738
+ ],
1739
+ "page_idx": 11
1740
+ },
1741
+ {
1742
+ "type": "image",
1743
+ "img_path": "images/dd1f1f7b5325949049111d7e45836b2a283a17299e5225a8cb7f075dab6f40af.jpg",
1744
+ "image_caption": [
1745
+ "Figure 5: Same as Figure 1, but using equally spaced pruning steps. Note the difference in number of pruning iterations. "
1746
+ ],
1747
+ "image_footnote": [],
1748
+ "bbox": [
1749
+ 179,
1750
+ 99,
1751
+ 813,
1752
+ 415
1753
+ ],
1754
+ "page_idx": 12
1755
+ },
1756
+ {
1757
+ "type": "image",
1758
+ "img_path": "images/60d1145cd1186e1188db38a441ce3ead99513dc4e0ea6e0c0f21302e1b11bfe3.jpg",
1759
+ "image_caption": [
1760
+ "Figure 6: Same as Figure 1, but displaying the validation error gap before fine-tuning. With proper number of pruning stages and step size regularization, LM and QM can produce pruned networks that are drastically better than the ones pruned using MP. "
1761
+ ],
1762
+ "image_footnote": [],
1763
+ "bbox": [
1764
+ 181,
1765
+ 473,
1766
+ 815,
1767
+ 784
1768
+ ],
1769
+ "page_idx": 12
1770
+ },
1771
+ {
1772
+ "type": "text",
1773
+ "text": "Validation gap before and after fine-tuning Figure 9 is the same as Figure 3, but showing the validation error gap after fine-tuning as a function of the validation error gap before fine-tuning. As for Figure 3, we do not observe much correlation between the validation error before and after the fine-tuning. ",
1774
+ "bbox": [
1775
+ 174,
1776
+ 867,
1777
+ 825,
1778
+ 924
1779
+ ],
1780
+ "page_idx": 12
1781
+ },
1782
+ {
1783
+ "type": "image",
1784
+ "img_path": "images/075ba47289a1ec7a6392525f55659407c125aa462ef8c4059d583bc32a7a6aa1.jpg",
1785
+ "image_caption": [
1786
+ "Figure 7: Same as Figure 1, but displaying the validation error gap after fine-tuning. "
1787
+ ],
1788
+ "image_footnote": [],
1789
+ "bbox": [
1790
+ 183,
1791
+ 102,
1792
+ 815,
1793
+ 405
1794
+ ],
1795
+ "page_idx": 13
1796
+ },
1797
+ {
1798
+ "type": "image",
1799
+ "img_path": "images/37756eb69c89faa24949b2b122ee0e75c3705f83434e6381bb2749667f68d539.jpg",
1800
+ "image_caption": [
1801
+ "Figure 8: Same as Figure 7, but using equally spaced pruning steps. Note the difference in number of pruning stages. "
1802
+ ],
1803
+ "image_footnote": [],
1804
+ "bbox": [
1805
+ 183,
1806
+ 446,
1807
+ 815,
1808
+ 750
1809
+ ],
1810
+ "page_idx": 13
1811
+ },
1812
+ {
1813
+ "type": "text",
1814
+ "text": "Training loss after fine-tuning Figure 10 is the same as Figure 3 but showing $\\mathcal { L } ( \\pmb { \\theta } _ { } ( \\mathbf { \\cdot } ) \\mathbf { m } )$ after finetuning as a function of $\\Delta \\mathcal { L } ( \\theta , \\Delta \\theta )$ . It has a similar trend as Figure 3: there is not much correlation between the loss before and after fine-tuning, except on MNIST. ",
1815
+ "bbox": [
1816
+ 174,
1817
+ 819,
1818
+ 826,
1819
+ 862
1820
+ ],
1821
+ "page_idx": 13
1822
+ },
1823
+ {
1824
+ "type": "text",
1825
+ "text": "Different sparsity levels Figure 11 shows the performances of different criteria on VGG11 on CIFAR10, for different sparsity levels. When the sparsity is low $( 8 9 . 3 \\% )$ , the network has enough capacity to return to its original performances after fine-tuning. When the sparsity is too high $( 9 8 . 6 \\% )$ , then all criteria produce networks with random predictions. There might be a sweet spot in between, but one would require more powerful model to verify this supposition. ",
1826
+ "bbox": [
1827
+ 174,
1828
+ 881,
1829
+ 825,
1830
+ 924
1831
+ ],
1832
+ "page_idx": 13
1833
+ },
1834
+ {
1835
+ "type": "image",
1836
+ "img_path": "images/b0a7e9a8f65d3ed9ac115b813b349afa2bb26854c8af252070869684e668a21b.jpg",
1837
+ "image_caption": [
1838
+ "Figure 9: Same as Figure 3, but showing the validation error gap after fine-tuning as a function of the validation error gap before fine-tuning. Networks with drastically different performance before fine-tuning can still produce similar performances after fine-tuning. "
1839
+ ],
1840
+ "image_footnote": [],
1841
+ "bbox": [
1842
+ 184,
1843
+ 101,
1844
+ 812,
1845
+ 273
1846
+ ],
1847
+ "page_idx": 14
1848
+ },
1849
+ {
1850
+ "type": "image",
1851
+ "img_path": "images/74bdb68f366c7d70a16232e28f02b397952f1de891d3f7dea858dc261a9db705.jpg",
1852
+ "image_caption": [
1853
+ "Figure 10: Same as Figure 3, but showing $\\mathcal { L } ( \\pmb { \\theta } \\odot \\mathbf { m } )$ after fine-tuning as a function of $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . Except for the MLP on MNIST, there is only a weak correlation between $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ and $\\mathcal { L } ( \\pmb { \\theta } \\odot \\mathbf { m } )$ after fine-tuning. "
1854
+ ],
1855
+ "image_footnote": [],
1856
+ "bbox": [
1857
+ 178,
1858
+ 343,
1859
+ 816,
1860
+ 516
1861
+ ],
1862
+ "page_idx": 14
1863
+ },
1864
+ {
1865
+ "type": "text",
1866
+ "text": "",
1867
+ "bbox": [
1868
+ 173,
1869
+ 599,
1870
+ 825,
1871
+ 628
1872
+ ],
1873
+ "page_idx": 14
1874
+ },
1875
+ {
1876
+ "type": "image",
1877
+ "img_path": "images/dcb61fd6831e77417f4cc1a85735599f9a4eb3667d5ea86570f52af4de978f02.jpg",
1878
+ "image_caption": [
1879
+ "Figure 11: Same as Figure 3, but for different sparsity levels on the VGG11 on CIFAR10. When the sparsity is low, the network has enough capacity to return to its original performances after fine-tuning. When the sparsity is too high, then all criteria produce networks with random predictions. "
1880
+ ],
1881
+ "image_footnote": [],
1882
+ "bbox": [
1883
+ 191,
1884
+ 641,
1885
+ 807,
1886
+ 814
1887
+ ],
1888
+ "page_idx": 14
1889
+ },
1890
+ {
1891
+ "type": "text",
1892
+ "text": "Hyper-parameters optimisation Figure 13 shows the impact of hyper-parameter optimization for the fine-tuning phase. We performed a grid search with three different learning rate (0.1, 0.01, 0.03) ",
1893
+ "bbox": [
1894
+ 173,
1895
+ 895,
1896
+ 825,
1897
+ 924
1898
+ ],
1899
+ "page_idx": 14
1900
+ },
1901
+ {
1902
+ "type": "image",
1903
+ "img_path": "images/230893cc41dd29f62b5b36abeac3ddc171d17c79ab303bd071ce2f41641f476e.jpg",
1904
+ "image_caption": [
1905
+ "Figure 12: Same as Figure 11 (left), but zoomed on smaller values of $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ "
1906
+ ],
1907
+ "image_footnote": [],
1908
+ "bbox": [
1909
+ 393,
1910
+ 99,
1911
+ 602,
1912
+ 272
1913
+ ],
1914
+ "page_idx": 15
1915
+ },
1916
+ {
1917
+ "type": "text",
1918
+ "text": "and three different l2-regularisation (0, 5e-4, 5e-5). All 9 sets of hyper-parameters were tested on LM, QM and MP on 5 different random seeds. In this set of experiments, we used $\\lambda \\in \\{ 0 , 0 . 0 1 , 0 . 1 , 1 \\}$ and $\\pi \\in \\{ 1 4 , 1 4 0 \\}$ . Optimizing hyper-parameters for fine-tuning can lead to better performance after fine-tuning, but does not increases the correlation between the performances after fine-tuning and $\\Delta \\mathcal { L } ( \\theta , \\Delta \\bar { \\theta } )$ . The lack of correlation can thus not be explained by bad fine-tuning hyper-parameters. ",
1919
+ "bbox": [
1920
+ 173,
1921
+ 335,
1922
+ 825,
1923
+ 405
1924
+ ],
1925
+ "page_idx": 15
1926
+ },
1927
+ {
1928
+ "type": "image",
1929
+ "img_path": "images/91b97b65a962e6f1d9aa115580c31954005cc1508a0275375b790df6a6d9ebe8.jpg",
1930
+ "image_caption": [
1931
+ "Figure 13: Left: Using the same hyper-parameters for fine-tuning as the ones of the original training. Right: Performing hyper-parameters optimisation for the fine-tuning. This figure shows that optimizing the hyper-parameters for fine-tuning can improve the performances of the network after pruning. However, it reduces the correlation between the performances after fine-tuning and $\\Delta \\mathcal { L } ( \\bar { \\theta } , \\Delta \\theta )$ . The lack of correlation can thus not be explained by poor fine-tuning hyper-parameters. "
1932
+ ],
1933
+ "image_footnote": [],
1934
+ "bbox": [
1935
+ 289,
1936
+ 424,
1937
+ 705,
1938
+ 592
1939
+ ],
1940
+ "page_idx": 15
1941
+ },
1942
+ {
1943
+ "type": "image",
1944
+ "img_path": "images/9dac7633e26af92b2d725d7f2ee684f8b6f8c38e69ab099b7fd07e1185c56236.jpg",
1945
+ "image_caption": [
1946
+ "Figure 14: Same as Figure 3, but zooming on the best performing networks in terms of $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ "
1947
+ ],
1948
+ "image_footnote": [],
1949
+ "bbox": [
1950
+ 178,
1951
+ 709,
1952
+ 813,
1953
+ 877
1954
+ ],
1955
+ "page_idx": 15
1956
+ },
1957
+ {
1958
+ "type": "text",
1959
+ "text": "C.3 FINE-TUNING CURVES ",
1960
+ "text_level": 1,
1961
+ "bbox": [
1962
+ 174,
1963
+ 103,
1964
+ 374,
1965
+ 117
1966
+ ],
1967
+ "page_idx": 16
1968
+ },
1969
+ {
1970
+ "type": "text",
1971
+ "text": "To investigate whether one of the networks is suffering from optimization issues during fine-tuning, we show in Figure 15 the fine-tuning curves of networks pruned using MP and our best QM criteria. We observe that, except for MNIST, the difference in training loss right after pruning disappears after only one epoch of fine-tuning, erasing the advantage of QM over MP. ",
1972
+ "bbox": [
1973
+ 173,
1974
+ 128,
1975
+ 826,
1976
+ 185
1977
+ ],
1978
+ "page_idx": 16
1979
+ },
1980
+ {
1981
+ "type": "image",
1982
+ "img_path": "images/bf37ca11bc53a699a1ecfd28de8866539613d0862438937feb3168b1b9f9ed21.jpg",
1983
+ "image_caption": [
1984
+ "Figure 15: Fine-tuning losses (dotted is training, solid is validation) of networks pruned using MP and QM criteria. All the curves are the average over the 5 seeds. We do not show the standard deviation for clarity. Left: MLP, middle: VGG11 and right: PreActResNet18. Except for MNIST, the difference in loss right after pruning (i.e. at epoch 0) disappears after one epoch of fine-tuning. "
1985
+ ],
1986
+ "image_footnote": [],
1987
+ "bbox": [
1988
+ 183,
1989
+ 199,
1990
+ 815,
1991
+ 275
1992
+ ],
1993
+ "page_idx": 16
1994
+ },
1995
+ {
1996
+ "type": "text",
1997
+ "text": "C.4 RESULTS USING GRASP AND SYNFLOW ",
1998
+ "text_level": 1,
1999
+ "bbox": [
2000
+ 176,
2001
+ 368,
2002
+ 493,
2003
+ 382
2004
+ ],
2005
+ "page_idx": 16
2006
+ },
2007
+ {
2008
+ "type": "text",
2009
+ "text": "We compare our results with two additional pruning methods that focus on preserving the flow of the gradient in the network instead of preserving the loss: GraSP (Wang et al., 2020), a datadependant method, and SynFlow (Tanaka et al., 2020), a data-agnostic one. Both methods were design to be applied at initialisation, so we investigate here their use on trained networks. We use $\\pi \\in { \\bar { \\{ 1 , 1 0 0 , 1 0 0 0 \\} } }$ , and added our proposed step size constraint $\\lambda$ to the pruning criteria as well. ",
2010
+ "bbox": [
2011
+ 173,
2012
+ 393,
2013
+ 825,
2014
+ 465
2015
+ ],
2016
+ "page_idx": 16
2017
+ },
2018
+ {
2019
+ "type": "text",
2020
+ "text": "Figure 16 shows the scatter plot of the preservation of the loss vs the performance after fine-tuning. Similarly to what we observed before, there is no clear evidence that better preserving the loss lead to better performance after fine-tuning. ",
2021
+ "bbox": [
2022
+ 174,
2023
+ 472,
2024
+ 826,
2025
+ 513
2026
+ ],
2027
+ "page_idx": 16
2028
+ },
2029
+ {
2030
+ "type": "image",
2031
+ "img_path": "images/9ded736cc7a921570fc4349a32c14093f959c94ad5c240e45efa726fcdf9888c.jpg",
2032
+ "image_caption": [
2033
+ "Figure 16: Same as Figure 3 showing GraSP and SynFlow on VGG11 (left) and the PreActResnet18 (right). This Figure shows that one can observe a large $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ and yet obtain very good performance after fine-tuning. This is especially true in the case of GraSP for VGG11. Furthermore, we can observe similar behaviour on PreActResNet18 where two different methods can lead to similar performance after fine-tuning while having completely different $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ : GraSP with $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\hat { \\Delta } \\pmb { \\theta } ) \\approx 1 0 ^ { 8 }$ has fine-tuning performance similar to MP with $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } ) < 1 0 ^ { 1 }$ . "
2034
+ ],
2035
+ "image_footnote": [],
2036
+ "bbox": [
2037
+ 289,
2038
+ 529,
2039
+ 707,
2040
+ 700
2041
+ ],
2042
+ "page_idx": 16
2043
+ },
2044
+ {
2045
+ "type": "text",
2046
+ "text": "C.5 RESULTS ON IMAGENET ",
2047
+ "text_level": 1,
2048
+ "bbox": [
2049
+ 174,
2050
+ 823,
2051
+ 387,
2052
+ 837
2053
+ ],
2054
+ "page_idx": 16
2055
+ },
2056
+ {
2057
+ "type": "text",
2058
+ "text": "Figure 17 is the same as Figure 4, but with $90 \\%$ sparsity. At that sparsity level, the validation accuracy right after pruning is close to random for all the pruning criteria. There is however quite a big variation in performances after fine-tuning: at equal performance before fine-tuning, some models achieve $70 \\%$ validation accuracy after fine-tuning, while others only reach $60 \\%$ . ",
2059
+ "bbox": [
2060
+ 173,
2061
+ 848,
2062
+ 825,
2063
+ 905
2064
+ ],
2065
+ "page_idx": 16
2066
+ },
2067
+ {
2068
+ "type": "image",
2069
+ "img_path": "images/ad0a9bac4f7b2a7dd40f0d69884b2157159b58621055d9d4d67640e9c0d75566.jpg",
2070
+ "image_caption": [
2071
+ "Figure 17: Same as Figure 4, but with $90 \\%$ sparsity. Increasing the number of pruning stages and constraining the step size reduce $\\Delta \\mathcal { L } ( \\pmb { \\theta } , \\Delta \\pmb { \\theta } )$ . However, the best-loss preserving criteria, which maximize the validation accuracy right after pruning, do not produce better networks after fine-tuning. "
2072
+ ],
2073
+ "image_footnote": [],
2074
+ "bbox": [
2075
+ 179,
2076
+ 397,
2077
+ 813,
2078
+ 568
2079
+ ],
2080
+ "page_idx": 17
2081
+ }
2082
+ ]
parse/train/jpm1AfJucwt/jpm1AfJucwt_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jpm1AfJucwt/jpm1AfJucwt_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/wta_8Hx2KD/wta_8Hx2KD.md ADDED
@@ -0,0 +1,617 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # INCORPORATING SYMMETRY INTO DEEP DYNAMICS MODELS FOR IMPROVED GENERALIZATION
2
+
3
+ Rui Wang ∗
4
+ Computer Science and Engineering
5
+ University of California
6
+ San Diego, CA 92093
7
+ ruw020@ucsd.edu
8
+ Robin Walters \*
9
+ Khoury College of Computer Science
10
+ Northeastern University
11
+ Boston, MA 02115
12
+ r.walters@northeastern.edu
13
+
14
+ # Rose Yu
15
+
16
+ Computer Science and Engineering
17
+ University of California
18
+ San Diego, CA 92093
19
+ roseyu@ucsd.edu
20
+
21
+ # ABSTRACT
22
+
23
+ Recent work has shown deep learning can accelerate the prediction of physical dynamics relative to numerical solvers. However, limited physical accuracy and an inability to generalize under distributional shift limits its applicability to the real world. We propose to improve accuracy and generalization by incorporating symmetries into convolutional neural networks. Specifically, we employ a variety of methods each tailored to enforce a different symmetry. Our models are both theoretically and experimentally robust to distributional shift by symmetry group transformations and enjoy favorable sample complexity. We demonstrate the advantage of our approach on a variety of physical dynamics including Rayleigh–Bénard convection and real-world ocean currents and temperatures. Compared with image or text applications, our work is a significant step towards applying equivariant neural networks to high-dimensional systems with complex dynamics. We open-source our simulation, data and code at https://github.com/Rose-STL-Lab/Equivariant-Net.
24
+
25
+ # 1 INTRODUCTION
26
+
27
+ Modeling dynamical systems in order to forecast the future is of critical importance in a wide range of fields including, e.g., fluid dynamics, epidemiology, economics, and neuroscience [2; 21; 45; 22; 14]. Many dynamical systems are described by systems of non-linear differential equations that are difficult to simulate numerically. Accurate numerical computation thus requires long run times and manual engineering in each application.
28
+
29
+ Recently, there has been much work applying deep learning to accelerate solving differential equations [46; 6]. However, current approaches struggle with generalization. The underlying problem is that physical data has no canonical frame of reference to use for data normalization. For example, it is not clear how to rotate samples of fluid flow such that they share a common orientation. Thus real-world out-of-distribution test data is difficult to align with training data. Another limitation of current approaches is low physical accuracy. Even when mean error is low, errors are often spatially correlated, producing a different energy distribution from the ground truth.
30
+
31
+ We propose to improve the generalization and physical accuracy of deep learning models for physical dynamics by incorporating symmetries into the forecasting model. In physics, Noether’s Law gives a correspondence between conserved quantities and groups of symmetries. By building a neural network which inherently respects a given symmetry, we thus make conservation of the associated quantity more likely and consequently the model’s prediction more physically accurate.
32
+
33
+ A function $f$ is equivariant if when its input $x$ is transformed by a symmetry group $g$ , the output is transformed by the same symmetry,
34
+
35
+ $$
36
+ f ( g \cdot x ) = g \cdot f ( x ) .
37
+ $$
38
+
39
+ See Figure 1 for an illustration. In the setting of forecasting, $f$ approximates the underlying dynamical system. The set of valid transformations $g$ is called the symmetry group of the system.
40
+
41
+ By designing a model that is inherently equivariant to transformations of its input, we can guarantee that our model generalizes automatically across these transformations, making it robust to distributional shift. The symmetries we consider, translation, rotation, uniform motion, and scale, have different properties, and thus we tailor our methods for incorporating each symmetry.
42
+
43
+ Specifically, for scale equivariance, we replace the convolution operation with group correlation over the group $G$ generated by translations and rescalings. Our method builds on that of Worrall and Welling [51], with significant novel adaptations to the physics domain: scaling affecting time, space, and magnitude; both up and down scaling; and scaling by any real number. For rotational symmetries, we leverage the key insight of Cohen and Welling [9] that the input, output, and hidden layers of the network are all acted upon by the symmetry group and thus should be treated as representations of the symmetry group. Our rotation-equivariant model is built using the flexible E(2)-CNN framework developed by Weiler and Cesa [49]. In the case of a uniform motion, or Galilean transformation, we show the above methods are too constrained. We use the simple but effective technique of convolutions conjugated by averaging operations.
44
+
45
+ ![](images/1af7544c555ead237ffcc66706457aed2e2e32544976706cd4068279c41784c3.jpg)
46
+ Figure 1: Illustration of equivariance of e.g. $f ( { \bar { x } } ) = 2 x$ with respect to ${ \overline { { T } } } = \operatorname { r o t } ( \pi / 4 )$ .
47
+
48
+ Research into equivariant neural networks has mostly been applied to tasks such as image classification and segmentation [27; 50; 49]. In contrast, we design equivariant networks in a completely different context, that of a time series representing a physical process. Forecasting high-dimensional turbulence is a significant step for equivariant neural networks compared to the low-dimensional physics examples and computer vision problems treated in other works.
49
+
50
+ We test on a simulated turbulent convection dataset and on real-world ocean current and temperature data. Ocean currents are difficult to predict using numerical methods due to unknown external forces and complex dynamics not fully captured by simplified mathematical models. These domains are chosen as examples, but since the symmetries we focus on are pervasive in almost all physics problems, we expect our techniques will be widely applicable. Our contributions include:
51
+
52
+ • We study the problem of improving the generalization capability and physical accuracy of deep learning models for learning complex physical dynamics such as turbulence and ocean currents. • We design tailored methods with theoretical guarantees to incorporate various symmetries, including uniform motion, rotation, and scaling, into convolutional neural networks. • When evaluated on turbulent convection and ocean current prediction, our models achieve significant improvement on generalization of both predictions and physical consistency. • For different symmetries, our methods have an average $3 1 \%$ and maximum $7 8 \%$ reduction in energy error when evaluated on turbulent convection with no distributional shift.
53
+
54
+ # 2 MATHEMATICAL PRELIMINARIES
55
+
56
+ # 2.1 SYMMETRY GROUPS AND EQUIVARIANT FUNCTIONS
57
+
58
+ Formal discussion of symmetry relies on the concept of an abstract symmetry group. We give a brief overview, for a more formal treatment see Appendix A, or Lang [28].
59
+
60
+ A group of symmetries or simply group consists of a set $G$ together with a composition map $\circ \colon G \times G \to G$ . The composition map is required to be associative and have an identity $1 \in G$ . Most importantly, composition with any element of $G$ is required to be invertible.
61
+
62
+ Groups are abstract objects, but they become concrete when we let them act. A group $G$ has an action on a set $S$ if there is an action map · $\colon G \times S S$ which is compatible with the composition law. We say further that $S$ is a $G$ -representation if the set $S$ is a vector space and the group acts on $S$ by linear transformations.
63
+
64
+ Definition 1 (invariant, equivariant). Let $f \colon X \to Y$ be a function and $G$ be a group. Assume $G$ acts on $X$ and $Y$ . The function $f$ is $G$ -equivariant if $f ( g x ) = g f ( x )$ for all $x \in X$ and $g \in G$ . The function $f$ is $G$ -invariant if $f ( g x ) = f ( x )$ for all $x \in X$ and $g \in G$ .
65
+
66
+ # 2.2 PHYSICAL DYNAMICAL SYSTEMS
67
+
68
+ We investigate two dynamical systems: Rayleigh–Bénard convection and real-world ocean current and temperature. These systems are governed by Navier-Stokes equations.
69
+
70
+ 2D Navier-Stokes (NS) Equations. Let ${ \pmb w } ( { \pmb x } , t )$ be the velocity vector field of a flow. The field $\pmb { w }$ has two components $( u , v )$ , velocities along the $x$ and $y$ directions. The governing equations for this physical system are the momentum equation, continuity equation, and temperature equation,
71
+
72
+ $$
73
+ \frac { \partial w } { \partial t } = - ( { \pmb w } \cdot { \nabla } ) { \pmb w } - \frac { 1 } { \rho _ { 0 } } \nabla p + \nu \nabla ^ { 2 } { \pmb w } + { \pmb f } ; \quad \nabla \cdot { \pmb w } = 0 ; \quad \frac { \partial H } { \partial t } = \kappa \Delta H - ( { \pmb w } \cdot { \nabla } ) H , ~ ( { \mathcal D } _ { \mathrm { N S } } )
74
+ $$
75
+
76
+ where $H ( { \pmb x } , t )$ is temperature, $p$ is pressure, $\kappa$ is the heat conductivity, $\rho _ { 0 }$ is initial density, $\alpha$ is the coefficient of thermal expansion, $\nu$ is the kinematic viscosity, and $f$ is the buoyant force.
77
+
78
+ # 2.3 SYMMETRIES OF DIFFERENTIAL EQUATIONS
79
+
80
+ By classifying the symmetries of a system of differential equations, the task of finding solutions is made far simpler, since the space of solutions will exhibit those same symmetries. Let $G$ be a group equipped with an action on 2-dimensional space $X = \mathbb { R } ^ { 2 }$ and 3-dimensional spacetime $\hat { X } = \mathbb { R } ^ { 3 }$ . Let $V = \mathbb { R } ^ { d }$ be a $G$ -representation. Denote the set of all $V$ -fields on $\hat { X }$ as ${ \hat { \mathcal { F } } } _ { V } = \{ \pmb { w } : { \hat { X } } V :$ $\pmb { w }$ smooth}. Define $\mathcal { F } _ { V }$ similarly to be $V$ -fields on $X$ . Then $G$ has an induced action on $\hat { \mathcal { F } } _ { V }$ by $( g w ) ( x , t ) \bar { } = g ( \pmb { w } ( g ^ { - 1 } x , g ^ { - 1 } t ) )$ and on $\mathcal { F } _ { V }$ analogously.
81
+
82
+ Consider a system of differential operators $\mathcal { D }$ acting on $\hat { \mathcal { F } } _ { V }$ . Denote the set of solutions $\operatorname { S o l } ( { \mathcal { D } } ) \subseteq { \hat { \mathcal { F } } } _ { V }$ . We say $G$ is a symmetry group of $\mathcal { D }$ if $G$ preserves $\operatorname { S o l } ( \mathcal { D } )$ . That is, if $\varphi$ is a solution of $\mathcal { D }$ , then for all $g \in G , g ( \varphi )$ is also. In order to forecast the evolution of a system $\mathcal { D }$ , we model the forward prediction function $f$ . Let $\pmb { w } \in \mathrm { S o l } ( \mathcal { D } )$ . The input to $f$ is a collection of $k$ snapshots at times $t - k , \dots , t - 1$ denoted ${ \pmb w } _ { t - i } \in \mathcal { F } _ { d }$ . The prediction function $f \colon \mathcal { F } _ { d } ^ { k } \to \mathcal { F } _ { d }$ is defined $f ( \pmb { w } _ { t - k } , \dots , \pmb { w } _ { t - 1 } ) = \pmb { w } _ { t }$ . It predicts the solution at a time $t$ based on the solution in the past. Let $G$ be a symmetry group of $\mathcal { D }$ . Then for $g \in G$ , $g ( w )$ is also a solution of $\mathcal { D }$ . Thus $f ( g \pmb { w } _ { t - k } , . . . , g \pmb { w } _ { t - 1 } ) = g \pmb { w } _ { t }$ . Consequently, $f$ is $G$ -equivariant.
83
+
84
+ # 2.4 SYMMETRIES OF NAVIER-STOKES EQUATIONS
85
+
86
+ The Navier-Stokes equations are invariant under the following five different transformations. Individually each of these types of transformations generates a group of symmetries of the system. The full list of symmetry groups of NS equations and Heat equations are shown in Appendix B.6.
87
+
88
+ • Space translation: $T _ { c } ^ { \mathrm { s p } } \pmb { w } ( \pmb { x } , t ) = \pmb { w } ( \pmb { x } - \pmb { c } , t ) , \pmb { c } \in \mathbb { R } ^ { 2 } ,$ • Time translation: $T _ { \tau } ^ { \mathrm { t i m e } } { \pmb w } ( { \pmb x } , t ) = { \pmb w } ( { \pmb x } , t - \tau ) , \tau \in$ R , • Uniform motion: $T _ { c } ^ { \mathrm { u m } } \pmb { w } ( \pmb { x } , t ) = \pmb { w } ( \pmb { x } , t ) + c , \pmb { c } \in \mathbb { R } ^ { 2 }$ • Rotation/Reflection: $\begin{array} { r } { T _ { R } ^ { \mathrm { r o t } } { \pmb w } ( { \pmb x } , t ) = R { \pmb w } ( R ^ { - 1 } { \pmb x } , t ) , R \in O ( 2 ) , } \end{array}$ • Scaling: $T _ { \lambda } ^ { s c } { \pmb w } ( { \pmb x } , t ) = \lambda { \pmb w } ( \lambda { \pmb x } , \lambda ^ { 2 } t ) , \lambda \in \mathbb { R } _ { > 0 }$ .
89
+
90
+ # 3 METHODOLOGY
91
+
92
+ We prescribe equivariance by training within function classes containing only equivariant functions. Our models can thus be theoretically guaranteed to be equivariant up to discretization error. We incorporate equivariance into two state-of-the-art architectures for dynamics prediction, ResNet and U-net [48]. Below, we describe how we modify the convolution operation in these models for different symmetries $G$ to form four EquG-ResNet and four EquG-Unet models.
93
+
94
+ # 3.1 EQUIVARIANT NETWORKS
95
+
96
+ The key to building equivariant networks is that the composition of equivariant functions is equivariant. Hence, if the maps between layers of a neural network are equivariant, then the whole network will be equivariant. Note that both the linear maps and activation functions must be equivariant. An important consequence of this principle is that the hidden layers must also carry a $G$ -action. Thus, the hidden layers are not collections of scalar channels, but vector-valued $G$ -representations.
97
+
98
+ Equivariant Convolutions. Consider a convolutional layer $\mathcal { F } _ { \mathbb { R } ^ { d _ { \mathrm { i n } } } } \mathcal { F } _ { \mathbb { R } ^ { d _ { \mathrm { o u t } } } }$ with kernel $K$ from a $\mathbb { R } ^ { \bar { d } _ { \mathrm { i n } } }$ -field to a $\mathbb { R } ^ { d _ { \mathrm { o u t } } }$ -field. Let $\mathbb { R } ^ { d _ { \mathrm { i n } } }$ and $\mathbb { R } ^ { d _ { \mathrm { o u t } } }$ be $G$ -representations with action maps $\rho _ { \mathrm { i n } }$ and $\rho _ { \mathrm { o u t } }$ respectively. Cohen et al. [11, Theorem 3.3] prove the network is $G$ -equivariant if and only if
99
+
100
+ $$
101
+ K ( g v ) = \rho _ { \mathrm { o u t } } ^ { - 1 } ( g ) K ( v ) \rho _ { \mathrm { i n } } ( g ) \qquad { \mathrm { f o r ~ a l l ~ } } g \in G .
102
+ $$
103
+
104
+ A network composed of such equivariant convolutions is called a steerable CNN.
105
+
106
+ Equivariant ResNet and U-net. Equivariant ResNet architectures appear in [9; 10], and equivariant transposed convolution, a feature of U-net, is implemented in [49]. We prove in general that adding skip connections to a network does not affect its equivariance with respect to linear actions and also give a condition for ResNet or Unet to be equivariant in Appendix B.2.
107
+
108
+ Relation to Data Augmentation. To improve generalization, equivariant networks offer a better performing alternative to the popular technique of data augmentation [13]. Large symmetry groups normally require augmentation with many transformed examples. In contrast, for equivariant models, we have following proposition. (See Appendix B.1 for proof.)
109
+
110
+ Proposition 1. $G$ -equivariant models with equivariant loss learn equally (up to sample weight) from any transformation $g ( s )$ of a sample s. Thus data augmentation does not help during training.
111
+
112
+ # 3.2 TIME AND SPACE TRANSLATION EQUIVARIANCE
113
+
114
+ CNNs are time translation-equivariant as long as we predict in an autoregressive manner. Convolutional layers are also naturally space translation-equivariant (if cropping is ignored). Any activation function which acts identically pixel-by-pixel is equivariant.
115
+
116
+ # 3.3 ROTATIONAL EQUIVARIANCE
117
+
118
+ To incorporate rotational symmetry, we model $f$ using $\mathrm { S O } ( 2 )$ -equivariant convolutions and activations within the E(2)-CNN framework of Weiler and Cesa [49]. In practice, we use the cyclic group $G = C _ { n }$ instead of $G = \mathrm { S O ( 2 ) }$ as for large enough $n$ the difference is practically indistinguishable due to space discretization. We use powers of the regular representation $\rho = \mathbb { R } [ C _ { n } ] ^ { m }$ for hidden layers. The representation $\mathbb { R } [ C _ { n } ]$ has basis given by elements of $C _ { n }$ and $C _ { n }$ -action by permutation matrices. It has good descriptivity since it contains all irreducible representations of $C _ { n }$ , and it is compatible with any activation function applied channel-wise.
119
+
120
+ # 3.4 UNIFORM MOTION EQUIVARIANCE
121
+
122
+ Uniform motion is part of Galilean invariance and is relevant to all non-relativistic physics modeling. For a vector field $\dot { \boldsymbol X } : \mathbb R ^ { 2 } \to \mathbb R ^ { 2 }$ and vector $c \in \mathbb { R } ^ { 2 }$ , uniform motion transformation is adding a constant vector field to the vector field $X ( v )$ , $T _ { c } ^ { \mathrm { u m } } ( X ) ( v ) = X ( v ) + c , c \in \mathbb { R } ^ { 2 }$ . By the following corollary, proved in Appendix B.3, enforcing uniform motion equivariance as above by requiring all layers of the CNN to be equivariant severely limits the model.
123
+
124
+ Corollary 2. If $f$ is a CNN alternating between convolutions $f _ { i }$ and channel-wise activations $\sigma _ { i }$ and the combined layers $\sigma _ { i } \circ f _ { i }$ are uniform motion equivariant, then $f$ is affine.
125
+
126
+ To overcome this limitation, we relax the requirement by conjugating the model with shifted input distribution. For each sliding local block in each convolutional layer, we shift the mean of input tensor to zero and shift the output back after convolution and activation function per sample. In other words, if the input is $\mathcal { P } _ { b \times d _ { i n } \times s \times s }$ and the output is $\pmb { \mathcal { Q } } _ { b \times d _ { o u t } } = \sigma ( \pmb { \mathcal { P } } \cdot \boldsymbol { K } )$ for one sliding local block, where $b$ is batch size, $d$ is number of channels, $s$ is the kernel size, and $K$ is the kernel, then
127
+
128
+ $$
129
+ \mu _ { i } = \operatorname { M e a n } _ { j k l } \left( \mathcal { P } _ { i j k l } \right) ; \quad \mathcal { P } _ { i j k l } \mapsto \mathcal { P } _ { i j k l } - \mu _ { i } ; \quad \mathcal { Q } _ { i j } \mapsto \mathcal { Q } _ { i j } + \mu _ { i } .
130
+ $$
131
+
132
+ This will allow the convolution layer to be equivariant with respect to uniform motion. If the input is a vector field, we apply this operation to each element.
133
+
134
+ Proposition 3. A residual block $f ( { \pmb x } ) + { \pmb x }$ is uniform motion equivariant if the residual connection $f$ is uniform motion invariant.
135
+
136
+ By the proposition 3 above that is proved in Appendix B.3, within ResNet, residual mappings should be invariant, not equivariant, to uniform motion. That is, the skip connection $f ^ { ( i , i + 2 ) } = I$ is equivariant and the residual function $f ^ { ( i , i + 1 ) }$ should be invariant. Hence, for the first layer in each residual block, we omit adding the mean back to the output $\mathcal { Q } _ { i j }$ . In the case of Unet, when upscaling, we pad with the mean to preserve the overall mean.
137
+
138
+ # 3.5 SCALE EQUIVARIANCE
139
+
140
+ Scale equivariance in dynamics is unique as the physical law dictates the scaling of magnitude, space and time simultaneously. This is very different from scaling in images regarding resolutions [51]. For example, the Navier-Stokes equations are preserved under a specific scaling ratio of time, space, and velocity given by the transformation
141
+
142
+ $$
143
+ T _ { \lambda } \colon \pmb { w } ( \pmb { x } , t ) \mapsto \lambda \pmb { w } ( \lambda \pmb { x } , \lambda ^ { 2 } t ) ,
144
+ $$
145
+
146
+ where $\lambda \in \mathbb { R } _ { > 0 }$ . We implement two different approaches for scale equivariance, depending on whether we tie the physical scale with the resolution of the data.
147
+
148
+ Resolution Independent Scaling. We fix the resolution and scale the magnitude of the input by varying the discretization step size. An input $w \in \mathcal { F } _ { \mathbb { R } ^ { 2 } } ^ { k }$ with step size $\Delta _ { x } ( w )$ and $\Delta _ { t } ( w )$ can be scaled ${ \pmb w } ^ { \prime } = T _ { \lambda } ^ { s c } ( { \pmb w } ) = \lambda { \pmb w }$ by scaling the magnitude of vector alone, provided the discretization constants are now assumed to be $\Delta _ { x } ( \mathbf { \bar { w } } ^ { \prime } ) = \bar { 1 ^ { \prime } } \lambda \Delta _ { x } ( \pmb { w } )$ and $\Delta _ { t } ( { \mathbf { \boldsymbol { w } } ^ { \prime } } ) \overset { * } { = } 1 / \lambda ^ { 2 } \Delta _ { t } ( { \mathbf { \boldsymbol { w } } } )$ . We refer to this as magnitude equvariance hereafter.
149
+
150
+ To obtain magnitude equivariance, we divide the input tensor by the MinMax scaler (the maximum of the tensor minus the minimum) and scale the output back after convolution and activation per sliding block. We found that the standard deviation and mean L2 norm may work as well but are not as stable as the MinMax scaler. Specifically, using the same notation as in Section 3.4,
151
+
152
+ $$
153
+ \begin{array} { r } { \pmb { \sigma } _ { i } = \mathrm { M i n M a x } _ { j k l } \left( \pmb { \mathcal { P } } _ { i j k l } \right) ; \quad \pmb { \mathcal { P } } _ { i j k l } \mapsto \pmb { \mathcal { P } } _ { i j k l } / \pmb { \sigma } _ { i } ; \quad \pmb { \mathcal { Q } } _ { i j } \mapsto \pmb { \mathcal { Q } } _ { i j } \cdot \pmb { \sigma } _ { i } . } \end{array}
154
+ $$
155
+
156
+ Resolution Dependent Scaling. If the physical scale of the data is fixed, then scaling corresponds to a change in resolution and time step size. To achieve this, we replace the convolution layers with group correlation layers over the group $G = ( \mathbb { R } _ { > 0 } , \cdot ) \times ( \mathbb { R } ^ { 2 } , + )$ of scaling and translations. In convolution, we translate a kernel $K$ across an input $\pmb { w }$ as such $\begin{array} { r } { \pmb { v } ( \pmb { p } ) = \sum _ { \pmb { q } \in \mathbb { Z } ^ { 2 } } \mathbf { \bar { w } } ( \pmb { p } + \pmb { q } ) K ( \pmb { q } ) } \end{array}$ . The $G$ -correlation upgrades this operation by both translating and scaling the kernel relative to the input,
157
+
158
+ $$
159
+ \pmb { v } ( \pmb { p } , s , \mu ) = \sum _ { \lambda \in \mathbb { R } _ { > 0 } , t \in \mathbb { R } , \pmb { q } \in \mathbb { Z } ^ { 2 } } \lambda \pmb { w } ( \lambda \pmb { p } + \pmb { q } , \lambda ^ { 2 } t , \lambda \mu ) K ( \pmb { q } , s , t , \lambda ) ,
160
+ $$
161
+
162
+ where $s$ and $t$ denote the indices of output and input channels respectively. We add an axis to the tensors corresponding the scale factor $\mu$ . Note that we treat the channel as a time dimension both with respective to our input and scaling action. As a consequence, as the number of channels increases in the lower layers of Unet and ResNet, the temporal resolution increases, which is analogous to temporal refinement in numerical methods [24; 31]. For the input $\tilde { w }$ of first layer where $\tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } ^ { \tilde { \mathbf { \Gamma } } } \tilde { \mathbf { \Gamma } } ^ { \tilde { \mathbf { \Gamma } } } \tilde { \mathbf { \Gamma } } ^ { \tilde { \mathbf { \Gamma } } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } \tilde \mathrm { \Gamma }$ has no levels originally, ${ \pmb w } ( p , s , \lambda ) = \lambda { \tilde { \pmb w } } ( \lambda p , \lambda ^ { 2 } s )$ .
163
+
164
+ Our model builds on the methods of Worrall and Welling [51], but with important adaptations for the physical domain. Our implementation of group correlation equation 5 directly incorporates the physical scaling law equation 3 of the system equation $\mathcal { D } _ { \mathrm { N S } }$ . This affects time, space, and magnitude. (For heat, we drop the magnitude scaling.) The physical scaling law dictates our model should be equivariant to both up and down scaling and by any $\lambda \in \mathbb { R } _ { > 0 }$ . Practically, the sum is truncated to 7 different $1 / 3 \le \lambda \le \bar { 3 }$ and discrete data is continuously indexed using interpolation. Note equation 3 demands we scale anisotropically, i.e. differently across time and space.
165
+
166
+ # 4 RELATED WORK
167
+
168
+ Equivariance and Invariance. Developing neural nets that preserve symmetries has been a fundamental task in image recognition [12; 49; 9; 7; 29; 27; 3; 52; 10; 19; 50; 16; 42]. But these models have never been applied to forecasting physical dynamics. Jaiswal et al. [23]; Moyer et al. [37] proposed approaches to find representations of data that are invariant to changes in specified factors, which is different from our physical symmetries. Ling et al. [30] and Fang et al. [17] studied tensor invariant neural networks to learn the Reynolds stress tensor while preserving Galilean invariance, and Mattheakis et al. [34] embedded even/odd symmetry of a function and energy conservation into neural networks to solve differential equations. But these two papers are limited to fully connected neural networks. Sosnovik et al. [44] extend Worrall and Welling [51] to group correlation convolution. But these two papers are limited to 2D images and are not magnitude equivariant, which is still inadequate for fluid dynamics. Bekkers [4] describes principles for endowing a neural architecture with invariance with respect to a Lie group.
169
+
170
+ Physics-informed Deep Learning. Deep learning models have been used often to model physical dynamics. For example, Wang et al. [48] unified the CFD technique and U-net to generate predictions with higher accuracy and better physical consistency. Kim and Lee [25] studied unsupervised generative modeling of turbulent flows but the model is not able to make real time future predictions given the historic data. Anderson et al. [1] designed rotationally covariant neural network for learning molecular systems. Raissi et al. [40; 41] applied deep neural networks to solve PDEs automatically but these approaches require explicit input of boundary conditions during inference, which are generally not available in real-time. Mohan et al. [35] proposed a purely data-driven DL model for turbulence, but the model lacks physical constraints and interpretability. Wu et al. [53] and Beucler et al. [5] introduced statistical and physical constraints in the loss function to regularize the predictions of the model. However, their studies only focused on spatial modeling without temporal dynamics. Morton et al. [36] incorporated Koopman theory into a encoder-decoder architecture but did not study the symmetry of fluid dynamics.
171
+
172
+ Video Prediction. Our work is related to future video prediction. Conditioning on the observed frames, video prediction models are trained to predict future frames, e.g., [33; 18; 54; 47; 39; 18]. Many of these models are trained on natural videos with complex noisy data from unknown physical processes. Therefore, it is difficult to explicitly incorporate physical principles into these models. Our work is substantially different because we do not attempt to predict object or camera motions.
173
+
174
+ # 5 EXPERIMENTS
175
+
176
+ We test our models on Rayleigh-Bénard convection and real-world ocean currents. We also evaluated on the heat diffusion systems, see Appendix C for more results. The implementation details and a detailed description of energy spectrum error can be found in Appendices D and B.7.
177
+
178
+ Evaluation Metrics. Our goal is to show that adding symmetry improves both the accuracy and the physical consistency of predictions. For accuracy, we use Root Mean Square Error (RMSE) between the forward predictions and the ground truth over all pixels. For physical consistency, we calculate the Energy Spectrum Error (ESE) which is the RMSE of the log of energy spectrum. ESE can indicate whether the predictions preserve the correct statistical distributions of the fluids and obey the energy conservation law, which is a critical metric for physical consistency.
179
+
180
+ Experimental Setup. ResNet[20] and U-net[43] are the best-performing models for our tasks [48] and are well-suited for our tasks. Thus, we implemented these two convolutional architectures equipped with four different symmetries, which we name Equ-ResNet(U-net). We use a rolling window approach to generate sequences with step size 1 for the RBC data and step size 3 for the ocean data. All models predict raw velocity and temperature fields up to 10 steps ahead autoregressively. We use the MSE loss function that accumulates the forecasting errors. We split the data $6 0 \% - 2 0 \% - 2 0 \%$ for training-validation-test across time and report mean errors over five random runs.
181
+
182
+ Table 2: The RMSE and ESE of the ResNet(Unet) and four Equ-ResNets(Unets) predictions on the original and four transformed test sets of Rayleigh-Bénard Convection. Augm is ResNet(Unet) trained on the augmented training set with additional samples applied with random transformations from the relevant symmetry group. Each column contains all models’ prediction errors on the original test set and four different transformed test sets.
183
+
184
+ <table><tr><td rowspan="2"></td><td colspan="5">Root Mean Square Error(103)</td><td colspan="5">Energy Spectrum Errors</td></tr><tr><td>Orig</td><td>UM</td><td>Mag</td><td>Rot</td><td>Scale</td><td>Orig</td><td>UM</td><td>Mag</td><td>Rot</td><td>Scale</td></tr><tr><td>ResNet</td><td>0.67±0.24 2.94±0.84 4.30±1.27</td><td></td><td></td><td>3.46±0.39</td><td>1.96±0.16</td><td></td><td>0.46±0.19 0.56±0.29 0.26±0.14 1.59±0.42 4.32±2.33</td><td></td><td></td><td></td></tr><tr><td>Augm</td><td></td><td>1.10±0.20 1.54±0.12 0.92±0.09 1.01±0.11</td><td></td><td></td><td></td><td></td><td>1.37±0.02 1.14±0.32 1.92±0.21 1.55±0.14</td><td></td><td></td><td></td></tr><tr><td>EquuM</td><td>0.71±0.26 0.71±0.26</td><td></td><td></td><td></td><td></td><td>0.33±0.11 0.33±0.11</td><td></td><td></td><td></td><td></td></tr><tr><td>EquMag</td><td>0.69±0.24</td><td></td><td>0.67±0.14</td><td></td><td></td><td>0.34±0.09</td><td></td><td>0.19±0.02</td><td></td><td></td></tr><tr><td>EquRot</td><td>0.65±0.26</td><td></td><td></td><td>0.76±0.02</td><td></td><td>0.31±0.06</td><td></td><td></td><td>1.23±0.04</td><td></td></tr><tr><td>Equscal</td><td>0.70±0.02</td><td></td><td></td><td></td><td>0.85±0.09</td><td>0.44±0.22</td><td></td><td></td><td></td><td>0.68±0.26</td></tr><tr><td>U-net</td><td>0.64±0.24 2.27±0.82 3.59±1.04 2.78±0.83</td><td></td><td></td><td></td><td>31.65±0.17</td><td>0.50±0.04 0.34±0.10 0.55±0.05 0.91±0.27 4.25±0.57</td><td></td><td></td><td></td><td></td></tr><tr><td>Augm</td><td></td><td>0.75±0.28 1.33±0.33 0.86±0.04 1.11±0.07</td><td></td><td></td><td></td><td></td><td>0.96±0.23 0.44±0.21 1.24±0.04 1.47±0.11</td><td></td><td></td><td></td></tr><tr><td>Equum</td><td>0.68±0.26 0.71±0.24</td><td></td><td></td><td></td><td></td><td></td><td>0.23±0.06 0.14±0.05</td><td></td><td></td><td></td></tr><tr><td>EquMag</td><td>0.67±0.11</td><td></td><td>0.68±0.14</td><td></td><td></td><td>0.42±0.04</td><td></td><td>0.34±0.06</td><td></td><td></td></tr><tr><td>EquRot</td><td>0.68±0.25</td><td></td><td></td><td>0.74±0.01</td><td></td><td>0.11±0.02</td><td></td><td></td><td>1.16±0.05</td><td></td></tr><tr><td>Equscal</td><td>0.69±0.13</td><td></td><td></td><td></td><td>0.90±0.25</td><td>0.45±0.32</td><td></td><td></td><td></td><td>0.89±0.29</td></tr></table>
185
+
186
+ # 5.1 EQUIVARIANCE ERRORS
187
+
188
+ The equivariance errors can be defined as $\mathrm { E E } _ { T } ( x ) = | T ( f ( x ) ) - f ( T ( x ) ) |$ , where $x$ is an input, $f$ is a neural net, $T$ is a transformation from a symmetry group. We empirically measure the equivariance errors of all equivariant models we have designed. Table 1 shows the equivariance errors of ResNet and Equ-ResNet. The transformation $T$ is sampled in the same way as we generated the transformed Rayleigh-Bénard Convection test sets. See more details in Appendix B.5.
189
+
190
+ # 5.2 EXPERIMENTS ON SIMULATED RAYLEIGH-BÉNARD CONVECTION DYNAMICS
191
+
192
+ Data Description. Rayleigh-Bénard Convection occurs in a horizontal layer of fluid heated from below and is a major feature of the El Niño dynamics. The dataset comes from two-dimensional turbulent flow simulated using the Lattice Boltzmann Method [8] with Rayleigh number $2 . 5 \times 1 0 ^ { 8 }$ We divide each $1 7 9 2 \times 2 5 6$ image into 7 square subregions of size $2 5 6 \times 2 5 6$ , then downsample to $6 4 \times 6 4$ pixels. To test the models’ generalization ability, we generate additional four test sets $: 1$ ) UM: added random vectors drawn from $U ( - 1 , 1 )$ ; 2) Mag: multiplied by random values sampled from $U ( 0 , 2 )$ ; 3) Rot: randomly rotated by the multiples of $\pi / 2$ ; 4) Scale: scaled by $\lambda$ sampled from $U ( 1 / 5 , 2 )$ . Due to lack of a fixed reference frame, real-world data would be transformed relative to training data. We use transformed data to mimic this scenario.
193
+
194
+ Prediction Performance. Table 2 shows the prediction RMSE and ESE on the original and four transformed test sets by the non-equivariant ResNet(Unet) and four Equ-ResNets(Unets). Augm is ResNet(Unet) trained on the augmented training set with additional samples with random transformations applied from the relevant symmetry group. The augmented training set contains additional transformed samples and is three times the size of the original training set. Each column contains the prediction errors by the non-equivariant and equivariant models on each test set. On the original test set, all models have similar RMSE, yet the equivariant models have lower ESE. This demonstrates that incorporating symmetries preserves the representation powers of CNNs and even improves models’ physical consistency.
195
+
196
+ Table 1: Equivariance Errors of ResNet(Unets) and Equ-ResNet(Unets).
197
+
198
+ <table><tr><td>EEr(10)</td><td>UM</td><td>Mag</td><td>Rot</td><td>Scale</td></tr><tr><td>ResNets</td><td>2.010</td><td>1.885</td><td>5.895</td><td>1.658</td></tr><tr><td>EqUResNets</td><td>0.0</td><td>0.0</td><td>1.190</td><td>0.579</td></tr><tr><td>Unets</td><td>1.070</td><td>0.200</td><td>1.548</td><td>1.809</td></tr><tr><td>Equunets</td><td>0.0</td><td>0.0</td><td>0.794</td><td>0.481</td></tr></table>
199
+
200
+ On the transformed test sets, we can see that ResNet(Unet) fails, while Equ-ResNets(Unets) performs even much better than Augm-ResNets(Unets). This demonstrates the value of equivariant models over data augmentation for improving generalization. Figure 2 shows the ground truth and the predicted velocity fields at time step 1, 5 and 10 by the ResNet and four Equ-ResNets on the four transformed test samples.
201
+
202
+ ![](images/c60d62fef257b929562f2168c52242b566d7a2c4fae4d9212215501895fd90e6.jpg)
203
+ Figure 2: The ground truth and the predicted velocity norm fields $\lVert \boldsymbol { \mathbf { \mathit { w } } } \rVert _ { 2 }$ at time step 1, 5 and 10 by the ResNet and four Equ-ResNets on the four transformed test samples. The first column is the target, the second is ResNet predictions, and the third is predictions by Equ-ResNets.
204
+
205
+ Generalization. In order to evaluate models’ generalization ability with respect to the extent of distributional shift, we created additional test sets with different scale factors from $\frac { 1 } { 5 }$ to 1. Figure 3 shows ResNet and EquScal-ResNet prediction RMSEs (left) and ESEs (right) on the test sets upscaled by different factors. We observed that $\mathtt { E q u } _ { S c a l } - \mathtt { R e } \mathtt { s N e t }$ is very robust across various scaling factors while ResNet does not generalize.
206
+
207
+ Table 3: Performance comparison on transformed train and test sets.
208
+
209
+ <table><tr><td></td><td>RMSE</td><td>ESE</td></tr><tr><td>ResNet Equum</td><td>1.03±0.05 0.69±0.01</td><td>0.96±0.10 0.35±0.13</td></tr><tr><td>ResNet</td><td>1.50±0.02</td><td>0.55±0.11</td></tr><tr><td>EquMag</td><td>0.75±0.04</td><td>0.39±0.02</td></tr><tr><td>ResNet</td><td>1.18±0.05</td><td>1.21±0.04</td></tr><tr><td>EquRot</td><td>0.77±0.01</td><td>0.68±0.01</td></tr><tr><td>ResNet Equscal</td><td>0.92±0.01 0.74±0.03</td><td>1.34±0.07 1.02±0.02</td></tr></table>
210
+
211
+ We also compare ResNet and Equ-ResNet when both train and test sets have random transformations from the relevant symmetry group applied to each sample. This mimics real-world data in which each sample has unknown reference frame. As shown in Table 3 shows Equ-ResNet outperforms ResNet on average by $34 \%$ RMSE and $40 \%$ ESE.
212
+
213
+ ![](images/bcdd91cba944a14b45ca2db6b244e4e94f7c5d6a1adf2d1ec60880bc0c8bc9be.jpg)
214
+ Figure 3: Left: Prediction RMSE and ESE over five runs of ResNet and $\mathtt { E q u } _ { S c a 1 } - \mathtt { R e s N e t }$ on the Rayleigh-Bénard Convection test set upscaled by different factors. Right: The ground truth and predicted ocean currents $\lVert \boldsymbol { w } \rVert _ { 2 }$ by ResNet and four Equ-ResNets on the test set of future time.
215
+
216
+ 5.3 EXPERIMENTS ON REAL WORLD OCEAN DYNAMICS
217
+
218
+ Data Description. We use the reanalysis ocean current velocity data generated by the NEMO ocean engine [32].1 We selected an area from each of the Atlantic, Indian and North Pacific Oceans from 01/01/2016 to 08/18/2017 and extracted $6 4 \times 6 4$ sub-regions for our experiments. The corresponding latitude and longitude ranges for the selected regions are $- 4 4 \sim - 2 3$ , $2 5 { \sim } 4 6$ ), $5 5 \sim 7 6$ , $- 3 9 \mathrm { \sim } - 1 8$ ) and $( - 1 7 4 \sim - 1 5 3$ , $5 { \sim } 2 6$ ) respectively. We not only test all models on the future data but also on a different domain $- 1 8 0 \mathrm { \sim } - 1 5 9$ , ${ \ - } 4 0 \mathrm { \sim } { - } 5 9$ ) in South Pacific Ocean from 01/01/2016 to 12/15/2016.
219
+
220
+ Prediction Performance. Table 4 shows the RMSE and ESE of ResNets(Unets), and equivariant Equ-ResNets(Unets) on the test sets with different time range and spatial domain from the training set. All the equivariant models outperform the non-equivariant baseline on RMSE, and $\mathtt { E q u } _ { S c a 1 } - \mathtt { R e s N e t }$ achieves the lowest RMSE. For ESE, only the $\mathtt { E q u _ { M a g } - R e s N e t }$ (Unet) is worse than the baseline. Also, it is remarkable that the $\mathtt { E q u } _ { \mathtt { R o t } }$ models have significantly lower ESE than others, suggesting that they correctly learn the statistical distribution of ocean currents.
221
+
222
+ Comparison with Data Augmentation. We also compare Equ-ResNets(Unets) ResNets(Unets) that are trained with data-augmentation (Augm) in Table 4. In all cases, equivariant models outperforms the baselines trained with data augmentation. We find that data augmentation sometimes improves slightly on RMSE but not as much as the equivariant models. And, in fact, ESE is uniformly worse for models trained with data augmentation than even the baselines. In contrast, the equivariant models have much better ESE than the baselines with or without augmentation. We believe data augmentation presents a trade-off in learning. Though the model may be less sensitive to the various transformations we consider, we need to train bigger models longer on many more samples. The models may not have enough capacity to learn the symmetry from the augmented data and the dynamics of the fluids at the same time. By comparison, equivariant architectures do not have this issue.
223
+
224
+ Figure 3 shows the ground truth and the predicted ocean currents at time step 1, 5, 10 by different models. We can see that equivariant models’ predictions are more accurate and contain more details than the baselines. Thus, incorporating symmetry into deep learning models can improve the prediction accuracy of ocean currents. The most recent work on this dataset is de Bezenac et al. [15], which combines a warping scheme and a U-net to predict temperature. Since our models can also be applied to advection-diffusion systems, we also investigated the task of ocean temperature field predictions. We observe that $\mathtt { E q u } _ { \mathtt { U M } } - \mathtt { U n e t }$ performs slightly better than de Bezenac et al. [15]. For additional results, see Appendix E.
225
+
226
+ # 6 CONCLUSION AND FUTURE WORK
227
+
228
+ We develop methods to improve the generalization of deep sequence models for learning physical dynamics. We incorporate various symmetries by designing equivariant neural networks and demonstrate their superior performance on 2D time series prediction both theoretically and experimentally. Our designs obtain improved physical consistency for predictions. In the case of transformed test data, our models generalize significantly better than their non-equivariant counterparts. Importantly, all of our equivariant models can be combined and can be extended to 3D cases. The group $G$ also acts on the boundary conditions and external forces of a system $\mathcal { D }$ . If these are $G$ -invariant, then the system $\mathcal { D }$ is strictly invariant as in Section 2.3. If not, one must consider a family of solutions $\cup _ { g \in G } \mathrm { S o l } ( g D )$ to retain equivariance. To the best of our best knowledge, there does not exist a single model with equivariance to the full symmetry group of the Navier-Stokes equations. It is possible but non-trivial, and we continue to work on combining different equivariances. Future work also includes speeding up the the scale-equivariant models and incorporating other symmetries into DL models.
229
+
230
+ Table 4: Prediction RMSE and ESE comparison on the two ocean currents test sets.
231
+
232
+ <table><tr><td rowspan="2"></td><td colspan="2">RMSE</td><td colspan="2">ESE</td></tr><tr><td>Testtime</td><td>Testdomain</td><td>Testime</td><td>Testdomain</td></tr><tr><td>ResNet</td><td></td><td>0.71±0.07 0.72±0.04</td><td>0.83±0.06 0.75±0.11</td><td></td></tr><tr><td>Augmum</td><td></td><td>0.70±0.01 0.70±0.07</td><td>1.06±0.06 1.06±0.04</td><td></td></tr><tr><td>AugmMag</td><td>0.76±0.02</td><td>0.71±0.01</td><td>1.08±0.08</td><td>1.05±0.8</td></tr><tr><td>AugmRot</td><td>0.73±0.01</td><td>0.69±0.01</td><td>0.94±0.01</td><td>0.86±0.01</td></tr><tr><td>Augmscal</td><td></td><td>0.97±0.06 0.92±0.04</td><td>0.85±0.03</td><td>30.95±0.11</td></tr><tr><td>EquuM</td><td>0.68±0.06</td><td>0.68±0.16</td><td>0.75±0.06</td><td>50.73±0.08</td></tr><tr><td>EquMag</td><td></td><td>0.66±0.14 0.68±0.11</td><td></td><td>0.84±0.04 0.85±0.14</td></tr><tr><td>EquRot</td><td>0.69±0.01</td><td>10.70±0.08</td><td></td><td>0.43±0.15 0.28±0.20</td></tr><tr><td>Equscal</td><td>0.63±0.02 0.68±0.21</td><td></td><td></td><td>0.44±0.05 0.42±0.12</td></tr><tr><td>U-net Augmum</td><td>0.68±0.02 0.68±0.01</td><td>0.70±0.13 0.73±0.10</td><td></td><td>0.77±0.12 0.73±0.07</td></tr><tr><td>AugmMag</td><td></td><td></td><td></td><td>0.85±0.04 0.83±0.04</td></tr><tr><td></td><td></td><td>0.69±0.02 0.67±0.10</td><td></td><td>0.78±0.03 0.86±0.02</td></tr><tr><td>AugmRot</td><td>0.79±0.01</td><td>0.70±0.01</td><td>0.79±0.01</td><td>10.78±0.02</td></tr><tr><td></td><td>Augmsca10.71±0.01 0.77±0.02</td><td></td><td></td><td>0.84±0.01 0.77±0.02</td></tr><tr><td>EquuM</td><td>0.66±0.10 0.67±0.03</td><td></td><td></td><td>0.73±0.03 0.82±0.13</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>EquMag</td><td></td><td>0.63±0.08 0.66±0.09</td><td></td><td>0.74±0.05 0.79±0.04</td></tr><tr><td>EquRot</td><td>0.68±0.05 0.69±0.02</td><td></td><td></td><td>0.42±0.02 0.47±0.07</td></tr><tr><td>Equscal</td><td></td><td>0.65±0.09 0.69±0.05</td><td></td><td>0.45±0.13 0.43±0.05</td></tr></table>
233
+
234
+ # ACKNOWLEDGMENTS
235
+
236
+ This work was supported in part by Google Faculty Research Award, NSF Grant #2037745, and the U. S. Army Research Office under Grant W911NF-20-1-0334. The Titan Xp used for this research was donated by the NVIDIA Corporation. This research used resources of the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231. We also thank Dragos Bogdan Chirila for providing the turbulent flow data.
237
+
238
+ REFERENCES
239
+ [1] Brandon Anderson, Truong-Son Hy, and Risi Kondor. Cormorant: Covariant molecular neural networks. In Advances in neural information processing systems (NeurIPS), 2019.
240
+ [2] John David Anderson and J Wendt. Computational fluid dynamics, volume 206. Springer, 1995.
241
+ [3] Erkao Bao and Linqi Song. Equivariant neural networks and equivarification. arXiv preprint arXiv:1906.07172, 2019.
242
+ [4] Erik J Bekkers. B-spline cnns on lie groups. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ H1gBhkBFDH.
243
+ [5] Tom Beucler, Michael Pritchard, Stephan Rasp, Pierre Gentine, Jordan Ott, and Pierre Baldi. Enforcing analytic constraints in neural-networks emulating physical systems. arXiv preprint arXiv:1909.00912, 2019.
244
+ [6] Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in neural information processing systems, pages 6571–6583, 2018.
245
+ [7] Benjamin Chidester, Minh N. Do, and Jian Ma. Rotation equivariance and invariance in convolutional neural networks. arXiv preprint arXiv:1805.12301, 2018.
246
+ [8] Dragos Bogdan Chirila. Towards lattice Boltzmann models for climate sciences: The GeLB programming language with applications. PhD thesis, University of Bremen, 2018.
247
+ [9] Taco S. Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning (ICML), pages 2990–2999, 2016.
248
+ [10] Taco S. Cohen and Max Welling. Steerable CNNs. arXiv preprint arXiv:1612.08498, 2016.
249
+ [11] Taco S Cohen, Mario Geiger, and Maurice Weiler. A general theory of equivariant cnns on homogeneous spaces. In Advances in Neural Information Processing Systems, pages 9142–9153, 2019.
250
+ [12] Taco S. Cohen, Maurice Weiler, Berkay Kicanaoglu, and Max Welling. Gauge equivariant convolutional networks and the icosahedral CNN. In Proceedings of the 36th International Conference on Machine Learning (ICML), volume 97, pages 1321–1330, 2019.
251
+ [13] Tri Dao, Albert Gu, Alexander J Ratner, Virginia Smith, Christopher De Sa, and Christopher Ré. A kernel theory of modern data augmentation. Proceedings of machine learning research, 97:1528, 2019.
252
+ [14] Richard H. Day. Complex economic dynamics-vol. 1: An introduction to dynamical systems and market mechanisms. MIT Press Books, 1, 1994.
253
+ [15] Emmanuel de Bezenac, Arthur Pajot, and Patrick Gallinari. Deep learning for physical processes: Incorporating prior scientific knowledge. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ By4HsfWAZ.
254
+ [16] Sander Dieleman, Jeffrey De Fauw, and Koray Kavukcuoglu. Exploiting cyclic symmetry in convolutional neural networks. In International Conference on Machine Learning (ICML), 2016.
255
+ [17] Rui Fang, David Sondak, Pavlos Protopapas, and Sauro Succi. Deep learning for turbulent channel flow. arXiv preprint arXiv:1812.02241, 2018.
256
+ [18] Chelsea Finn, Ian Goodfellow, and Sergey Leine. Unsupervised learning for physical interaction through video prediction. In Advances in neural information processing systems, pages 64–72, 2016.
257
+ [19] Marc Finzi, Samuel Stanton, Pavel Izmailov, and Andrew Gordon Wilson. Generalizing convolutional neural networks for equivariance to lie groups on arbitrary continuous data. arXiv preprint arXiv:2002.12880, 2020.
258
+
259
+ [20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv:1505.04597, 2015.
260
+
261
+ [21] Herbert W Hethcote. The mathematics of infectious diseases. SIAM review, 42(4):599–653, 2000.
262
+
263
+ [22] Eugene M. Izhikevich. Dynamical systems in neuroscience. MIT press, 2007.
264
+
265
+ [23] Ayush Jaiswal, Daniel Moyer, Greg Ver Steeg, Wael AbdAlmageed, and Premkumar Natarajan. Invariant representations through adversarial forgetting. arXiv preprint arXiv:1911.04060, 2019.
266
+
267
+ [24] Ihn S Kim and Wolfgang JR Hoefer. A local mesh refinement algorithm for the time domainfinite difference method using maxwell’s curl equations. IEEE Transactions on Microwave Theory and Techniques, 38(6):812–815, 1990.
268
+
269
+ [25] Junhyuk Kim and Changhoon Lee. Deep unsupervised learning of turbulence for inflow generation at various Reynolds numbers. Journal of Computational Physics, page 109216, 2020.
270
+
271
+ [26] Anthony W. Knapp. Lie Groups Beyond an Introduction, volume 140 of Progress in Mathematics. Birkhäuser, Boston, 2nd edition, 2002.
272
+
273
+ [27] Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In Proceedings of the 35th International Conference on Machine Learning (ICML), volume 80, pages 2747–2755, 2018.
274
+
275
+ [28] Serge Lang. Algebra. Springer, Berlin, 3rd edition, 2002.
276
+
277
+ [29] Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 991–999, 2015.
278
+
279
+ [30] Julia Ling, Andrew Kurzawskim, and Jeremy Templeton. Reynolds averaged turbulence modeling using deep neural networks with embedded invariance. Journal of Fluid Mechanics, 2017.
280
+
281
+ [31] Vadim Lisitsa, Galina Reshetova, and Vladimir Tcheverda. Finite-difference algorithm with local time-space grid refinement for simulation of waves. Computational geosciences, 16(1): 39–54, 2012.
282
+
283
+ [32] Gurvan Madec et al. NEMO ocean engine, 2015. Technical Note. Institut PierreSimon Laplace (IPSL), France. https://epic.awi.de/id/eprint/39698/1/ NEMO_book_v6039.pdf.
284
+
285
+ [33] Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square error. arXiv preprint arXiv:1511.05440, 2015.
286
+
287
+ [34] Marios Mattheakis, Pavlos Protopapas, D. Sondak, Marco Di Giovanni, and Efthimios Kaxiras. Physical symmetries embedded in neural networks. arXiv preprint arXiv:1904.08991, 2019.
288
+
289
+ [35] Arvind Mohan, Don Daniel, Michael Chertkov, and Daniel Livescu. Compressed convolutional LSTM: An efficient deep learning framework to model high fidelity 3D turbulence. arXiv preprint arXiv:1903.00033, 2019.
290
+
291
+ [36] Jeremy Morton, Antony Jameson, Mykel J. Kochenderfer, and Freddie Witherden. Deep dynamical modeling and control of unsteady fluid flows. In Advances in Neural Information Processing Systems (NeurIPS), 2018.
292
+
293
+ [37] Daniel Moyer, Shuyang Gao, Rob Brekelmans, Aram Galstyan, and Greg Ver Steeg. Invariant representations without adversarial training. In Advances in Neural Information Processing Systems (NeurIPS), pages 9084–9093, 2018.
294
+
295
+ [38] Peter J. Olver. Applications of Lie groups to differential equations, volume 107. Springer Science & Business Media, 2000.
296
+
297
+ [39] Sergiu Oprea, P. Martinez-Gonzalez, A. Garcia-Garcia, John Alejandro Castro-Vargas, S. OrtsEscolano, J. Garcia-Rodriguez, and Antonis A. Argyros. A review on deep learning techniques for video prediction. ArXiv, abs/2004.05214, 2020.
298
+
299
+ [40] Maziar Raissi, Paris Perdikaris, and George Em Karniadakis. Physics informed deep learning (part I): Data-driven solutions of nonlinear partial differential equations. arXiv preprint arXiv:1711.10561, 2017.
300
+
301
+ [41] Maziar Raissi, Paris Perdikaris, and George E Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686–707, 2019.
302
+
303
+ [42] Anupam K. Gupta Rohan Ghosh. Scale steerable filters for locally scale-invariant convolutional neural networks. arXiv preprint arXiv:1906.03861, 2019.
304
+
305
+ [43] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234–241. Springer, 2015.
306
+
307
+ [44] Ivan Sosnovik, Michał Szmaja, and Arnold Smeulders. Scale-equivariant steerable networks. In International Conference on Learning Representations, 2020. URL https://openreview. net/forum?id $=$ HJgpugrKPS.
308
+
309
+ [45] Steven H. Strogatz. Nonlinear dynamics and chaos: with applications to physics, biology, chemistry, and engineering. CRC press, 2018.
310
+
311
+ [46] Jonathan Tompson, Kristofer Schlachter, Pablo Sprechmann, and Ken Perlin. Accelerating Eulerian fluid simulation with convolutional networks. In Proceedings of the 34th International Conference on Machine Learning (ICML), volume 70, pages 3424–3433, 2017.
312
+
313
+ [47] Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In International Conference on Learning Representations (ICLR), 2017.
314
+
315
+ [48] Rui Wang, Karthik Kashinath, Mustafa Mustafa, Adrian Albert, and Rose Yu. Towards physicsinformed deep learning for turbulent flow prediction. arXiv preprint arXiv:1911.08655, 2019.
316
+
317
+ [49] Maurice Weiler and Gabriele Cesa. General E(2)-equivariant steerable CNNs. In Advances in Neural Information Processing Systems (NeurIPS), pages 14334–14345, 2019.
318
+
319
+ [50] Maurice Weiler, Fred A. Hamprecht, and Martin Storath. Learning steerable filters for rotation equivariant CNNs. Computer Vision and Pattern Recognition (CVPR), 2018.
320
+
321
+ [51] Daniel Worrall and Max Welling. Deep scale-spaces: Equivariance over scale. In Advances in Neural Information Processing Systems (NeurIPS), pages 7364–7376, 2019.
322
+
323
+ [52] Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5028–5037, 2017.
324
+
325
+ [53] Jin-Long Wu, Karthik Kashinath, Adrian Albert, Dragos Chirila, Prabhat, and Heng Xiao. Enforcing statistical constraints in generative adversarial networks for modeling chaotic dynamical systems. Journal of Computational Physics, page 109209, 2019.
326
+
327
+ [54] Tianfan Xue, Jiajun Wu, Katherine Bouman, and Bill Freeman. Visual dynamics: Probabilistic future frame synthesis via cross convolutional networks. In Advances in neural information processing systems (NeurIPS), pages 91–99, 2016.
328
+
329
+ # A ADDITIONAL BACKGROUND ON GROUP THEORY
330
+
331
+ We give a brief overview of group theory and representation theory. For a more complete introduction to the topic see Lang [28]. We start with the definition of an abstract symmetry group.
332
+
333
+ Definition 2 (group). A group of symmetries or simply group is a set $G$ together with a binary operation $\circ \colon G \times G \to G$ called composition satisfying three properties:
334
+
335
+ 1. (identity) There is an element $1 \in G$ such that $1 \circ g = g \circ 1 = g$ for all $g \in G$ ,
336
+ 2. (associativity) $( g _ { 1 } \circ g _ { 2 } ) \circ g _ { 3 } = g _ { 1 } \circ ( g _ { 2 } \circ g _ { 3 } ) { \mathrm { ~ f o r ~ a l l ~ } } g _ { 1 } , g _ { 2 } , g _ { 3 } \in G ,$
337
+ 3. (inverses) if $g \in G$ , then there is an element $g ^ { - 1 } \in G$ such that $g \circ g ^ { - 1 } = g ^ { - 1 } \circ g = 1$ .
338
+
339
+ Definition 3 (Lie group). A group $G$ is a Lie group if it is also a smooth manifold over $\mathbb { R }$ and the composition and inversion maps are smooth, i.e. infinitely differentiable.
340
+
341
+ Example 1. Let $G = G L _ { 2 } ( \mathbb { R } )$ be the set of $2 \times 2$ invertible real matrices. The set is closed under inversion and matrix multiplication gives a well-defined composition. This a 4-dimensional real Lie group.
342
+
343
+ Example 2. Let $G = D _ { 3 } = \{ 1 , r , r ^ { 2 } , s , r s , r ^ { 2 } s \}$ where $r$ is rotation by $2 \pi / 3$ and $s$ is reflection over the $y$ -axis. This is the group of symmetries of an equilateral triangle pointing along the $y$ -axis, see Figure 2.
344
+
345
+ ![](images/8dbbda6e43faeb356743be45cded2f61834a6dfd4bb7c97c052caad4b98bac2e.jpg)
346
+ Figure 4: Illustration of $D _ { 3 }$ acting on a triangle with the letter “R”.
347
+
348
+ Groups are abstract objects, but they become concrete when we let them act.
349
+
350
+ Definition 4 (action). A group $G$ acts on a set $S$ if there is an action map · : $G \times S \to S$ satisfying
351
+
352
+ 1. $1 \cdot x = x$ for all $x \in S , g \in G$ ,
353
+
354
+ 2. $g _ { 1 } \cdot ( g _ { 2 } \cdot x ) = ( g _ { 1 } \circ g _ { 2 } ) \cdot x$ for all $x \in S$ , $g _ { 1 } , g _ { 2 } \in G$ .
355
+
356
+ Definition 5 (representation). We say $S$ is a $G$ -representation if $S$ is an $\mathbb { R }$ -vector space and $G$ acts on $S$ by linear transformations, that is,
357
+
358
+ 1. $g \cdot ( x + y ) = g \cdot x + g \cdot y { \mathrm { ~ f o r ~ a l l ~ } } x , y \in S , g \in G ,$
359
+ 2. $g \cdot ( c x ) = c ( g \cdot x )$ for all $x \in S , g \in G , c \in \mathbb { R }$ .
360
+
361
+ Example 3. The group $D _ { 3 }$ acts on $S$ , the set of points in an equilateral triangle, as in Figure 2. The vector space $\mathbb { R } ^ { 2 }$ is both a $D _ { 3 }$ -representation and a $G L _ { 2 } ( \mathbb { R } )$ -representation.
362
+
363
+ The language of group theory allows us to formally define equivariance and invariance.
364
+
365
+ Definition 6 (invariant, equivariant). Let $f \colon X \to Y$ be a function and $G$ be a group.
366
+
367
+ 1. Assume $G$ acts on $X$ . The function $f$ is $G$ -invariant if $f ( g x ) = x$ for all $x \in X$ and $g \in G$ 2. Assume $G$ acts on $X$ and $Y$ . The function $f$ is $G$ -equivariant if $f ( g x ) = g f ( x )$ for all $x \in X$ and $g \in G$ .
368
+
369
+ See Figure 1 for an illustration. Note that we often omit the different action maps of $G$ on $X$ and on $Y$ in our notion when they are clear from context.
370
+
371
+ We can combine and decompose representations in different ways.
372
+
373
+ Definition 7 (direct sum, tensor product). Let $V$ and $W$ be $G$ -representations.
374
+
375
+ 1. The direct sum $V \oplus W$ has underlying set $V \times W$ . As a vector space it has scalars $c ( v , w ) = ( c v , c w )$ and addition $( v _ { 1 } , w _ { 1 } ) + ( v _ { 2 } , w _ { 2 } ) = ( v _ { 1 } + v _ { 2 } , w _ { 1 } + w _ { 2 } )$ . It is a $G$ representation with action $g \cdot ( v , w ) = ( g v , g w )$ .
376
+
377
+ 2. The tensor product
378
+
379
+ $$
380
+ V \otimes W = \left\{ \sum _ { i } v _ { i } \otimes w _ { i } : v _ { i } \in V , w _ { i } \in W \right\}
381
+ $$
382
+
383
+ is a $G$ -representation with action $g \cdot v \otimes w = ( g v ) \otimes ( g w )$
384
+
385
+ Definition 8 (irreducible). Let $V$ be a $G$ -representation.
386
+
387
+ 1. If $W$ is a subspace of $V$ and is closed under the action of $G$ , i.e. $g w \in W$ for all $w \in$ $W , g \in G$ , then we say it is a subrepresentation.
388
+
389
+ 2. If 0 and $V$ itself are the only subrepresentations of $V$ , then it is irreducible.
390
+
391
+ Irreducible representations are the “prime” building blocks of representations. A compact Lie group is one which is closed and bounded. The rotation group $S O ( 2 , \mathbb { R } )$ is compact, but the group $( \mathbb { R } , + )$ is not. All finite groups are also compact Lie groups. The following theorem vastly simplifies our understanding of possible representations of compact Lie groups (see e.g. Knapp [26]).
392
+
393
+ Theorem 4 (Weyl’s Complete Reducibility Theorem). Let $G$ be a compact real Lie group. Every finite-dimensional representation of $V$ is a direct sum of irreducible representations $V = \oplus _ { i } V _ { i }$ .
394
+
395
+ Thus to classify the possible finite-dimensional representations of $G$ , one need only to find all possible irreducible representations of $G$ .
396
+
397
+ # B ADDITIONAL THEORY
398
+
399
+ # B.1 EQUIVARIANT NETWORKS AND DATA AUGMENTATION
400
+
401
+ A classic strategy for dealing with distributional shift by transformations in a group $G$ is to augment the training set $s$ by adding samples transformed under $G$ . That is, using the new training set $\begin{array} { r } { S ^ { \prime } = \bigcup _ { g \in G } \bar { g ( S ) } } \end{array}$ . We show that data augmentation has no advantage for a perfectly equivariant parameterized function $f _ { \theta } ( x )$ since training samples $( x , y )$ and $( g x , g y )$ are equivalent. That is, $f _ { \theta }$ learns the same from $( x , y )$ as from $( g x , g y )$ but with only possibly different sample weight. The following is a more formal statement of Proposition 1.
402
+
403
+ Proposition 5. Let $G$ act on $X$ and $Y$ . Let $f _ { \theta } \colon X \to Y$ be a parameterized class of $G$ -equivariant functions differentiable with respect to $\theta$ . Let $\mathcal { L } \colon Y \times Y \to \mathbb { R }$ be a $G$ -equivariant loss function where $G$ acts on $\mathbb { R }$ by $\chi ,$ , we have,
404
+
405
+ $$
406
+ \chi ( g ) \nabla _ { \theta } \mathcal { L } ( f _ { \theta } ( x ) , y ) = \nabla _ { \theta } \mathcal { L } ( f _ { \theta } ( g x ) , g y ) .
407
+ $$
408
+
409
+ Proof. Equality of the gradients follows equality of the functions $\begin{array} { r l } { \mathcal { L } ( f _ { \theta } ( g x ) , g y ) } & { { } = } \end{array}$ $\chi ( g ) \dot { \mathcal { L } } ( g ^ { - 1 } f _ { \theta } ( \bar { g } x ) , y ) = \chi ( \bar { g } ) \dot { \mathcal { L } } ( f _ { \theta } ( x ) , y )$ .
410
+
411
+ In the case of RMSE and rotation or uniform motion, the loss function is invariant. That is, equivariant with $\chi ( g ) = 1$ . Thus the gradient for sample $( x , y )$ and $( g x , g y )$ is equal. In the case of scale, the loss function is equivariant with $G = ( \mathbb { R } _ { > 0 } , \cdot )$ and $\overset { \cdot } { \chi } ( \lambda ) = \overset { \cdot } { \lambda }$ . In that case, the sample $( g x , g y )$ is the same as the sample $( x , y )$ but with sample weight $\chi ( g )$ .
412
+
413
+ # B.2 ADDING SKIP CONNECTIONS PRESERVES EQUIVARIANCE
414
+
415
+ We prove in general that adding skip connections to a network does not affect its equivariance with respect to linear actions in the following proposition 6. Define $f ^ { ( i j ) }$ as the functional mapping between layer $i$ and layer $j$ .
416
+
417
+ Proposition 6. Let the layer $V ^ { ( i ) }$ be a $G$ -representations for $0 \leq i \leq n$ . Let $f ^ { ( i j ) } \colon V ^ { ( i ) } \to V ^ { ( j ) }$ be $G$ -equivariant for $i < j$ . Define recursively $\begin{array} { r } { \pmb { x } ^ { ( j ) } = \sum _ { 0 \leq i < j } f ^ { ( i j ) } ( \pmb { x } ^ { ( i ) } ) } \end{array}$ . Then $\pmb { x } ^ { ( n ) } = f ( \pmb { x } ^ { ( 0 ) } )$ is $G$ -equivariant.
418
+
419
+ Proof. Assume $\mathbf { \boldsymbol { x } } ^ { ( i ) }$ is an equivariant function of $\mathbf { x } ^ { ( 0 ) }$ for $i < j$ . Then by equivariance of $f ^ { ( i j ) }$ and by linearity of the $G$ -action,
420
+
421
+ $$
422
+ \sum _ { 0 \leq i < j } f ^ { ( i j ) } ( g \pmb { x } ^ { ( i ) } ) = \sum _ { 0 \leq i < j } g f ^ { ( i j ) } ( \pmb { x } ^ { ( i ) } ) = g \pmb { x } ^ { ( j ) } ,
423
+ $$
424
+
425
+ for $g \in G$ . By induction, $\pmb { x } ^ { ( n ) } = f ( \pmb { x } ^ { ( 0 ) } )$ is equivariant with respect to $G$
426
+
427
+ Both ResNet and U-net may be modeled as in Proposition 6 with some convolutional and activation components $f ^ { ( i , i + 1 ) }$ and some skip connections $f ^ { ( i \bar { j } ) } = I$ with $j - i \geq 2$ . Since $I$ is equivariant for any $G$ , we thus have:
428
+
429
+ Corollary 7. If the layers of ResNet or $U ^ { . }$ -net are $G$ -representations and the convolutional mappings and activation functions are $G$ -equivariant, then the entire network is $G$ -equivariant.
430
+
431
+ Corollary 7 allows us to build equivariant convolutional networks for rotational and scaling transformations, which are linear actions.
432
+
433
+ # B.3 RESULTS ON UNIFORM MOTION EQUIVARIANCE
434
+
435
+ In this section, we prove that for the combined convolution-activation layers of a CNN to be uniform motion equivariant, the CNN must be an affine function. We assume that the activation function is applied pointwise. That is, the same activation function is applied to every one-dimensional channel independently.
436
+
437
+ Proposition 8. Let $\boldsymbol { X }$ be a tensor of shape $h \times w \times c$ and $K$ be convolutional kernel of shape $k \times k \times c$ . Let $f ( \boldsymbol { X } ) = \boldsymbol { X } * \boldsymbol { K }$ be a convolutional layer which is equivariant with respect to arbitrary uniform motion $X \mapsto X + C$ for $C$ a constant tensor of the same shape as $\boldsymbol { X }$ . That is $C _ { i j k } = c f o r$ all $i , j , k$ for some fixed $c \in \mathbb { R }$ . Then the sum of the weights of $K$ is $I$ .
438
+
439
+ Proof. Since $f$ is equivariant, $\pmb { X } * K + \pmb { C } = ( \pmb { X } + \pmb { C } ) * K$ . By linearity, $C * K = C$ . Then because $C$ is a constant vector field, $\begin{array} { r } { C * K = C ( \sum _ { v } K ( v ) ) } \end{array}$ . As $C$ is arbitrary, $\begin{array} { r } { \sum _ { v } K ( v ) = 1 } \end{array}$ .
440
+
441
+ For an activation function to be uniform motion equivariant, it must be a translation.
442
+
443
+ Proposition 9. Let $\sigma : \mathbb { R } \mathbb { R }$ be a function satisfying $\sigma ( x + c ) = \sigma ( x ) + c .$ . Then $\sigma$ is a translatio
444
+
445
+ Proof. Let $a = \sigma ( 0 )$ . Then $\sigma ( x ) = \sigma ( x + c ) - c$ . Choosing $c = - x$ gives $\sigma ( x ) = a + x$
446
+
447
+ Proposition 10. Let $\boldsymbol { X }$ and $K$ be as in Prop 8. Let $f$ be a convolutional layer with kernel $K$ and $\sigma$ an activation function. Assume $\sigma \colon { \mathbb { R } } \to { \mathbb { R } }$ is piecewise differentiable. Then if the composition $\varphi = \sigma \circ f$ is equivariant with respect to arbitrary uniform motions, it is an affine map of the form $\varphi ( { \boldsymbol { X } } ) = K ^ { \prime } * { \boldsymbol { X } } + b$ , where $b$ is a real number and $\begin{array} { r } { \sum _ { v } K ^ { \prime } ( v ) = 1 } \end{array}$ .
448
+
449
+ Proof. If $f$ is non-zero, then we can choose a tensor $X$ , and constant tensor $C$ full of $c \in \mathbb { R }$ , and $p \in \mathbb { Z } ^ { 2 }$ such that $c$ and $\beta = ( f ( X ) ) _ { p }$ are any two real numbers. Let $\begin{array} { r } { \lambda = \sum _ { v } K ( v ) } \end{array}$ . As before $f ( C ) = \lambda C$ . Equivariance thus implies
450
+
451
+ $$
452
+ \sigma ( \beta + c \lambda ) = \sigma ( \beta ) + c .
453
+ $$
454
+
455
+ Note $\lambda \neq 0$ , since if $\lambda = 0$ , then $\sigma ( \beta ) = \sigma ( \beta ) + c$ implies $c = 0$ . However $c$ is arbitrary. Let $h = c \lambda$ Then
456
+
457
+ $$
458
+ { \frac { \sigma ( \beta + h ) - \sigma ( \beta ) } { h } } = { \frac { 1 } { \lambda } } .
459
+ $$
460
+
461
+ This holds for arbitrary $\beta$ and $h$ , and thus we find $\sigma$ is everywhere differentiable with slope $\lambda ^ { - 1 }$ . So $\sigma ( x ) = x / \lambda + b$ for some $b \in \mathbb { R }$ . We can then rescale the convolution kernel $K ^ { \prime } = K / \lambda$ to get $\varphi ( \boldsymbol { X } ) = K ^ { \prime } * \boldsymbol { X } + \boldsymbol { b } .$ . □
462
+
463
+ Corollary 11 (Corollary 2). If $f$ is a CNN alternating between convolutions $f _ { i }$ and pointwise activations $\sigma _ { i }$ and the combined layers $\sigma _ { i } \circ f _ { i }$ are uniform motion equivariant, then $f$ is affine.
464
+
465
+ Proof. This follows from Proposition 9 and the fact that composition of affine functions is affine.
466
+
467
+ Since our treatment is only for pointwise activation functions, it remains a possibility that more descriptive networks can be constructed using activation functions which span multiple channels.
468
+
469
+ Proposition 12 (Proposition 3). A residual block $f ( { \pmb x } ) + { \pmb x }$ is uniform motion equivariant if the residual connection $f$ is uniform motion invariant.
470
+
471
+ Proof. We denote the uniform motion transformation by $^ c$ by $T _ { c } ^ { \mathrm { u m } } ( \pmb { w } ) = \pmb { w } + \pmb { c }$ . Let $f$ be an invariant residual connection which is a composition of convolution layers and activation functions. Then we compute
472
+
473
+ $$
474
+ \begin{array} { r l } & { f \big ( T _ { c } ^ { \mathrm { u m } } ( { \pmb w } ) \big ) + T _ { c } ^ { \mathrm { u m } } ( { \pmb w } ) = f ( { \pmb w } ) + { \pmb w } + { \pmb c } } \\ & { \qquad = ( f ( { \pmb w } ) + { \pmb w } ) + { \pmb c } } \\ & { \qquad = T _ { c } ^ { \mathrm { u m } } ( f ( { \pmb w } ) + { \pmb w } ) . } \end{array}
475
+ $$
476
+
477
+ as desired.
478
+
479
+ # B.4 RESULTS ON SCALE EQUIVARIANCE
480
+
481
+ We show that a scale-invariant CNN in the sense of equation 1 would be extremely limited. Let $G = ( \mathbb { R } _ { > 0 } , \cdot )$ be the rescaling group. It is isomorphic to $( \mathbb { R } , + )$ . For $c$ a real number, $\rho _ { c } ( \lambda ) = \lambda ^ { c }$ gives an action of $G$ on $\mathbb { R }$ . There is also, e.g., a two-dimensional representation
482
+
483
+ $$
484
+ \rho ( \lambda ) = \left( \begin{array} { c c } { { 1 } } & { { \log ( \lambda ) } } \\ { { 0 } } & { { 1 } } \end{array} \right) .
485
+ $$
486
+
487
+ Proposition 13. Let $K$ be a $G$ -equivariant kernel for a convolutional layer. Assume $G$ acts on the input layer by $\rho _ { i n }$ and output layer by $\rho _ { o u t }$ . Assume that the input layer is padded with 0s. Then $K$ is $l x l$ .
488
+
489
+ Proof. If $v \ne 0$ then there exists $\lambda \in \mathbb { R } _ { > 0 }$ such that $\lambda v$ is outside the radius of the kernel. So $K ( \lambda v ) = 0$ . Thus by equivariance, for some $n$ ,
490
+
491
+ $$
492
+ K ( v ) = \lambda ^ { \mathbf { n } } \rho _ { \mathrm { o u t } } ^ { - 1 } K ( \lambda v ) \rho _ { \mathrm { i n } } = 0 .
493
+ $$
494
+
495
+ # B.5 EQUIVARIANCE ERROR.
496
+
497
+ In practice it is difficult to implement a model which is perfectly equivariant. This results in equivariance error $\mathrm { E E } _ { T } ( x ) \stackrel { } { = } \stackrel { \cdot } { | T ( f ( x ) ) - f ( T ( x ) ) | }$ . Given an input $x$ with true output $\hat { y }$ and transformed data $T ( x )$ , the transformed test error $\tilde { \Gamma \mathrm { T E } } = | T ( \hat { y } ) - f ( T ( x ) ) |$ can be bounded using the untransformed test error $\mathrm { T E } = | \hat { y } - f ( x ) |$ and EE.
498
+
499
+ Proposition 14. The transformed test error is bounded
500
+
501
+ $$
502
+ \mathrm { T T E } \leq | T | \mathrm { T E } + \mathrm { E E } .
503
+ $$
504
+
505
+ Proof. By the triangle inequality
506
+
507
+ $$
508
+ \begin{array} { r l } & { | T ( \hat { y } ) - f ( T ( x ) ) | \leq | T ( \hat { y } ) - T ( f ( x ) ) | + | T ( f ( x ) ) - f ( T ( x ) ) | } \\ & { \qquad = | T | | \hat { y } - f ( x ) | + \mathrm { E E } . } \end{array}
509
+ $$
510
+
511
+ For uniform motion $\mathrm { T T E } \leq \mathrm { E E } + \mathrm { T E }$ since $| T ( \hat { y } ) - T ( f ( x ) ) | = | \hat { y } + c - f ( x ) - c | = \mathrm { T E }$ . Consider $x$ and $y$ as flattened into a vector. $| T | = \operatorname* { s u p } _ { | x | = 1 } | T ( x ) |$ denotes the operator norm. For $g \in S O ( 2 )$ , acting by $T _ { g }$ on vector fields, $\left| T _ { g } \right| = 1$ . For scaling $T ^ { \lambda } ( w ) ( x , t ) = \lambda w ( \lambda x , \lambda ^ { 2 } t )$ , $| T ^ { \lambda } | = \lambda / \sqrt { \lambda ^ { 4 } } = 1 / \lambda$ .
512
+
513
+ B.6 FULL LISTS OF SYMMETRIES OF HEAT AND NS EQUATIONS.
514
+
515
+ Symmetries of NS Equations. The Navier-Stokes equations are invariant under five different transformations (see e.g. [38]),
516
+
517
+ • Space translation: $T _ { c } ^ { \mathrm { s p } } \pmb { w } ( \pmb { x } , t ) = \pmb { w } ( \pmb { x } - \pmb { c } , t ) , \pmb { c } \in \mathbb { R } ^ { 2 }$ , • Time translation: $T _ { \tau } ^ { \mathrm { t i m e } } { \pmb w } ( { \pmb x } , t ) = { \pmb w } ( { \pmb x } , t - \tau ) , \tau$ $\tau \in \mathbb { R }$ , • Uniform motion: $T _ { c } ^ { \mathrm { u m } } \pmb { w } ( \pmb { x } , t ) = \pmb { w } ( \pmb { x } , t ) + c , c \in \mathbb { R } ^ { 2 }$ , • Reflect/rotation: $T _ { R } ^ { \mathrm { r o t } } { \pmb w } ( { \pmb x } , t ) = R { \pmb w } ( R ^ { - 1 } { \pmb x } , t ) , R \in O ( 2 ) ,$ • Scaling: $T _ { \lambda } ^ { s c } { \pmb w } ( { \pmb x } , t ) = \lambda { \pmb w } ( \lambda { \pmb x } , \lambda ^ { 2 } t ) , \lambda \in \mathbb { R } _ { > 0 } .$ .
518
+
519
+ Individually each of these types of transformations generates a group of symmetries of the system.
520
+ Collectively, they form a 7-dimensional symmetry group.
521
+
522
+ Symmetries of Heat Equation. The heat equation has an even larger symmetry group than the NS equations [38]. Let $H ( { \pmb x } , t )$ be a solution to equation $\mathcal { D } _ { \mathrm { h e a t } }$ . Then the following are also solutions:
523
+
524
+ • Space translation: $H ( \pmb { x } - \pmb { v } , t )$ , $\pmb { v } \in \mathbb { R } ^ { 2 }$ ,
525
+ • Time translation: $H ( { \pmb x } , t - c )$ , $c \in \mathbb { R }$ ,
526
+ • Galilean: $e ^ { - { \pmb v } \cdot { \pmb x } + { \pmb v } \cdot { \pmb v } t } H ( { \pmb x } - 2 { \pmb v } t , t ) , { \pmb v } \in \mathbb { R } ^ { 2 }$
527
+ • Reflect/Rotation: $H ( R { \pmb x } , t ) , R \in O ( 2 )$ ,
528
+ • Scaling: $H ( \lambda \mathbf { x } , \lambda ^ { 2 } t )$ , $\lambda \in \mathbb { R } _ { > 0 }$
529
+ • Linearity: $\lambda H ( { \pmb x } , t )$ , $\lambda \in \mathbb { R }$ and $H ( \mathbf { x } , t ) + H _ { 1 } ( \mathbf { x } , t ) , H _ { 1 } \in \mathrm { S o l } ( \mathcal { D } _ { \mathrm { h e a t } } )$ • Inversion: $a ( t ) e ^ { - a ( t ) c x \cdot x } H ( a ( t ) x , a ( t ) t )$ , where $a ( t ) = ( 1 + 4 c t ) ^ { - 1 } , c \in \mathbb { R }$ .
530
+
531
+ # B.7 TURBULENCE KINETIC ENERGY SPECTRUM
532
+
533
+ The turbulence kinetic energy spectrum $E ( k )$ is related to the mean turbulence kinetic energy as
534
+
535
+ $$
536
+ \begin{array} { r } { \int _ { 0 } ^ { \infty } E ( k ) d k = ( \overline { { ( u ^ { \prime } ) ^ { 2 } } } + \overline { { ( v ^ { \prime } ) ^ { 2 } } } ) / 2 , } \\ { \overline { { ( u ^ { \prime } ) ^ { 2 } } } = \displaystyle \frac { 1 } { T } \sum _ { t = 0 } ^ { T } ( u ( t ) - \bar { u } ) ^ { 2 } , } \end{array}
537
+ $$
538
+
539
+ where the $k$ is the wavenumber and $t$ is the time step. Figure 5 shows a theoretical turbulence kinetic energy spectrum plot. The spectrum can describe the transfer of energy from large scales of motion to the small scales and provides a representation of the dependence of energy on frequency. Thus, the Energy Spectrum Error can indicate whether the predictions preserve the correct statistical distribution and obey the energy conservation law. A trivial example that can illustrate why we need ESE is that if a model simply outputs moving averages of input frames, the accumulated RMSE of predictions might not be high but the ESE would be really big because all the small or even medium eddies are smoothed out.
540
+
541
+ ![](images/07455f4484a888050978f6ebb3f257c1bf34caff3492ece8d8f5ba4ca338728e.jpg)
542
+ Figure 5: Theoretical turbulence energy spectrum plot
543
+
544
+ # C HEAT DIFFUSION
545
+
546
+ 2D Heat Equation. Let $H ( t , x , y )$ be a scalar field representing temperature. Then $H$ satisfies
547
+
548
+ $$
549
+ \frac { \partial H } { \partial t } = \alpha \Delta H .
550
+ $$
551
+
552
+ $$
553
+ \left( \mathcal { D } _ { \mathrm { h e a t } } \right)
554
+ $$
555
+
556
+ Here $\Delta = \partial _ { x } ^ { 2 } + \partial _ { y } ^ { 2 }$ is the two-dimensional Laplacian and $\alpha \in \mathbb { R } _ { > 0 }$ is the diffusivity.
557
+
558
+ The Heat Equation plays a major role in studying heat transfer, Brownian motion and particle diffusion. We simulate the heat equation at various initial conditions and thermal diffusivity using the finite difference method and generate $6 k$ scalar temperature fields. Figure 6 shows a heat diffusion process where the temperature inside the circle is higher than the outside and the thermal diffusivity is 4. Since the heat equation is much simpler than the NS equations, a shallow CNN suffices to forecast the heat diffusion process.
559
+
560
+ ![](images/74ab0331ce6a4d0e49ad63304a5f11dda5e8d67f5c469e161707ac38600a746d.jpg)
561
+ Figure 6: Five snapshots in heat diffusion dynamics. The spatial resolution is $5 0 \times 5 0$ pixels.
562
+
563
+ For heat diffusion, due to the law of energy conservation, the sum of each temperature field should be consistent over the entire heat diffusion process. We evaluate the physical characteristics of the predictions using the L1 loss of the thermal energy. Table 5 shows the prediction RMSE and thermal energy loss of the CNNs and three Equ-CNNs on three transformed test sets. We can see that Equ-CNNs consistently outperform CNNs over three test sets.
564
+
565
+ Table 5: The prediction RMSE and thermal energy L1 loss of the CNNs and three Equ-CNNs on three transformed test sets. Equ-CNNs outperform the CNNs over all three test sets.
566
+
567
+ <table><tr><td>Testset$</td><td colspan="3">RMSE (Thermal Energy Loss)</td></tr><tr><td>Models</td><td>Mag</td><td>Rot</td><td>Scale</td></tr><tr><td>CNNs</td><td>0.103 (4696.3)</td><td>0.308 (1125.6)</td><td>0.357 (1447.6)</td></tr><tr><td>Equ-CNNs</td><td>0.028 (107.7)</td><td>0.153 (127.3)</td><td>0.045 (396.6)</td></tr></table>
568
+
569
+ # D IMPLEMENTATION DETAILS
570
+
571
+ # D.1 DATASETS DESCRIPTION
572
+
573
+ Rayleigh-Bénard convection Rayleigh-Bénard convection results from a horizontal layer of fluid heated from below, which is a major feature of the El Nino dynamics. The dataset comes from two dimensional turbulent flow simulated using the Lattice Boltzmann Method [8] with Rayleigh number $= 2 . 5 \times 1 0 ^ { 8 }$ . We divided each $1 7 9 2 \times 2 5 6$ image into 7 square sub-regions of size $2 5 6 \times 2 5 6$ , then downsample them into $6 4 \times 6 4$ pixels sized images. Figure 7 in appendix shows a snapshot in our RBC flow dataset. We generate the following test sets to test the models’ generalization ability.
574
+
575
+ • Uniform motion (UM): transformed test sets by adding random vectors drawn from $U ( - 1 , 1 )$ .
576
+ • Magnitude (Mag): transformed test sets by multiplying random values sampled from $U ( 0 , 2 )$ .
577
+ • Rotation $( R o t )$ : transformed test sets by randomly rotated by the multiples of $\pi / 1 2$ .
578
+ • Scale: transformed test sets by scaling each sample $\lambda$ sampled from $U ( 1 / 5 , 2 )$ .
579
+
580
+ ![](images/57bcf96b3f914cc2903f7e2c2058d24af81a3af6bb7586832c5eafb44e6b8335.jpg)
581
+ Figure 7: A snapshot of the Rayleigh-Bénard convection flow, the velocity fields along $x$ direction (left) and $y$ direction (right) [8]. The spatial resolution is $1 7 9 2 \times 2 5 6$ pixels.
582
+
583
+ Ocean Currents We used the reanalysis ocean currents velocity data generated by the NEMO (Nucleus for European Modeling of the Ocean) simulation engine 2. We selected an area from each of the Atlantic, Indian and North Pacific Oceans from 01/01/2016 to 08/18/2017 and extracted $6 4 \times 6 4$ sub-regions for our experiments. The corresponding latitude and longitude ranges for the selected regions are $- 4 4 \sim - 2 3$ , $2 5 { \sim } 4 6 ,$ ), $( 5 5 \sim 7 6$ , ${ - 3 9 } \mathrm { \sim } { - 1 8 } $ ) and $( - 1 7 4 \sim - 1 5 3$ , $5 { \sim } 2 6$ ) respectively. We not only test all models on the future data but also on a different domain $- 1 8 0 \mathrm { \sim } - 1 5 9$ , $- 4 0 \sim - 5 9$ ) in South Pacific Ocean from 01/01/2016 to 12/15/2016. Also, the most recent work on this dataset is [15], which unified a warping scheme and an U-net to predict temperature. So to compare our equivariant models with state-of-arts, we also investigate our models on the task of temperature field predictions. Since the data back to year 2006 that [15] used is no longer available, we collect more recent temperature data from a square region $( - 5 0 \sim - 2 0 , 2 0 \sim 5 0 )$ in Atlantic Ocean from 01/01/2016 to 12/31/2017.
584
+
585
+ # D.2 EXPERIMENTS SETUP
586
+
587
+ We tested our convolutional equivariant layers in two architecture, 18-layer ResNet and 13-layer U-net. One of our goals is to show that adding equivariance improves the physical accuracy of state-of-the-art dynamics prediction. ResNet and ${ \mathrm { U } } - { \mathrm { n e t } }$ are the popular state-of-the-art methods at the moment and our equivariance techniques are well-suited for their architecture. The reason we did not use recurrent models, such as Convolutional LSTM, is that they are slow to train especially for our case where the input length is large. This does not fit our long-term goal of accelerating computation.
588
+
589
+ The input to each model is a $l \times 6 4 \times 6 4 \times 2 \cdot$ -size tensor representing the past $l$ timesteps of the velocity field. The output is a single velocity field. The value of $l$ is a hyper-parameter we tuned. We found the optimal value of $l$ to be around $l = 2 5$ . To predict more timesteps, we apply the model autoregressively, dropping the oldest timestep and concatenating the prediction to the input.
590
+
591
+ To make this a fair comparison, we adjust the hidden dimensions for different equivariant models to make sure that the number of parameters in all models are about the same for either architecture, which can be found in Table 6. Table 7 gives the hyper-parameter tuning ranges for our models. Note that the hidden dimension and the number of layers of the shallow CNNs for the heat diffusion task are also well-tuned.
592
+
593
+ The loss function used is the MSE between the predicted frames and the ground truth for next $k$ steps, where $k$ is a parameter we tuned. We found $k = 3$ or 4 give the best performance. We use $6 0 \% - 2 0 \% - 2 0 \%$ training-validation-test split in time and use the validation set for hyper-parameters tuning based on the average error of predictions. The training set corresponds to the first $60 \%$ of the entire dataset in time and the validation/test sets contains the following $40 \%$ . For fluid flows, we standardize the data by the average of velocity vectors and the standard deviation of the L2 norm of velocity vectors. For sea surface temperature, we did the exact same data preprocessing described in de Bezenac et al. [15].
594
+
595
+ Table 6: The number of parameters in each model and time costs for training an epoch on 8 V100 GPUs.
596
+
597
+ <table><tr><td>ResNet</td><td>Reg</td><td>UM</td><td>Mag</td><td>Rot</td><td>Scale</td><td>U-net</td><td>Reg</td><td>UM</td><td>Mag</td><td>Rot</td><td>Scale</td></tr><tr><td>Params (106)</td><td>11.0</td><td>11.0</td><td>11.0</td><td>10.2</td><td>10.7</td><td></td><td>6.2</td><td>6.2</td><td>6.2</td><td>7.1</td><td>5.9</td></tr><tr><td>Time(min)</td><td>3.04</td><td>5.21</td><td>5.50</td><td>14.31</td><td>160.32</td><td></td><td>2.15</td><td>4.32</td><td>4.81</td><td>11.32</td><td>135.72</td></tr></table>
598
+
599
+ # E ADDITIONAL RESULTS
600
+
601
+ Table 8 shows the RMSEs of temperature predictions. Figure 8 shows the ground truth and the√ predicted velocity norm fields $( \sqrt { u ^ { 2 } + v ^ { 2 } } )$ at time step 1, 5 and 10 by the U-net and four Equ-Unet
602
+
603
+ Table 7: The Hyper-parameter tuning range: Learning rate, the number of accumulated errors for backpropogation, the number of input frames, batch size, and the hidden dimension and the number of layers of the shallow CNNs for heat diffusion
604
+
605
+ <table><tr><td></td><td>Learning rate |#Accum Errors|#Input frames</td><td></td><td>Batch Size</td><td>Hidden dim (CNNs)| #Layers (CNNs)</td><td></td></tr><tr><td>1e-1~ 1e-6</td><td>1~10</td><td>1~30</td><td>4~64</td><td>8~128</td><td>1~10</td></tr></table>
606
+
607
+ on the four transformed test samples. Figure 9 shows the ground truth and the predicted ocean currents $( \sqrt { u ^ { 2 } + v ^ { 2 } } )$ at time step 5 and 10 by the regular ResNet and four Equ-ResNets on the test set of future time.
608
+
609
+ Table 8: The RMSEs of temperature predictions on test data. For equivariant models, the left number in the cell is ResNet and the right number in the cell is U-net
610
+
611
+ <table><tr><td></td><td>CLSTM</td><td>Bézenac</td><td>ResNet U-net</td><td></td><td>EquuM</td><td>Equmag</td><td>EquRot</td><td>Equscal</td></tr><tr><td>RMSE</td><td>0.46</td><td>0.38</td><td>0.41</td><td>0.391</td><td>0.38 1 0.37</td><td>0.39 10.37</td><td>0.3810.40</td><td>0.42 10.41</td></tr></table>
612
+
613
+ ![](images/903fab999acccf7f9d766390f676e1f36c72039b7b4a6651b4962de160cb57bc.jpg)
614
+ Figure 8: The ground truth and the predicted velocity norm fields $( \sqrt { u ^ { 2 } + v ^ { 2 } } )$ at time step 1, 5 and 10 by the U-net and four Equ-Unet on the four transformed test samples. From left to right, the transformed test samples are the original test samples uniform-motion-shifted by $( 1 , - 0 . 5 )$ , magnitude-scaled by 1.5, rotated by 90 degrees and upscaled by 3 respectively. The first row is the target, the second row is Equ-Unets predictions, and the third row is predictions by U-net.
615
+
616
+ ![](images/4ffc65424708b059cda0434db4f8f41c4c3a312d6bc0674e04fd624337487421.jpg)
617
+ Figure 9: The ground truth and the predicted ocean currents $( \sqrt { u ^ { 2 } + v ^ { 2 } } )$ at time step 5 and 10 by the regular ResNet and four Equ-ResNets on the test set of future time.
parse/train/wta_8Hx2KD/wta_8Hx2KD_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/wta_8Hx2KD/wta_8Hx2KD_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/wta_8Hx2KD/wta_8Hx2KD_model.json ADDED
The diff for this file is too large to render. See raw diff