Datasets:
Add files using upload-large-folder tool
Browse files- md/train/1toB0Fo9CZy/1toB0Fo9CZy.md +450 -0
- md/train/2pJZSVcSZz/2pJZSVcSZz.md +254 -0
- md/train/52XXcK8jY0J/52XXcK8jY0J.md +206 -0
- md/train/68B1ezcffDc/68B1ezcffDc.md +343 -0
- md/train/BJgklhAcK7/BJgklhAcK7.md +426 -0
- md/train/BJlBSkHtDS/BJlBSkHtDS.md +298 -0
- md/train/BJlS634tPr/BJlS634tPr.md +0 -0
- md/train/ByZmGjkA-/ByZmGjkA-.md +221 -0
- md/train/Byj54-bAW/Byj54-bAW.md +464 -0
- md/train/BylaUTNtPS/BylaUTNtPS.md +582 -0
- md/train/Byx9p2EtDH/Byx9p2EtDH.md +300 -0
- md/train/Eql5b1_hTE4/Eql5b1_hTE4.md +348 -0
- md/train/H18uzzWAZ/H18uzzWAZ.md +330 -0
- md/train/H196sainb/H196sainb.md +314 -0
- md/train/HJeVnCEKwH/HJeVnCEKwH.md +460 -0
- md/train/HJeqhA4YDS/HJeqhA4YDS.md +0 -0
- md/train/HJsjkMb0Z/HJsjkMb0Z.md +252 -0
- md/train/HJx7l309Fm/HJx7l309Fm.md +393 -0
- md/train/HJxFrs09YQ/HJxFrs09YQ.md +339 -0
- md/train/HJzgZ3JCW/HJzgZ3JCW.md +222 -0
- md/train/Hk4fpoA5Km/Hk4fpoA5Km.md +270 -0
- md/train/HkcdHtqlx/HkcdHtqlx.md +317 -0
- md/train/HknbyQbC-/HknbyQbC-.md +359 -0
- md/train/HktK4BeCZ/HktK4BeCZ.md +439 -0
- md/train/Hy_o3x-0b/Hy_o3x-0b.md +235 -0
- md/train/IOqr2ZyXHz1/IOqr2ZyXHz1.md +246 -0
- md/train/MSXDyfli9vy/MSXDyfli9vy.md +271 -0
- md/train/NsMLjcFaO8O/NsMLjcFaO8O.md +429 -0
- md/train/OqtLIabPTit/OqtLIabPTit.md +328 -0
- md/train/QWIvzSQaX5/QWIvzSQaX5.md +256 -0
- md/train/RSU17UoKfJF/RSU17UoKfJF.md +376 -0
- md/train/S1Jhfftgx/S1Jhfftgx.md +230 -0
- md/train/SJ3dBGZ0Z/SJ3dBGZ0Z.md +266 -0
- md/train/SklTQCNtvS/SklTQCNtvS.md +414 -0
- md/train/Skxuk1rFwB/Skxuk1rFwB.md +0 -0
- md/train/Syxwsp4KDB/Syxwsp4KDB.md +238 -0
- md/train/XjIm8hOCxTm/XjIm8hOCxTm.md +269 -0
- md/train/dOcQK-f4byz/dOcQK-f4byz.md +374 -0
- md/train/eLfqMl3z3lq/eLfqMl3z3lq.md +227 -0
- md/train/enoVQWLsfyL/enoVQWLsfyL.md +319 -0
- md/train/kLwjnXCh2hm/kLwjnXCh2hm.md +464 -0
- md/train/qWtmNpgjD5K/qWtmNpgjD5K.md +384 -0
- md/train/qrwe7XHTmYb/qrwe7XHTmYb.md +480 -0
- md/train/r1ecqn4YwB/r1ecqn4YwB.md +0 -0
- md/train/rJeW1yHYwH/rJeW1yHYwH.md +465 -0
- md/train/rJgSk04tDH/rJgSk04tDH.md +240 -0
- md/train/rygkk305YQ/rygkk305YQ.md +0 -0
- md/train/rygrBhC5tQ/rygrBhC5tQ.md +425 -0
- md/train/ryxO3gBtPB/ryxO3gBtPB.md +341 -0
- md/train/zfO1MwBFu-/zfO1MwBFu-.md +476 -0
md/train/1toB0Fo9CZy/1toB0Fo9CZy.md
ADDED
|
@@ -0,0 +1,450 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NEURAL ARCHITECTURE SEARCH OF SPD MANIFOLD NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
In this paper, we propose a new neural architecture search (NAS) problem of Symmetric Positive Definite (SPD) manifold networks. Unlike the conventional NAS problem, our problem requires to search for a unique computational cell called the SPD cell. This SPD cell serves as a basic building block of SPD neural architectures. An efficient solution to our problem is important to minimize the extraneous manual effort in the SPD neural architecture design. To accomplish this goal, we first introduce a geometrically rich and diverse SPD neural architecture search space for an efficient SPD cell design. Further, we model our new NAS problem using the supernet strategy, which models the architecture search problem as a one-shot training process of a single supernet. Based on the supernet modeling, we exploit a differentiable NAS algorithm on our relaxed continuous search space for SPD neural architecture search. Statistical evaluation of our method on drone, action, and emotion recognition tasks mostly provides better results than the stateof-the-art SPD networks and NAS algorithms. Empirical results show that our algorithm excels in discovering better SPD network design and providing models that are more than 3 times lighter than searched by state-of-the-art NAS algorithms.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Designing a favorable neural network architecture for a given application requires a lot of time, effort, and domain expertise. To mitigate this issue, researchers in the recent years have started developing algorithms to automate the design process of neural network architectures (Zoph & Le, 2016; Zoph et al., 2018; Liu et al., 2017; 2018a; Real et al., 2019; Liu et al., 2018b; Tian et al., 2020). Although these neural architecture search (NAS) algorithms have shown great potential to provide an optimal architecture for a given application, it is limited to handle architectures with Euclidean operations and representation. To deal with non-euclidean data representation and corresponding set of operations, researchers have barely proposed any NAS algorithms —to the best of our knowledge.
|
| 12 |
+
|
| 13 |
+
It is well-known that manifold-valued data representation such as symmetric positive definite (SPD) matrices have shown overwhelming accomplishments in many real-world applications such as pedestrian detection (Tuzel et al., 2006; 2008), magnetic resonance imaging analysis (Pennec et al., 2006), action recognition (Harandi et al., 2014), face recognition (Huang et al., 2014; 2015), braincomputer interfaces (Barachant et al., 2011), structure from motion (Kumar et al., 2018; Kumar, 2019), etc. Also, in applications like diffusion tensor imaging of the brain, drone imaging, samples are collected directly as SPD’s. As a result, neural network usage based on Euclidean data representation becomes inefficient for those applications. Consequently, this has led to the development of the SPD neural network (SPDNet) architectures for further improvements in these areas of research (Huang & Van Gool, 2017; Brooks et al., 2019). However, these architectures are handcrafted, so the operations or the parameters defined for these networks generally change as per the application. This motivated us to propose a new NAS problem of SPD manifold networks. A solution to this problem can reduce unwanted efforts in SPDNet design. Compared to the traditional NAS problem, our NAS problem requires a new definition of computation cell and proposal for diverse SPD candidate operation set. In particular, we model the basic architecture cell with a specific directed acyclic graph (DAG), where each node is a latent SPD representation, and each edge corresponds to a SPD candidate operation. Here, the intermediate transformations between nodes respect the geometry of the SPD manifolds.
|
| 14 |
+
|
| 15 |
+
For solving the suggested NAS problem, we exploit a supernet search strategy which models the architecture search problem as a one-shot training process of a supernet that comprises of a mixture of SPD neural architectures. The supernet modeling enables us to perform a differential architecture search on a continuous relaxation of SPD neural architecture search space, and therefore, can be solved using a gradient descent approach. Our evaluation validates that the proposed method can build a reliable SPD network from scratch. We show the results of our method on benchmark datasets that clearly show results better than handcrafted SPDNet. Our work makes the following contributions:
|
| 16 |
+
|
| 17 |
+
• We introduce a NAS problem of SPD manifold networks that opens up a new direction of research in automated machine learning and SPD manifold learning. Based on a supernet modeling, we propose a novel differentiable NAS algorithm for SPD neural architecture search. Concretely, we exploit a sparsemax-based Frechet mixture of SPD operations to introduce sparsity that is essential ´ for an effective diffentiable search, and bi-level optimization with manifold-based update and convexity-based update to jointly optimize architecture parameters and network kernel weights. Besides well-studied operations from exiting SPDNets (Huang & Van Gool, 2017; Brooks et al., 2019; Chakraborty et al., 2020), we follow Liu et al. (2018b) to further introduce some new SPD layers, i.e., skip connection, none operation, max pooling and averaging pooling. Our introduced additional set of SPD operations make the search space more diverse for the neural architecture search algorithm to obtain more generalized SPD neural network architectures. Evaluation on three benchmark datasets shows that our searched SPD neural architectures can outperform the existing handcrafted SPDNets (Huang & Van Gool, 2017; Brooks et al., 2019; Chakraborty et al., 2020) and the state-of-the-art NAS methods (Liu et al., 2018b; Chu et al., 2020). Notably, our searched architecture is more than 3 times lighter than those searched by the traditional NAS algorithms.
|
| 18 |
+
|
| 19 |
+
# 2 BACKGROUND
|
| 20 |
+
|
| 21 |
+
In recent years, plenty of research work has been published in the area of NAS (Gong et al., 2019; Liu et al., 2019; Nayman et al., 2019; Guo et al., 2020). This is probably due to the success of deep learning for several applications which has eventually led to the automation of neural architecture design. Also, improvements in the processing capabilities of machines has influenced the researchers to work out this computationally expensive yet an important problem. Computational cost for some of the well-known NAS algorithms is in thousands of GPU days which has resulted in the development of several computationally efficient methods (Zoph et al., 2018; Real et al., 2019; Liu et al., 2018a; 2017; Baker et al., 2017; Brock et al., 2017; Bender, 2019; Elsken et al., 2017; Cai et al., 2018; Pham et al., 2018; Negrinho & Gordon, 2017; Kandasamy et al., 2018; Chu et al., 2020). In this work, we propose a new NAS problem of SPD networks. We solve this problem using a supernet modeling methodology with a one-shot differentiable training process of an overparameterized supernet. Our modeling is driven by the recent progress in supernet methodology. Supernet methodology has shown a great potential than other NAS methodologies in terms of search efficiency. Since our work is directed towards solving a new NAS problem, we confine our discussion to the work that have greatly influenced our method i.e., one-shot NAS methods and SPD networks.
|
| 22 |
+
|
| 23 |
+
To the best of our knowledge, there are mainly two types of one-shot NAS methods based on the architecture modeling (Elsken et al., 2018) (a) parameterized architecture (Liu et al., 2018b; Zheng et al., 2019; Wu et al., 2019; Chu et al., 2020), and (b) sampled architecture (Deb et al., 2002; Chu et al., 2019). In this paper, we adhere to the parametric modeling due to its promising results on conventional neural architectures. A majority of the previous work on NAS with continuous search space fine-tunes the explicit feature of specific architectures (Saxena & Verbeek, 2016; Veniat & Denoyer, 2018; Ahmed & Torresani, 2017; Shin et al., 2018). On the contrary, Liu et al. (2018b); Liang et al. (2019); Zhou et al. (2019); Zhang et al. (2020); Wu et al. (2020); Chu et al. (2020) provides architectural diversity for NAS with highly competitive performances. The other part of our work focuses on SPD network architectures. There exist algorithms to develop handcrafted SPDNet (Huang & Van Gool, 2017; Brooks et al., 2019; Chakraborty et al., 2020). To automate the process of SPD network design, in this work, we choose the most promising approaches from these fields (NAS (Liu et al., 2018b), SPD networks (Huang & Van Gool, 2017)) and propose a NAS algorithm for SPD inputs. Next, we summarize the essential notions of Riemannian geometry of SPD manifolds, followed by an introduction of some basic SPDNet operations and layers. As some of the introduced operations and layers have been well-studied by the existing literature, we applied them directly to define our SPD neural architectures’ search space.
|
| 24 |
+
|
| 25 |
+
Representation and Operation: We denote $n \times n$ real SPD as $\pmb { X } \in \mathcal { S } _ { + + } ^ { n }$ . A real SPD matrix $\pmb { X } \in \mathcal { S } _ { + + } ^ { n }$ satisfies the property that for any non-zero $z \in \mathbb { R } ^ { n }$ , $z ^ { T } X z > 0$ (Harandi et al., 2017). We denote $\overrightharpoon { \tau } _ { X } \mathcal { M }$ as the tangent space of the manifold $\mathcal { M }$ at $\pmb { X } \in \mathcal { S } _ { + + } ^ { n }$ and log corresponds to matrix logarithm. Let $X _ { 1 } , X _ { 2 }$ be any two points on the SPD manifold then the distance between them is given by
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
\delta _ { \mathcal { M } } ( X _ { 1 } , X _ { 2 } ) = 0 . 5 \| \log ( X _ { 1 } ^ { - \frac { 1 } { 2 } } X _ { 2 } X _ { 1 } ^ { - \frac { 1 } { 2 } } ) \| _ { F }
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
There are other efficient methods to compute distance between two points on the SPD manifold (Gao et al., 2019; Dong et al., 2017b), however, their discussion is beyond the scope of our work. Other property of the Riemannian manifold of our interest is local diffeomorphism of geodesics which is a one-to-one mapping from the point on the tangent space of the manifold to the manifold (Pennec, 2020; Lackenby, 2020). To define such notions, let $\pmb { X } \in \mathcal { S } _ { + + } ^ { n }$ be the base point and, $Y \in \mathcal { T } _ { \mathbf { X } } \mathcal { S } _ { + + } ^ { n }$ , then Eq:(2) associates $Y \in \mathcal { T } _ { X } { S } _ { + + } ^ { n }$ to a point on the manifold (Pennec, 2020).
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\exp _ { X } ( Y ) = X ^ { \frac { 1 } { 2 } } \exp ( X ^ { - \frac { 1 } { 2 } } Y X ^ { - \frac { 1 } { 2 } } ) X ^ { \frac { 1 } { 2 } } \in { \mathcal { S } } _ { + + } ^ { n } , \ \forall Y \in { \mathcal { T } } _ { X }
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
Similarly, an inverse map is defined as $\log _ { X } ( Z ) = X ^ { \frac { 1 } { 2 } } \log ( X ^ { - \frac { 1 } { 2 } } Z X ^ { - \frac { 1 } { 2 } } ) X ^ { \frac { 1 } { 2 } } \in { \mathcal { T } } _ { X } , \forall Z \in S _ { + + } ^ { n } .$
|
| 38 |
+
|
| 39 |
+
1) Basic operations of SPD Network: It is well-known that operations such as mean centralization, normalization, and adding bias to a batch of data are inherent performance booster for most neural networks. In the same spirit, existing works like Brooks et al. (2019); Chakraborty (2020) use the notion of these operations for the SPD or general manifold data to define analogous operations on manifolds. Below we introduce them following the work of Brooks et al. (2019).
|
| 40 |
+
|
| 41 |
+
• Batch mean, centering and bias: Given a batch of $N$ SPD matrices $\{ X _ { i } \} _ { i = 1 } ^ { N }$ , we can compute its Riemannian barycenter $( { \mathcal { B } } )$ as ${ \mathcal { B } } = \underset { X _ { \mu } \in S _ { + + } ^ { n } } { \mathrm { a r g m i n } } ~ \sum _ { i = 1 } ^ { N } \delta _ { { \mathcal { M } } } ^ { 2 } ( X _ { i } , X _ { \mu } )$ . It is sometimes referred as Frechet mean ( ´ Moakher, 2005; Bhatia $\&$ Holbrook, 2006). This definition can be extended to compute the weighted Riemannian Barycenter 1 also known as weighted Frechet Mean (wFM) . ´
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\mathcal { B } = \mathop { \mathrm { \underset { \boldsymbol { x } } { \mathrm { r g m i n } } } } _ { \boldsymbol { x } _ { \mu } \in S _ { + + } ^ { n } } \sum _ { i = 1 } ^ { N } w _ { i } \delta _ { \mathcal { M } } ^ { 2 } ( \boldsymbol { X } _ { i } , \boldsymbol { X } _ { \mu } ) ; \mathrm { \boldsymbol { s . t . } } w _ { i } \geq 0 \mathrm { \ a n d \ } \sum _ { i = 1 } ^ { N } w _ { i } = 1
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
Eq:(3) can be approximated using Karcher flow (Karcher, 1977; Bonnabel, 2013; Brooks et al., 2019) or recursive geodesic mean (Cheng et al., 2016; Chakraborty et al., 2020).
|
| 48 |
+
|
| 49 |
+
2) Basic layers of SPD Network: Analogous to standard CNN, methods like Huang & Van Gool (2017); Brooks et al. (2019); Chakraborty et al. (2020) designed SPD layers to perform operations that respect SPD manifold constraints. Assuming $\pmb { X } _ { k - 1 } \in \mathcal { S } _ { + + } ^ { n }$ be the input SPD matix to the $k ^ { t h }$ layer, the SPD network layers are defined as follows:
|
| 50 |
+
|
| 51 |
+
• BiMap layer: This layer corresponds to a dense layer for SPD data. The BiMap layer reduces the dimension of a input SPD matrix via a transformation matrix $W _ { k }$ as $\pmb { X } _ { k } = \bar { \pmb { W } } _ { k } \mathbf { \bar { X } } _ { k - 1 } \pmb { W } _ { k } ^ { T }$ . To ensure the matrix $X _ { k }$ to be an SPD matrix, the $W _ { k }$ matrix must be of full row-rank.
|
| 52 |
+
|
| 53 |
+
• Batch normalization layer: To perform batch normalization after each BiMap layer, we first compute the Riemannian barycenter of the batch of SPD matrices followed by a running mean update step, which is Riemannian weighted average between the batch mean and the current running mean, with the weights $( 1 - \theta )$ and $( \theta )$ respectively. Once mean is calculated, we centralize and add bias to each SPD sample of the batch using Eq:(4) (Brooks et al., 2019), where $\mathcal { P }$ is the notation used for parallel transport :
|
| 54 |
+
|
| 55 |
+
Batch centering : Centering th $\begin{array} { r l } & { \textup { \bf e } \mathcal { B } : { \bf X } _ { i } ^ { c } = \mathcal { P } _ { \mathcal { B } I } ( { \bf X } _ { i } ) = \mathcal { B } ^ { - \frac { 1 } { 2 } } { \bf X } _ { i } \mathcal { B } ^ { - \frac { 1 } { 2 } } , I \mathrm { ~ i s ~ t h e ~ i d e n t i t y ~ m a t r i x } } \\ & { { \bf \mathfrak { I } } : { \bf X } _ { i } ^ { b } = \mathcal { P } _ { I G } ( { \bf X } _ { i } ^ { c } ) = G ^ { \frac { 1 } { 2 } } { \bf X } _ { i } ^ { c } G ^ { \frac { 1 } { 2 } } , I \mathrm { ~ i s ~ t h e ~ i d e n t i t y ~ m a t r i x } } \end{array}$ Bias the batch $:$ Bias towards
|
| 56 |
+
|
| 57 |
+
• ReEig layer: The ReEig layer is analogous to ReLU like layers present in the classical ConvNets. It aims to introduce non-linearity to SPD network. The ReEig for the $k ^ { t h }$ layer is defined as: $\boldsymbol { X _ { k } } = \boldsymbol { U _ { k - 1 } } \operatorname* { m a x } ( \epsilon \boldsymbol { I } , \boldsymbol { \Sigma _ { k - 1 } } ) \boldsymbol { U } _ { k - 1 } ^ { T }$ where, $X _ { k - 1 } = { U _ { k - 1 } } { \Sigma _ { k - 1 } } { \bar { U } _ { k - 1 } } ^ { T }$ , $\pmb { I }$ is the identity matrix, and $\epsilon > 0$ is a rectification threshold value. $U _ { k - 1 } , \Sigma _ { k - 1 }$ are the orthonormal matrix and singular-value matrix respectively which are obtained via matrix factorization of $X _ { k - 1 }$ .
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 1: (a) A SPD cell structure composed of 4 SPD nodes, 2 input node and 1 output node. Initially the edges are unknown (b) Mixture of candidate SPD operations between nodes (c) Optimal cell architecture obtained after solving the relaxed continuous search space under a bi-level optimization formulation.
|
| 61 |
+
|
| 62 |
+
• LogEig layer: To map the manifold representation of SPD to flat space so that a Euclidean operation can be performed, LogEig layer is introduced. The LogEig layer is defined as: $X _ { k } =$ $\begin{array} { r } { \dot { U } _ { k - 1 } \log ( \Sigma _ { k - 1 } ) \dot { U } _ { k - 1 } ^ { T } } \end{array}$ where, $\begin{array} { r } { \bar { X _ { k - 1 } } = \bar { U _ { k - 1 } } \Sigma _ { k - 1 } U _ { k - 1 } ^ { T } } \end{array}$ . The LogEig layer is used with fully connected layers to solve tasks with SPD representation.
|
| 63 |
+
|
| 64 |
+
• ExpEig layer: This layer maps tmanifold space. It is defined as $\begin{array} { r } { \pmb { X } _ { k } = \pmb { \dot { U _ { k - 1 } } } \mathrm { e x p } \big ( \pmb { \Sigma } _ { k - 1 } \big ) \mathbf { \dot { U } } _ { k - 1 } ^ { T } } \end{array}$ ntation where, $\begin{array} { r } { \pmb { X } _ { k - 1 } = \mathbf { \dot { U } } _ { k - 1 } \pmb { \Sigma } _ { k - 1 } \pmb { U } _ { k - 1 } ^ { T } } \end{array}$ • Weighted Riemannian pooling layer: It uses wFM definition to compute the output of the layer. Recent method use recursive geodesic mean algorithm to calculate the mean (Chakraborty et al., 2020), in contrast, we use Karcher flow algorithm to compute it (Karcher, 1977) as it is simple and widely used in practice.
|
| 65 |
+
|
| 66 |
+
# 3 NEURAL ARCHITECTURE SEARCH OF SPD MANIFOLD NETWORK
|
| 67 |
+
|
| 68 |
+
As alluded before, to solve the suggested problem, there are a few key changes that must be introduced. Firstly, a new definition of the computation cell is required. In contrast to the computational cells designed by regular NAS algorithms like Liu et al. (2018b); Chu et al. (2020), our computational cell —which we call as SPD cell, additionally incorporate the notion of SPD manifold geometry so that SPD representations can be treated properly. On the other hand, like the regular NAS cell design, our SPD cell can either be a normal cell that returns SPD feature maps of the same width and height or, a reduction cell in which the SPD feature maps are reduced by a certain factor in width and height. Secondly, to solve our new NAS problem will require an appropriate and diverse SPD search space that can help NAS method to optimize for an effective SPD cell, which can then be stacked and trained to build an efficient SPD neural network architecture.
|
| 69 |
+
|
| 70 |
+
Concretely, a SPD cell is modeled by a directed asyclic graph (DAG) which is composed of nodes and edges. In our DAG each node is an latent representation of the SPD manifold valued data i.e. an intermediate SPD feature map and, each edge corresponds to a valid candidate operation on SPD manifold (see Fig.1(a)). Each edge of a SPD cell is associated with a set of candidate SPD manifold operations $( \mathcal { O } _ { \mathcal { M } } )$ that transforms the SPD valued latent representation from the source node (say $\bar { X } _ { \mathcal { M } } ^ { ( i ) } )$ to the target node (say $\pmb { X } _ { \mathcal { M } } ^ { ( j ) }$ ). We define the intermediate transformation between the nodes in our SPD cell as: $\begin{array} { r } { \pmb { X } _ { \mathcal { M } } ^ { ( j ) } = \underset { \pmb { X } _ { \mathcal { M } } ^ { ( j ) } } { \mathrm { a r g m i n } } \sum _ { i < j } \delta _ { \mathcal { M } } ^ { 2 } \Big ( \mathcal { O } _ { \mathcal { M } } ^ { ( i , j ) } \big ( \pmb { X } _ { \mathcal { M } } ^ { ( i ) } \big ) , \pmb { X } _ { \mathcal { M } } ^ { ( j ) } \Big ) , } \end{array}$ , where $\delta _ { \mathcal { M } }$ denotes the geodesic distance Eq:(1). Generally, this transformation result corresponds to the unweighted Frechet mean ´ of the operations based on the predecessors, such that the mixture of all operations still reside on SPD manifolds. Note that our definition of SPD cell ensures that each computational graph preserves the appropriate geometric structure of the SPD manifold. Equipped with the notion of SPD cell and its intermediate transformation, we are prepared to propose our search space (§3.1) followed by the solution to our SPDNet NAS problem (§3.2) and its results (§4).
|
| 71 |
+
|
| 72 |
+
# 3.1 SEARCH SPACE
|
| 73 |
+
|
| 74 |
+
Our search space consists of a set of valid SPD network operations which is defined for the supernet search. First of all, the search space includes some existing SPD operations2, e.g., BiMap, batch normalization, ReEig, LogEig, ExpEig and weighted Riemannian pooling layers, all of which are introduced in Sec.2. Though those individual operations (e.g., BiMap, LogEig, ExpEig) have been explored well by existing works, different aggregations on them are still understudied, which are essential to enrich our search space. To be specific to enrich the search space, following Liu et al. (2018b); Gong et al. (2019) traditional NAS methods, we apply the SPD batch normalization to every SPD convolution operation (i.e., BiMap), and design three variants of convolution blocks including the one without activation (i.e., ReEig), the one using post-activation and the one using pre-activation (see Table 1). In addition, we introduce five new operations analogous to DARTS (Liu et al., 2018b) to enrich the search space in the context of SPD networks. These are skip normal, none normal, average pooling, max pooling and skip reduced. The effect of such diverse operation choices have not been fully explored for SPD networks. All the candidate operations are illustrated in Table (1), and the definitions of the new operations are detailed as follows:
|
| 75 |
+
|
| 76 |
+
Table 1: Search space for the proposed SPD architecture search method.
|
| 77 |
+
|
| 78 |
+
<table><tr><td rowspan=1 colspan=1>Operation</td><td rowspan=1 colspan=2>Definition</td><td rowspan=1 colspan=1>Operation</td><td rowspan=1 colspan=1>Definition</td></tr><tr><td rowspan=1 colspan=1>BiMap_0</td><td rowspan=1 colspan=2>{BiMap,BatchNormalization}</td><td rowspan=1 colspan=1>WeightedReimannPooling_normal</td><td rowspan=1 colspan=1>{wFM on SPD multiple times}</td></tr><tr><td rowspan=1 colspan=1>BiMap_1</td><td rowspan=1 colspan=2>{BiMap,Batch Normalization,ReEig}</td><td rowspan=1 colspan=1>AveragePooling_reduced</td><td rowspan=1 colspan=1>{LogEig,AveragePooling,ExpEig}</td></tr><tr><td rowspan=1 colspan=1>BiMap_2</td><td rowspan=1 colspan=2>{ReEig,BiMap,BatchNormalization}</td><td rowspan=1 colspan=1>MaxPooling_reduced</td><td rowspan=1 colspan=1>{LogEig,MaxPooling,ExpEig}</td></tr><tr><td rowspan=1 colspan=1>Skip_normal</td><td rowspan=1 colspan=1>{Output same as input}</td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=2>Skip_reduced={Cin =BiMap(Xin),[Uin,Din,~]=svd(Cin);in=1,2},Cout=UbDbU,where,Ub=diag(U1,U2)and Db=diag(D1,D2)</td></tr><tr><td rowspan=1 colspan=1>None_normal</td><td rowspan=1 colspan=1>{Return identitymatrix}</td><td rowspan=1 colspan=1></td></tr></table>
|
| 79 |
+
|
| 80 |
+
(a) Skip normal: It preserves the input representation and is similar to skip connection. (b) None normal: It corresponds to the operation that returns identity as the output i.e, the notion of zero in the SPD space. (c) Max pooling: Given a set of SPD matrices, max pooling operation first projects these samples to a flat space via a LogEig operation, where a standard max pooling operation is performed. Finally, an ExpEig operation is used to map the sample back to the SPD manifold. (d) Average pooling: Similar to Max pooling, the average pooling operation first projects the samples to the flat space using a LogEig operation, where a standard average pooling is employed. To map the sample back to SPD manifold, an ExpEig operation is used. (e) Skip reduced: It is similar to ‘skip normal’ but in contrast, it decomposes the input into small matrices to reduces the inter-dependency between channels. Our definition of reduce operation is in line with the work of Liu et al. (2018b).
|
| 81 |
+
|
| 82 |
+
The newly introduced operations allow us to generate a more diverse discrete search space. As presented in Table 2, the randomly selected architecture (generally consisting of the newly introduced SPD operations) shows some improvement over SPDNet and SPDNetBN, both of which only contain conventional SPD operations. This establishes the effectiveness of the introduced rich search space.
|
| 83 |
+
|
| 84 |
+
# 3.2 SUPERNET SEARCH
|
| 85 |
+
|
| 86 |
+
To solve the suggested new NAS problem, one of the most promising NAS methodologies is supernet modeling. While we can resort to some other NAS methods to solve the problem like reinforcement learning based method (Zoph & Le, 2016) or evolution based algorithm (Real et al., 2019), in general, the supernet method models the architecture search problem as a one-shot training process of a single supernet that consists of all architectures. Based on the supernet modeling, we can search for the optimal SPD neural architecture either using parameterization of architectures or sampling of single-path architectures. In this paper, we focus on the parameterization approach that is based on the continuous relaxation of the SPD neural architecture representation. Such an approach allows for an efficient search of architecture using the gradient descent approach. Next, we introduce our supernet search method, followed by a solution to our proposed bi-level optimization problem. Fig.1(b) and Fig.1(c) illustrates an overview of our proposed method.
|
| 87 |
+
|
| 88 |
+
To search for an optimal SPD architecture $( \alpha )$ , we optimize the over parameterized supernet. In essence, it stacks the basic computation cells with the parameterized candidate operations from our search space in a one-shot search manner. The contribution of specific subnets to the supernet helps in deriving the optimal architecture from the supernet. Since the proposed operation search space is discrete in nature, we relax the explicit choice of an operation to make the search space continuous. To do so, we use wFM over all possible candidate operations. Mathematically,
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\bar { \mathcal { O } } _ { \mathcal { M } } ( X _ { \mathcal { M } } ) = \underset { X _ { \mathcal { M } } ^ { \mu } } { \mathrm { a r g m i n } } \sum _ { k = 1 } ^ { N _ { e } } \tilde { \alpha } ^ { k } \delta _ { \mathcal { M } } ^ { 2 } \left( \mathcal { O } _ { \mathcal { M } } ^ { ( k ) } \left( X _ { \mathcal { M } } \right) , X _ { \mathcal { M } } ^ { \mu } \right) ; \mathrm { ~ s u b j e c t ~ t o : ~ \mathbf { 1 } ~ } ^ { T } \tilde { \alpha } = 1 , \ 0 \leq \tilde { \alpha } \leq 1
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
# Algorithm 1: The proposed Neural Architecture Search of SPD Manifold Nets (SPDNetNAS)
|
| 95 |
+
|
| 96 |
+
Require: Mixed Operation $\bar { \mathcal { O } } _ { \mathcal { M } }$ which is parameterized by $\alpha ^ { k }$ for each edge $k \in N _ { e }$ ; while not converged do
|
| 97 |
+
|
| 98 |
+
Step1: Update $\alpha$ (architecture) using Eq:(8) solution by satisfying an additional strict convex constraint. Note that updates on $w$ and $\tilde { w }$ (Eq:(9), Eq:(10)) should follow the gradient descent on SPD manifold; Step2: Update $w$ by solving $\nabla _ { w } E _ { t r a i n } ( w , \alpha )$ ; Ensure SPD manifold gradient to update $w$ (Absil et al., 2009; Huang & Van Gool, 2017; Brooks et al., 2019);
|
| 99 |
+
|
| 100 |
+
end
|
| 101 |
+
|
| 102 |
+
Ensure: Final architecture based on $\alpha$ . Decide the operation at an edge $k$ using argmax $\{ \alpha _ { o } ^ { k } \}$ where, $\mathcal { O } _ { \mathcal { M } } ^ { k }$ is the $k ^ { t h }$ candidate operation between nodes, $X _ { \mu }$ is the intermediate SPD manifold mean (Eq.3) and, $N _ { e }$ denotes number of edges. We can compute wFM solution either using Karcher flow (Karcher, 1977) or recursive geodesic mean (Chakraborty et al., 2020) algorithm. Nonetheless, we adhere to Karcher flow algorithm as it is widely used to calculate $\mathrm { w F M } ^ { 3 }$ . To impose the explicit convex constraint on $\tilde { \alpha }$ , we project the solution onto the probability simplex as
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\begin{array} { r } { \underset { \alpha } { \mathrm { m i n i m i z e } } ~ \| \alpha - \tilde { \alpha } \| _ { 2 } ^ { 2 } ; ~ \mathrm { s u b j e c t t o : } ~ \mathbf { 1 } ^ { T } \alpha = 1 , ~ 0 \leq \alpha \leq 1 } \end{array}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Eq:(6) enforces the explicit constraint on the weights to supply $\alpha$ for our task and can easily be added as a convex layer in the framework (Agrawal et al., 2019). This projection is likely to reach the boundary of the simplex, in which case $\alpha$ becomes sparse (Martins $\&$ Astudillo, 2016). Optionally, softmax, sigmoid and other regularization methods can be employed to satisfy the convex constraint. However, Chu et al. (2020) has observed that the use of softmax can cause performance collapse and may lead to aggregation of skip connections. While Chu et al. (2020) suggested sigmoid can overcome the unfairness problem with softmax, it may output smoothly changed values which is hard to threshold for dropping redundant operations with non-marginal contributions to the supernet. Also, FairDARTS (Chu et al., 2020) regularization, may not preserve the summation equal to 1 constraint. Besides, Chakraborty et al. (2020) proposes recursive statistical approach to solve wFM with convex constraint, however, the definition proposed do not explicitly preserve the equality constraint and it requires re-normalization of the solution. In contrast, our approach composes of the sparsemax transformation for convex Frechet mixture of SPD operations with the following two advantages: 1) ´ It can preserve most of the important properties of softmax such as, it is simple to evaluate, cheaper to differentiate (Martins & Astudillo, 2016). 2) It is able to produce sparse distributions such that the best operation associated with each edge is more likely to make more dominant contributions to the supernet, and thus more optimal architecture can be derived (refer Figure 2(a),2(b) and §4).
|
| 109 |
+
|
| 110 |
+
From Eq:(5–6), the mixing of operations between nodes is determined by the weighted combination of alpha’s $( \alpha ^ { k } )$ and the set of operations. This relaxation makes the search space continuous and therefore, architecture search can be achieved by learning a set of alpha $( \alpha = \dot { \{ \alpha ^ { k } , \forall k \in N _ { e } \} } )$ . To achieve our goal, we must simultaneously learn the contribution of several possible operation within all the mixed operations $( w )$ and the corresponding architecture $\alpha$ . Consequently, for a given $w$ , we can find $\alpha$ and vice-versa resulting in the following bi-level optimization problem.
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\operatorname* { m i n i m i z e } _ { \alpha } E _ { v a l } ^ { U } \big ( w ^ { o p t } ( \alpha ) , \alpha \big ) ; \mathrm { ~ s u b j e c t ~ t o : ~ } w ^ { o p t } ( \alpha ) = \operatorname* { a r g m i n } _ { w } E _ { t r a i n } ^ { L } ( w , \alpha )
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
The lower-level optimization $E _ { t r a i n } ^ { L }$ corresponds to the optimal weight variable learned for a given $\alpha$ i.e., $w ^ { o p t } ( \alpha )$ using a training loss. The upper-level optimization $E _ { v a l } ^ { U }$ solves for the variable $\alpha$ given the optimal $w$ using a validation loss. This bi-level search method gives optimal mixture of multiple small architectures. To derive each node in the discrete architecture, we maintain top- $k$ operations i.e, with the $k ^ { \mathrm { { t h } } }$ highest weight among all the candidate operations associated with all the previous nodes.
|
| 117 |
+
|
| 118 |
+
Bi-level Optimization: The bi-level optimization problem proposed in Eq:(7) is difficult to solve. Following Liu et al. (2018b) work, we approximate $w ^ { o p t } ( \alpha )$ in the upper- optimization problem to skip inner-optimization as follows:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\nabla _ { \alpha } \mathbf { E } _ { v a l } ^ { U } \big ( w ^ { o p t } ( \alpha ) , \alpha \big ) \approx \nabla _ { \alpha } \mathbf { E } _ { v a l } ^ { U } \big ( w - \eta \nabla _ { w } \mathbf { E } _ { t r a i n } ^ { L } ( w , \alpha ) , \alpha \big )
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
(a) Distribution of edge weights for operation selection
|
| 126 |
+
|
| 127 |
+
Figure 2: (a) Distribution of edge weights for operation selection using softmax, sigmoid, and sparsemax on Frechet mixture of SPD operations. (b) Derived sparsemax architecture by the proposed SPDNetNAS. Better ´ sparsity leads to less skips and poolings compared to those of other NAS solutions shown in Appendix Fig.5.
|
| 128 |
+
|
| 129 |
+
Here, $\eta$ is the learning rate and $\nabla$ is the gradient operator. Note that the gradient based optimization for $w$ must follow the geometry of SPD manifold to update the structured connection weight, and its corresponding SPD matrix data. Applying the chain rule to Eq:(8) gives
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\overbrace { \nabla _ { \alpha } { \pmb { E } } _ { v a l } ^ { U } \big ( \tilde { w } , \alpha \big ) } ^ { \mathrm { f i r s t ~ t e r m } } - \overbrace { \eta \nabla _ { \alpha , w } ^ { 2 } { \pmb { E } } _ { t r a i n } ^ { L } ( w , \alpha ) \nabla _ { \tilde { w } } { \pmb { E } } _ { v a l } ^ { U } ( \tilde { w } , \alpha ) } ^ { \mathrm { s e c o n d t e r m } }
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
where, $\tilde { w } = \Psi _ { \bf r } \big ( w - \eta \tilde { \nabla } _ { w } E _ { t r a i n } ^ { L } ( w , \alpha ) \big )$ denotes the weight update on the SPD manifold for the forward model. $\tilde { \nabla } _ { w }$ , $\Psi _ { \mathbf { r } }$ symbolizes the Riemannian gradient and the retraction operator respectively. The second term in the Eq:(9) involves second order differentials with very high computational complexity, hence, using the finite approximation method the second term of Eq:(9) reduces to:
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\nabla _ { \alpha , w } ^ { 2 } E _ { t r a i n } ^ { L } ( w , \alpha ) \nabla _ { \bar { w } } E _ { v a l } ^ { U } ( \tilde { w } , \alpha ) = \left( \nabla _ { \alpha } E _ { t r a i n } ^ { L } ( w ^ { + } , \alpha ) - \nabla _ { \alpha } E _ { t r a i n } ^ { L } ( w ^ { - } , \alpha ) \right) / 2 \delta
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where, $w ^ { \pm } = \Psi _ { \mathbf { r } } ( w \pm \delta \tilde { \nabla } _ { \tilde { w } } E _ { v a l } ^ { U } ( \tilde { w } , \alpha ) )$ and $\delta$ is a small number set to $0 . 0 1 / \| \nabla _ { \tilde { w } } E _ { v a l } ^ { U } ( \tilde { w } , \alpha ) \| _ { 2 }$ Though the structure of bi-level optimization the same as the DARTS Liu et al. (2018b), there are some key differences. Firstly, the updates on the manifold-valued kernel weights are constrained on manifolds, which ensures that the feature maps at every intermediate layer are SPDs. For concrete derivations on back-propagation for SPD network layers, refer to Huang & Van Gool (2017) work. Secondly, the update on the aggregation weights of the involved SPD operations needs to satisfy an additional strict convex constraint, which is enforced as part of the optimization problem. The pseudo code of our method is outlined in Algorithm $^ { ( 1 ) }$ .
|
| 142 |
+
|
| 143 |
+
# 4 EXPERIMENTS AND RESULTS
|
| 144 |
+
|
| 145 |
+
To keep the experimental evaluation consistent with the previously proposed SPD networks (Huang & Van Gool, 2017; Brooks et al., 2019), we used RADAR (Chen et al., 2006), HDM05 (Muller et al. ¨ , 2007), and AFEW (Dhall et al., 2014) datasets. For SPDNetNAS, we first optimize the supernet on the training/validation sets, and then prune it with the best operation for each edge. Finally, we train the optimized architecture from scratch to document the results. For both these stages, we consider the same normal and reduction cells. A cell receives preprocessed inputs which is performed using fixed BiMap 2 to make the input of same initial dimension. All architectures are trained with a batch size of 30. Learning rate $( \eta )$ for RADAR, HDM05, and AFEW dataset is set to 0.025, 0.025 and 0.05 respectively. Besides, we conducted experiments where we select architecture using a random search path (SPDNetNAS (R)), to justify whether our search space with the introduced SPD operations can derive meaningful architectures. We refer to SPDNet (Huang & Van Gool, 2017), SPDNetBN (Brooks et al., 2019), and ManifoldNet (Chakraborty et al., 2020) for comparison against handcrafted SPD networks. SPDNet and SPDNetBN are evaluated using their original implementations. We follow the video classification setup of (Chakraborty et al., 2020) to evaluate ManifoldNet on AFEW. It is non-trivial to adapt ManifoldNet to RADAR and HDM05, as ManifoldNet requires SPD features with multiple channels and both of the two datasets can hardly obtain them. For comparing against Euclidean NAS methods, we used DARTS (Liu et al., 2018b) and FairDARTS (Chu et al., 2020) by treating SPD’s logarithm maps as Euclidean data in their official implementation with default setup. We observed that using raw SPD’s as input to Euclidean NAS algorithms degrades its performance.
|
| 146 |
+
|
| 147 |
+
a) Drone Recognition: For this task, we used the RADAR dataset from (Chen et al., 2006). The synthetic setting for this dataset is composed of radar signals, where each signal is split into windows of length 20 resulting in a $2 0 \mathbf { x } 2 0$ covariance matrix for each window (one radar data point). The synthesized dataset consists of 1000 data points per class. Given $2 0 \times 2 0$ input covariance matrices, our reduction cell reduces them to $1 0 \times 1 0$ matrices followed by normal cell to provide complexity to our network. Following Brooks et al. (2019), we assign $50 \%$ , $2 5 \%$ , and $2 5 \%$ of the dataset for training, validation, and test set respectively. The Euclidean NAS algorithms are evaluated on the euclidean map of the input. For direct SPD input the performance of darts $( 9 5 . 8 6 \% )$ and fairdarts $( 9 2 . 2 6 \% )$ are worse as expected. For this dataset, our algorithm takes 1 CPU day of search time to provide the SPD architecture. Training and validation take 9 CPU hours for 200 epochs4. Test results on this dataset are provided in Table (2) which clearly shows the benefit of our method. Statistical performance show that our NAS algorithm provides an efficient architecture with much fewer parameters (more than 140 times) than state-of-the-art Euclidean NAS on the SPD manifold valued data. The normal and reduction cells obtained on this dataset are shown in Fig. 2(b).
|
| 148 |
+
|
| 149 |
+
b) Action Recognition: For this task, we used the HDM05 dataset (Muller et al.¨ , 2007) which contains 130 action classes, yet, for consistency with previous work (Brooks et al., 2019), we used 117 class for performance comparison. This dataset has 3D coordinates of 31 joints per frame. Following the previous works (Harandi et al., 2017; Huang & Van Gool, 2017), we model an action for a sequence using $9 3 \times 9 3$ joint covariance matrix. The dataset has 2083 SPD matrices distributed among all 117 classes. Similar to the previous task, we split the dataset into $50 \%$ , $2 5 \%$ , and $2 5 \%$ for training, validation, and testing. Here, our reduction cell is designed to reduce the matrices dimensions from 93 to 30 for legitimate comparison against Brooks et al. (2019). To search for the best architecture, we ran our algorithm for 50 epoch (3 CPU days). Figure 2(b) show the final cell architecture that got selected based on the validation performance. The optimal architecture is trained from scratch for 100 epochs which took approximately 16 CPU hours. The test accuracy achieved on this dataset is provided in Table (2). Statistics clearly show that our models despite being lighter performs better than the NAS models and the handcrafted SPDNets. The NAS models’ inferior results show that the use of SPD layers for respecting SPD geometries is crucial for SPD data analysis.
|
| 150 |
+
|
| 151 |
+
Table 2: Performance comparison of our method against existing SPDNets and TraditionalNAS on drone and action recognition. SPDNetNAS (R): randomly select architecure from our search space, DARTS/FairDARTS: accepts logarithm forms of SPDs. The search time of our method on RADAR and HDM05 is noted to be 1 CPU days and 3 CPU days respectively. And the search cost of DARTS and FairDARTS on RADAR and HDM05 are about 8 GPU hours. #RADAR and #HDM05 show model parameter comparison on the respective dataset.
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Dataset</td><td>DARTS</td><td>FairDARTS</td><td>SPDNet</td><td>SPDNetBN</td><td>SPDNetNAS (R)</td><td>SPDNetNAS</td></tr><tr><td>RADAR</td><td>98.21%± 0.23</td><td>98.51%±0.09</td><td>93.21%±0.39</td><td>92.13%±0.77</td><td>95.49% ±0.08</td><td>97.75%±0.30</td></tr><tr><td>#RADAR</td><td>2.6383MB</td><td>2.6614MB</td><td>0.0014MB</td><td>0.0018MB</td><td>0.0185MB</td><td>0.0184MB</td></tr><tr><td>HDM05</td><td>53.93% ± 1.42</td><td>47.71% ± 1.46</td><td>61.60% ± 1.35</td><td>65.20% ± 1.15</td><td>66.92% ± 0.72</td><td>69.87% ±0.31</td></tr><tr><td>#HDM05</td><td>3.6800MB</td><td>5.1353MB</td><td>0.1082MB</td><td>0.1091MB</td><td>1.0557MB</td><td>1.064MBMB</td></tr></table>
|
| 154 |
+
|
| 155 |
+
c) Emotion Recognition: We used AFEW dataset (Dhall et al., 2014) to evaluate the transferability of our searched architecture for emotion recognition. This dataset has 1345 videos of facial expressions classified into 7 distinct classes. To train on the video frames directly, we stack all the handcrafted SPDNets and our searched SPDNet on top of a covolutional network Meng et al. (2019) with its official implementation. For ManifoldNet, we compute a $6 4 \times 6 4$ spatial covariance matrix for each frame on the intermediate CNN features of $6 4 \times 5 6 \times 5 6$ (channels, height, width). We follow the reported setup of Chakraborty et al. (2020) to first apply a single wFM layer with kernel size 5, stride 3 and 8 channels, followed by three temporal wFM layers of kernel size 3 and stride 2, with the channels being 1, 4, 8 respectively. We closely follow the official implementation of ManifoldNet 5 for the wFM layers and adapt the code to our specific task. Since SPDNet, SPDNetBN and our SPDNetNAS require a single channel SPD matrix as input, we use the final 512 dimensional vector extracted from the covolutional network, project it using a dense layer to a 100 dimensional feature vector and compute a $1 0 0 \times 1 0 0$ temporal covariance matrix. To study the transferability of our algorithm, we evaluate its searched architecture on RADAR and HDM05. In addition, we evaluate DARTS and FairDARTS directly on the video frames of AFEW. Table (3) reports the evaluations results. As we can observe, the transferred architectures can handle the new dataset quite convincingly, and their test accuracies are better than those of the existing SPDNets and the Euclidean NAS algorithms. In Appendix, we present results of competing methods and our searched models on the raw SPD features of AFEW.
|
| 156 |
+
|
| 157 |
+
Table 3: Performance comparison of our transferred architectures on AFEW against handcrafted SPDNets and Euclidean NAS. SPDNetNAS(RADAR/HDM05): architectures searched on RADAR and HDM05 respectively.
|
| 158 |
+
|
| 159 |
+
<table><tr><td>DARTS</td><td>FairDARTS</td><td>ManifoldNet</td><td>SPDNet</td><td>SPDNetBN</td><td>SPDNetNAS (RADAR)</td><td>SPDNetNAS (HDM05)</td></tr><tr><td>26.88%</td><td>22.31%</td><td>28.84%</td><td>34.06%</td><td>37.80%</td><td>40.80%</td><td>40.64%</td></tr></table>
|
| 160 |
+
|
| 161 |
+
# d) Ablation study:
|
| 162 |
+
|
| 163 |
+
Lastly, we conducted some ablation study to realize the effect of probability simplex constraint (sparsemax) on our suggested Frechet ´ mixture of SPD operations. Although in Fig. 2(a) we show better probability weight distribution with sparsemax, Table(4) shows that
|
| 164 |
+
|
| 165 |
+
Table 4: Ablations study on different solutions to our suggested Frechet mixture of SPD operations. ´
|
| 166 |
+
|
| 167 |
+
<table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>softmax</td><td rowspan=1 colspan=1>sigmoid</td><td rowspan=1 colspan=1>sparsemax</td></tr><tr><td rowspan=1 colspan=1>RADAR</td><td rowspan=1 colspan=1>96.47%± 0.10</td><td rowspan=1 colspan=1>97.70%± 0.23</td><td rowspan=1 colspan=1>97.75% ± 0.30</td></tr><tr><td rowspan=1 colspan=1>HDM05</td><td rowspan=1 colspan=1>68.74%± 0.93</td><td rowspan=1 colspan=1>68.64% ±0.09</td><td rowspan=1 colspan=1>69.87% ± 0.31</td></tr></table>
|
| 168 |
+
|
| 169 |
+
it performs better empirically as well on both RADAR and HDM05 compared to the softmax and sigmoid cases. Therefore, SPD architectures derived using the sparsemax is observed to be better.
|
| 170 |
+
|
| 171 |
+
e) Statistical comparison under same model complexity: We compare the statistical performance of our method against the other competing methods under similar model sizes. Table 5 show the results obtained on the RADAR dataset. One key point to note here is that when we increase the number of parameters in SPDNet and SPDNetBN, we observe a very severe degradation in the performance accuracy —mainly because the network starts overfitting rapidly. The performance degradation is far more severe for the HDM05 dataset with SPDNet (1.047MB) performing $0 . 7 6 1 9 \%$ and SPDNetBN (1.082MB) performing $1 . 4 5 \%$ and hence, is not reported in the table below. That further indicates the ability of SPDNetNAS to generalize better and avoid overfitting despite the larger model size.
|
| 172 |
+
|
| 173 |
+
Similarly, we experimented on the AFEW dataset. To have a fair comparison against the related method like ManifoldNet, whose model size is about (76MB), we must reduce the model size accordingly. ManifoldNet model size is large mainly due to multiple final dense fully connected layers. Hence, to reduce the model size, we decreased the number of FC layers. The performance result with comparable model sizes on the AFEW dataset is shown in Table 5. Again, we can infer that our SPDNetNAS achieves a significant performance improvement over the others.
|
| 174 |
+
|
| 175 |
+
Table 5: Performance of our model against ManifoldNet, SPDNet and SPDNetBN with comparable model sizes on the RADAR and AFEW datasets.
|
| 176 |
+
|
| 177 |
+
<table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>Manifoldnet</td><td rowspan=1 colspan=1>SPDNet</td><td rowspan=1 colspan=1>SPDNetBN</td><td rowspan=1 colspan=1>SPDNetNAS</td></tr><tr><td rowspan=1 colspan=1>RADAR</td><td rowspan=1 colspan=1>NA</td><td rowspan=1 colspan=1>73.066%</td><td rowspan=1 colspan=1>87.866%</td><td rowspan=1 colspan=1>97.75%</td></tr><tr><td rowspan=1 colspan=1>#RADAR</td><td rowspan=1 colspan=1>NA</td><td rowspan=1 colspan=1>0.01838MB</td><td rowspan=1 colspan=1>0.01838MB</td><td rowspan=1 colspan=1>0.01840MB</td></tr><tr><td rowspan=1 colspan=1>AFEW</td><td rowspan=1 colspan=1>25.8%</td><td rowspan=1 colspan=1>34.06%</td><td rowspan=1 colspan=1>37.80%</td><td rowspan=1 colspan=1>40.64%</td></tr><tr><td rowspan=1 colspan=1>#AFEW</td><td rowspan=1 colspan=1>11.6476MB</td><td rowspan=1 colspan=1>11.2626MB</td><td rowspan=1 colspan=1>11.2651MB</td><td rowspan=1 colspan=1>11.7601MB</td></tr></table>
|
| 178 |
+
|
| 179 |
+
# 5 CONCLUSION AND FUTURE DIRECTION
|
| 180 |
+
|
| 181 |
+
In this work, we present a neural architecture search problem of SPD manifold networks. To solve it, a SPD cell representation and corresponding candidate operation search space is introduced. A parameterized supernet search method is employed to explore the relaxed continuous SPD search space following a bi-level optimization problem with probability simplex constraint for effective SPD network design. The solution to our proposed problem using back-propagation is carefully crafted, so that, the weight updates follow the geometry of the SPD manifold. Quantitative results on the benchmark dataset show a commendable performance gain over handcrafted SPD networks and Euclidean NAS algorithms. Additionally, we demonstrate that the learned SPD architecture is much lighter than other NAS based architecture and, it is transferable to other datasets as well.
|
| 182 |
+
|
| 183 |
+
Our work provides an architecture search methodology for the scenarios where the acquired input data are SPD’s, for example, diffusion tensor imaging for medical applications, drone recognition, etc. In addition, our method offers a paradigm to automate the neural architecture design for the scenarios that require the second-order representations/poolings for robust visual recognition (e.g., Wang et al. (2017); Engin et al. (2018); Wang et al. (2019)). Accordingly, we encourage more future works to pursue these two directions. Also, it is fairly interesting to extend our proposed method to sequential manifold valued data (Zhen et al., 2019; Chakraborty et al., 2018).
|
| 184 |
+
|
| 185 |
+
# REFERENCES
|
| 186 |
+
|
| 187 |
+
P-A Absil, Robert Mahony, and Rodolphe Sepulchre. Optimization algorithms on matrix manifolds. Princeton University Press, 2009.
|
| 188 |
+
|
| 189 |
+
Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J Zico Kolter. Differentiable convex optimization layers. In Advances in neural information processing systems, pp. 9562–9574, 2019.
|
| 190 |
+
|
| 191 |
+
Karim Ahmed and Lorenzo Torresani. Connectivity learning in multi-branch networks. arXiv preprint arXiv:1709.09582, 2017.
|
| 192 |
+
|
| 193 |
+
Bowen Baker, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Accelerating neural architecture search using performance prediction. arXiv preprint arXiv:1705.10823, 2017.
|
| 194 |
+
|
| 195 |
+
Alexandre Barachant, Stephane Bonnet, Marco Congedo, and Christian Jutten. Multiclass brain– ´ computer interface classification by riemannian geometry. IEEE Transactions on Biomedical Engineering, 59(4):920–928, 2011.
|
| 196 |
+
|
| 197 |
+
Gabriel Bender. Understanding and simplifying one-shot architecture search. 2019.
|
| 198 |
+
|
| 199 |
+
Rajendra Bhatia and John Holbrook. Riemannian geometry and matrix geometric means. Linear algebra and its applications, 413(2-3):594–618, 2006.
|
| 200 |
+
|
| 201 |
+
Silvere Bonnabel. Stochastic gradient descent on riemannian manifolds. IEEE Transactions on Automatic Control, 58(9):2217–2229, 2013.
|
| 202 |
+
|
| 203 |
+
Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Smash: one-shot model architecture search through hypernetworks. arXiv preprint arXiv:1708.05344, 2017.
|
| 204 |
+
|
| 205 |
+
Daniel Brooks, Olivier Schwander, Fred´ eric Barbaresco, Jean-Yves Schneider, and Matthieu Cord. ´ Riemannian batch normalization for spd neural networks. In Advances in Neural Information Processing Systems, pp. 15463–15474, 2019.
|
| 206 |
+
|
| 207 |
+
Han Cai, Tianyao Chen, Weinan Zhang, Yong Yu, and Jun Wang. Efficient architecture search by network transformation. In Thirty-Second AAAI conference on artificial intelligence, 2018.
|
| 208 |
+
|
| 209 |
+
Rudrasis Chakraborty. Manifoldnorm: Extending normalizations on riemannian manifolds. arXiv preprint arXiv:2003.13869, 2020.
|
| 210 |
+
|
| 211 |
+
Rudrasis Chakraborty, Chun-Hao Yang, Xingjian Zhen, Monami Banerjee, Derek Archer, David Vaillancourt, Vikas Singh, and Baba Vemuri. A statistical recurrent model on the manifold of symmetric positive definite matrices. In Advances in Neural Information Processing Systems, pp. 8883–8894, 2018.
|
| 212 |
+
|
| 213 |
+
Rudrasis Chakraborty, Jose Bouza, Jonathan Manton, and Baba C Vemuri. Manifoldnet: A deep neural network for manifold-valued data with applications. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020.
|
| 214 |
+
|
| 215 |
+
Victor C Chen, Fayin Li, S-S Ho, and Harry Wechsler. Micro-doppler effect in radar: phenomenon, model, and simulation study. IEEE Transactions on Aerospace and electronic systems, 42(1):2–21, 2006.
|
| 216 |
+
|
| 217 |
+
Guang Cheng, Jeffrey Ho, Hesamoddin Salehian, and Baba C Vemuri. Recursive computation of the frechet mean on non-positively curved riemannian manifolds with applications. In ´ Riemannian Computing in Computer Vision, pp. 21–43. Springer, 2016.
|
| 218 |
+
|
| 219 |
+
Xiangxiang Chu, Bo Zhang, Jixiang Li, Qingyuan Li, and Ruijun Xu. Scarletnas: Bridging the gap between scalability and fairness in neural architecture search. arXiv preprint arXiv:1908.06022, 2019.
|
| 220 |
+
|
| 221 |
+
Xiangxiang Chu, Tianbao Zhou, Bo Zhang, and Jixiang Li. Fair DARTS: Eliminating Unfair Advantages in Differentiable Architecture Search. In 16th Europoean Conference On Computer Vision, 2020. URL https://arxiv.org/abs/1911.12126.pdf.
|
| 222 |
+
|
| 223 |
+
Kalyanmoy Deb, Amrit Pratap, Sameer Agarwal, and TAMT Meyarivan. A fast and elitist multiobjective genetic algorithm: Nsga-ii. IEEE transactions on evolutionary computation, 6(2):182–197, 2002.
|
| 224 |
+
|
| 225 |
+
Abhinav Dhall, Roland Goecke, Jyoti Joshi, Karan Sikka, and Tom Gedeon. Emotion recognition in the wild challenge 2014: Baseline, data and protocol. In Proceedings of the 16th international conference on multimodal interaction, pp. 461–466, 2014.
|
| 226 |
+
|
| 227 |
+
Tingxing Dong, Azzam Haidar, Stanimire Tomov, and Jack J Dongarra. Optimizing the svd bidiagonalization process for a batch of small matrices. In ICCS, pp. 1008–1018, 2017a.
|
| 228 |
+
|
| 229 |
+
Zhen Dong, Su Jia, Chi Zhang, Mingtao Pei, and Yuwei Wu. Deep manifold learning of symmetric positive definite matrices with application to face recognition. In Thirty-First AAAI Conference on Artificial Intelligence, 2017b.
|
| 230 |
+
|
| 231 |
+
Thomas Elsken, Jan-Hendrik Metzen, and Frank Hutter. Simple and efficient architecture search for convolutional neural networks. arXiv preprint arXiv:1711.04528, 2017.
|
| 232 |
+
|
| 233 |
+
Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. arXiv preprint arXiv:1808.05377, 2018.
|
| 234 |
+
|
| 235 |
+
Melih Engin, Lei Wang, Luping Zhou, and Xinwang Liu. Deepkspd: Learning kernel-matrix-based spd representation for fine-grained image recognition. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 612–627, 2018.
|
| 236 |
+
|
| 237 |
+
Zhi Gao, Yuwei Wu, Mehrtash Harandi, and Yunde Jia. A robust distance measure for similarity-based classification on the spd manifold. IEEE Transactions on Neural Networks and Learning Systems, 2019.
|
| 238 |
+
|
| 239 |
+
Mark Gates, Stanimire Tomov, and Jack Dongarra. Accelerating the svd two stage bidiagonal reduction and divide and conquer using gpus. Parallel Computing, 74:3–18, 2018.
|
| 240 |
+
|
| 241 |
+
Xinyu Gong, Shiyu Chang, Yifan Jiang, and Zhangyang Wang. Autogan: Neural architecture search for generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3224–3234, 2019.
|
| 242 |
+
|
| 243 |
+
Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path one-shot neural architecture search with uniform sampling. In European Conference on Computer Vision, pp. 544–560. Springer, 2020.
|
| 244 |
+
|
| 245 |
+
Mehrtash Harandi, Mathieu Salzmann, and Richard Hartley. Dimensionality reduction on spd manifolds: The emergence of geometry-aware methods. IEEE transactions on pattern analysis and machine intelligence, 40(1):48–62, 2017.
|
| 246 |
+
|
| 247 |
+
Mehrtash T Harandi, Mathieu Salzmann, and Richard Hartley. From manifold to manifold: Geometryaware dimensionality reduction for spd matrices. In European conference on computer vision, pp. 17–32. Springer, 2014.
|
| 248 |
+
|
| 249 |
+
Zhiwu Huang and Luc Van Gool. A riemannian network for spd matrix learning. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 250 |
+
|
| 251 |
+
Zhiwu Huang, Ruiping Wang, Shiguang Shan, and Xilin Chen. Learning euclidean-to-riemannian metric for point-to-set classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1677–1684, 2014.
|
| 252 |
+
|
| 253 |
+
Zhiwu Huang, Ruiping Wang, Shiguang Shan, Xianqiu Li, and Xilin Chen. Log-euclidean metric learning on symmetric positive definite manifold with application to image set classification. In International conference on machine learning, pp. 720–729, 2015.
|
| 254 |
+
|
| 255 |
+
Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabas Poczos, and Eric P Xing. Neural architecture search with bayesian optimisation and optimal transport. In Advances in Neural Information Processing Systems, pp. 2016–2025, 2018.
|
| 256 |
+
|
| 257 |
+
Hermann Karcher. Riemannian center of mass and mollifier smoothing. Communications on pure and applied mathematics, 30(5):509–541, 1977.
|
| 258 |
+
|
| 259 |
+
Suryansh Kumar. Jumping manifolds: Geometry aware dense non-rigid structure from motion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5346–5355, 2019.
|
| 260 |
+
|
| 261 |
+
Suryansh Kumar, Anoop Cherian, Yuchao Dai, and Hongdong Li. Scalable dense non-rigid structurefrom-motion: A grassmannian perspective. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 254–263, 2018.
|
| 262 |
+
|
| 263 |
+
Marc Lackenby. Introductory chapter on riemannian manifolds. Notes, 2020.
|
| 264 |
+
|
| 265 |
+
Hanwen Liang, Shifeng Zhang, Jiacheng Sun, Xingqiu He, Weiran Huang, Kechen Zhuang, and Zhenguo Li. Darts+: Improved differentiable architecture search with early stopping. arXiv preprint arXiv:1909.06035, 2019.
|
| 266 |
+
|
| 267 |
+
Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 19–34, 2018a.
|
| 268 |
+
|
| 269 |
+
Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan L Yuille, and Li FeiFei. Auto-deeplab: Hierarchical neural architecture search for semantic image segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 82–92, 2019.
|
| 270 |
+
|
| 271 |
+
Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. arXiv preprint arXiv:1711.00436, 2017.
|
| 272 |
+
|
| 273 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018b.
|
| 274 |
+
|
| 275 |
+
Andre Martins and Ramon Astudillo. From softmax to sparsemax: A sparse model of attention and multi-label classification. In International Conference on Machine Learning, pp. 1614–1623, 2016.
|
| 276 |
+
|
| 277 |
+
Debin Meng, Xiaojiang Peng, Kai Wang, and Yu Qiao. Frame attention networks for facial expression recognition in videos. In 2019 IEEE International Conference on Image Processing (ICIP), pp. 3866–3870. IEEE, 2019.
|
| 278 |
+
|
| 279 |
+
Maher Moakher. A differential geometric approach to the geometric mean of symmetric positivedefinite matrices. SIAM Journal on Matrix Analysis and Applications, 26(3):735–747, 2005.
|
| 280 |
+
|
| 281 |
+
Meinard Muller, Tido R ¨ oder, Michael Clausen, Bernhard Eberhardt, Bj ¨ orn Kr ¨ uger, and Andreas ¨ Weber. Documentation mocap database hdm05. 2007.
|
| 282 |
+
|
| 283 |
+
Niv Nayman, Asaf Noy, Tal Ridnik, Itamar Friedman, Rong Jin, and Lihi Zelnik. Xnas: Neural architecture search with expert advice. In Advances in Neural Information Processing Systems, pp. 1977–1987, 2019.
|
| 284 |
+
|
| 285 |
+
Renato Negrinho and Geoff Gordon. Deeparchitect: Automatically designing and training deep architectures. arXiv preprint arXiv:1704.08792, 2017.
|
| 286 |
+
|
| 287 |
+
Xavier Pennec. Manifold-valued image processing with spd matrices. In Riemannian Geometric Statistics in Medical Image Analysis, pp. 75–134. Elsevier, 2020.
|
| 288 |
+
|
| 289 |
+
Xavier Pennec, Pierre Fillard, and Nicholas Ayache. A riemannian framework for tensor computing. International Journal of computer vision, 66(1):41–66, 2006.
|
| 290 |
+
|
| 291 |
+
Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018.
|
| 292 |
+
|
| 293 |
+
Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In Proceedings of the aaai conference on artificial intelligence, volume 33, pp. 4780–4789, 2019.
|
| 294 |
+
|
| 295 |
+
Shreyas Saxena and Jakob Verbeek. Convolutional neural fabrics. In Advances in Neural Information Processing Systems, pp. 4053–4061, 2016.
|
| 296 |
+
|
| 297 |
+
Richard Shin, Charles Packer, and Dawn Song. Differentiable neural network architecture search. 2018.
|
| 298 |
+
|
| 299 |
+
Yuan Tian, Qin Wang, Zhiwu Huang, Wen Li, Dengxin Dai, Minghao Yang, Jun Wang, and Olga Fink. Off-policy reinforcement learning for efficient and effective gan architecture search. In Proceedings of the European Conference on Computer Vision, 2020.
|
| 300 |
+
|
| 301 |
+
Oncel Tuzel, Fatih Porikli, and Peter Meer. Region covariance: A fast descriptor for detection and classification. In European conference on computer vision, pp. 589–600. Springer, 2006.
|
| 302 |
+
|
| 303 |
+
Oncel Tuzel, Fatih Porikli, and Peter Meer. Pedestrian detection via classification on riemannian manifolds. IEEE transactions on pattern analysis and machine intelligence, 30(10):1713–1727, 2008.
|
| 304 |
+
|
| 305 |
+
Tom Veniat and Ludovic Denoyer. Learning time/memory-efficient deep architectures with budgeted super networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3492–3500, 2018.
|
| 306 |
+
|
| 307 |
+
Qilong Wang, Peihua Li, and Lei Zhang. G2denet: Global gaussian distribution embedding network and its application to visual recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2730–2739, 2017.
|
| 308 |
+
|
| 309 |
+
Qilong Wang, Jiangtao Xie, Wangmeng Zuo, Lei Zhang, and Peihua Li. Deep cnns meet global covariance pooling: Better representation and generalization. arXiv preprint arXiv:1904.06836, 2019.
|
| 310 |
+
|
| 311 |
+
Ruiping Wang, Huimin Guo, Larry S Davis, and Qionghai Dai. Covariance discriminative learning: A natural and efficient approach to image set classification. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pp. 2496–2503. IEEE, 2012.
|
| 312 |
+
|
| 313 |
+
Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 10734–10742, 2019.
|
| 314 |
+
|
| 315 |
+
Yan Wu, Aoming Liu, Zhiwu Huang, Siwei Zhang, and Luc Van Gool. Neural architecture search as sparse supernet. arXiv preprint arXiv:2007.16112, 2020.
|
| 316 |
+
|
| 317 |
+
X. Zhang, Z. Huang, N. Wang, S. XIANG, and C. Pan. You only search once: Single shot neural architecture search via direct sparse optimization. IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 1–1, 2020.
|
| 318 |
+
|
| 319 |
+
Xingjian Zhen, Rudrasis Chakraborty, Nicholas Vogt, Barbara B Bendlin, and Vikas Singh. Dilated convolutional neural networks for sequential manifold-valued data. In Proceedings of the IEEE International Conference on Computer Vision, pp. 10621–10631, 2019.
|
| 320 |
+
|
| 321 |
+
Xiawu Zheng, Rongrong Ji, Lang Tang, Baochang Zhang, Jianzhuang Liu, and Qi Tian. Multinomial distribution learning for effective neural architecture search. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1304–1313, 2019.
|
| 322 |
+
|
| 323 |
+
H Zhou, M Yang, J Wang, and W Pan. Bayesnas: A bayesian approach for neural architecture search. In 36th International Conference on Machine Learning, ICML 2019, volume 97, pp. 7603–7613. Proceedings of Machine Learning Research (PMLR), 2019.
|
| 324 |
+
|
| 325 |
+
Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
|
| 326 |
+
|
| 327 |
+
Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8697–8710, 2018.
|
| 328 |
+
|
| 329 |
+
# A ADDITIONAL EXPERIMENTAL ANALYSIS
|
| 330 |
+
|
| 331 |
+
# A.1 EFFECT OF MODIFYING PREPROCESSING LAYERS FOR MULTIPLE DIMENSIONALITY REDUCTION
|
| 332 |
+
|
| 333 |
+
Unlike Huang & Van Gool (2017) work on the SPD network, where multiple transformation matrices are applied at multiple layers to reduce the dimension of the input data, our reduction cell presented in the main paper is one step. For example: For HDM05 dataset (Muller et al. ¨ , 2007), the author’s of SPDNet (Huang & Van Gool, 2017) apply $9 3 \times 7 0$ , $7 0 \times 5 0$ , $5 0 \times 3 0$ , transformation matrices to reduce the dimension of the input matrix, on the contrary, we reduce the dimension in one step from 93 to 30 which is inline with Brooks et al. (2019) work.
|
| 334 |
+
|
| 335 |
+
To study the behaviour of our method under multiple dimesionality reduction pipeline on HDM05, we use the preprocessing layers to perform dimensionality reduction. To be precise, we consider a preprocessing step to reduce the dimension from 93 to 70 to 50 and then, a reduction cell that reduced the dimension from 50 to 24. This modification has the advantage that it reduces the search time from 3 CPU days to 2.5 CPU days, and in addition, provides a performance gain (see Table (6)). The normal and the reduction cells for the multiple dimension reduction are shown in Figure (3).
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 3: (a)-(b) Normal cell and Reduction cell for multiple dimensionality reduction respectively
|
| 339 |
+
|
| 340 |
+
A.2 EFFECT OF ADDING NODES TO THE CELL
|
| 341 |
+
|
| 342 |
+
Experiments presented in the main paper consists of $N = 5$ nodes per cell which includes two input nodes, one output node, and two intermediate nodes. To do further analysis of our design choice, we added nodes to the cell. Such analysis can help us study the critical behaviour of our cell design i.e, whether adding an intermediate nodes can improve the performance or not?, and how it affects the computational complexity of our algorithm? To perform this experimental analysis, we used HDM05 dataset (Muller et al. ¨ , 2007). We added one extra intermediate node $N = 6$ ) to the cell design. We observe that we converge towards an architecture design that is very much similar in terms of operations (see Figure 4). The evaluation results shown in Table (7) help us to deduce that adding more intermediate nodes increases the number of channels for output node, subsequently leading to increased complexity and almost double the computation time.
|
| 343 |
+
|
| 344 |
+
Table 6: Results of modifying preprocessing layers for multiple dimentionality reduction on HDM05
|
| 345 |
+
Table 7: Results for multi-node experiments on HDM05
|
| 346 |
+
|
| 347 |
+
<table><tr><td>Numberof nodes</td><td>SPDNetNAS</td><td>Search time</td></tr><tr><td>5</td><td>68.74% ±0.93</td><td>3 CPU days</td></tr><tr><td>6</td><td>67.96% ± 0.67</td><td>6 CPU days</td></tr></table>
|
| 348 |
+
|
| 349 |
+
# A.3 EFFECT OF ADDING MULTIPLE CELLS
|
| 350 |
+
|
| 351 |
+
In our paper we stack 1 normal cell over 1 reduction cell for all the experiments. For more extensive analysis of the proposed method, we conducted training experiments by stacking multiple cells which is in-line with the experiments conducted by Liu et al. (2018b). We then transfer the optimized architectures from the singe cell search directly to the multi-cell architectures for training. Hence, the search time for all our experiments is same as for a single cell search i.e. 3 CPU days. Results for this experiment are provided in Table 8. The first row in the table shows the performance for single cell model, while the second and third rows show the performance with multi-cell stacking. Remarkably, by stacking multiple cells our proposed SPDNetNAS outperforms SPDNetBN Brooks et al. (2019) by a large margin (about $8 \%$ , i.e., about $12 \%$ for the relative improvement).
|
| 352 |
+
|
| 353 |
+

|
| 354 |
+
Figure 4: (a)-(b) Optimal Normal cell and Reduction cell with 6 nodes on the HDM05 dataset
|
| 355 |
+
|
| 356 |
+
Table 8: Results for multiple cell search and training experiments on HDM05: reduction corresponds to reduction cell and normal corresponds to the normal cell.
|
| 357 |
+
|
| 358 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Dim reduction in cells</td><td rowspan=1 colspan=1>Cell type sequence</td><td rowspan=1 colspan=1>SPDNetNAS</td><td rowspan=1 colspan=1>Search Time</td></tr><tr><td rowspan=1 colspan=1>single cell</td><td rowspan=1 colspan=1>93→46</td><td rowspan=1 colspan=1>reduction-normal</td><td rowspan=1 colspan=1>68.74%± 0.93</td><td rowspan=1 colspan=1>3 CPU days</td></tr><tr><td rowspan=1 colspan=1>multi-cell</td><td rowspan=1 colspan=1>93→46</td><td rowspan=1 colspan=1>normal-reduction-normal</td><td rowspan=1 colspan=1>71.48%± 0.42</td><td rowspan=1 colspan=1>3CPU days</td></tr><tr><td rowspan=1 colspan=1>multi-cell</td><td rowspan=1 colspan=1>93→46→22</td><td rowspan=1 colspan=1>reduction-normal-reduction-normal</td><td rowspan=1 colspan=1>73.59 %± 0.33</td><td rowspan=1 colspan=1>3 CPU days</td></tr></table>
|
| 359 |
+
|
| 360 |
+
# A.4 AFEW PERFORMANCE COMPARISON ON RAW SPD FEATURES
|
| 361 |
+
|
| 362 |
+
In addition to the evaluation on CNN features in the major paper, we also use the raw SPD features (extracted from gray video frames) from Huang & Van Gool (2017); Brooks et al. (2019) to compare the competing methods. To be specific, each frame is normalized to $2 0 \times 2 0$ and then represent each video using a $4 0 0 \times 4 0 0$ covariance matrix (Wang et al., 2012; Huang & Van Gool, 2017). Table 9 summarizes the results. As we can see, the transferred architecture can handle the new dataset quite convincingly. The test accuracy is comparable to the best SPD network method for RADAR model transfer. For HDM05 model transfer, the test accuracy is much better than the existing SPD networks.
|
| 363 |
+
|
| 364 |
+
Table 9: Performance of transferred SPDNetNAS Network architecture in comparison to existing SPD Networks on the AFEW dataset Dhall et al. (2014). RAND symbolizes random architecture from our search space. DARTS/FairDARTS: accepts the logarithms of raw SPDs, and the other competing methods receive the SPD features.
|
| 365 |
+
|
| 366 |
+
<table><tr><td>DARTS</td><td>FairDARTS</td><td>ManifoldNet</td><td>SPDNet</td><td>SPDNetBN</td><td>Ours(R)</td><td>Ours(RADAR)</td><td>Ours (HDM05)</td></tr><tr><td>25.87 %</td><td>25.34%</td><td>23.98%</td><td>33.17%</td><td>35.22%</td><td>32.88%</td><td>35.31 %</td><td>38.01%</td></tr></table>
|
| 367 |
+
|
| 368 |
+
# A.5 DERIVED CELL ARCHITECTURE USING SIGMOID ON FRECHET MIXTURE OF ´ SPDOPERATION
|
| 369 |
+
|
| 370 |
+
Figure 5(a) and Figure 5(b) show the cell architecture obtained using the softmax and sigmoid respectively on the Frechet mixture of SPD operation. It can be observed that it has relatively more ´ skip and pooling operation than sparsemax ((see Figure 2(b))). In contrast to softmax and sigmoid, the SPD cell obtained using sparsemax is composed of more convolution type operation in the architecture, which in fact is important for better representation of the data.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 5: (a), (b) Derived architecture by using softmax and sigmoid on the Frechet mixture of SPD operations. ´ These are the normal cell and reduced cell obtained on RADAR and HDM05 dataset.
|
| 374 |
+
|
| 375 |
+
A.6 COMPARISON BETWEEN KARCHER FLOW AND RECURSIVE APPORACH FOR WEIGHTEDFRECHET MEAN
|
| 376 |
+
|
| 377 |
+
The proposed NAS algorithm is based on Frechet Mean computations. From the weighted mixture ´ of operations between nodes to the derivation of intermediate nodes, both compute the Frechet ´ mean of a set of points on the SPD manifold. It is well known that there is no closed form solution when the number of input samples is bigger than 2 (Brooks et al., 2019). We can only compute an approximation using the famous Karcher flow algorithm (Brooks et al., 2019) or recursive geodesic mean (Chakraborty et al., 2020). For comparison, we replace our used Karcher flow algorithm with the recursive approach under our SPDNetNAS framework. Table 10 sumarizes the comparison between these two algorithms. We observe considerable decrease in accuracy for both the training and test set when using the recursive methods, showing that the Karcher flow algorithm favors our proposed algorithm more.
|
| 378 |
+
|
| 379 |
+
Table 10: Test performance of the proposed SPDNetNAS using the Karcher flow algorithm and the recursive algorithm to compute Frechet means. ´
|
| 380 |
+
|
| 381 |
+
<table><tr><td>Dataset/Method</td><td>Karcher flow</td><td>Recursivealgorithm</td></tr><tr><td>RADAR</td><td>96.47% ±0.08</td><td>68.13% ±0.64</td></tr><tr><td>HDM05</td><td>68.74%± 0.93</td><td>56.85%± 0.17</td></tr></table>
|
| 382 |
+
|
| 383 |
+
# A.7 CONVERGENCE CURVE ANALYSIS
|
| 384 |
+
|
| 385 |
+
Figure 6(a) shows the validation curve which almost saturates at 200 epoch demonstrating the stability of our training process. First column bar of Figure (6(b)) show the test accuracy comparison when only $10 \%$ of the data is used for training our architecture which demonstrate the effectiveness of our algorithm. Further, we study this for our SPDNetNAS architecture by taking $10 \%$ , $33 \%$ , $80 \%$ of the data for training. Figure 6(b)) clealy show our superiority of SPDNetNAS algorithm than handcrafted SPD networks.
|
| 386 |
+
|
| 387 |
+
Figure (7(a)) and Figure (7(b)) show the convergence curve of our loss function on the RADAR and HDM05 datasets respectively. For the RADAR dataset the validation and training losses follow a similar trend and converges at 200 epochs. For the HDM05 dataset, we observe the training curve plateaus after 60 epochs, where as the validation curve takes 100 epochs to provide a stable performance. Additionally, we noticed a reasonable gap between the training loss and validation loss for the HDM05 dataset (Muller et al. ¨ , 2007). A similar pattern of convergence gap between validation loss and training loss has been observed by Huang & Van Gool (2017) work.
|
| 388 |
+
|
| 389 |
+
# A.8 WHY WE PREFERRED TO SIMULATE OUR EXPERIMENTS ON CPU RATHER THAN GPU?
|
| 390 |
+
|
| 391 |
+
When dealing with SPD matrices, we need to carry out complex computations. These computations are performed to make sure that our transformed representation and corresponding operations respect the underlying manifold structure. In our study, we analyzed SPD matrices with the Affine Invariant
|
| 392 |
+
|
| 393 |
+

|
| 394 |
+
Figure 6: (a) Validation accuracy of our method in comparison to the SPDNet and SPDNetBN on RADAR dataset. Clearly, our SPDNetNAS algorithm show a steeper validation accuracy curve. (b) Test accuracy on $10 \%$ , $33 \%$ , $80 \%$ , $100 \%$ of the total data sample. It can be observed that our method exhibit superior performance.
|
| 395 |
+
|
| 396 |
+

|
| 397 |
+
Figure 7: (a) Loss function curve showing the values over 200 epochs for the RADAR dataset (b) Loss function curve showing the values over 100 epochs on the HDM05 dataset.
|
| 398 |
+
|
| 399 |
+
Riemannian Metric (AIRM), this induces operations heavily dependent on singular value decomposition (SVD) or eigendecomposition (EIG). Both decompositions suffer from weak support on GPU platforms. Hence, our training did not benefit from GPU acceleration and we decided to train on CPU. As a future work, we aim to speedup our implementation on GPU by optimizing the SVD Householder bi-diagonalization process as studied in some existing works like Dong et al. (2017a); Gates et al. (2018).
|
| 400 |
+
|
| 401 |
+
# B DETAILED DESCRIPTION OF OUR PROPOSED OPERATIONS
|
| 402 |
+
|
| 403 |
+
In this section, we describe some of the major operations defined in the main paper from an intuitive point of view. We particularly focus on some of the new operations that are defined for the input SPDs, i.e., the Weighted Riemannian Pooling, the Average/Max Pooling, the Skip Reduced operation and the Mixture of Operations.
|
| 404 |
+
|
| 405 |
+
# B.1 WEIGHTED RIEMANNIAN POOLING
|
| 406 |
+
|
| 407 |
+
Figure 8 provides an intuition behind the Weighted Riemannian Pooling operation. Here, w 11, w 21, etc., corresponds to the set of normalized weights for each channel (shown as two blue channels). The next channel —shown in orange, is then computed as weighted Frechet mean over these two ´ input channels. This procedure is repeated to achieve the desired number of output channels (here two), and finally all the output channels are concatenated. The weights are learnt as a part of the optimization procedure ensuring the explicit convex constraint is imposed.
|
| 408 |
+
|
| 409 |
+

|
| 410 |
+
Figure 8: Weighted Riemannian Pooling: Performs multiple weighted Frechet means on the channels of the ´ input SPD
|
| 411 |
+
|
| 412 |
+
# B.2 AVERAGE AND MAX POOLING
|
| 413 |
+
|
| 414 |
+
In Figure 9 we show our average and max pooling operations. We first perform a LogEig map on the SPD matrices to project them to the Euclidean space. Next, we perform average and max pooling on these Euclidean matrices similar to classical convolutional neural networks. We further perform an ExpEig map to project the Euclidean matrices back on the SPD manifold. The diagram shown in Figure 9 is inspired by Huang & Van Gool (2017) work. The kernel size of AveragePooling reduced and MaxPooling reduced is set to 2 or 4 for all experiments according to the specific dimensionality reduction factors.
|
| 415 |
+
|
| 416 |
+

|
| 417 |
+
Figure 9: Avg/Max Pooling: Maps the SPD matrix to Euclidean space using LogEig mapping, does avg/max pooling followed by ExpEig map
|
| 418 |
+
|
| 419 |
+
# B.3 SKIP REDUCED
|
| 420 |
+
|
| 421 |
+
Following Liu et al. (2018b), we defined an analogous of Skip operation on a single channel for the reduced cell (Figure 10). We start by using a BiMap layer —equivalent to Conv in Liu et al. (2018b), to map the input channel to an SPD whose space dimension is half of the input dimension. We further perform an SVD decomposition on the two SPDs followed by concatenating the Us, Vs and Ds obtained from SVD to block diagonal matrices. Finally, we compute the output by multiplying the block diagonal U, V and D computed before.
|
| 422 |
+
|
| 423 |
+

|
| 424 |
+
Figure 10: Skip Reduced:Maps input to two smaller matrices using BiMaps, followed by SVD decomposition on them and then computes the output using a block diagonal form of U’s D’s and V’s
|
| 425 |
+
|
| 426 |
+
# B.4 MIXED OPERATION ON SPDS
|
| 427 |
+
|
| 428 |
+
In Figure 11 we provide an intuition of the mixed operation we have proposed in the main paper. We consider a very simple base case of three nodes, two input nodes (1 and 2) and one output node (node 3). The goal is to compute the output node 3 from input nodes 1 and 2. We perform a candidate set of operations on the input node, which correspond to edges between the nodes (here two for simplicity). Each operation has a weight $\alpha _ { i _ { - } j }$ where i corresponds to the node index and j is the candidate operation identifier. In Figure 11 below i and $\mathrm { j } \in \{ \bar { 1 } , 2 \}$ and $\pmb { \alpha _ { 1 } } = \{ \alpha _ { 1 . 1 } , \alpha _ { 1 . 2 } \}$ , ${ \pmb { \alpha _ { 2 } } } = \{ { \alpha _ { 2 . 1 } , \alpha _ { 2 . 2 } } \}$ . $\alpha$ ’s are optimized as a part of the bi-level optimization procedure proposed in the main paper. Using these alpha’s, we perform a channel-wise weighted Frechet mean (wFM) as ´ depicted in the figure below. This effectively corresponds to a mixture of the candidate operations. Note that the alpha’s corresponding to all channels of a single operation are assumed to be the same. Once the weighted Frechet means have been computed for nodes 1 and 2, we perform a channel-wise ´ concatenation on the outputs of the two nodes, effectively doubling the number of channels in node 3.
|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
Figure 11: Detailed overview of mixed operations. We simplify the example by taking 3 nodes (two input nodes and one output node) and two candidate operations. Input nodes have two channels (SPD matrices), we perform channelwise weighted Frechet mean between the result of each operation (edge) where weights ´ $\alpha$ ’s are optimized during bi-level architecture search optimization. Output node 3 is formed by concatenating both mixed operation outputs, resulting in a four channel node.
|
| 432 |
+
Listing 1: Function to solve the sparsemax constraint optimization
|
| 433 |
+
|
| 434 |
+
# C DIFFERENTIABLE CONVEX LAYER FOR SPARSEMAX OPTIMIZATION
|
| 435 |
+
|
| 436 |
+
1 import cvxpy as cp
|
| 437 |
+
2 from cvxpylayers.torch import CvxpyLayer
|
| 438 |
+
3
|
| 439 |
+
4 def sparsemax_convex_layer(x, n):
|
| 440 |
+
5 $\begin{array} { r l } { \mathbf { \tilde { w } _ { - } } } & { { } = } \end{array}$ cp.Variable(n)
|
| 441 |
+
6 $\begin{array} { r l } { \mathrm { x } \_ } & { { } = } \end{array}$ cp.Parameter(n)
|
| 442 |
+
7
|
| 443 |
+
8 # define the objective and constraint
|
| 444 |
+
9 objective $=$ cp.Minimize(cp.sum(cp.multiply $( \ w _ { \mathbb { W } _ { - } } , \mathrm { ~ \\v ~ { ~ x ~ } _ { - } ) ~ } )$ ))
|
| 445 |
+
10 constraint $=$ [cp.sum(w_) == 1.0, $0 . 0 < = \mathrm { \Delta } \mathsf { w } _ { - }$ , w_<=1.0]
|
| 446 |
+
11
|
| 447 |
+
12 opt_problem $=$ cp.Problem(objective, constraint)
|
| 448 |
+
13 layer $=$ CvxpyLayer(opt_problem, parameter $\mathbf { S } = \left[ \mathbf { X } _ { - } \right]$ , variable $\mathrm { s } = \left[ \mathrm { w } _ { - } \right]$ )
|
| 449 |
+
14 $\begin{array} { r } { \begin{array} { c c l } { \mathtt { w } , } & { = } & { \mathtt { l a y e r } \left( \mathtt { x } \right) } \end{array} } \end{array}$
|
| 450 |
+
15 return w
|
md/train/2pJZSVcSZz/2pJZSVcSZz.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective
|
| 2 |
+
|
| 3 |
+
Jiun Tian Hoe1∗ Kam Woh Ng2,3∗ Tianyu Zhang4
|
| 4 |
+
Chee Seng Chan1† Yi-Zhe Song2,3 Tao Xiang2,3
|
| 5 |
+
|
| 6 |
+
1CISiP, Universiti Malaya, Malaysia 2CVSSP, University of Surrey, U.K. 3iFlyTek-Surrey Joint Research Centre on Artificial Intelligence 4Geek+, China
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
A deep hashing model typically has two main learning objectives: to make the learned binary hash codes discriminative and to minimize a quantization error. With further constraints such as bit balance and code orthogonality, it is not uncommon for existing models to employ a large number $( > 4 )$ of losses. This leads to difficulties in model training and subsequently impedes their effectiveness. In this work, we propose a novel deep hashing model with only a single learning objective. Specifically, we show that maximizing the cosine similarity between the continuous codes and their corresponding binary orthogonal codes can ensure both hash code discriminativeness and quantization error minimization. Further, with this learning objective, code balancing can be achieved by simply using a Batch Normalization (BN) layer and multi-label classification is also straightforward with label smoothing. The result is an one-loss deep hashing model that removes all the hassles of tuning the weights of various losses. Importantly, extensive experiments show that our model is highly effective, outperforming the state-of-the-art multi-loss hashing models on three large-scale instance retrieval benchmarks, often by significant margins. Code is available at https://github.com/kamwoh/orthohash
|
| 11 |
+
|
| 12 |
+
# 1 Introduction
|
| 13 |
+
|
| 14 |
+
A key building block of a real-world large-scale image retrieval system is hashing. The objective of image hashing is to represent the content of an image using a binary code for efficient storage and accurate retrieval. Recently, deep hashing methods [48, 23] have shown great improvements over conventional hashing methods [46, 15, 16, 22, 36, 37, 19]. Furthermore, deep hashing methods can be grouped by how the similarity of the learned hashing codes are measured, namely pointwise [49, 54, 40, 12, 50], pairwise [25, 23, 5, 4], triplet-wise [45, 32], or listwise [52]. Among them, pointwise methods have a $O ( N )$ computational complexity, whilst the complexity of the others are of at least $O ( N ^ { 2 } )$ for $N$ data points. This means that for large-scale problems, only the pointwise methods are tractable [49]. They are thus the focus of most recent studies.
|
| 15 |
+
|
| 16 |
+
A deep hashing neural network naturally has multiple learning objectives. Specifically, given an image input, the network outputs a continuous code (feature vector) which is then converted into a binary hash code using a quantization layer (usually a sign function). There are thus two main objectives. First, the final model output, i.e., the binary codes must be discriminative, meaning the intra-class hamming distances are small, while the inter-class ones are big. Second, a quantization error minimization objective is needed to regularize the continuous codes. But the learning is constrained by the vanishing gradient problem caused by the quantization layer. Although the problem can be avoided by deploying some relaxation schemes [5, 23, 25], these schemes often produce sub-optimal hash codes due to the introduction of quantization error (see Figure 1). Hence, most recently deep hashing methods [41, 25, 4, 53, 50] has an explicit quantization error minimization learning objective.
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 1: We train a simple CNN model on CIFAR10 with only first 4 classes and 2-bits. The continuous codes v are visualized before sgn. (Left) The model is trained with cross entropy (CE) only. Although it can separate the 4 classes in Euclidean space, the output is not bounded and thus indicating high quantization error and sub-optimal in the Hamming space. (Middle) By appending a batch normalization (BN) layer after v, the hash codes are now balanced. (Right) Now the model (proposed) is trained to maximize the cosine similarity between v and its corresponding binary target o. The black arrows are the binary orthogonal target, denoted as o for each class. It can be seen that the continuous codes exhibit lower intra-class variance and quantization error as compared with the $\mathbf { C E + B N }$ models (middle).
|
| 20 |
+
|
| 21 |
+
Having these two main objectives/losses are still not enough. In particular, to ensure the quality of hash codes, many other losses are employed by existing methods. These include bit balance loss [53, 49, 40], weights constraints to maximize Hamming distance [54], code orthogonality [31, 32]. Further, losses are designed to address the vanishing gradient problem caused by the sign function used to obtain binary codes from the continuous ones [41, 40, 27]. As a result, the state-of-the-art hashing models typically have a large number $( > 4 )$ losses. This means difficulties in optimization which in turn hamper their effectiveness.
|
| 22 |
+
|
| 23 |
+
In this work, for the first time, a deep hashing model with a single loss is developed which removes any needs for loss weight tuning and is thus much easier to optimize. As mentioned earlier, a deep hashing model needs to be trained with at least two objectives, namely binary code discriminativenss and quantization error minimization. So how could one use one loss only? The answer lies in the fact that the two objectives are closely related and can be unified into one. More concretely, we show that both objectives can be satisfied by maximizing the cosine similarity between the continuous codes and their corresponding binary orthogonal target, which can be formulated as a cross-entropy (CE) loss. Our model, dubbed OrthoHash has one loss only which maximizes the cosine similarity between the $\mathrm { L _ { 2 } }$ -normalized continuous codes and binary orthogonal target to maximize inter-class Hamming distance and minimize quantization error simultaneously. We show that this single unifying loss has a number of additional benefits. First, we can leverage the benefit of margin [42, 10] to further improve the intra-class variance. Second, since conventional CE loss only works for single-label classification, we can easily leverage Label Smoothing [38] to modify the CE loss to tackle multilabels classification. Finally, we show that code balancing can now be enforced by introducing a batch normalization [17] (BN) layer rather than requiring a different loss. Extensive experiment results suggest that on conventional category-level retrieval tasks using ImageNet100, NUS-WIDE and MS-COCO, our model is on par with the SOTA. More importantly, on the large-scale instance-level retrieval tasks, our method achieves the new SOTA, beating the best results obtained so far on GLDv2, $\mathcal { R } \mathrm { O x f }$ and $\mathcal { R }$ Paris by $0 . 6 \%$ , $9 . 1 \%$ and $1 7 . 1 \%$ respectively.
|
| 24 |
+
|
| 25 |
+
# 2 Related Work
|
| 26 |
+
|
| 27 |
+
Hashing methods. Conventional hashing methods can be categorized into many streams. Dataindependent methods such as Locality-sensitive Hashing (LsH) [16, 13], and its kernelized version (KLsH) [22] have contributed many of the fundamental concepts for hashing such as the requirement of code balance, uncorrelated bit, and similarity preserving. In contrast, data-dependent methods [46, 21, 15, 19, 36, 37] aim to learn hash codes that are more compact yet more dataset-specific [7]. Recently, deep learning based hashing methods [25, 48, 23] dominated the hashing research due to the superior learning ability of DNN. Various learning objectives are developed to learn hash codes using a training dataset. The objective functions include i) task learning objective which can be further categorized into pointwise [49, 54, 40, 41, 12, 50], pairwise [5, 25, 23], triplet-wise [45, 32], listwise [52] and unsupervised [27, 14]; ii) quantization error minimization such as the loss designed to minimize the $p$ -norm (usually $p = 2$ ) between continuous codes and hash codes; iii) code balancing [27, 40]. We refer readers to learning to hashing surveys [44, 43, 11] for more detailed review.
|
| 28 |
+
|
| 29 |
+
Binary optimization. Hashing is a NP-hard binary optimization problem [46], and is prone to the vanishing gradient problem due to the discrete and non-differentiable binary hash functions. Early methods solved the problem by discarding the discrete constraints (e.g., designing a penalty loss term to generate feature as binary as possible [25, 23]; solve with continuous relaxation, i.e., to optimize in a continuous space using sigmoid or tanh for approximation [5]). Some methods also utilized coordinate descent method in the training [28, 24]. Nevertheless, these methods have increased the complexity of learning due to need for tuning of hyper-parameters balancing different learning objectives.
|
| 30 |
+
|
| 31 |
+
Bypassing vanishing gradient. Greedy Hash [41] designed a new coding layer which uses the sign function in the forward pass to generate binary codes, and gradients are backpropagated using straight-through estimator [1] during optimization. [27] designed a parameter-free coding layer – Bi-half, to maximize the bit capacity by shifting the network output by median (each bit can have a $50 \%$ chance of being $+ 1$ or $^ { - 1 }$ ) . These methods typically requires the modification of computational graphs, in the sense that the original graph is no longer end-to-end trained, hence further complicates the original optimization objective. Ours on the other hand incorporates a neat one-loss design that removes all such complications.
|
| 32 |
+
|
| 33 |
+
Learning hash codes with pre-defined target. Deep Polarized Network (DPN) [12] used a random assignment scheme to generate target vectors with maximal inter-class distance, then optimized with hinge-like polarized loss. Central Similarity Quantization (CSQ) [50] uses Hadamard matrix as "hash centers", then optimized with binary cross entropy. Both methods have similar overall objective, i.e., the continuous codes are learned to be as similar as the target vectors (or "hash centers"). Our model also employs a hash target, but uniquely it is used in a single cosine similarity based single objective.
|
| 34 |
+
|
| 35 |
+
Cosine similarity. According to [6], which is a theoretical analysis for Locality-sensitive Hashing (LsH) [16, 13], if two samples have high angular similarity, then we have high probability of obtaining the same hash codes as well. Hence, while most works focus on hashing images with various constraints, we reformulate the problem of deep hashing in the lens of cosine similarity. By following the same principle, a similar work is done by [2] which described the hashing problem under pairwise constraint while our work describes the problem under pointwise constraint. As inspired by [51, 14] which utilize cosine similarity to find closest approximate binary or ternary representation, we also interpret the quantization error in terms of cosine similarity. Moreover, deep hypersphere embedding learning methods (e.g., SphereFace [35], CosFace [42] and ArcFace [10]) imposed discriminative constraints on a hypersphere manifold and proposed to improve decision boundary by cosine or angular margin. Inspired by them, we also leverage the benefit of margin to improve intra-class variance.
|
| 36 |
+
|
| 37 |
+
# 3 OrthoHash: One Loss for All
|
| 38 |
+
|
| 39 |
+
In Section 3.1, we reformulate the problem of deep hashing in the lens of cosine similarity, i.e., interpreting both Hamming distance retrieval and quantization error in cosine similarity. In Section 3.2, we propose to maximize cosine similarity between the continuous codes and binary orthogonal target under a single classification objective (for both single-label and multi-labels classification).
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 2: We first obtain continuous codes ${ \bf V } = \{ { \bf v } _ { n } \} _ { n = 1 } ^ { N } \in \mathbb { R } ^ { N \times K }$ from our backbone network. It is then passed through a batch normalization (BN) layer to obtain zero-mean continuous codes. Next, we compute scaled cosine similarity between the continuous codes and their binary orthogonal targets $\mathbf { O } = \{ \overset { \cdot } { \mathbf { o } _ { i } } \} _ { i = 1 } ^ { C } \in \{ - 1 , + 1 \} ^ { C \times K }$ where $\mathbf { C } =$ number of classes. Finally, the scaled cosine similarity will act as a classification output and we minimize a cross entropy loss. See Section 3.2 for details.
|
| 43 |
+
|
| 44 |
+
Finally, we describe why adding a batch normalization layer after the continuous codes will achieve code balance in Section 3.2.3. Our method is illustrated in Figure 2.
|
| 45 |
+
|
| 46 |
+
Let us first formally define the deep hashing problem. Let $d$ -dimensional data, ${ \mathbf X } = \{ { \mathbf x } _ { n } \} _ { n = 1 } ^ { N } \in$ where is the number of training samples, and $\mathbf { Y } ~ = ~ \{ \mathbf { y } _ { n } \} _ { n = 1 } ^ { N } ~ \in ~ \{ 0 , 1 \} ^ { N \times C }$ as onehot training labels of $C$ classes (for multi-labels, $\mathbf { y } _ { n } \triangleq \mathbf { y } _ { n i } = [ y _ { n 1 } , \cdot \cdot \cdot , y _ { n C } ]$ , whose $y _ { n i } = 1$ if any $i$ -th class are assigned to the $n$ -th sample and 0 otherwise). Our objective is to learn a set of $K$ -bit binary codes $\mathbf { B } = \{ \mathbf { b } _ { n } \} _ { n = 1 } ^ { N } \in \mathbf { \hat { \Gamma } } [ - 1 , 1 \} ^ { N \times K }$ for each training point ${ \bf x } _ { n }$ , which is converted from the continuous codes $\mathbf { v } _ { n }$ through a sgn function. v can be computed by a latent layer $\mathcal { H } ( \mathbf { x } ) = \mathbf { W } \boldsymbol { \phi } ( \mathbf { x } ) \in \mathbb { R } ^ { K } , \boldsymbol { \phi } ( \cdot )$ is a deep neural network (backbone network) to compute $q$ -dimensional nonlinear feature representation $\mathbf { f } = \phi ( \mathbf { x } ) \in \mathbb { R } ^ { q }$ , $\mathbf { W } \in \mathbb { R } ^ { K \times q }$ is the weights of the latent layer and $s g n ( \mathbf { v } _ { n k } ) = 1$ if $k$ -th bit of ${ \bf v } _ { n } \geq 0$ and $- 1$ otherwise. In our work, binary orthogonal targets $\mathbf { o } _ { y _ { n } } \in [ \mathbf { o } _ { 1 } , \therefore \cdot \cdot \mathbf { \tau } , \mathbf { o } _ { C } ] ^ { \intercal } = \mathbf { O } \in \{ - 1 , + 1 \} ^ { C \times K }$ , where $\mathbf { o } _ { i }$ denotes a column vector belongs to $i$ -th class. Ideally, for any two rows, $1 \leq i , j \leq C$ , $\mathbf { o } _ { i }$ and $\mathbf { o } _ { j }$ are orthogonal to each other. We use $a$ or $A$ to represent scalar, $\mathbf { a }$ to represent column vector, and $\mathbf { A }$ to represent matrix. Both $i$ and $j$ are often used as index.
|
| 47 |
+
|
| 48 |
+
# 3.1 Reformulating Deep Hashing in the Lens of Cosine Similarity
|
| 49 |
+
|
| 50 |
+
Interpreting Hamming Distance as Cosine Similarity. Typically, Hamming distance can be computed using logical xor operation between binary codes $\mathbf { b } _ { i }$ and ${ \bf b } _ { j }$ , followed by popcount. If $\mathbf { b }$ is represented by $\{ - 1 , + 1 \} ^ { K }$ , then Hamming distance can also be computed mathematically as:
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
D ( \mathbf { b } _ { i } , \mathbf { b } _ { j } ) = \frac { K - \mathbf { b } _ { i } ^ { \intercal } \mathbf { b } _ { j } } { 2 } .
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
Geometrically, the dot product $\mathbf { b } _ { i } ^ { \mathsf { T } } \mathbf { b } _ { j }$ can be interpreted as:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathbf { b } _ { i } ^ { \mathsf { T } } \mathbf { b } _ { j } = \| \mathbf { b } _ { i } \| \| \mathbf { b } _ { j } \| \cos \theta _ { i j } ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
in which $\left\| \cdot \right\|$ is the Euclidean norm and √ $\theta _ { i j }$ is the angle between $\mathbf { b } _ { i }$ and $\mathbf { b } _ { j }$ . As both $\left\| \mathbf { b } _ { i } \right\|$ and $\| \mathbf { b } _ { j } \|$ are constant (i.e., $\| \mathbf { b } \| = { \sqrt { K } } )$ , equation (1) can then be viewed as:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
D ( \mathbf { b } _ { i } , \mathbf { b } _ { j } ) = \frac { K - K \cos \theta _ { i j } } { 2 } = \frac { K } { 2 } ( 1 - \cos \theta _ { i j } ) .
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
Since $\textstyle { \frac { K } { 2 } }$ is a constant, we can see that the retrieval is now will be only based on the angle between two hash codes i.e., similar hash codes will have a similar direction, yield a lower angle between them, and hence a lower hamming distance.
|
| 69 |
+
|
| 70 |
+
Interpreting Quantization Error as Cosine Similarity. Typically, converting continuous codes v to binary codes b will lead to information loss, which is also known as quantization error. Therefore,
|
| 71 |
+
|
| 72 |
+
most of the existing hashing methods have included quantization error minimization in their learning objective such as $\mathrm { L _ { 1 } }$ -norm, $\mathrm { L _ { 2 } }$ -norm and p-norm (e.g., $p = 3$ in Greedy Hash [41]), usually in the form of:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\operatorname* { m i n } L + \lambda Q ,
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $L$ is the supervised learning objective such as Cross Entropy and $Q$ is the quantization error between $\mathbf { v }$ and b. However, it is difficult to control the scale $\lambda$ , i.e. a low $\lambda$ might not be effective, while a high $\lambda$ might lead to underfitting. As a result of this, careful tuning is needed and yet the tuned $\lambda$ may varies in different tasks. To overcome this cumbersome practise, let us first interpret quantization error geometrically:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\operatorname* { m i n } { \left\| \mathbf { v } - \mathbf { b } \right\| ^ { 2 } } \ \mathrm { s . t . } \ \mathbf { b } \in \{ - 1 , 1 \} ^ { K } ,
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
in which $\mathbf { v }$ is in continuous space, $\mathbf { b } = s g n ( \mathbf { v } )$ is in binary space. We expand equation (5) to get:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\left\| \mathbf { v } - \mathbf { b } \right\| ^ { 2 } = \left\| \mathbf { v } \right\| ^ { 2 } + \left\| \mathbf { b } \right\| ^ { 2 } - 2 \left\| \mathbf { v } \right\| \left\| \mathbf { b } \right\| \cos { \theta _ { v b } } .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
According to equation (3), retrieval is only based on the similarity in the direction of two hash codes. Hence, we can ignore the magnitude of $\mathbf { v }$ by normalizing it to have the same norm with $\mathbf { b }$ , i.e., $\| \mathbf { v } \| = { \sqrt { K } }$ and interpret the quantization error as to only the angle $\theta _ { v b }$ between $\mathbf { v }$ and $\mathbf { b } ^ { 3 }$ :
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\left\| \mathbf { v } - \mathbf { b } \right\| ^ { 2 } = 2 K - 2 K \cos { \theta _ { v b } } = 2 K ( 1 - \cos { \theta _ { v b } } ) .
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
Since $2 K$ is a constant, we can then conclude that maximize the cosine similarity between $\mathbf { v }$ and b will lead to a low quantization error, leading to a better approximation in the hash codes.
|
| 97 |
+
|
| 98 |
+
# 3.2 Discriminative Hash Codes with Orthogonal Target
|
| 99 |
+
|
| 100 |
+
According to [6], the probability of two samples $\mathbf { x } _ { i }$ and $\mathbf { x } _ { j }$ to have the same hash code under a family $\mathcal { F }$ of hash functions using random hyperplane technique can be described as $\mathbf { P r } _ { h \in \mathcal { F } } [ h ( \mathbf { x } _ { i } ) =$ $\begin{array} { r } { h ( \mathbf { x } _ { j } ) ] = 1 - \frac { \theta _ { i j } } { \pi } } \end{array}$ , where $h ( \cdot )$ is a hash function and $\theta _ { i j }$ is the angle between $\mathbf { x } _ { i }$ and $\mathbf { x } _ { j }$ . Therefore, based on the same principle, it can be derived that if the two continuous codes $\mathbf { v } _ { i }$ and $\mathbf { v } _ { j }$ from latent layer $\mathcal { H }$ have high cosine similarity, then the hash codes $\mathbf { b } _ { i }$ and $\mathbf { b } _ { j }$ should also have high chance of obtaining the same hash codes. Beside that, as described in Section 3.1, cosine similarity can also be used to justify the retrieval performance using both the hash codes and quantization error between the continuous codes and hash codes. Given these two circumstances, we therefore propose to maximize the cosine similarity of the continuous codes $\mathbf { v } _ { n }$ and its corresponding binary orthogonal target, $\mathbf { o } _ { y _ { n } } \in [ \mathbf { o } _ { 1 } , \therefore \cdot \cdot , \mathbf { o } _ { C } ] ^ { \top } = \mathbf { O } \in \{ - 1 , + 1 \} ^ { C \times K }$ , where this can be achieved by maximizing the posterior probability of the ground-truth class using softmax (cross-entropy) loss:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
L = - \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \log \frac { \exp { ( \mathbf { o } _ { y _ { n } } ^ { \intercal } \mathbf { v } _ { n } ) } } { \sum _ { i = 1 } ^ { C } \exp { ( \mathbf { o } _ { i } ^ { \intercal } \mathbf { v } _ { n } ) } } ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
where $\mathbf { v } _ { n }$ denotes the deep continuous codes of the $n$ -th samples from DNN $\phi$ and both $\mathbf { o } _ { y _ { n } }$ , $\mathbf { o } _ { i } \in \mathbf { O }$ denote the ground-truth class $y _ { n }$ and the $i$ -th class of the binary orthogonal targets. For simplicity, we omit the bias term from equation (8). It follows that under the framework of deep hypersphere embedding [35, 42, 10], we can transform the logit $\mathbf { o } _ { i } ^ { \mathsf { T } } \mathbf { v } _ { n } = \left\| \mathbf { o } _ { i } \right\| \left\| \mathbf { v } _ { n } \right\| \cos \theta _ { n i }$ where $\theta _ { n i }$ is the angle between the continuous codes $\mathbf { v } _ { n }$ and the binary orthogonal target √ $\mathbf { o } _ { i }$ . Next, we perform $\mathrm { L _ { 2 } }$ normalization on $\mathbf { v } _ { n }$ so that $\left\| \mathbf { v } _ { n } \right\| = 1$ , and $\| \mathbf { o } _ { i } \| = { \dot { \sqrt { K } } }$ since it is in binary form. Now our loss function can be rewritten as:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
L = - \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \log \frac { \exp { ( \sqrt { K } \cos \theta _ { y _ { n } } ) } } { \exp { ( \sqrt { K } \cos \theta _ { y _ { n } } ) } + \sum _ { i = 1 , i \neq y _ { n } } ^ { C } \exp { ( \sqrt { K } \cos \theta _ { n i } ) } } .
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
As such, instead of introducing the quantization error minimization in the learning objective (equation (4)), our proposed method unifies both the learning objective and quantization error minimization together under a single classification objective as shown in the loss function (equation (9)). Furthermore, since the binary orthogonal targets attain maximal inter-class Hamming distance and that our loss function also aims to minimize the intra-class variance, we can leverage on cosine or angular margin4 that have been proven to be beneficial in CosFace [42] and ArcFace [10], to further improve the minimization of intra-class variance (we set $m = 0 . 2$ in all of our experiments unless mentioned explicitly). With this, our method is able to perform end-to-end training to learn highly discriminative hash codes without both the sophisticated training objectives and computational graph modifications.
|
| 113 |
+
|
| 114 |
+
# 3.2.1 Binary Orthogonal Target
|
| 115 |
+
|
| 116 |
+
The maximization of the expectation of inter-class Hamming distance will help to increase the recall rate during retrieval as there will be lesser chance to retrieve incorrect items, because the aim is to retrieve more similar items (intra-class), and avoid to retrieve incorrect items (interclass). That is, given a K-bit Hamming space $\mathbb { H } ^ { K } \in \{ - 1 , + 1 \} ^ { K }$ , for any two binary vectors $\mathbf { b } _ { i } , \mathbf { b } _ { j }$ sampled with probability $p$ for $+ 1$ on each bit, the expectation of Hamming distance is $\mathbb { E } [ D ( { \mathbf b } _ { i } , { \mathbf b } _ { j } ) ] = 2 \cdot K \cdot p ( 1 - p )$ and it achieves the upper bound of $\begin{array} { l } { { \frac { K } { 2 } } } \end{array}$ with $p = 0 . 5$ [12, 50] (See Appendix B in supplementary material for details.). Hence, hash codes $\mathbf { b } _ { i }$ and $\mathbf { b } _ { j }$ must be orthogonal so that we can get $\begin{array} { r } { D ( { \mathbf b } _ { i } , { \mathbf b } _ { j } ) = \frac { K } { 2 } } \end{array}$ in equation (3).
|
| 117 |
+
|
| 118 |
+
Orthogonal Targets Generation. Hadamard matrix naturally contains orthogonal rows and columns, which guarantees the maximum Hamming distance of $\textstyle { \frac { K } { 2 } }$ between any two rows [50, 29]. However, it is restricted when $K$ is not 1, 2, or a multiple of 4. Hence, a simple solution is to sample the targets from $B e r n ( 0 . 5 )$ which every sampled bit has the probability $p = 0 . 5$ to be $+ 1$ . The result is the expectation of Hamming distance between any two rows equals to $\frac { K } { 2 }$ which indicates orthogonality. One limitation is that if , the nearest rows in the sampled targets will be identical, which causes performance degrade. Hence, a simple solution is to increase $K$ . In supplementary material (Appendix D.3), we show that the two nearest rows has Hamming distance closed to $\frac { \tilde { K } } { 2 }$ as $K$ is higher. We also generate the targets with the objective of maximum inter-class Hamming distance heuristically, it indeed improved the performance at lower $K$ , but the improvement in higher $K$ are negligible.
|
| 119 |
+
|
| 120 |
+
# 3.2.2 Multi-labels Hash Codes Learning
|
| 121 |
+
|
| 122 |
+
As conventional cross-entropy loss only works for single-label classification, we leverage the concept of Label Smoothing [38] to generate labels for multi-labels classification. A standard cross entropy (CE) loss is mathematically formulated as:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
L = - \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \sum _ { i = 1 } ^ { C } y _ { n i } \log ( p ( y _ { n i } | \mathbf { x } _ { n } ) ) ,
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
in which $y _ { n i } = 1$ if $i$ -th class is assigned to the $n$ -th sample in a single label multiclass classification task. In [38], the target label becomes soft-target such that non-target class has a small "smoothing" value to regularize overconfident samples and we leverage this concept for multi-labels. To adopt CE for multi labels classification, we set $y _ { n i } = z > 0$ if any $i$ -th class are assigned to $n$ -th sample. The constant $z$ is determined such that $\textstyle \sum _ { i = 1 } ^ { C } y _ { n i } = 1$ , e.g., $z = 0 . 5$ and ${ \bf y } _ { n } = [ 0 , 0 . 5 , 0 , 0 . 5 ]$ when the $2 ^ { \mathrm { n d } }$ and the $4 ^ { \mathrm { t h } }$ classes are the assigned classes. Our motivation is that the model should maximize the probabilities of the target classes, which can optimize the hash codes to be as similar as the binary targets from assigned classes5. In our experiments, we found out empirically that replacing softmax with sigmoid for multi-labels are not effective6. A likely explanation is that softmax will intrinsically suppress the lower activated class unit (i.e., scaled cosine similarity) with lower probability and increase the highly activated class unit with higher probability, while sigmoid will treat each class unit as an individual unit. As a result, maximizing probability of a class might not lead to minimizing the probability of other classes. Therefore, we propose to leverage the concept of Label Smoothing to generate labels so that we can use cross entropy loss for learning.
|
| 129 |
+
|
| 130 |
+
# 3.2.3 Code Balance
|
| 131 |
+
|
| 132 |
+
Although binary orthogonal target helps in code balancing, since every bit has $50 \%$ of chance being $+ 1$ or $- 1$ , there is no guarantee that the model will learn to output a balanced code. Therefore, we propose to add a batch normalization (BN) layer after the continuous codes $v$ to ensure the code balance. If $\textstyle \sum _ { n } \mathbf { v } _ { n k } = 0$ , then we can see that $\dot { \sum _ { n } } \mathbf { b } _ { n k } = 0$ for the $k$ -th bit. Because the distribution of $\mathbf { v }$ has been normalized to have zero-mean and variance of 1, with $\mathbf { b } = s g n ( \mathbf { v } )$ , the hash codes b will follow a uniform binary distribution with $50 \%$ chances on both $+ 1$ and $- 1$ . Empirically, we found that it improves the retrieval performance on ImageNet100 by about $1 7 - 2 0 \%$ as compared with a model with normal cross entropy loss (see Table 1). Note that the Bi-half method [27] shifts the continuous codes by their median, followed by converting the continuous codes to binary codes for optimization. However, it will have to modify the computational graph in order to have a proxy derivative to the solve vanishing gradient problem. In contrast, appending BN layer will not modify the computational graph, therefore enabling straightforward end-to-end training.
|
| 133 |
+
|
| 134 |
+
# 4 Experiment
|
| 135 |
+
|
| 136 |
+
Training Setup. We select 7 different deep hashing methods for comparison (5 point-wise, 1 pairwise and 1 triplet-wise). For a fair comparison, we use the same learning rate of 0.0001, Adam optimizer [18] and 100 epochs for all methods. For SDH-C [31], we have modified it from pair-wise objective to point-wise objective, while all penalty terms are kept (i.e., quantization loss, bit variance loss and orthogonality on projection weights).
|
| 137 |
+
|
| 138 |
+
Datasets. We follow prior works [5, 12, 41, 33, 40, 48, 23, 34] and choose ImageNet100 [9], NUSWIDE [8] and MS-COCO [30] for category-level retrieval experiments. For a more practical yet challenging large-scale instance-level retrieval task (i.e., tremendous number of classes), we evaluate on the popular GLDv2 [47], ROxf and RPar [39].
|
| 139 |
+
|
| 140 |
+
Architecture. For category-level retrieval, following the settings in [5, 41, 40, 12], we use pre-trained AlexNet [20] as the network backbone initialization. The output from last fully-connected with ReLU (4096-dimension vector) acts as input to the latent layer; various supervised deep hashing methods are then applied to generate binary codes. The image size is $2 2 4 \times 2 2 4$ . For instance-level retrieval, due to the expensive cost of training from scratch, we use pre-trained model7 (R50-DELG-GLDv2- clean) from DELG [3] to compute the 2048-dimension global descriptors. We then train a latent layer $\mathcal { H }$ to compute hash codes where inputs are the global descriptors. For GLDv2, the images input are√ $5 1 2 \times 5 1 2$ . For $\mathcal { R } \mathrm { O x f }$ and RPar, we use 3 scales $\{ \frac { 1 } { \sqrt { 2 } } , 1 , \sqrt { 2 } \}$ to produce multi-scale representations. These are subject to $\mathrm { L _ { 2 } }$ normalization, and then average-pooled to obtain a single descriptor as done by [3]. A $G L D \nu 2$ -trained latent layer is used to compute hash codes for the evaluations.
|
| 141 |
+
|
| 142 |
+
Details of training setups, datasets and architecture can be found in the supplementary material (Appendix C).
|
| 143 |
+
|
| 144 |
+
# 4.1 Results on Category-level Retrieval
|
| 145 |
+
|
| 146 |
+
For performance evaluation8, we use mean average precision $( \mathrm { m A P } @ \mathrm { R } )$ which is the mean of average precision scores of the top R retrieved items. Table 1 offers performance comparison amongst all selected hashing methods and our methods $^ +$ variants). CE denotes model trained with cross entropy only, the hash codes are computed from sign of continuous codes. $\mathbf { C E + B N }$ denotes CE model with BN layer [17] appended after the latent layer. $\mathbf { C E + }$ Bihalf denotes CE model with Bihalf9 [27] layer appended after the latent layer. OrthoCos denotes model trained with cosine margin and binary orthogonal target. OrthoCos+Bihalf denotes a variant of OrthoCos, and with Bihalf layer appended. OrthoCos+BN denotes a variant of OrthoCos, and with BN layer appended. OrthoArc $\mathbf { \Gamma } + \mathbf { B } \mathbf { N }$ denotes a variant of $\mathbf { O r t h o C o s + B N }$ , trained with angular margin.
|
| 147 |
+
|
| 148 |
+
Overall. It can be observed that both our OrthoCos+BN and OrthoArc+BN perform better than recent state-of-the-art, DPN [12] and CSQ [50]. On multi-labeled datasets (i.e., NUS-WIDE and MS
|
| 149 |
+
|
| 150 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="4">ImageNet100 (mAP@ 1K)</td><td colspan="4">NUS-WIDE (mAP@5K)</td><td colspan="4">MS COCO (mAP@5K)</td></tr><tr><td>16</td><td>32</td><td>64</td><td>128</td><td>16</td><td>32</td><td>64</td><td>128</td><td>16 32</td><td></td><td>64</td><td>128</td></tr><tr><td>HashNet2 [5]</td><td>0.343</td><td>0.480</td><td>0.573</td><td>0.612</td><td>0.814</td><td>0.831</td><td>0.842</td><td>0.847</td><td>0.663</td><td>0.693</td><td>0.713</td><td>0.727</td></tr><tr><td>DTSH³ [45]</td><td>0.442</td><td>0.528</td><td>0.581</td><td>0.612</td><td>0.816</td><td>0.836</td><td>0.851</td><td>0.862</td><td>0.699</td><td>0.732</td><td>0.753</td><td>0.770</td></tr><tr><td>SDH-C1 [31]</td><td>0.584</td><td>0.649</td><td>0.664</td><td>0.662</td><td>0.763</td><td>0.792</td><td>0.816</td><td>0.832</td><td>0.671</td><td>0.710</td><td>0.733</td><td>0.742</td></tr><tr><td>GreedyHash1 [41]</td><td>0.570</td><td>0.639</td><td>0.659</td><td>0.659</td><td>0.771</td><td>0.797</td><td>0.815</td><td>0.832</td><td>0.677</td><td>0.722</td><td>0.740</td><td>0.746</td></tr><tr><td>JMLH1 [40]</td><td>0.517</td><td>0.621</td><td>0.662</td><td>0.678</td><td>0.791</td><td>0.825</td><td>0.836</td><td>0.843</td><td>0.689</td><td>0.733</td><td>0.758</td><td>0.768</td></tr><tr><td>DPN1 [12]</td><td>0.592</td><td>0.670</td><td>0.703</td><td>0.714</td><td>0.783</td><td>0.818</td><td>0.838</td><td>0.842</td><td>0.668</td><td>0.721</td><td>0.752</td><td>0.773</td></tr><tr><td>CSQ1 [50]</td><td>0.586</td><td>0.666</td><td>0.693</td><td>0.700</td><td>0.797</td><td>0.824</td><td>0.835</td><td>0.839</td><td>0.693</td><td>0.762</td><td>0.781</td><td>0.789</td></tr><tr><td>CE1</td><td>0.350</td><td>0.379</td><td>0.406</td><td>0.445</td><td>0.744</td><td>0.770</td><td>0.796</td><td>0.813</td><td>0.602</td><td>0.639</td><td>0.658</td><td>0.676</td></tr><tr><td>CE+BN1</td><td>0.533</td><td>0.586</td><td>0.612</td><td>0.617</td><td>0.801</td><td>0.814</td><td>0.823</td><td>0.825</td><td>0.697</td><td>0.721</td><td>0.729</td><td>0.726</td></tr><tr><td>CE+Bihalf1 [27]</td><td>0.541</td><td>0.630</td><td>0.661</td><td>0.662</td><td>0.802</td><td>0.825</td><td>0.836</td><td>0.839</td><td>0.674</td><td>0.728</td><td>0.755</td><td>0.757</td></tr><tr><td>OrthoCos1</td><td>0.583</td><td>0.660</td><td>0.702</td><td>0.714</td><td>0.795</td><td>0.826</td><td>0.842</td><td>0.851</td><td>0.690</td><td>0.745</td><td>0.772</td><td>0.784</td></tr><tr><td>OrthoCos+Bihalfl</td><td>0.562</td><td>0.656</td><td>0.698</td><td>0.711</td><td>0.804</td><td>0.834</td><td>0.846</td><td>0.852</td><td>0.690</td><td>0.746</td><td>0.775</td><td>0.782</td></tr><tr><td>OrthoCos+BN1</td><td>0.606</td><td>0.679</td><td>0.711</td><td>0.717</td><td>0.804</td><td>0.836</td><td>0.850</td><td>0.856</td><td>0.709</td><td>0.762</td><td>0.787</td><td>0.797</td></tr><tr><td>OrthoArc+BN1</td><td>0.614</td><td>0.681</td><td>0.709</td><td>0.714</td><td>0.806</td><td>0.833</td><td>0.850</td><td>0.856</td><td>0.708</td><td>0.762</td><td>0.785</td><td>0.794</td></tr></table>
|
| 151 |
+
|
| 152 |
+
Table 1: Performance of different methods for 4 different bits on different benchmark datasets. All results are run by us. The superscript 1, 2 and 3 indicate point-wise, pair-wise and triplet-wise method respectively. Bold values indicate best performance in the column.
|
| 153 |
+
|
| 154 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="2">GLDv2 (mAP@ 100)</td><td colspan="2">ROxf-Hard (mAP@ all)</td><td colspan="3">RParis-Hard (mAP@ all)</td></tr><tr><td>128 512</td><td>2048</td><td>128 512</td><td>2048</td><td>128</td><td>512</td><td>2048</td></tr><tr><td>HashNet² [5]</td><td>0.018 0.069</td><td>0.111</td><td>0.034 0.058</td><td>0.307</td><td>0.133</td><td>0.190</td><td>0.490</td></tr><tr><td>DPN1 [12]</td><td>0.021 0.089</td><td>0.133</td><td>0.053 0.184</td><td>0.303</td><td>0.224</td><td>0.399</td><td>0.562</td></tr><tr><td>GreedyHash1 [41]</td><td>0.029 0.108</td><td>0.144</td><td>0.032 0.251</td><td>0.373</td><td>0.128</td><td>0.531</td><td>0.652</td></tr><tr><td>CSQ1 [50]</td><td>0.023 0.086</td><td>0.114</td><td>0.093 0.284</td><td>0.398</td><td>0.245</td><td>0.541</td><td>0.649</td></tr><tr><td>OrthoCos+BN1</td><td>0.035 0.111</td><td>0.147</td><td>0.184 0.359</td><td>0.447</td><td>0.416</td><td>0.608</td><td>0.669</td></tr><tr><td>R50-DELG-H</td><td>- 1</td><td>0.125*</td><td>-</td><td>0.471</td><td>-</td><td>1</td><td>0.682</td></tr><tr><td>R50-DELG-C</td><td>=</td><td>0.138*</td><td>1</td><td>1</td><td>0.510</td><td></td><td>0.715</td></tr></table>
|
| 155 |
+
|
| 156 |
+
Table 2: Performance of different methods for 3 different numbers of bits on different instance-level benchmark datasets. All results are run by us. The superscript 1 and 2 indicate point-wise and pair-wise method respectively. Bold values indicate best performance in the column. \* indicates using $5 1 2 \times 5 1 2$ image inputs, hence different performance as reported by DELG [3]. R50-DELG-H denotes Hamming distance retrieval using the sign of extracted descriptors. R50-DELG-C denotes Cosine distance retrieval using the extracted descriptors.
|
| 157 |
+
|
| 158 |
+
COCO), DTSH [45] (triplet based method) performed the best with 0.851 and 0.862 with 64 and 128-bits hash codes in NUS-WIDE followed by our method (e.g., OrthoCos+BN achieves 0.850 and 0.856 in the same settings), while $\mathbf { O r t h o C o s + B N }$ and OrthoArc $\mathbf { \Gamma } + \mathbf { B } \mathbf { N }$ performed the best on MS-COCO with at most $1 \%$ improvement over previous deep hashing methods.
|
| 159 |
+
|
| 160 |
+
Code Balance. Although retrieval performance of CE models performed the worst, but by appending BN layer after the latent layer $\mathbf { \left( C E { + } B N \right) }$ , we were able to observe $5 \%$ improvement over all settings (dataset and number of bits). Bihalf [27] layer (zero-median features) has a proxy derivative to learn hash features, hence getting $0 . 1 { - } 4 . 9 \%$ improvement than $\mathbf { C E + B N }$ . This indicates that without sophisticated training objectives, code balance itself is a very important factor in improving Hamming distance based retrieval. However, OrthoCos+Bihalf does not show significant improvement over OrthoCos+BN, but is comparable with OrthoCos. We thus conclude that our method can achieve code balance without explicitly engineering the computational graph.
|
| 161 |
+
|
| 162 |
+
Cosine and Angular Margin. In our experiments, we observed that cosine margin $\left( \mathbf { O r t h o C o s + B N } \right)$ slightly outperform angular margin (OrthoArc ${ \bf \Lambda } + { \bf B } { \bf N }$ ) by about $0 . 2 \%$ on average.
|
| 163 |
+
|
| 164 |
+
# 4.2 Results on Instance-Level Retrieval
|
| 165 |
+
|
| 166 |
+
For evaluation metrics, we adapt the evaluation protocol of [3, 39]. The baseline performance of GLDv2, $\mathcal { R }$ Oxf-Hard and RPar-Hard from the pre-trained R50-DELG-GLDv2-clean are 0.138,
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 3: Histogram of intra-class and inter-class Hamming distances with 64-bits ImageNet100. The arrow annotation is the separability in Hamming distances, $\mathbb { E } [ D _ { i n t e r } ] - \mathbb { E } [ D _ { i n t r a } ]$ . We normalized the frequency so that sum of all bins equal to 1.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 4: Analysis of retrieval performance of 64-bits ImageNet100. (a) Quantization error: $\theta _ { v b }$ . (b) Separability: $\mathbb { E } [ D _ { i n t e r } ] - \mathbb { E } [ D _ { i n t r a } ]$ . (c) Orthogonality: $\begin{array} { r l } { { \bf \nabla } } & { { } \left\| \frac { 1 } { K } { \bf H } { \bf H } ^ { \intercal } - \mathbb { I } \right\| } \end{array}$ . Blue solid line denotes mean average precision (mAP $@$ 1000) and orange dotted line denotes the respective analysis score.
|
| 173 |
+
|
| 174 |
+
0.510 and 0.715 respectively. Table 2 summarizes the performance of different deep hashing methods and our method. For all the 3 datasets, our method outperforms all previous deep hashing methods on all bits. This suggests that our method has a better generalization ability on unseen instances than previous deep hashing methods. In particular, our model significantly outperforms previous deep hashing models by $0 . 6 \%$ , $9 . 1 \%$ and $1 7 . 1 \%$ respectively on the 3 datasets with 128-bits hash codes.
|
| 175 |
+
|
| 176 |
+
Orthogonal Transformation. For GLDv2 2048-bits hash codes, surprisingly it can achieve a much better performance than the pre-trained 2048-dimensions descriptors (by $1 . 1 \%$ improvement over R50-DELG-C). We then analyze the separability in cosine distances, i.e., the difference in the mean of intra-class cosine distance and the mean of inter-class cosine distance before and after the transformation (similar to Figure 3). We observe that the separability in cosine distances increases after the orthogonal transformation, i.e., before it is 0.142 and after it increases to 0.167. The results thus show that learning orthogonal hash codes can transform the inputs to be more discriminative.
|
| 177 |
+
|
| 178 |
+
Domain shifting with BN. As the model is trained with GLDv2, the running mean and variance in the BN layer might experience domain shifting problem [26] when testing directly on different datasets (e.g., ROxf and RPar). We empirically found that using running mean and variance from GLDv2 will lead to a large performance drop in Hamming distance retrieval10. One simple solution is to recompute the mean and variance from all continuous codes in the database, then update the running mean and variance with the computed mean and variance. The performances of $\mathcal { R } \mathrm { O x f }$ and RPar in Table 2 are obtained with running mean and variance of the respective database.
|
| 179 |
+
|
| 180 |
+
# 4.3 Further Analysis
|
| 181 |
+
|
| 182 |
+
Histogram of Hamming Distances. Figure 3 summarizes the histogram of intra-class and interclass distances. We compare our method OrthoCos+BN with pair-wise method HashNet [5] and point-wise classification based GreedyHash [41]. Although the distribution of inter-class distances are about the same for all the 3 methods (close to Hamming distance of $K / 2 = 3 2$ ), we can see that the larger the separability i.e., the difference in the mean of intra-class distance (the blue dotted line) with the mean of inter-class distance (the orange dotted line), the better the performance.
|
| 183 |
+
|
| 184 |
+
Performance Improvement Analysis. We further analyze the reasons behind performance improvements of different deep hashing methods, and summarizes the results in Figure 4. We conclude 3 main reasons that contribute to the improvement in deep hashing methods: i) quantization error; ii) the separability in Hamming distances; and iii) orthogonality in hash centers. For quantization error, we measure the angle $\theta _ { v b }$ between the continuous codes $\mathbf { v }$ and the hash codes $\mathbf { b }$ , i.e., $\begin{array} { r } { \theta _ { v b } = d e g ( \operatorname { a r c c o s } \big ( \frac { \mathbf { v } ^ { \mathsf { T } } \mathbf { b } } { \lVert \mathbf { v } \rVert \lVert \mathbf { b } \rVert } \big ) \big ) } \end{array}$ . For separability, we measure the difference in the mean of inter-class distances and the mean of intra-class distances, i.e., $\mathbb { E } [ D _ { i n t e r } ] - \mathbb { E } [ D _ { i n t r a } ]$ . For orthogonality, we first compute the hash centers $\mathbf { H } \in \{ - 1 , + 1 \} ^ { C \times K }$ for every class (by taking the sign of average hash codes in every class), then we measure the orthogonality with $\begin{array} { r l } { { \big \| \frac { 1 } { K } \mathbf H \mathbf H ^ { \intercal } - \mathbb { I } \big \| } } & { { } } \end{array}$ (lower is better). When the quantization error reduces, the separability increases and the hash centers has better orthogonality, resulting in better performance.
|
| 185 |
+
|
| 186 |
+
# 5 Conclusion & Future Work
|
| 187 |
+
|
| 188 |
+
We propose to unify training objectives of deep hashing under a single classification objective. We show this can be achieved by maximizing the cosine similarity between the continuous codes and binary orthogonal target under a cross entropy loss. For that, we first reformulated the problem of deep hashing in the lens of cosine similarity. We then demonstrated that if we perform $\mathrm { L _ { 2 } }$ -normalization on the continuous codes, then end-to-end training of deep hashing is possible without any extra sophisticated constraints. Moreover, we leverage the concept of Label Smoothing to train multilabels classification with cross-entropy loss and batch normalization for code balancing. Extensive experiments validated the efficiency of our method in both category-level and instance-level retrieval benchmarks.
|
| 189 |
+
|
| 190 |
+
Nonetheless, the proposed method might fail when the number of bits is too small ( $^ { < 8 }$ bits), especially when number of classes is much greater than the number of bits. In this case, there will be overlapping in the generated target code (i.e., the number of maximum unique codes is equal to $2 ^ { K }$ where $K$ is number of bits). In such condition, the target code will also not guarantee to be orthogonal. Overcoming this limitation is part of the future work. Also, we are exploring how to learn better feature representations to improve the retrieval performance by using hash codes through unsupervised learning.
|
| 191 |
+
|
| 192 |
+
# Broader Impact
|
| 193 |
+
|
| 194 |
+
Hashing remains a key bottleneck in practical deployments of large-scale retrieval systems. Recent deep hashing frameworks have shown great promise in learning code that are both compact and discriminative. Yet state-of-the-art frameworks are known to be difficult to train and to reproduce – largely owing to their complex loss designs that dictates hyperparameter tuning and multi-stage training. In this work, we set out to change that – we attempt to unify deep hashing under $a$ single objective, therefore simplifying training and help reproducibility. Our key intuition lies with reformulating hashing in the lens of cosine similarity. We report competitive hashing performance on all common datasets, and significant improvements over state-of-the-arts on the more challenging task of instance-level retrieval.
|
| 195 |
+
|
| 196 |
+
# Acknowledgments and Disclosure of Funding
|
| 197 |
+
|
| 198 |
+
This research is partly supported by the Fundamental Research Grant Scheme (FRGS) MoHE Grant FP021-2018A, from the Ministry of Education Malaysia. We also thank Kilho Shin for helpful discussions and recommendations.
|
| 199 |
+
|
| 200 |
+
# References
|
| 201 |
+
|
| 202 |
+
[1] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013.
|
| 203 |
+
[2] Levi Boyles, Aniket Anand Deshmukh, Urun Dogan, Rajesh Koduru, Charles Denis, and Eren Manavoglu. Semantic hashing with locality sensitive embeddings, 2021.
|
| 204 |
+
[3] Bingyi Cao, André Araujo, and Jack Sim. Unifying deep local and global features for image search. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision – ECCV 2020, pages 726–743, Cham, 2020. Springer International Publishing.
|
| 205 |
+
[4] Yue Cao, Mingsheng Long, Bin Liu, and Jianmin Wang. Deep cauchy hashing for hamming space retrieval. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1229–1237, 2018.
|
| 206 |
+
[5] Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Philip S. Yu. Hashnet: Deep learning to hash by continuation. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 5609–5618, 2017.
|
| 207 |
+
[6] Moses S Charikar. Similarity estimation techniques from rounding algorithms. In Proceedings of the thiry-fourth annual ACM symposium on Theory of computing, pages 380–388, 2002.
|
| 208 |
+
[7] Ken Chatfield, Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Return of the devil in the details: Delving deep into convolutional nets. arXiv preprint arXiv:1405.3531, 2014.
|
| 209 |
+
[8] Tat-Seng Chua, Jinhui Tang, Richang Hong, Haojie Li, Zhiping Luo, and Yan-Tao Zheng. Nus-wide: A real-world web image database from national university of singapore. In Proceedings of the ACM international conference on image and video retrieval, pages 1–9, Santorini, Greece., July 8-10, 2009. [9] 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, pages 248–255, 2009.
|
| 210 |
+
[10] Jiankang Deng, Jia Guo, Xue Niannan, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019.
|
| 211 |
+
[11] Shiv Ram Dubey. A decade survey of content based image retrieval using deep learning, 2020.
|
| 212 |
+
[12] Lixin Fan, Kam Woh Ng, Ce Ju, Tianyu Zhang, and Chee Seng Chan. Deep polarized network for supervised learning of accurate binary hashing codes. In Christian Bessiere, editor, Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 825–831. International Joint Conferences on Artificial Intelligence Organization, 7 2020. Main track.
|
| 213 |
+
[13] Aristides Gionis, Piotr Indyk, Rajeev Motwani, et al. Similarity search in high dimensions via hashing. In Vldb, volume 99, pages 518–529, 1999.
|
| 214 |
+
[14] Yunchao Gong, Sanjiv Kumar, Vishal Verma, and Svetlana Lazebnik. Angular quantization-based binary codes for fast similarity search. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems, volume 25. Curran Associates, Inc., 2012.
|
| 215 |
+
[15] Yunchao Gong, Svetlana Lazebnik, Albert Gordo, and Florent Perronnin. Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval. IEEE transactions on pattern analysis and machine intelligence, 35(12):2916–2929, 2012.
|
| 216 |
+
[16] Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, STOC ’98, page 604–613, New York, NY, USA, 1998. Association for Computing Machinery.
|
| 217 |
+
[17] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 448–456, Lille, France, 07–09 Jul 2015. PMLR.
|
| 218 |
+
[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 219 |
+
[19] Weihao Kong and Wu-jun Li. Isotropic hashing. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems, volume 25. Curran Associates, Inc., 2012.
|
| 220 |
+
[20] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1, NIPS’12, page 1097–1105, Red Hook, NY, USA, 2012. Curran Associates Inc.
|
| 221 |
+
[21] Brian Kulis and Trevor Darrell. Learning to hash with binary reconstructive embeddings. In Y. Bengio, D. Schuurmans, J. Lafferty, C. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems, volume 22. Curran Associates, Inc., 2009.
|
| 222 |
+
[22] Brian Kulis and Kristen Grauman. Kernelized locality-sensitive hashing for scalable image search. In 2009 IEEE 12th international conference on computer vision, pages 2130–2137. IEEE, 2009.
|
| 223 |
+
[23] Hanjiang Lai, Yan Pan, Ye Liu, and Shuicheng Yan. Simultaneous feature learning and hash coding with deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3270–3278, 2015.
|
| 224 |
+
[24] Qi Li, Zhenan Sun, Ran He, and Tieniu Tan. Deep supervised discrete hashing. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
|
| 225 |
+
[25] Wu-Jun Li, Sheng Wang, and Wang-Cheng Kang. Feature learning based deep supervised hashing with pairwise labels. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, IJCAI’16, page 1711–1717. AAAI Press, 2016.
|
| 226 |
+
[26] Yanghao Li, Naiyan Wang, Jianping Shi, Xiaodi Hou, and Jiaying Liu. Adaptive batch normalization for practical domain adaptation. Pattern Recognition, 80:109–117, 2018.
|
| 227 |
+
[27] Yunqiang Li and Jan van Gemert. Deep unsupervised image hashing by maximizing bit entropy. Proceedings of the AAAI Conference on Artificial Intelligence, 2021.
|
| 228 |
+
[28] Guosheng Lin, Chunhua Shen, David Suter, and Anton van den Hengel. A general two-step approach to learning-based hashing. In 2013 IEEE International Conference on Computer Vision, pages 2552–2559, 2013.
|
| 229 |
+
[29] Mingbao Lin, Rongrong Ji, Hong Liu, and Yongjian Wu. Supervised online hashing via hadamard codebook learning. In Proceedings of the 26th ACM International Conference on Multimedia, MM ’18, page 1635–1643, New York, NY, USA, 2018. Association for Computing Machinery.
|
| 230 |
+
[30] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C. Lawrence Zitnick. Microsoft coco: Common objects in context. In David Fleet, Tomas Pajdla, Bernt Schiele, and Tinne Tuytelaars, editors, Computer Vision – ECCV 2014, pages 740–755, Cham, 2014. Springer International Publishing.
|
| 231 |
+
[31] Venice Erin Liong, Jiwen Lu, Gang Wang, Pierre Moulin, and Jie Zhou. Deep hashing for compact binary codes learning. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2475–2483, 2015.
|
| 232 |
+
[32] Bin Liu, Yue Cao, Mingsheng Long, Jianmin Wang, and Jingdong Wang. Deep triplet quantization. In Proceedings of the 26th ACM international conference on Multimedia, pages 755–763, 2018.
|
| 233 |
+
[33] Haomiao Liu, Ruiping Wang, Shiguang Shan, and Xilin Chen. Deep supervised hashing for fast image retrieval. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2064–2072, 2016.
|
| 234 |
+
[34] Wei Liu, Jun Wang, Rongrong Ji, Yu-Gang Jiang, and Shih-Fu Chang. Supervised hashing with kernels. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 2074–2081. IEEE, 2012.
|
| 235 |
+
[35] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6738–6746, 2017.
|
| 236 |
+
[36] Mohammad Norouzi and David J. Fleet. Minimal loss hashing for compact binary codes. In Proceedings of the 28th International Conference on International Conference on Machine Learning, ICML’11, page 353–360, Madison, WI, USA, 2011. Omnipress.
|
| 237 |
+
[37] Mohammad Norouzi, David J Fleet, and Russ R Salakhutdinov. Hamming distance metric learning. In Advances in neural information processing systems, pages 1061–1069, 2012.
|
| 238 |
+
[38] Gabriel Pereyra, George Tucker, Jan Chorowski, Łukasz Kaiser, and Geoffrey Hinton. Regularizing neural networks by penalizing confident output distributions. arXiv preprint arXiv:1701.06548, 2017.
|
| 239 |
+
[39] Filip Radenovic, Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Revisiting oxford and paris: Large-scale image retrieval benchmarking. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5706–5715, 2018.
|
| 240 |
+
[40] Yuming Shen, Jie Qin, Jiaxin Chen, Li Liu, Fan Zhu, and Ziyi Shen. Embarrassingly simple binary representation learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops, Oct 2019.
|
| 241 |
+
[41] Shupeng Su, Chao Zhang, Kai Han, and Yonghong Tian. Greedy hash: Towards fast optimization for accurate hash coding in cnn. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 242 |
+
[42] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5265–5274, 2018.
|
| 243 |
+
[43] Jingdong Wang, Ting Zhang, jingkuan song, Nicu Sebe, and Heng Tao Shen. A survey on learning to hash. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(4):769–790, 2018.
|
| 244 |
+
[44] Jun Wang, Wei Liu, Sanjiv Kumar, and Shih-Fu Chang. Learning to hash for indexing big data - a survey, 2015.
|
| 245 |
+
[45] Xiaofang Wang, Yi Shi, and Kris M Kitani. Deep supervised hashing with triplet labels. Asian Conference on Computer Vision, 2016.
|
| 246 |
+
[46] Yair Weiss, Antonio Torralba, and Rob Fergus. Spectral hashing. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems, volume 21. Curran Associates, Inc., 2009.
|
| 247 |
+
[47] Tobias Weyand, Andre Araujo, Bingyi Cao, and Jack Sim. Google landmarks dataset v2-a large-scale benchmark for instance-level recognition and retrieval. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2575–2584, 2020.
|
| 248 |
+
[48] Rongkai Xia, Yan Pan, Hanjiang Lai, Cong Liu, and Shuicheng Yan. Supervised hashing for image retrieval via image representation learning. In Proceedings of the AAAI conference on artificial intelligence, volume 28, 2014.
|
| 249 |
+
[49] Huei-Fang Yang, Kevin Lin, and Chu-Song Chen. Supervised learning of semantics-preserving hash via deep convolutional neural networks. IEEE transactions on pattern analysis and machine intelligence, 40(2):437–451, 2017.
|
| 250 |
+
[50] Li Yuan, Tao Wang, Xiaopeng Zhang, Francis EH Tay, Zequn Jie, Wei Liu, and Jiashi Feng. Central similarity quantization for efficient image and video retrieval. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3083–3092, 2020.
|
| 251 |
+
[51] Tianyu Zhang, Lei Zhu, Qian Zhao, and Kilho Shin. Neural networks weights quantization: Target none-retraining ternary (tnt), 2019.
|
| 252 |
+
[52] Fang Zhao, Yongzhen Huang, Liang Wang, and Tieniu Tan. Deep semantic ranking based hashing for multi-label image retrieval. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1556–1564, 2015.
|
| 253 |
+
[53] Xiangtao Zheng, Yichao Zhang, and Xiaoqiang Lu. Deep balanced discrete hashing for image retrieval. Neurocomputing, 403:224–236, 2020.
|
| 254 |
+
[54] Chang Zhou, Lai-Man Po, Wilson Y. F. Yuen, Kwok Wai Cheung, Xuyuan Xu, Kin Wai Lau, Yuzhi Zhao, Mengyang Liu, and Peter H. W. Wong. Angular deep supervised hashing for image retrieval. IEEE Access, 7:127521–127532, 2019.
|
md/train/52XXcK8jY0J/52XXcK8jY0J.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Disentangling Identifiable Features from Noisy Data with Structured Nonlinear ICA
|
| 2 |
+
|
| 3 |
+
Hermanni Hälvä1 ∗ Sylvain Le Corff2 Luc Lehéricy3
|
| 4 |
+
|
| 5 |
+
Jonathan So4 Yongjie Zhu1 Elisabeth Gassiat5 † Aapo Hyvärinen1 †
|
| 6 |
+
|
| 7 |
+
1Department of Computer Science, University of Helsinki, Finland 2 Samovar, Télécom SudParis, département CITI, Institut Polytechnique de Paris, Palaiseau, France 3Laboratoire J. A. Dieudonné, Université Côte d’Azur, CNRS, 06100, Nice, France 4Department of Engineering, University of Cambridge, UK 5Université Paris-Saclay, CNRS, Laboratoire de mathématiques d’Orsay, 91405, Orsay, France
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
We introduce a new general identifiable framework for principled disentanglement referred to as Structured Nonlinear Independent Component Analysis (SNICA). Our contribution is to extend the identifiability theory of deep generative models for a very broad class of structured models. While previous works have shown identifiability for specific classes of time-series models, our theorems extend this to more general temporal structures as well as to models with more complex structures such as spatial dependencies. In particular, we establish the major result that identifiability for this framework holds even in the presence of noise of unknown distribution. Finally, as an example of our framework’s flexibility, we introduce the first nonlinear ICA model for time-series that combines the following very useful properties: it accounts for both nonstationarity and autocorrelation in a fully unsupervised setting; performs dimensionality reduction; models hidden states; and enables principled estimation and inference by variational maximum-likelihood.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
A central tenet of unsupervised deep learning is that noisy and high dimensional real world data is generated by a nonlinear transformation of lower dimensional latent factors. Learning such lower dimensional features is valuable as they may allow us to understand complex scientific observations in terms of much simpler, semantically meaningful, representations (Morioka et al., 2020; Zhou and Wei, 2020). Access to a ground truth generative model and its latent features would also greatly enhance several other downstream tasks such as classification (Klindt et al., 2021; Banville et al., 2021), transfer learning (Khemakhem et al., 2020b), as well as causal inference (Monti et al., 2019; Wu and Fukumizu, 2020).
|
| 16 |
+
|
| 17 |
+
A recently popular approach to deep representation learning has been to learn disentangled features. Whilst not rigorously defined, the general methodology has been to use deep generative models such as VAEs (Kingma and Welling, 2014; Higgins et al., 2017) to estimate semantically distinct factors of variation that generate and encode the data. A substantial problem with the vast majority of work on disentanglement learning is that the models used are not identifiable – that is, they do not learn the true generative features, even in the limit of infinite data – in fact, this task has been proven impossible without inductive biases on the generative model (Hyvärinen and Pajunen, 1999; Locatello et al., 2019). Lack of identifiability plagues deep learning models broadly and has been implicated as one of the reasons for unexpectedly poor behaviour when these models are deployed in real world applications (D’Amour et al., 2020). Fortunately, in many applications the data have dependency structures, such as temporal dependencies which introduce inductive biases. Recent advances in both identifiability theory and practical algorithms for nonlinear ICA (Hyvärinen and Morioka, 2016, 2017; Hälvä and Hyvärinen, 2020; Morioka et al., 2021; Klindt et al., 2021; Oberhauser and Schell, 2021) exploit this and offer a principled approach to disentanglement for such data. Learning statistically independent nonlinear features in such models is well-defined, i.e. those models are identifiable.
|
| 18 |
+
|
| 19 |
+
However, the existing nonlinear ICA models suffer from numerous limitations. First, they only exploit specific types of temporal structures, such as either temporal dependencies or nonstationarity. Second, they often work under the assumption that some ’auxiliary’ data about a latent process is observed, such as knowledge of the switching points of a nonstationary process as in Hyvärinen and Morioka (2016); Khemakhem et al. (2020a) . Furthermore, all the nonlinear ICA models cited above, with the exception of Khemakhem et al. (2020a), assume that the data are fully observed and noise-free, even though observation noise is very common in practice, and even Khemakhem et al. (2020a) assumes the noise distribution to be exactly known. This approach of modelling observation noise explicitly is in stark contrast to the approach taken in papers, such as Locatello et al. (2020), who instead consider general stochasticity of their model to be captured by latent variables – this approach would be ill-suited to the type of denoising one would often need in practice. Lastly, the identifiability theorems in previous nonlinear ICA works usually restrict the latent components to a specific class of models such as exponential families (but see Hyvärinen and Morioka (2017)).
|
| 20 |
+
|
| 21 |
+
In this paper we introduce a new framework for identifiable disentanglement, Structured Nonlinear ICA (SNICA), which removes each of the aforementioned limitations in a single unifying framework. Furthermore, the framework guarantees identifiability of a rich class of nonlinear ICA models that is able to exploit dependency structures of any arbitrary order and thus, for instance, extends to spatially structured data. This is the first major theoretical contribution of our paper.
|
| 22 |
+
|
| 23 |
+
The second important theoretical contribution of our paper proves that models within the SNICA framework are identifiable even in the presence of additive output noise of arbitrary, unknown distribution. We achieve this by extending the theorems by Gassiat et al. (2020b,a). The subsequent practical implication is that SNICA models can perform dimensionality reduction to identifiable latent components and de-noise observed data. We note that noisy-observation part of the identifiability theory is not even limited to nonlinear ICA but applies to any system observed under noise.
|
| 24 |
+
|
| 25 |
+
Third, we give mild sufficient conditions, relating to the strength and the non-Gaussian nature of the temporal or spatial dependencies, enabling identifiability of nonlinear independent components in this general framework. An important implication is that our theorems can be used, for example, to develop models for disentangling identifiable features from spatial or spatio-temporal data.
|
| 26 |
+
|
| 27 |
+
As an example of the flexibility of the SNICA framework, we present a new nonlinear ICA model called $\Delta$ -SNICA . It achieves the following very practical properties which have previously been unattainable in the context of nonlinear ICA: the ability to account for both nonstationarity and autocorrelation in a fully unsupervised setting; ability perform dimensionality reduction; model latent states; and to enable principled estimation and inference by variational maximum-likelihood methods. We demonstrate the practical utility of the model in an application to noisy neuroimaging data that is hypothesized to contain meaningful lower dimensional latent components and complex temporal dynamics.
|
| 28 |
+
|
| 29 |
+
# 2 Background
|
| 30 |
+
|
| 31 |
+
We start by giving some brief background on Nonlinear ICA and identifiability. Consider a model where the distribution of observed data $\mathbf { x }$ is given by $p _ { X } ( \mathbf { x } ; \pmb \theta )$ for some parameter vector $\pmb \theta$ . This model is called identifiable if the following condition is fulfilled:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\forall ( \pmb \theta , \pmb \theta ^ { \prime } ) \qquad p _ { X } ( \mathbf x ; \pmb \theta ) = p _ { X } ( \mathbf x ; \pmb \theta ^ { \prime } ) \Rightarrow \pmb \theta = \pmb \theta ^ { \prime } .
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
In other words, based on the observed data distribution alone, we can uniquely infer the parameters that generated the data. For models parameterized with some nonparametric function estimator $\mathbf { f }$ , such as a deep neural network, we can replace $\pmb { \theta }$ with $\mathbf { f }$ in the equation above. In practice, identifiability
|
| 38 |
+
|
| 39 |
+
might hold for some parameters, not all; and parameters might be identifiable up to some more or less trivial indeterminacies, such as scaling.
|
| 40 |
+
|
| 41 |
+
In a typical nonlinear ICA setting we observe some $\mathbf { x } \in \mathbb { R } ^ { N }$ which has been generated by an invertible nonlinear mixing function f from latent independent components $\mathbf { s } \in \mathbb { R } ^ { N }$ , with $\begin{array} { r } { p ( \mathbf { s } ) = \mathbf { \dot { \prod } } _ { i = 1 } ^ { N } p ( s ^ { ( i ) } ) } \end{array}$ , as per:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\begin{array} { r } { { \bf x } = { \bf f } ( { \bf s } ) , } \end{array}
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
Identifiability of f would then mean that we can in theory find the true $\mathbf { f }$ , and subsequently the true data generating components. Unfortunately, without some additional structure this model is unidentifiable, as shown by Hyvärinen and Pajunen (1999): there is an infinite number of possible solutions and these have no trivial relation with each other. To solve this problem, previous work (Sprekeler et al., 2014; Hyvärinen and Morioka, 2016, 2017) developed models with temporal structure. Such time series models were generalized and expressed in a succinct way by Hyvärinen et al. (2019); Khemakhem et al. (2020a) by assuming the independent components are conditionally independent upon some observed auxiliary variable $\begin{array} { r } { \bar { u } _ { t } \colon p ( \mathbf { s } _ { t } | \bar { u _ { t } } ) = \prod _ { i = 1 } ^ { N } \bar { p ( s _ { t } ^ { ( i ) } | u _ { t } ) } . } \end{array}$ . In a time series context, the auxiliary variable might be history, e.g. $u _ { t } = \mathbf { x } _ { t - 1 }$ , or the index of a time segment to model nonstationarity (or piece-wise stationarity). (It could also be data from another modality, such as audio data used to condition video data (Arandjelovic and Zisserman, 2017).)
|
| 48 |
+
|
| 49 |
+
Notice that the mixing function f in (2) is assumed bijective and thus identifiable dimension reduction is not possible in most of the models discussed above. The only exceptions, we are aware of, are Khemakhem et al. (2020a); Klindt et al. (2021) who choose f as injective rather than bijective. Further, Khemakhem et al. (2020a) assume additive noise on the observations $\mathbf { x } = \mathbf { f } ( \mathbf { s } ) + \boldsymbol \varepsilon$ , which allows to estimate posterior of s by an identifiable VAE (iVAE). We will take a similar strategy in what follows.
|
| 50 |
+
|
| 51 |
+
# 3 Definition of Structured Nonlinear ICA
|
| 52 |
+
|
| 53 |
+
In this section, we first present the new framework of Structured Nonlinear ICA (SNICA) – a broad class of models for identifiable disentanglement and learning of independent components when data has structural dependencies. Next, we give an example of a particularly useful specific model that fits within our framework, called $\Delta$ -SNICA , by using switching linear dynamical latent processes.
|
| 54 |
+
|
| 55 |
+
# 3.1 Structured Nonlinear ICA framework
|
| 56 |
+
|
| 57 |
+
Consider observations $( \mathbf { x } _ { t } ) _ { t \in \mathbb { T } } = ( ( x _ { t } ^ { ( 1 ) } , \dots , x _ { t } ^ { ( M ) } ) ) _ { t \in \mathbb { T } }$ where $\mathbb { T }$ is a discrete indexing set of arbitrary dimension. For discrete time-series models, like previous works, $\mathbb { T }$ would be a subset of $\mathbb { N }$ . Crucially, however, we allow it to be any arbitrary indexing variable that describes a desired structure. For instance, $\mathbb { T }$ could be a subset of $\mathbb { N } ^ { 2 }$ for spatial data.
|
| 58 |
+
|
| 59 |
+
We assume the data is generated according the following nonlinear ICA model. First, there exist latent components $\mathbf { s } ^ { ( i ) } \bar { = } ( s _ { t } ^ { ( i ) } ) _ { t \in \mathbb { T } }$ for $i \in \{ 1 , \ldots , N \}$ where for any $t , t ^ { \prime } \in \mathbb { T }$ , the distributions of $( \mathbf { s } _ { t } ^ { ( i ) } ) _ { 1 \leqslant i \leqslant N }$ and $( \mathbf { s } _ { t ^ { \prime } } ^ { ( i ) } ) _ { 1 \leqslant i \leqslant N }$ are the same, which is a weak form of stationarity. Second, we assume t that for any $m \in \mathbb { N } ^ { * }$ and $( t _ { 1 } , \ldots , t _ { m } ) \in \mathbb { T } ^ { m }$ , $\begin{array} { r } { \underline { { p } } ( \mathbf { s } _ { t _ { 1 } } , \ldots , \mathbf { s } _ { t _ { m } } ) = \prod _ { i = 1 } ^ { N } p ( s _ { t _ { 1 } } ^ { ( i ) } , \ldots , s _ { t _ { m } } ^ { ( i ) } ) } \end{array}$ : that is, the $\mathbf { f } : \dot { \mathbb { R } ^ { N } } \xrightarrow { } \mathbb { R } ^ { M }$ with $M \geqslant N$ is injective, so there may be more observed variables than components. Finally, denote observational noise by $\boldsymbol { \varepsilon } _ { t } \in \mathbb { R } ^ { M }$ and assume that they are i.i.d. for all $t \in \mathbb { T }$ and independent of the signals $\mathbf { s } ^ { ( i ) }$ . Putting these together, we assume the mixing model where for each $t \in \mathbb { T }$ ,
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\mathbf { x } _ { t } = \mathbf { f } ( \mathbf { s } _ { t } ) + \pmb { \varepsilon } _ { t } ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $\mathbf { s } _ { t } = ( s _ { t } ^ { ( 1 ) } , \dots , s _ { t } ^ { ( N ) } )$ . Importantly, $\varepsilon _ { t }$ can have any arbitrary unknown distribution, even with dependent entries; in fact, it may even not have finite moments.
|
| 66 |
+
|
| 67 |
+
The main appeal of this framework is that, under the conditions given in next section, we can now guarantee identifiability for a very broad and rich class of models.
|
| 68 |
+
|
| 69 |
+
First, notice that all previous Nonlinear ICA time-series models can be reformulated and often improved upon when viewed through this new unifying framework. In other words, we can create models that are very much like those previous works, and capture their dependency profiles, but with the changes that by assuming unconditional independence and output noise we now allow them to perform dimension reduction (this does also require some additional assumptions needed in our identifiability theorems below). To see this, consider the model in Hälvä and Hyvärinen (2020) which captures nonstationarity in the independent components through a global hidden Markov chain. We can transform this model into the SNICA framework if we instead model each independent component as its own HMM (Figure 1a), with the added benefit that we now have marginally independent components and are able to perform dimensionality reduction into low dimensional latent components. Nonlinear ICA with time-dependencies, such as in an autoregressive model, proposed by Hyvärinen and Morioka (2017) is also a special case of our framework (Figure 1b), but again with the extension of dimensionality reduction. Furthermore, this framework allows for a plethora of new Nonlinear ICA models to be developed. As described above, these do not have to be limited to time-series but could for instance be a process on a two-dimensional graph with appropriate (in)dependencies (see Figure 1c). However, we now proceed to introduce a particularly useful time-series model using our framework.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 1: Graphical models for the SNICA framework
|
| 73 |
+
|
| 74 |
+
# 3.2 $\Delta$ -SNICA $:$ Nonlinear ICA with switching linear dynamical systems
|
| 75 |
+
|
| 76 |
+
While the above framework has great generality, any practical application will need a specific model. Next we propose one which combines the following properties of previous nonlinear ICA models into a single model: ability to account for both nonstationarity and autocorrelation in a fully unsupervised setting, to perform dimensionality reduction and model hidden states. Real world processes, such as video/audio data, financial time-series, and brain signals, exhibit these properties – disentangling latent features in such data would hence be very useful.
|
| 77 |
+
|
| 78 |
+
Our new model is depicted in Figure 1d. The independent components are generated by a Switching Linear Dynamical System (SLDS) (Ackerson and Fu, 1968; Chang and Athans, 1978; Hamilton, 1990; Ghahramani and Hinton, 2000) with additional latent variables to express rich dynamics. Formally, for each independent component $i \in \{ 1 , \ldots , N \}$ , consider the following SLDS over some latent vector $\mathbf { y } _ { t } ^ { ( i ) }$ :
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathbf { y } _ { t } ^ { ( i ) } = \mathbf { B } _ { u _ { t } } ^ { ( i ) } \mathbf { y } _ { t - 1 } ^ { ( i ) } + \mathbf { b } _ { u _ { t } } ^ { ( i ) } + \varepsilon _ { u _ { t } } ^ { ( i ) } ,
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $u _ { t } : = u _ { t } ^ { ( i ) }$ is a state of a first-order hidden Markov chain $( u _ { t } ^ { ( i ) } ) _ { t = 1 : T }$ . Crucially, we assume that t tthe independent components at each time-point are the first elements $y _ { t , 1 } ^ { ( i ) }$ of $\mathbf { y } _ { t } ^ { ( i ) } = ( y _ { t , 1 } ^ { ( i ) } , \ldots , y _ { t , d } ^ { ( i ) } ) ^ { T }$ i.e. $s _ { t } ^ { ( i ) } = y _ { t , 1 } ^ { ( i ) }$ . The rest of the elements in $\mathbf { y } _ { t } ^ { ( i ) }$ are latent variables modelling hidden dynamics. The great utility of using such a higher-dimensional latent variable is that this model allows us, for example, as a special case, to consider higher-order ARMA processes, thus modelling each $s _ { t } ^ { ( i ) }$ as switching between ARMA processes of an order determined by the dimensionality of $\mathbf { y } _ { t }$ . We call the ensuing model $\Delta$ -SNICA ("Delta-SNICA", with delta as in "dynamic").
|
| 85 |
+
|
| 86 |
+
# 4 Identifiability
|
| 87 |
+
|
| 88 |
+
In this section, we present two very general identifiability theorems for SNICA. We basically decouple the problem into two parts. First, we consider identifying the noise-free distribution of $\mathbf { f } \left( \mathbf { s } _ { t } \right)$ from noisy data. Theorem 1 states conditions—on tail behaviour, non-degeneracy, and non-Gaussianity— under which it is possible to recover the distribution of a process based on noisy data with unknown noise distribution. Second, we consider demixing of the nonlinearly mixed data. Theorem 2 provides general conditions—on temporal or spatial dependencies, and non-Gaussianity—that allow recovery of the mixing function f when there is no more noise. We then consider application of these theorems to SNICA.
|
| 89 |
+
|
| 90 |
+
# 4.1 Identifiability with unknown noise distribution
|
| 91 |
+
|
| 92 |
+
Consider the model
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
{ \bf x } _ { t } = { \bf z } _ { t } + \varepsilon _ { t } ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $( \mathbf { z } _ { t } ) _ { t \in \mathbb { T } }$ is a family of random variables in $\mathbb { R } ^ { M }$ such that all $\mathbf { z } _ { t }$ , $t \in \mathbb { T }$ , have the same marginal distribution, and $\textstyle ( \varepsilon _ { t } ) _ { t \in \mathbb { T } }$ is a family of independent (over $t$ ) and identically distributed random variables, independent of $( \mathbf { z } _ { t } ) _ { t \in \mathbb { T } }$ . Let $P$ be the common distribution of each $\varepsilon _ { t }$ , for $t \in \mathbb { T }$ . Let $t _ { 1 }$ and $t _ { 2 }$ in $\mathbb { T }$ , and consider the following assumptions.
|
| 99 |
+
|
| 100 |
+
• (A1) [Tail behaviour] For some $\rho < 3$ , there exist $A$ and $B$ such that for all $\boldsymbol { \lambda } \in \mathbb { R } ^ { N }$ , $\mathbb { E } [ \exp ( \langle \lambda , \mathbf { z } _ { t _ { 1 } } \rangle ) ] \leqslant A \exp ( B \| \lambda \| ^ { \rho } ) .$
|
| 101 |
+
• (A2) [Non-degeneracy] For any $\ b { \eta } \in \mathbb { C } ^ { M }$ , $\mathbb { E } [ \exp \{ \langle \eta , \mathbf { z } _ { t _ { 2 } } \rangle \} | \ \mathbf { z } _ { t _ { 1 } } ]$ is not the null random variable.
|
| 102 |
+
• (A3) [Non-Gaussianity] The following assertion is false: there exist a vector $\boldsymbol { \eta } \in \mathbb { R } ^ { M }$ and independent random variables $\tilde { z }$ and $u$ , such that $u$ is a non dirac Gaussian random variable and $\langle \eta , \mathbf { z } _ { t _ { 1 } } \rangle$ has the same distribution as $\tilde { z } + u$ .
|
| 103 |
+
|
| 104 |
+
We defer the detailed discussion on the practical meaning of the assumptions (A1-A3) in the context of SNICA to Section 4.3. We next present Theorem 1 which establishes identifiability under unknown noise (its proof is postponed to Section A.1 in the Supplementary Material):
|
| 105 |
+
|
| 106 |
+
Theorem 1 Assume that assumptions (A1), (A2) and (A3) hold for some $( t _ { 1 } , t _ { 2 } ) \in { \mathbb { T } } ^ { 2 }$ . Then, up to translation, for all $m \geqslant 2$ , for all $( t _ { 3 } , \ldots , t _ { m } ) \in { \mathbb { T } } ^ { m - 2 }$ , the application that associates the distribution of $\left( \mathbf { z } _ { t _ { 1 } } , \ldots , \mathbf { z } _ { t _ { m } } \right)$ and $P$ to the distribution of $\left( \mathbf { x } _ { t _ { 1 } } , \ldots , \mathbf { x } _ { t _ { m } } \right)$ is one-to-one.
|
| 107 |
+
|
| 108 |
+
Here, up to translation means that adding a constant vector to all $\varepsilon _ { t }$ , and substracting this constant to all $\mathbf { z } _ { t }$ , $t \in \{ t _ { 1 } , \ldots , t _ { m } \}$ , does not change the distribution of $( \mathbf { x } _ { t _ { 1 } } , \ldots , \mathbf { x } _ { t _ { m } } )$ . The proof of Theorem 1 extends that of Theorem 1 in (Gassiat et al., 2020b), see also (Gassiat et al., 2020a), which assumed sub-Gaussian noise-free data. Our extension allows the noise-free data to have heavier tails, which is important since (noise-free) data in many real-world applications is super-Gaussian, i.e. heavy-tailed, as is well-known in work on linear ICA (Hyvärinen et al., 2001).
|
| 109 |
+
|
| 110 |
+
Importantly, there is no assumption on the unknown noise distribution in Theorem 1. In fact, it does not even assume a mixing as in ICA, and thus extends greatly outside of the framework of this paper.
|
| 111 |
+
|
| 112 |
+
# 4.2 Identifiability of the mixing function
|
| 113 |
+
|
| 114 |
+
Based on Theorem 1, it is possible to recover the distribution of the noise-free data in SNICA in (3) by setting $\mathbf { z } _ { t } = \mathbf { f } ( \mathbf { s } _ { t } )$ . Next, we consider under which conditions the mixing function f is identifiable. Denote by $S = S ^ { ( 1 ) } \times \cdots \times S ^ { ( N ) }$ the support of the distribution of all $\mathbf { s } _ { t }$ . We consider the situation where each $S ^ { ( i ) } \subset \mathbb { R }$ , $1 \leqslant i \leqslant N$ , is connected, so that each $S ^ { ( i ) }$ is an interval. We assume moreover that the injective mixing function f is a $\mathcal { C } ^ { 2 }$ diffeomorphism between $S$ and a $\mathcal { C } ^ { 2 }$ differentiable manifold $\mathcal { M } \subset \mathbb { R } ^ { M }$ . Formally, this means that there exists an atlas $\{ \varphi _ { \vartheta } : U _ { \vartheta } \to \mathbb { R } ^ { N } \} _ { \vartheta \in \Theta }$ of $\mathcal { M }$ such that for all $\vartheta , \vartheta ^ { \prime } \in \Theta$ , the map $\varphi _ { \vartheta } \circ \varphi _ { \vartheta ^ { \prime } } ^ { - 1 }$ is a $\mathcal { C } ^ { 2 }$ map, and f is a bijection $\mathbb { R } ^ { N } \to \mathcal { M }$ such that for all $\vartheta \in \Theta$ , $\varphi _ { \vartheta } \circ \mathbf { f }$ and $\mathbf { f } ^ { - 1 } \circ \varphi _ { \vartheta } ^ { - 1 }$ have continuous second derivatives. The sets $U _ { \vartheta }$ , $\vartheta \in \Theta$ , cover $\mathcal { M }$ and are open in $\mathcal { M }$ . The proof of Theorem 2 is postponed to Section A.2 in the Supplementary Material.
|
| 115 |
+
|
| 116 |
+
ssume that thehas a density xist wh $\qquad m \ \geqslant \ 2$ anon $( t _ { 1 } , \ldots , t _ { m } ) \in \mathbb { T } ^ { m }$ such that the vectorreover that there exist $( s _ { t _ { 1 } } ^ { ( i ) } , \ldots , s _ { t _ { m } } ^ { ( i ) } )$ $p _ { m } ^ { ( i ) }$ $\mathcal { C } ^ { 2 }$ $( S ^ { ( i ) } ) ^ { m }$ $( k , l ) \in \{ 1 , \ldots , m \} ^ { 2 }$ with $k \neq l$ such that the following assumptions hold with .
|
| 117 |
+
|
| 118 |
+
• $( B l )$ (Uniform $( k , l )$ -dependency). For all $i \in \{ 1 , \ldots , N \}$ , the set of zeros of $\frac { \partial ^ { 2 } } { \partial s _ { t _ { k } } ^ { ( i ) } \partial s _ { t _ { l } } ^ { ( i ) } } Q _ { m } ^ { ( i ) }$ is a meagre subset of $( S ^ { ( i ) } ) ^ { m }$ , i.e. it contains no open subset.
|
| 119 |
+
|
| 120 |
+
• $( B 2 )$ (Local $( k , l )$ -non quasi Gaussianity). For any open subset $A \subset S ^ { m }$ , there exists at most one $i \in \{ 1 , \ldots , N \}$ such that there exists a function $\alpha : \mathbb { R } ^ { m - 1 } \mathbb { R }$ and a constant $c \in \mathbb { R }$ such that for all $s \in A$ ,
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\frac { \partial ^ { 2 } } { \partial s _ { t _ { k } } ^ { ( i ) } \partial s _ { t _ { l } } ^ { ( i ) } } Q _ { m } ^ { ( i ) } = c \alpha ( s _ { t _ { k } } ^ { ( i ) } , \mathbf { s } _ { ( - t _ { k } , - t _ { l } ) } ^ { ( i ) } ) \alpha ( s _ { t _ { l } } ^ { ( i ) } , \mathbf { s } _ { ( - t _ { k } , - t _ { l } ) } ^ { ( i ) } ) ,
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
where $\mathbf { s } _ { ( - t _ { k } , - t _ { l } ) } ^ { ( i ) } \ i s \ ( s _ { t _ { 1 } } ^ { ( i ) } , \ldots , s _ { t _ { m } } ^ { ( i ) } )$ without the coordinates $t _ { k }$ and $t _ { l }$ .
|
| 127 |
+
|
| 128 |
+
Then, $\mathbf { f } ^ { - 1 }$ can be recovered up to permutation and coordinate-wise transformations from the distribution of $( \mathbf { f } ( \mathbf { s } _ { t _ { 1 } } ) , \dots , \mathbf { f } ( \mathbf { s } _ { t _ { m } } ) )$ .
|
| 129 |
+
|
| 130 |
+
# 4.3 Applications to SNICA
|
| 131 |
+
|
| 132 |
+
In this section, we provide additional comments on the assumptions (A1-A3) and (B1-B2) and their verification in the context of SNICA.
|
| 133 |
+
|
| 134 |
+
Assumption (A1) is a condition on the tails of the noise-free data: it allows tails that are somewhat heavier than Gaussian tails. It is in fact equivalent to assuming that for some $\tilde { \rho } > 3 / 2$ , there exists $A ^ { \prime } , B ^ { \prime } > 0$ such that for all $t > 0$ , $\| \mathbf { z } _ { t _ { 1 } } \| \geqslant t ) \leqslant A ^ { \prime } \exp ( - \bar { B ^ { \prime } } t ^ { \tilde { \rho } } )$ .
|
| 135 |
+
|
| 136 |
+
Assumption (A2) is a non-degeneracy condition likely to be fulfilled for any randomly chosen SNICA model parameters. As an example, consider a model such as Fig. 1c, where there exist hidden variables $( u _ { t } ) _ { t \in \mathbb { T } }$ taking values in a finite set $\{ 1 , \ldots , K \}$ such that the pairs of variables $\left( \mathbf { z } _ { t } , u _ { t } \right)$ have the same distribution for all $t \in \mathbb { T }$ , and such that conditioned on $( u _ { t } ) _ { t \in \mathbb { T } }$ , the variables $( \mathbf { z } _ { t } ) _ { t \in \mathbb { T } }$ are independent and the distribution of $\mathbf { z } _ { t }$ only depends on $u _ { t }$ . (As a special case, this model includes the temporal HMM setting described in Fig. 1a.) Let $( t _ { 1 } , t _ { 2 } ) \in \mathbb { T } ^ { 2 }$ . For all $u , v \in \{ 1 , \ldots , K \}$ , let $\pi ( u ) = \overline { { p _ { u _ { t _ { 1 } } } ( u ) } }$ be the mass function of $\boldsymbol { u } _ { t _ { 1 } }$ , $Q ( u , v ) = p _ { u _ { t _ { 2 } } | u _ { t _ { 1 } } } ( v | u )$ be the transition matrix from $u _ { t _ { 1 } }$ to $u _ { t _ { 2 } }$ , and $\gamma _ { u } ( \mathbf { z } ) = p _ { \mathbf { z } _ { t _ { 1 } } | u _ { t _ { 1 } } } ( \mathbf { z } | u )$ be the density of $\mathbf { z } _ { t _ { 1 } }$ conditionally to $u _ { t _ { 1 } } = u$ . By assumption, it is also the density of $\mathbf { z } _ { t _ { 2 } }$ conditionally to $u _ { t _ { 2 } } = u$ . Theorem 3 provides sufficient conditions for assumption (A2) to hold:
|
| 137 |
+
|
| 138 |
+
Theorem 3 Assume that $Q$ has full rank, $\operatorname* { m i n } _ { u } \pi ( u ) > 0$ and the $( \gamma _ { u } ) _ { 1 \leqslant u \leqslant K }$ are linearly independent, then (A2) is satisfied as soon as the functions $\begin{array} { r } { \langle \eta \mapsto \int \exp ( \langle \eta , \mathbf { z } \rangle ) \gamma _ { v } ( \mathbf { z } ) d \mathbf { z } ) _ { 1 \leqslant v \leqslant K } } \end{array}$ do not have simultaneous zeros.
|
| 139 |
+
|
| 140 |
+
Besides the non-simultaneous zeros assumption, the assumptions of Theorem 3 are reminiscent of those used for the identifiability of non-parametric hidden Markov models, see for instance Gassiat et al. (2016); Lehéricy (2019). The key element is that $\mathbf { z } _ { t _ { 1 } }$ and $\mathbf { z } _ { t _ { 2 } }$ are not independent. Thus, we see that (A2) holds if the $\pi$ and the $\gamma$ are not degenerate (in the precise sense given by Theorem 3), for the latent state models in Figs. 1a,1c.Another situation where (A2) holds is when $\mathbf { z } _ { t _ { 2 } }$ is a complete statistic (Lehmann and Casella, 2006) in the statistical model $\{ \mathbb { P } _ { \mathbf { z } _ { t _ { 2 } } | \mathbf { z } _ { t _ { 1 } } } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right) \} _ { \mathbf { z } _ { t _ { 1 } } }$ , where $\mathbb { P } _ { \mathbf { z } _ { t _ { 2 } } \mid \mathbf { z } _ { t _ { 1 } } } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right)$ is the distribution of $\mathbf { z } _ { t _ { 2 } }$ conditionally to $\mathbf { z } _ { t _ { 1 } }$ . Consider the two following examples where this holds: 1) When the model $\{ \mathbb { P } _ { \mathbf { z } _ { t _ { 2 } } | \mathbf { z } _ { t _ { 1 } } } ^ { - } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right) \} _ { \mathbf { z } _ { t _ { 1 } } }$ is an exponential family. In this situation, complete statistics are known. 2) Autoregressive models with additive innovation of the form ${ \bf z } _ { t _ { 2 } } = { \bf h } ( { \bf z } _ { t _ { 1 } } ) + { \bf v } _ { t _ { 2 } }$ for some bijective function $\mathbf { h }$ when the additive noise $\mathbf { v } _ { t _ { 2 } }$ is a complete statistic in the statistical model $\{ \mathbb { P } _ { \mathbf { v } _ { t _ { 2 } } | \mathbf { z } _ { t _ { 1 } } } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right) \} _ { \mathbf { z } _ { t _ { 1 } } }$ (note that $\mathbf { v } _ { t _ { 2 } }$ cannot be independent of $\mathbf { z } _ { t _ { 1 } }$ here). The case in Fig. 1b is typically covered by this example.
|
| 141 |
+
|
| 142 |
+
Assumption (A3) states that no direction of the noise free data has a non Dirac Gaussian variable component. It holds as soon as $\mathbf { z } _ { t } = \mathbf { f } ( \mathbf { s } _ { t } )$ and the range of $\mathbf { f }$ is such that its orthogonal projection on any line is not the full line. This assumption holds for instance in the following cases: 1) The range of f is compact, or 2) the range of f is contained in a half-cylinder, that is, there exists a hyperplane such that the range of f is only on one side of this hyperplane and the projection of the range of f on this hyperplane is bounded.
|
| 143 |
+
|
| 144 |
+
Assumption (B1) and Assumption (B2) are similar to those in (Hyvärinen and Morioka, 2017; Oberhauser and Schell, 2021) in the special case of time-series, i.e. $\mathbb { T } = \mathbb { N }$ . (B1) then entails that there must be sufficiently strong statistical dependence between nearby time points. (B2) is a condition which excludes Gaussian processes and processes which can be trivially transformed to be Gaussian. (For treatment of the Gaussian case, see Appendix B in Supplementary Material.) We can further provide a simple and equivalent formulation when the independent components $\mathbf { s } ^ { ( i ) }$ follow independent and stationary HMMs with two hidden states, which is a special case of SNICA. Denote by $\gamma _ { 0 } ^ { ( i ) }$ and $\gamma _ { 1 } ^ { ( i ) }$ the densities of $s _ { t } ^ { ( i ) }$ conditionally to $\{ u _ { t } ^ { ( i ) } = 0 \}$ and $\bar { \{ u _ { t } ^ { ( i ) } = 1 \} }$ respectively.
|
| 145 |
+
|
| 146 |
+
Theorem 4 Assume that the stationary distribution $\pi$ of the hidden chain is such that $0 < \pi ( 0 ) < 1$ and that its transition matrix is invertible. Then $( B l )$ and $( B 2 )$ are satisfied with $m = 2$ if and only $i f$ on any open interval, γ(i)0 a nd $\gamma _ { 1 } ^ { ( i ) }$ are not proportional.
|
| 147 |
+
|
| 148 |
+
Thus, a very simple HMM leads to these conditions being verified. Hyvärinen and Morioka (2017) already showed that the conditions (B1) and (B2) also hold in the case of non-Gaussian autoregressive models. Thus, we see that our identifiability theory applies both in the case HMM’s (Fig 1a) and autoregressive models (Fig 1b), the two principal kinds of temporal structure proposed in previous work, while extending them to further cases and combinations such as in Fig 1c,1d.
|
| 149 |
+
|
| 150 |
+
A simplification of (B1,B2) It is also possible to combine the assumptions (B1) and (B2) in one, while slightly weakening the generality. The key is to notice that (6) in (B2) implies the derivative in (B1) is zero, by setting $c = 0$ . But there is still the difference that (B2) considers all but one index while (B1) considers all indices $i$ . If we simply assume (6) does not hold for any $i$ , we can replace (B1) and (B2) by the new condition:
|
| 151 |
+
|
| 152 |
+
• $\mathbf { ( B ^ { \prime } ) }$ For any open subset $A \subset S ^ { m }$ and for any $i \in \{ 1 , \ldots , N \}$ , a function $\alpha : \mathbb { R } ^ { m - 1 } \mathbb { R }$ and a constant $c \in \mathbb { R }$ do not exist such that (6) would hold for all $s \in A$ .
|
| 153 |
+
|
| 154 |
+
Note that Hyvärinen and Morioka (2017) defined uniform dependency and (non-)quasi-Gaussianity as two separate properties, but in fact their assumption of non-quasi-Gaussianity was weaker than ours: it did not consider all open subsets separately, which is why this simplification was not possible for them. We believe their definition of non-quasi-Gaussianity was in fact not quite sufficient to prove their theorem, and our stronger version may be needed, in line with Oberhauser and Schell (2021).
|
| 155 |
+
|
| 156 |
+
# 5 Experiments
|
| 157 |
+
|
| 158 |
+
Estimation method One challenge is that it is not practically possible to learn $\Delta$ -SNICA by exact maximum-likelihood methods. Instead, we perform learning and inference using Structured VAEs (Johnson et al., 2016) – the current state-of-art in variational inference for structured models. Specifically, this consists of assuming that the latent posterior factorizes as per $q ( \mathbf { y } _ { 1 : T } ^ { ( 1 : N ) } , u _ { 1 : T } ^ { ( 1 : N ) } ) =$ $\begin{array} { r } { \prod _ { i = 1 } ^ { N } q ( \mathbf { y } _ { 1 : T } ^ { ( i ) } ) q ( u _ { 1 : T } ^ { ( i ) } ) } \end{array}$ , which allows us to optimize the resulting evidence lower bound (ELBO):
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
\begin{array} { r l } & { \log \widehat { \mathcal { L } } = \mathbb { E } _ { q } \left[ \displaystyle \sum _ { t = 1 } ^ { T } \log p ( \mathbf { x } _ { t } \mid \mathbf { s } _ { t } ^ { ( 1 ) } , . . . , \mathbf { s } _ { t } ^ { ( N ) } ) \right] + \displaystyle \sum _ { i = 1 } ^ { N } \left( - \mathrm { K L } \Big [ q ( u _ { 1 : T } ^ { ( i ) } ) \Big | p ( u _ { 1 : T } ^ { ( i ) } ) \Big ] + \mathrm { H } \Big [ q ( \mathbf { s } _ { 1 : T } ^ { ( i ) } ) \Big ] \right. } \\ & { \qquad \left. + \mathbb { E } _ { q } \left[ \log p ( \mathbf { s } _ { 1 } ^ { ( i ) } \mid u _ { 1 } ^ { ( i ) } ) \right] + \displaystyle \sum _ { t = 2 } ^ { T } \mathbb { E } _ { q } \left[ \log p ( \mathbf { s } _ { t } ^ { ( i ) } \mid \mathbf { s } _ { t - 1 } ^ { ( i ) } , u _ { t } ^ { ( i ) } ) \right] \right) . } \end{array}
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
Since all the distributions are in conjugate exponential families (encoder neural network is used to approximate the natural parameters of the nonlinear likelihood term) efficient message passing can be used for inference, and the mixing function is learned as decoder neural network. Even though this method lacks consistency guarantees (but see Wang and Blei (2018)), we find that our model performs very well. A more detailed treatment of estimation and inference of $\Delta$ -SNICA is given in Appendix C. Our code will be openly available at https://github.com/HHalva/snica.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 2: (a) Mean absolute correlation coefficients between ground-truth independent components and their estimates by $\Delta$ -SNICA , IIA-HMM, LGSSM and $\mathrm { i V A E ^ { * } }$ , with different orders of complexity (number of layers) and two different dimensions of observed (12, 24) and latent (6, 12) data. (b) Mean absolute correlation coefficient between estimated noise free data and ground-truth noise free data for same set of models except IIA-HMM. Please note the difference in y-axis scales.
|
| 168 |
+
|
| 169 |
+
# 5.1 Experiments on simulated data
|
| 170 |
+
|
| 171 |
+
The identifiability theorems stated above hold in the limit of infinite data. Additionally, a consistent estimator would be required to learn the ground-truth components. In the real world, we are limited by data and estimation methods and hence it is unclear as to what extent we are actually able to estimate identifiable components – and whether identifiability reflects in better performance in real world tasks. To explore this, we first performed experiments on simulated data. We compared the performance of our model to the current state-of-the-art, IIA-HMM (Morioka et al., 2021), as well as identifiable VAE (iVAE) (Khemakhem et al., 2020a) and standard linear Gaussian state-space model (LGSSM). Since iVAE is not able to handle latent auxiliary variables, we allow it to "cheat" by giving it access to the true data generating latent-state, thereby creating a presumably challenging baseline (denoted $\mathrm { i V A E ^ { * } }$ in our figures). LGSSM was included as a naive baseline which is only able to estimate linear mixing function.
|
| 172 |
+
|
| 173 |
+
Investigating identifiability and consistency We simulated 100K long time-sequences from the $\Delta$ - SNICA model and computed the mean absolute correlation coefficient (MCC) between the estimated latent components and ground truth independent components (see Supplementary material for further implementation details). More precisely, to illustrate the dimensionality reduction capabilities we considered two settings where the observed data dimension $M$ , was either 12 or 24 and the number of independent components, $N$ was 3 and 6, respectively. Since IIA-HMM is unable to do dimensionality reduction, we used PCA to get the data dimension to match that of the latent states. We considered four levels of mixing of increasing complexity by randomly initialized MLPs of the following number of layers: 1 (linear ICA), 2, 3, and 5. The results in Figure 2a) illustrate the clearly superior performance of our model. The especially poor performance of IIA-HMM maybe explained by lack of noise model, much simpler latent dynamics, and lost information due to PCA pre-processing. See Appendix D for further discussion and training details.
|
| 174 |
+
|
| 175 |
+
Application to denoising $\Delta$ -SNICA is able to denoise time-series signals by learning the generative model and then performing inference on latent variables. Specifically, SVAE learns the encoder network which is used to perform inference on the posterior of the independent components. We illustrate this using the same settings as above, with the exception that we now use our learned encoder and inference to get the posterior means of the independent components and input these in to the estimated decoder to get predicted noise-free observations, denoted as $\widehat { \mathbf { f } } \left( \mathbf { s } _ { t } \right)$ – we measured the correlation between $\widehat { \mathbf { f } } \left( \mathbf { s } _ { t } \right)$ and the ground-truth $\mathbf { f } \left( \mathbf { s } _ { t } \right)$ . Note that IIA-HMM, is not able to perform this task. The results in Figure 2b) show that the other models, designed to handle denoising, perform well at this task, as would be expected – identifiability of the latent state is not necessary for good denoising performance. For LGSSM, denoising is done with the Kalman Smoother algorithm.
|
| 176 |
+
|
| 177 |
+
# 5.2 Experiments on real MEG data
|
| 178 |
+
|
| 179 |
+
To demonstrate real-data applicability, $\Delta$ -SNICA was applied to multivariate time series of electrical activity in the human brain, measured by magnetoencephalography (MEG). Recently, many studies have demonstrated the existence of fast transient networks measured by MEG in the resting state and the dynamic switching between different brain networks (Baker et al., 2014; Vidaurre et al., 2017). Additionally, such MEG data is high-dimensional and very noisy. Thus this data provides an excellent target for $\Delta$ -SNICA to disentangle the underlying low-dimensional components.
|
| 180 |
+
|
| 181 |
+
Data and Preprocessing We considered a resting state MEG sessions from the Cam-CAN dataset. During the resting state recording, subjects sat still with their eyes closed. In the task-session data, the subjects carried out a (passive) audio–visual task including visual stimuli and auditory stimuli. We exclusively used the resting-session data for the training of the network, and task-session data was only used in the evaluation. The modality of the sensory stimulation provided a class label that we used in the evaluation, giving in total two classes. We band-pass filtered the data between $4 \mathrm { H z }$ and $3 0 \mathrm { H z }$ (see Supplementary Material for the details of data and settings).
|
| 182 |
+
|
| 183 |
+
Methods The resting-state data from all subjects were temporally concatenated and used for training. The number of layers of the decoder and encoder were equal and took values 2, 3, 4. We fixed the number of independent components to 5 so that our result can be fairly compared to those in Morioka et al. (2021). To evaluate the obtained features, we performed classification of the sensory stimulation categories by applying feature extractors trained with (unlabeled) resting-state data to (labeled) task-session data. Classification was performed using a linear support vector machine (SVM) classifier trained on the stimulation modality labels and sliding-window-averaged features obtained for each trial. The performance was evaluated by the generalizability of a classifier across subjects. i.e., one-subject-out cross-validation. For comparison, we evaluated the baseline methods: IIA-HMM and IIA-TCL (Morioka et al., 2021). We also visualized the spatial activity patterns obtained by $\Delta$ -SNICA , using the weight vectors from encoder neural network across each layer.
|
| 184 |
+
|
| 185 |
+
Results Figure 3 a) shows the classification accuracies of the stimulus categories, across different methods and the number of layers for each model. The performances by $\Delta$ -SNICA were consistently higher than those by the other (baseline) methods, which indicates the importance of the modeling of the MEG signals by $\Delta$ -SNICA . Figure $^ { 3 \mathrm { ~ b ~ } }$ ) shows an example of spatial patterns from the encoder network learned by the $\Delta$ -SNICA . We used the visualization method presented in (Hyvärinen and Morioka, 2016). We manually picked one out of the hidden nodes from the third layer in encoder network, and plotted its weighted-averaged sensor signals, We also visualized the most strongly contributing second- and first-layer nodes. We see progressive pooling of L1 units to form left lateral frontal, right lateral frontal and parietal patterns in L2 which are then all pooled together in L3 resulting in a lateral frontoparietal pattern. Most of the spatial patterns in the third layer (not shown) are actually similar to those previously reported using MEG (Brookes et al., 2011). Appendix E provides more detail to the interpretation of the $\Delta$ -SNICA results.
|
| 186 |
+
|
| 187 |
+
# 6 Related work
|
| 188 |
+
|
| 189 |
+
Previous works on nonlinear ICA have exploited autocorrelations (Hyvärinen and Morioka, 2017; Oberhauser and Schell, 2021) and nonstationarities (Hyvärinen and Morioka, 2016; Hälvä and Hyvärinen, 2020) for identifiability. The SNICA setting provides a unifying framework which allows for both types of temporal dependencies, and further, extends identifiability to other temporal structures as well as any arbitrary higher order data structures which has not previously been considered in the context of nonlinear ICA. Another major theoretical contribution here is to show that identifiability with noise of unknown, arbitrary distribution, while previous work on noisy nonlinear ICA assumed noise of known distribution and known variance (Khemakhem et al., 2020a).
|
| 190 |
+
|
| 191 |
+
Importantly, the SNICA framework is fully probabilistic and thus accommodates higher order latent variables, leading to "purely unsupervised" learning. This is in large contrast to previous research which have been developed for the case where we are able to observe some additional auxiliary variable, such as audio signals accompanying video (Hyvärinen et al., 2019; Khemakhem et al., 2020a,b), or heuristically define the auxiliary variable based on time structure (Hyvärinen and Morioka, 2016). In practice this means that we are able to estimate our models using (variational)
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 3: $\Delta$ -SNICA on MEG data. (a) Classification accuracies of linear SVMs trained with auditoryvisual data to predict stimulus category, with feature extractors trained by $\Delta$ -SNICA in advance with resting-state data. Each point represents a testing accuracy on a target subject (chance level: $50 \%$ ). Horizontal dotted line is PCA-only baseline. (b) Example of spatial patterns of the components learned by $\Delta$ -SNICA $\left( \mathrm { L } { = } 3 \right)$ . Each topography corresponds to one spatial pattern. L3: approximate total spatial pattern of one third-layer unit. L2: the patterns of the three second-layer units maximally contributing to this L3 unit. L1: for each L2 unit, the two most strongly contributing first-layer units.
|
| 195 |
+
|
| 196 |
+
MLE, which is more principled than the heuristic self-supervised methods in most earlier papers. The only existing frameworks allowing MLE (Hälvä and Hyvärinen, 2020; Khemakhem et al., 2020a) used model restricted to exponential families, and had either no HMM or a very simple one.
|
| 197 |
+
|
| 198 |
+
The switching linear dynamical model, $\Delta$ -SNICA in Section 3.2, shows the above benefits in the form of a single model. That is, unlike previous nonlinear ICA models, it combines: 1) temporal dependencies and "non-stationarity" (or HMM) in a single model 2) dimensionality reduction within a rigorous maximum likelihood learning and inference framework, and 3) a separate observation equation with general observational noise. This results in a very rich, realistic, and principled model for time series.
|
| 199 |
+
|
| 200 |
+
Very recently, Morioka et al. (2021) proposed a related model by considering innovations of time series to be nonstationary. However, their model is noise-free, restricted to exponential families of at least order two, and not applicable to the spatial case, thus making our identifiability results significantly stronger. From a more practical viewpoint, their model suffers from the fact that it either does not allow for dimensionality reduction (if an HMM is used) or requires a manual segmentation (if HMM is not used). Nor does it have a clear distinction into a state dynamics equation and a measurement equation which allows for cleaning or denoising of the data.
|
| 201 |
+
|
| 202 |
+
Limitations Our identifiability theory makes some restrictive assumptions, and it remains to be seen if they could be lifted in future work. In particular, the data is not allowed to have too heavy tails; the noise must be additive, and independent of the signal; and the practical interpretation of some of the assumptions, such as (A3) is difficult. It is also difficult to say whether our assumption of unconditionally independent components is realistic in practice. Regarding practical applications, our specific model only scratches the surface of what is possible in this framework. In particular, we did not develop a model with spatial distributions, nor did we model non-Gaussian observational noise – our main aim was to lay the foundations for the relevant identification theory. Future work should aim to make the estimation more efficient computationally; this is a ubiquitous problem in deep learning, but specific solutions for this concrete problem may be achievable (Gresele et al., 2020).
|
| 203 |
+
|
| 204 |
+
# 7 Conclusion
|
| 205 |
+
|
| 206 |
+
We proposed a new general framework for identifiable disentanglement, based on nonlinear ICA with very general temporal dynamics or spatial structure. Observational noise of arbitrary unknown distribution is further included. We prove identifiability of the models in this framework with high generality and mathematical rigour. For real data analysis, we propose a special case which subsumes the properties of all existing time series models in nonlinear ICA, while generalizing them in many ways (see Section 6 for details). We hope this work will contribute to wide-spread application of identifiable methods for disentanglement in a highly principled, probabilistic framework.
|
md/train/68B1ezcffDc/68B1ezcffDc.md
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Subgroup Generalization and Fairness of Graph Neural Networks
|
| 2 |
+
|
| 3 |
+
Jiaqi Ma ∗† jiaqima@umich.edu
|
| 4 |
+
|
| 5 |
+
Junwei Deng ∗† junweid@umich.edu
|
| 6 |
+
|
| 7 |
+
Qiaozhu Mei∗‡ qmei@umich.edu
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Despite enormous successful applications of graph neural networks (GNNs), theoretical understanding of their generalization ability, especially for node-level tasks where data are not independent and identically-distributed (IID), has been sparse. The theoretical investigation of the generalization performance is beneficial for understanding fundamental issues (such as fairness) of GNN models and designing better learning methods. In this paper, we present a novel PAC-Bayesian analysis for GNNs under a non-IID semi-supervised learning setup. Moreover, we analyze the generalization performances on different subgroups of unlabeled nodes, which allows us to further study an accuracy-(dis)parity-style (un)fairness of GNNs from a theoretical perspective. Under reasonable assumptions, we demonstrate that the distance between a test subgroup and the training set can be a key factor affecting the GNN performance on that subgroup, which calls special attention to the training node selection for fair learning. Experiments across multiple GNN models and datasets support our theoretical results4.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Graph Neural Networks (GNNs) [13, 35, 20] are a family of machine learning models that can be used to model non-Euclidean data as well as inter-related samples in a flexible way. In recent years, there have been enormous successful applications of GNNs in various areas, such as drug discovery [18], computer vision [29], transportation forecasting [49], recommender systems [48], etc. Depending on the type of prediction target, the application tasks can be roughly categorized into node-level, edge-level, subgraph-level, and graph-level tasks [46].
|
| 16 |
+
|
| 17 |
+
In contrast to the marked empirical success, theoretical understanding of the generalization ability of GNNs has been rather limited. Among the existing literature, some studies [9, 11, 25] focus on the analysis of graph-level tasks where each sample is an entire graph and the samples of graphs are IID. A very limited number of studies [36, 42] explore GNN generalization for node-level tasks but they assume the nodes (and their associated neighborhoods) are IID samples, which does not align with the commonly seen graph-based semi-supervised learning setups. Baranwal et al. [3] investigate GNN generalization without IID assumptions but under a specific data generating mechanism.
|
| 18 |
+
|
| 19 |
+
In this work, our first contribution is to provide a novel PAC-Bayesian analysis for the generalization ability of GNNs on node-level tasks with non-IID assumptions. In particular, we assume the node features are fixed and the node labels are independently sampled from distributions conditioned on the node features. We also assume the training set and the test set can be chosen as arbitrary subsets of nodes on the graph. We first prove two general PAC-Bayesian generalization bounds (Theorem 1 and Theorem 2) under this non-IID setup. Subsequently, we derive a generalization bound for GNN (Theorem 3) in terms of characteristics of the GNN models and the node features.
|
| 20 |
+
|
| 21 |
+
Notably, the generalization bound for GNN is influenced by the distance between the test nodes and the training nodes in terms of their aggregated node features. This suggests that, given a fixed training set, test nodes that are “far away” from all the training nodes may suffer from larger generalization errors. Based on this analysis, our second contribution is the discovering of a type of unfairness that arises from theoretically predictable accuracy disparity across some subgroups of test nodes. We further conduct a empirical study that investigates the prediction accuracy of four popular GNN models on different subgroups of test nodes. The results on multiple benchmark datasets indicate that there is indeed a significant disparity in test accuracy among these subgroups.
|
| 22 |
+
|
| 23 |
+
We summarize the contributions of this work as follows:
|
| 24 |
+
|
| 25 |
+
(1) We establish a novel PAC-Bayesian analysis for graph-based semi-supervised learning with non-IID assumptions.
|
| 26 |
+
(2) Under this setup, we derive a generalization bound for GNNs that can be applied to an arbitrary subgroup of test nodes.
|
| 27 |
+
(3) As an implication of the generalization bound, we predict that there would be an unfairness of GNN predictions that arises from accuracy disparity across subgroups of test nodes.
|
| 28 |
+
(4) We empirically verify the existence of accuracy disparity of popular GNN models on multiple benchmark datasets, as predicted by our theoretical analysis.
|
| 29 |
+
|
| 30 |
+
# 2 Related Work
|
| 31 |
+
|
| 32 |
+
# 2.1 Generalization of Graph Neural Networks
|
| 33 |
+
|
| 34 |
+
The majority of existing literature that aims to develop theoretical understandings of GNNs have focused on the expressive power of GNNs (see Sato [34] for a survey along this line), while the number of studies trying to understand the generalizability of GNNs is rather limited. Among them, some [9, 11, 25] focus on graph-level tasks, the analyses of which cannot be easily applied to node-level tasks. As far as we know, Scarselli et al. [36], Verma and Zhang [42], and Baranwal et al. [3] are the only existing studies investigating the generalization of GNNs on node-level tasks, even though node-level tasks are more common in reality. Scarselli et al. [36] present an upper bound of the VC-dimension of GNNs; Verma and Zhang [42] derive a stability-based generalization bound for a single-layer GCN [20] model. Yet, both Scarselli et al. [36] and Verma and Zhang [42] (implicitly) assume that the training nodes are IID samples from a certain distribution, which does not align with the common practice of node-level semi-supervised learning. Baranwal et al. [3] investigate the generalization of graph convolution under a specific data generating mechanism (i.e., the contextual stochastic block model [8]). Our work presents the first generalization analysis of GNNs for non-IID node-level tasks without strong assumptions on the data generating mechanism.
|
| 35 |
+
|
| 36 |
+
# 2.2 Fairness of Machine Learning on Graphs
|
| 37 |
+
|
| 38 |
+
The fairness issues of machine learning on graphs start to receive research attention recently. Following conventional machine learning fairness literature, the majority of previous work along this line [1, 5–7, 22, 32, 39, 50] concerns about fairness with respect to a given sensitive attribute, such as gender or race, which defines protected groups. In practice, the fairness issues of learning on graphs are much more complicated due to the asymmetric nature of the graph-structured data. However, only a few studies [19] investigate the unfairness caused by the graph structure without knowing a sensitive feature. Moreover, in a node-level semi-supervised learning task, the non-IID sampling of training nodes brings additional uncertainty to the fairness of the learned models. This work is the first to present a learning theoretic analysis under this setup, which in turn suggests how the graph structure and the selection of training nodes may influence the fairness of machine learning on graphs.
|
| 39 |
+
|
| 40 |
+
# 2.3 PAC-Bayesian Analysis
|
| 41 |
+
|
| 42 |
+
PAC-Bayesian analysis [27] has become one of the most powerful theoretical framework to analyze the generalization ability of machine learning models. We will briefly introduce the background in
|
| 43 |
+
|
| 44 |
+
Section 3.2, and refer the readers to a recent tutorial [14] for a systematic overview of PAC-Bayesian analysis. We note that Liao et al. [25] recently present a PAC-Bayesian generalization bound for GNNs on IID graph-level tasks. Both Liao et al. [25] and this work utilize results from Neyshabur et al. [30], a PAC-Bayesian analysis for ReLU-activated neural networks, in part of our proofs. Compared to Neyshabur et al. [30], the key contribution of Liao et al. [25] is the derivation of perturbation bounds of two types of GNN architectures; while the key contribution of this work is the novel analysis under the setup of non-IID node-level tasks. There is also an existing work of PAC-Bayesian analysis for transductive semi-supervised learning [4]. But it is different from our problem setup and, in particular, it cannot be used to analyze the generalization on subgroups.
|
| 45 |
+
|
| 46 |
+
# 3 Preliminaries
|
| 47 |
+
|
| 48 |
+
In this section, we first formulate the problem of node-level semi-supervised learning. We also provide a brief introduction of the PAC-Bayesian framework.
|
| 49 |
+
|
| 50 |
+
# 3.1 The Problem Formulation and Notations
|
| 51 |
+
|
| 52 |
+
Semi-supervised node classification. Let $G = ( V , E ) \in \mathcal G _ { N }$ be an undirected graph, with $V = \{ 1 , \bar { 2 } , \dots , N \}$ being the set of $N$ nodes and $E \subseteq V \times V$ being the set of edges. And $\mathcal { G } _ { N }$ is the space of all undirected graphs with $N$ nodes. The nodes are associated with node features $\boldsymbol { X } \in \mathbb { R } ^ { \hat { \boldsymbol { N } } \times \boldsymbol { D } }$ and node labels $y \in \{ 1 , 2 , \ldots , K \} ^ { N }$ .
|
| 53 |
+
|
| 54 |
+
In this work, we focus on the transductive node classification setting [47], where the node features $X$ and the graph $G$ are observed prior to learning, and every quantity of interest in the analysis will be conditioned on $X$ and $G$ . Without loss of generality, we treat $X$ and $G$ as fixed throughout our analysis, and the randomness comes from the labels $y$ . In particular, we assume that for each node $i \in V$ , its label $y _ { i }$ is generated from an unknown conditional distribution $\mathrm { P r } ( y _ { i } \mid Z _ { i } )$ , where $Z = g ( X , G )$ and $g : \mathbb { R } ^ { N \times D } \times \mathcal { G } _ { N } \mathbb { R } ^ { N \times D ^ { \prime } }$ is an aggregation function that aggregates the features over (multi-hop) local neighborhoods5. We also assume that the node labels are generated independently conditional on their respective aggregated features $Z _ { i }$ ’s.
|
| 55 |
+
|
| 56 |
+
Given a small set of the labeled nodes, $V _ { 0 } \subseteq V$ , the task of node-level semi-supervised learning is to learn a classifier $h : \mathbb { R } ^ { N \times D } \times \mathcal { G } _ { N } \mathbb { R } ^ { N \times K }$ from a function family $\mathcal { H }$ and perform it on the remaining unlabeled nodes. Given a classifier $h$ , the classification for a node $i$ is obtained by
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\hat { y } _ { i } = \underset { k \in \{ 1 , \dots , K \} } { \mathrm { a r g m a x } } h _ { i } ( X , G ) [ k ] ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $h _ { i } ( X , G )$ is the $i$ -th row of $h ( X , G )$ and $h _ { i } ( X , G ) [ k ]$ refers to the $k$ -th element of $h _ { i } ( X , G )$ .
|
| 63 |
+
|
| 64 |
+
Subgroups. In Section 4, we will present an analysis of the GNN generalization performance on any subgroup of the set of unlabeled nodes, $V \setminus \bar { V _ { 0 } }$ . Note that the analysis on any subgroup is a stronger result than that on the entire unlabeled set, as any set is a subset of itself. Later we will show that the analysis on subgroups (rather than on the entire set) further allows us to investigate the accuracy disparity across subgroups. We denote a collection of subgroups of interest as $V _ { 1 } , \bar { V } _ { 2 } , \ldots , V _ { M } \subseteq \bar { V } \setminus \bar { V } _ { 0 }$ . In practice, a subgroup can be defined based on an attribute of the nodes (e.g., a gender group), certain graph-based properties, or an arbitrary partition of the nodes. We also define the size of each subgroup as $N _ { m } : = | V _ { m } | , m = 0 , \ldots , M$ .
|
| 65 |
+
|
| 66 |
+
Margin loss on each subgroup. Now we can define the empirical and expected margin loss of any classifier $h \in \mathcal H$ on each subgroup $V _ { m } , m = 0 , 1 , \dots , M$ . Given a sample of observed node labels $y _ { i }$ ’s, the empirical margin loss of $h$ on $V _ { m }$ for a margin $\gamma \geq 0$ is defined as
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\widehat { \mathcal { L } } _ { m } ^ { \gamma } ( h ) : = \frac { 1 } { N _ { m } } \sum _ { i \in V _ { m } } \mathbb { 1 } \left[ h _ { i } ( X , G ) [ y _ { i } ] \leq \gamma + \operatorname* { m a x } _ { k \neq y _ { i } } h _ { i } ( X , G ) [ k ] \right] ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $\mathbb { 1 } \left[ \cdot \right]$ is the indicator function. The expected margin loss is the expectation of Eq. (1), i.e.,
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array} { r } { \mathcal { L } _ { m } ^ { \gamma } ( h ) : = \mathbb { E } _ { y _ { i } \sim \operatorname* { P r } ( \mathbf { y } \mid Z _ { i } ) , i \in V _ { m } } \widehat { \mathcal { L } } _ { m } ^ { \gamma } ( h ) . } \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
To simplify the notation, we define $y ^ { m } : = \{ y _ { i } \} _ { i \in V _ { m } }$ , $\forall m = 0 , \ldots , M$ , so that Eq. (2) can be written as $\bar { \mathcal { L } } _ { m } ^ { \gamma } \bar { ( } h ) \bar { = } \mathbb { E } _ { y ^ { m } } \widehat { \mathcal { L } } _ { m } ^ { \gamma } ( h )$ . We note that the classification risk and empirical risk of $h$ on $V _ { m }$ are respectively equal to $\mathcal { L } _ { m } ^ { 0 } ( h )$ and $\widehat { \mathcal { L } } _ { m } ^ { 0 } ( h )$ .
|
| 79 |
+
|
| 80 |
+
# 3.2 The PAC-Bayesian Framework
|
| 81 |
+
|
| 82 |
+
The PAC-Bayesian framework [27] is an approach to analyze the generalization ability of a stochastic predictor drawn from a distribution $Q$ over the predictor family $\mathcal { H }$ that is learned from the training data. For any stochastic classifier distribution $Q$ and $m = 0 , \ldots , M$ , slightly overloading the notation, we denote the empirical margin loss of $Q$ on $V _ { m }$ as ${ \widehat { \mathcal { L } } } _ { m } ^ { \gamma } ( Q )$ , and the corresponding expected margin loss as $\mathcal { L } _ { m } ^ { \gamma } ( Q )$ . And they are given by
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\widehat { \mathscr { L } } _ { m } ^ { \gamma } ( Q ) : = \mathbb { E } _ { h \sim Q } \widehat { \mathscr { L } } _ { m } ^ { \gamma } ( h ) , \quad \mathscr { L } _ { m } ^ { \gamma } ( Q ) : = \mathbb { E } _ { h \sim Q } \mathscr { L } _ { m } ^ { \gamma } ( h ) .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
In general, a PAC-Bayesian analysis aims to bound the generalization gap between $\mathcal { L } _ { m } ^ { \gamma } ( Q )$ and $\widehat { \mathcal { L } } _ { m } ^ { \gamma } ( Q )$ . The analysis is usually done by first proving that, for any “prior” distribution6 $P$ over $\mathcal { H }$ that is independent of the training data, the generalization gap can be controlled by the discrepancy between $P$ and $Q$ ; the analysis is then followed by careful choices of $P$ to get concrete upper bounds of the generalization gap. While the PAC-Bayesian framework is built on top of stochastic predictors, there exist standard techniques [23] that can be used to derive generalization bounds for deterministic predictors from PAC-Bayesian bounds.
|
| 89 |
+
|
| 90 |
+
Finally, we denote the Kullback-Leibler $( K L )$ divergence as $\begin{array} { r } { D _ { \mathrm { K L } } ( Q \| P ) : = \int \ln \frac { d Q } { d P } d Q } \end{array}$ , which will be used in the following analysis.
|
| 91 |
+
|
| 92 |
+
# 4 The Generalization Bound and Its Implications for Fairness
|
| 93 |
+
|
| 94 |
+
As we mentioned in Section 2.3, existing PAC-Bayesian analyses cannot be directly applied to the nonIID semi-supervised learning setup where we care about the generalization (and its disparity) across different subgroups of the unlabeled samples. In this section, we first present general PAC-Bayesian theorems for subgroup generalization under our problem setup; then we derive a generalization bound for GNNs and discuss fairness implications of the bound.
|
| 95 |
+
|
| 96 |
+
# 4.1 General PAC-Bayesian Theorems for Subgroup Generalization
|
| 97 |
+
|
| 98 |
+
Stochastic classifier bound. We first present the general PAC-Bayesian theorem (Theorem 1) for subgroup generalization of stochastic classifiers. The generalization bound depends on a notion of expected loss discrepancy between two subgroups as defined below.
|
| 99 |
+
|
| 100 |
+
Definition 1 (Expected Loss Discrepancy). Given a distribution $P$ over $\mathcal { H }$ , for any $\lambda > 0$ and $\gamma \geq 0$ for any two subgroups $V _ { m }$ and $V _ { m ^ { \prime } }$ $0 \leq m , m ^ { \prime } \leq M )$ , define the expected loss discrepancy between $V _ { m }$ and $V _ { 0 }$ with respect to $( P , \gamma , \lambda )$ as
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
D _ { m , m ^ { \prime } } ^ { \gamma } ( P ; \lambda ) : = \ln \mathbb { E } _ { h \sim P } e ^ { \lambda \left( \mathcal { L } _ { m } ^ { \gamma / 2 } ( h ) - \mathcal { L } _ { m ^ { \prime } } ^ { \gamma } ( h ) \right) } ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
where $\mathcal { L } _ { m } ^ { \gamma / 2 } ( h )$ and $\mathcal { L } _ { m ^ { \prime } } ^ { \gamma } ( h )$ follow the definition of Eq. (2).
|
| 107 |
+
|
| 108 |
+
Intuitively, $D _ { m , m ^ { \prime } } ^ { \gamma } ( P ; \lambda )$ captures the difference of the expected loss between $V _ { m }$ and $V _ { m ^ { \prime } }$ in an average sense (over $P$ ). Note that $D _ { m , m ^ { \prime } } ^ { \gamma } ( P ; \lambda )$ is asymmetric in terms of $V _ { m }$ and $V _ { m ^ { \prime } }$ , and can be negative if the loss on $V _ { m }$ is mostly smaller than that on $V _ { m ^ { \prime } }$ .
|
| 109 |
+
|
| 110 |
+
For stochastic classifiers, we have the following Theorem 1. Proof can be found in Appendix A.1.
|
| 111 |
+
|
| 112 |
+
Theorem 1 (Subgroup Generalization of Stochastic Classifiers). For any $0 < m \le M$ , for any $\lambda > 0$ and $\gamma \geq 0 _ { ; }$ , for any “prior” distribution $P$ on $\mathcal { H }$ that is independent of the training data on $V _ { 0 }$ , with
|
| 113 |
+
|
| 114 |
+
probability at least $1 - \delta$ over the sample of $y ^ { 0 }$ , for any $Q$ on $\mathcal { H }$ , we have7
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathcal { L } _ { m } ^ { \gamma / 2 } ( Q ) \leq \widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( Q ) + \frac { 1 } { \lambda } \left( D _ { \mathrm { K L } } ( Q \| P ) + \ln \frac { 1 } { \delta } + \frac { \lambda ^ { 2 } } { 4 N _ { 0 } } + D _ { m , 0 } ^ { \gamma } ( P ; \lambda ) \right) .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
Theorem 1 can be viewed as an adaptation of a result by Alquier et al. [2] from the IID supervised setting to our non-IID semi-supervised setting. The terms $\begin{array} { r } { D _ { \mathrm { K L } } ( Q \| P ) , \mathrm { l n } \frac { 2 } { \delta } } \end{array}$ , and $\frac { \lambda ^ { 2 } } { 4 N _ { 0 } }$ are commonly seen in PAC-Bayesian analysis for IID supervised setting. In particular, when setting $\lambda = \Theta ( \sqrt { N _ { 0 } } )$ , $\begin{array} { r } { \frac { 1 } { \lambda } \left( \ln \frac { 2 } { \delta } + \frac { \lambda ^ { 2 } } { 4 N _ { 0 } } \right) } \end{array}$ vanishes as the training size $N _ { 0 }$ grows. The divergence between $Q$ and $P$ , $D _ { \mathrm { K L } } ( Q \| P )$ , is usually considered as a measurement of the model complexity [14]. And there will be a trade-off between the training loss, $\widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( Q )$ , and the complexity (how far can the learned “posterior” $Q$ go from the “prior” $P$ ).
|
| 121 |
+
|
| 122 |
+
Uniquely for the non-IID semi-supervised setting, there is an extra term $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ , which is the expected loss discrepancy between the target test subgroup $V _ { m }$ and the training set $V _ { 0 }$ . Note that this quantity is independent of the training labels $y ^ { 0 }$ . Not surprisingly, it is difficult to give generalization guarantees if the expected loss on $V _ { m }$ is much larger than that on $V _ { 0 }$ for any stochastic classifier $P$ independent of training data. We have to make some assumptions about the relationship between $V _ { m }$ and $V _ { 0 }$ to obtain a meaningful bound on $\begin{array} { r } { \frac { 1 } { \lambda } D _ { m , 0 } ^ { \gamma } ( P ; \lambda ) } \end{array}$ , which we will discuss in details in Section 4.2.
|
| 123 |
+
|
| 124 |
+
Deterministic classifier bound. Utilizing standard techniques in PAC-Bayesian analysis [23, 27, 30], we can convert the bound for stochastic classifiers in Theorem 1 to a bound for deterministic classifiers as stated in Theorem 2 below (see Appendix A.2 for the proof).
|
| 125 |
+
|
| 126 |
+
Theorem 2 (Subgroup Generalization of Deterministic Classifiers). Let $\tilde { h }$ be any classifier in $\mathcal { H }$ . For any $0 < m \le M$ , for any $\lambda > 0$ and $\gamma \geq 0$ , for any “prior” distribution $P$ on $\mathcal { H }$ that is independent of the training data on $V _ { 0 }$ , with probability at least $1 - \delta$ over the sample of $y ^ { 0 }$ , for any $Q$ on $\mathcal { H }$ such that $\begin{array} { r } { \operatorname* { P r } _ { h \sim Q } \left( \operatorname* { m a x } _ { i \in V _ { 0 } \cup V _ { m } } \| h _ { i } ( X , G ) - \tilde { h } _ { i } ( X , G ) \| _ { \infty } < \frac { \gamma } { 8 } \right) > \frac { 1 } { 2 } } \end{array}$ , we have
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\mathcal { L } _ { m } ^ { 0 } ( \widetilde { h } ) \le \widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( \widetilde { h } ) + \frac { 1 } { \lambda } \left( 2 ( D _ { \mathrm { K L } } ( Q \| P ) + 1 ) + \ln \frac { 1 } { \delta } + \frac { \lambda ^ { 2 } } { 4 N _ { 0 } } + D _ { m , 0 } ^ { \gamma / 2 } ( P ; \lambda ) \right) .
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
Theorem 1 and 2 are not specific to GNNs and hold for any (respectively stochastic and deterministic) classifier under the semi-supervised setup. In Section 4.2, we will apply Theorem 2 to obtain a subgroup generalization bound that explicitly depends on the characteristics of GNNs and the data.
|
| 133 |
+
|
| 134 |
+
# 4.2 Subgroup Generalization Bound for Graph Neural Networks
|
| 135 |
+
|
| 136 |
+
The GNN model. We consider GNNs where the node feature aggregation step and the prediction step are separate. In particular, we assume the GNN classifier takes the form of $h _ { i } ( X , G ) ~ =$ $f ( \bar { g } _ { i } ( X , G ) ; W _ { 1 } , W _ { 2 } , \underline { { { \cdot \cdot \cdot } } } , W _ { L } )$ , where $g$ is an aggregation function as we described in Section 3.1 and $f$ is a ReLU-activated $L$ -layer Multi-Layer Perceptron (MLP) with $W _ { 1 } , \dots , W _ { L }$ as parameters for each layer8. Denote the largest width of all the hidden layers as $b$ .
|
| 137 |
+
|
| 138 |
+
Remark 1. There is a technical restriction on the possible choice of the aggregation function $g$ . For the following derivation of the generalization bound (6) to be valid, we need the condition that the node labels $y _ { i }$ ’s are independent conditional on their aggregated features $g _ { i } ( X , G )$ ’s, as introduced in the problem formulation in Section 3.1. However, we also note that this condition tends to hold when the aggregated features $g _ { i } ( X , G )$ ’s contain rich information about the labels.
|
| 139 |
+
|
| 140 |
+
Upper-bounding $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ . To derive the generalization guarantee, we need to upper-bound the expected loss discrepancy $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ . It turns out that we have to make some assumptions on the data in order to get a meaningful upper bound.
|
| 141 |
+
|
| 142 |
+
So far we have not had any restrictions on the conditional label distributions $\operatorname* { P r } ( y _ { i } = k \mid g _ { i } ( X , G ) )$ If the label distributions on $V \backslash V _ { 0 }$ can be arbitrarily different from those on $V _ { 0 }$ , the generalization can be arbitrarily poor. We therefore assume that the label distributions conditional on aggregated features are smooth (Assumption 1).
|
| 143 |
+
|
| 144 |
+
Assumption 1 (Smoothness of Data Distribution). Assume there exist $c$ -Lipschitz continuous functions $\mathring { \eta _ { 1 } } , \eta _ { 2 } , \dotsc , \eta _ { K } : \mathbb { R } ^ { D ^ { \prime } } [ 0 , 1 ]$ , such that, for any node $i \in V$ ,
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\operatorname* { P r } ( y _ { i } = k \mid g _ { i } ( X , G ) ) = \eta _ { k } ( g _ { i } ( X , G ) ) , \forall k = 1 , \ldots , K .
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
We also need to characterize the relationship between a target test subgroup $V _ { m }$ and the training set $V _ { 0 }$ . For this purpose, we define the distance from $V _ { m }$ to $V _ { 0 }$ and the concept of near set below.
|
| 151 |
+
|
| 152 |
+
Definition 2 (Distance To Training Set and Near Set). For each $0 < m \le M$ , define the distance from the subgroup $V _ { m }$ to the training set $V _ { 0 }$ as
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
\epsilon _ { m } : = \operatorname* { m a x } _ { j \in V _ { m } } \operatorname* { m i n } _ { i \in V _ { 0 } } \| g _ { i } ( X , G ) - g _ { j } ( X , G ) \| _ { 2 } .
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
Further, for each $i \in V _ { 0 }$ , define the near set of $i$ with respect to $V _ { m }$ as
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
V _ { m } ^ { ( i ) } : = \{ j \in V _ { m } \mid \| g _ { i } ( X , G ) - g _ { j } ( X , G ) \| _ { 2 } \leq \epsilon _ { m } \} .
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
Clearly,
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
V _ { m } = \cup _ { i \in V _ { 0 } } V _ { m } ^ { ( i ) } .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
Then, with the Assumption 2 and 3 below, we can bound the expected loss discrepancy $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ with the following Lemma 1 (see the proof in Appendix A.3).
|
| 171 |
+
|
| 172 |
+
Assumption 2 (Equal-Sized and Disjoint Near Sets). For any $0 < m \le M$ , assume the near sets of each $i \in V _ { 0 }$ with respect to $V _ { m }$ are disjoint and have the same size $s _ { m } \in \mathbb { N } ^ { + }$ .
|
| 173 |
+
|
| 174 |
+
Assumption 3 (Concentrated Expected Loss Difference). Let $P$ be a distribution on $\mathcal { H }$ , defined by sampling the vectorized MLP parameters from ${ \mathcal { N } } ( 0 , \sigma ^ { 2 } I )$ for some $\begin{array} { r } { \sigma ^ { 2 } \le \frac { ( \gamma / 8 \epsilon _ { m } ) ^ { 2 / L } } { 2 b ( \lambda N _ { 0 } ^ { - \alpha } + \ln { 2 b L } ) } } \end{array}$ For any $L$ - layer GNN classifier $h \in \mathcal H$ with model parameters $W _ { 1 } ^ { h } , \ldots , W _ { L } ^ { h }$ , define $T _ { h } : = \operatorname* { m a x } _ { l = 1 , \ldots , L } \| W _ { l } \| _ { 2 }$ . Assume that there exists some $\textstyle 0 < \alpha < { \frac { 1 } { 4 } }$ satisfying
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\operatorname* { P r } _ { h \sim P } \left( \mathcal { L } _ { m } ^ { \gamma / 4 } ( h ) - \mathcal { L } _ { 0 } ^ { \gamma / 2 } ( h ) > N _ { 0 } ^ { - \alpha } + c K \epsilon _ { m } \mid T _ { h } ^ { L } \epsilon _ { m } > \frac { \gamma } { 8 } \right) \le e ^ { - N _ { 0 } ^ { 2 \alpha } } .
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
Lemma 1 (Bound for $D _ { m , 0 } ^ { \gamma } ( P ; \lambda ) )$ . Under Assumption $I$ , 2 and 3, for any $0 < m \le M$ , any $0 < \lambda \leq N _ { 0 } ^ { 2 \alpha }$ and $\gamma \geq 0$ , assume the “prior” $P$ on $\mathcal { H }$ is defined by sampling the vectorized $M L P$ parameters from ${ \mathcal { N } } ( 0 , \sigma ^ { 2 } I )$ for some $\begin{array} { r } { \sigma ^ { 2 } \le \frac { ( \gamma / 8 \epsilon _ { m } ) ^ { 2 / L } } { 2 b ( \lambda N _ { 0 } ^ { - \alpha } + \ln { 2 b L } ) } } \end{array}$ . We have
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
D _ { m , 0 } ^ { \gamma / 2 } ( P ; \lambda ) \leq \ln { 3 } + \lambda c K \epsilon _ { m } .
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
Intuitively, what we need to bound $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ is that the training set $V _ { 0 }$ is “representative” for $V _ { m }$ . This is reasonable in practice as it is natural to select the training samples according to the distribution of the population. Specifically, Assumption 2 assumes that $V _ { m }$ can be split into equalsized partitions indexed by the training samples. The elements of each partition $V _ { m } ^ { ( i ) }$ are close to the corresponding training sample $i$ but not so close to training samples other than $i$ . This assumption is stronger than needed to obtain a meaningful bound on $\bar { D } _ { m , 0 } ^ { \gamma } \bar { ( } P ; \lambda )$ , and we can relax it by only assuming that most samples in $V _ { m }$ have proportional “close representatives” in $V _ { 0 }$ . But we keep Assumption 2 in this work, as it is intuitively clear and significantly eases the analysis and notations. Assumption 3 essentially assumes that the expected margin loss on $V _ { m }$ is not much larger than that on $V _ { 0 }$ when the number of samples becomes large. We first note that this assumption becomes trivially true in the degenerate case that all samples in $V _ { m }$ and $V _ { 0 }$ are IID. In this case, $\bar { \mathcal { L } } _ { m } ^ { \gamma / 4 } ( h ) = \bar { \mathcal { L } } _ { 0 } ^ { \gamma / 4 } ( h ) < \bar { \mathcal { L } } _ { 0 } ^ { \gamma / 2 } ( h ) \bar { \ } \leq 0$ for any classifier $h$ . In Appendix A.5, we further provide a simple non-IID example where Assumption 3 holds.
|
| 187 |
+
|
| 188 |
+
The bound (5) suggests that the closer between $V _ { m }$ and $V _ { 0 }$ (smaller $\epsilon _ { m }$ ), the smaller the expected loss discrepancy.
|
| 189 |
+
|
| 190 |
+
Bound for GNNs. Finally, with an additional technical assumption (Assumption 4) that the maximum L2 norm of aggregated node features does not grow too fast in terms of the number of training samples, we obtain a subgroup generalization bound for GNNs in Theorem 3. The proof of Theorem 3 can be found in Appendix A.4.
|
| 191 |
+
|
| 192 |
+
Assumption 4. Define $B _ { m } : = \operatorname* { m a x } _ { i \in V _ { 0 } \cup V _ { m } } \| g _ { i } ( X , G ) \| _ { 2 }$ . For any classifier $\tilde { h } \in \mathcal { H }$ with parameters $\{ \widetilde { W } _ { l } \} _ { l = 1 } ^ { L }$ , assume $\| \widetilde { W } _ { l } \| _ { F } \le C f o r l = 1 , \ldots , L .$ . Assume $B _ { m } , C$ are constants with respect to $N _ { 0 }$ .
|
| 193 |
+
|
| 194 |
+
Theorem 3 (Subgroup Generalization Bound for GNNs). Let $\tilde { h }$ be any classifier in $\mathcal { H }$ with parameters $\{ \widetilde { W } _ { l } \} _ { l = 1 } ^ { L }$ . Under Assumptions 1, 2, 3, and 4, for any $0 < m \le M$ , $\gamma \geq 0$ , and large enough $N _ { 0 }$ , with probability at least $1 - \delta$ over the sample of $y ^ { 0 }$ , we have
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
\mathcal { L } _ { m } ^ { 0 } ( \widetilde { h } ) \leq \widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( \widetilde { h } ) + O \left( c K \epsilon _ { m } + \frac { b \sum _ { l = 1 } ^ { L } \| \widetilde { W } _ { l } \| _ { F } ^ { 2 } } { ( \gamma / 8 ) ^ { 2 / L } N _ { 0 } ^ { \alpha } } ( \epsilon _ { m } ) ^ { 2 / L } + \frac { 1 } { N _ { 0 } ^ { 1 - 2 \alpha } } + \frac { 1 } { N _ { 0 } ^ { 2 \alpha } } \ln \frac { L C ( 2 B _ { m } ) ^ { 1 / L } } { \gamma ^ { 1 / L } \delta } \right) .
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
Next, we investigate the qualitative implications of our theoretical results.
|
| 201 |
+
|
| 202 |
+
# 4.3 Implications for Fairness of Graph Neural Networks
|
| 203 |
+
|
| 204 |
+
Theoretically predictable accuracy disparity. One merit of our analysis is that we can apply Theorem 3 on different subgroups of the unlabeled nodes and compare the subgroup generalization bounds. This allows us to study the accuracy disparity across subgroups from a theoretical perspective.
|
| 205 |
+
|
| 206 |
+
A major factor that affects the generalization bound (6) is $\epsilon _ { m }$ , the aggregated-feature distance (in terms of $g ( X , G ) )$ from the target test subgroup $V _ { m }$ to the training set $V _ { 0 }$ . The generalization bound (6) suggests that there is a better generalization guarantee for subgroups that are closer to the training set. In other words, it is unfair for subgroups that are far away from the training set. While our theoretical analysis can only tell the difference among upper bounds of generalization errors, we empirically verify that, in the following Section 5, the aggregated-feature distance $\epsilon _ { m }$ is indeed a strong predictor for the test accuracy of each subgroup $V _ { m }$ . More specifically, the test accuracy decreases as the distance increases, which is consistent with the theoretical prediction given by the bound (6).
|
| 207 |
+
|
| 208 |
+
Impact of the structural positions of nodes. We further investigate if the aggregated-feature distance can be related to simpler and more interpretable graph characteristics, in order to obtain a more intuitive understanding of how the structural positions of nodes influence the prediction accuracy on them. We find that the geodesic distance (length of the shortest path) between two nodes is positively related to the distance between their aggregated features in some scenarios9, such as when the node features exhibit homophily [28]. Empirically, we also observe that test nodes with larger geodesic distance to the training set tend to suffer from lower accuracy (see Figure 2).
|
| 209 |
+
|
| 210 |
+
In contrast, we find that common node centrality metrics (e.g., degree and PageRank) have less influence on the test accuracy (see Figure 3). These centrality metrics only capture the graph characteristics of the test nodes alone, but do not take their relationship to the training set into account, which is a key factor suggested by our theoretical analysis.
|
| 211 |
+
|
| 212 |
+
Impact of training data selection. Another implication of the theoretical results is that the selection of the training set plays an important role on the fairness of the learned GNN models. First, if the training set is selected unevenly on the graph, leaving part of the test nodes far away, there will likely be a large accuracy disparity. Second, a key ingredient in the proof of Lemma 1 is that the GNN predictions on two nodes tend to be more similar if they are closer in terms of the aggregated node features. This suggests that, if an individual training node is close to many test nodes, it may bias the predictions of the learned GNN on the test nodes towards the class it belongs to.
|
| 213 |
+
|
| 214 |
+
# 5 Experiments
|
| 215 |
+
|
| 216 |
+
In this section, we empirically verify the fairness implications suggested by our theoretical analysis.
|
| 217 |
+
|
| 218 |
+
General setup. We experiment on 4 popular GNN models, GCN [20], GAT [41], SGC [45], and APPNP [21], as well as an MLP model for reference. For all models, we use the implementations by Deep Graph Library [43]. For each experiment setting, 40 independent trials are carried out.
|
| 219 |
+
|
| 220 |
+
# 5.1 Accuracy Disparity Across Subgroups
|
| 221 |
+
|
| 222 |
+
Subgroups. We examine the accuracy disparity with three types of subgroups as described below.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 1: Test accuracy disparity across subgroups by aggregated-feature distance. Each figure corresponds to a dataset, and each bar cluster corresponds to a model. Bars labeled 1 to 5 represent subgroups with increasing distance to training set. Results are averaged over 40 independent trials with different random splits of the data, and the error bar represents the standard error of the mean.
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
Figure 2: Test accuracy disparity across subgroups by geodesic distance. The experiment and plot settings are the same as Figure 1, except for the bars labeled from 1 to 5 here represent subgroups with increasing shortest-path distance to training set.
|
| 229 |
+
|
| 230 |
+
Subgroup by aggregated-feature distance. In order to directly investigate the effect of $\epsilon _ { m }$ on the generalization bound (6), we first split the test nodes into subgroups by their distance to the training set in terms of the aggregated features. We use the two-step aggregated features to calculate the distance. In particular, denote the adjacency matrix of the graph $G$ as $\breve { A } \in \{ 0 , 1 \} ^ { N \times N }$ and the corresponding degree matrix as D, where D is an N × N diagonal matrix with Dii = PNj=1 Aij , ∀i = 1, . . . , N . Given the feature matrix $X \in \mathbb { R } ^ { N \times D }$ , the two-step aggregated features $Z$ are obtained by $Z =$ $( D + I ) ^ { - 1 } ( A + I ) ( D + I ) ^ { - 1 } ( A + I ) X$ . For each test node $i$ , we calculate its aggregated-feature distance to the training set $V _ { 0 }$ as $\begin{array} { r } { d _ { i } = \operatorname* { m i n } _ { j \in V _ { 0 } } \| Z _ { i } - Z _ { j } \| _ { 2 } } \end{array}$ . Then we sort the test nodes according to this distance and split them into 5 equal-sized subgroups.
|
| 231 |
+
|
| 232 |
+
Strictly speaking, our theory does not directly apply to GCN and GAT as they are not in the form as we defined in Section 4.2. Moreover, the two-step aggregated feature does not match exactly to the feature aggregation function of SGC and APPNP. Nevertheless, we find that even with such approximations, we are still able to observe the expected descending trend of test accuracy with respect to increasing distance in terms of the two-step aggregated features, on all four GNN models.
|
| 233 |
+
|
| 234 |
+
Subgroup by geodesic distance. As we discussed in Section 4.3, geodesic distance on the graph may well relate to the aggregated-feature distance. So we also define subgroups based on geodesic distance. We split the subgroups by replacing the aggregated-feature distance $d _ { i }$ of each test node $i$ with the minimum of the geodesic distances from $i$ to each training node on the graph.
|
| 235 |
+
|
| 236 |
+
Subgroup by node centrality. Lastly, we define subgroups based on 4 types of common node centrality metrics (degree, closeness, betweenness, and PageRank) of the test nodes. We split the subgroups by replacing the aggregated-feature distance $d _ { i }$ of each test node $i$ with the centrality score of $i$ . The purpose of this setup is to show that the common node centrality metrics are not sufficient to capture the monotonic trend of test accuracy.
|
| 237 |
+
|
| 238 |
+
Experiment setup. Following common GNN experiment setup [38], we randomly select 20 nodes in each class for training, 500 nodes for validation, and 1,000 nodes for testing. Once training is done, we report the test accuracy on subgroups defined by aggregated-feature distance, geodesic distance, and node centrality in Figure 1, 2, and 3 respectively10.
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
Figure 3: Test accuracy disparity across subgroups by node centrality. Each figure corresponds to the results of a pair of model and dataset, and each bar cluster corresponds to the subgroups defined by a certain centrality metric. In each cluster, the bars labeled from 1 to 5 represent subgroups with decreasing node centrality. Other settings are the same as Figure 1.
|
| 242 |
+
|
| 243 |
+
Experiment results. First, as shown in Figure 1, there is a clear trend that the accuracy of a test subgroup decreases as the aggregated-feature distance between the test subgroup and the training set increases. And the trend is consistent for all 4 GNN models on all the datasets we test on (except for APPNP on Cora). This result verifies the existence of accuracy disparity suggested by Theorem 3.
|
| 244 |
+
|
| 245 |
+
Second, we observe in Figure 2 that there is a similar trend when we split subgroups by the geodesic distance. This suggests that the geodesic distance on the graph can sometimes be used as a simpler indicator in practice for machine learning fairness on graph-structured data. Using such a classical graph metric as an indicator also helps us connect graph-based machine learning to network theory, especially to understandings about social networks, to better analyze fairness issues of machine learning on social networks, where high-stake decisions related to human subjects may be involved.
|
| 246 |
+
|
| 247 |
+
Furthermore, as shown in Figure 3, there is no clear monotonic trend for test accuracy when we split subgroups by node centrality, except for some particular combinations of GNN model and dataset. Empirically, the common node centrality metrics are not as good as the geodesic distance in terms of capturing the accuracy disparity. This contrast highlights the importance of the insight provided by our analysis: the “distance” to the training set, rather than some graph characteristics of the test nodes alone, is the key predictor of test accuracy.
|
| 248 |
+
|
| 249 |
+
Finally, it is intriguing that, in both Figure 1 and 2, the test accuracy of MLP (which does not use the graph structure) also decreases as the distance of a subgroup to the training set increases. This result is perhaps not surprising if the subgroups were defined by distance on the original node features, as MLP can be viewed as a special GNN where the feature aggregation function is an identity mapping, so the “aggregated features” for MLP essentially equal to the original features. Our theoretical analysis can then be similarly applied to MLP. The question is why there is also an accuracy disparity w.r.t. the aggregated-feature distance and the geodesic distance. We suspect this is because these datasets present homophily, i.e., original (non-aggregated) features of geodesically closer nodes tend to be more similar. As a result, a subgroup with smaller geodesic distance may also have closer node features to the training set. To verify this hypothesis, we repeat the experiments in Figure 1, but with independent noises added to node features such that they become less homophilious. As in Figure 4, the decreasing pattern of test accuracy across subgroups remains for the 4 GNNs on all datasets; while for MLP, the pattern disappears on Cora and Pubmed and becomes less sharp on Citeseer.
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
Figure 4: Test accuracy disparity across subgroups by aggregated-feature distance, experimented with noisy features. The experiment and plot settings are the same as Figure 1, except for the node features are perturbed by independent noises such that they are less homophilious.
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
Figure 5: Relative ratio between the FPR under biased training node selection and the FPR under uniform training node selection. Each bar in each cluster corresponds to a class (there are 7 classes in total). The red shaded bar indicates the class with high centrality training nodes under the biased setup. Each cluster corresponds to a centrality metric being used for the biased node selection.
|
| 256 |
+
|
| 257 |
+
# 5.2 Impact of Biased Training Node Selection
|
| 258 |
+
|
| 259 |
+
In all the previous experiments, we follow the standard GNN training setup where 20 training nodes are uniformly sampled for each class. Next we investigate the impact if the selection of training nodes is biased, verifying our discussions in Section 4.3. We will demonstrate that the node centrality scores of the training nodes play an important role in the learned GNN model.
|
| 260 |
+
|
| 261 |
+
We choose a “dominant class” and construct a manipulated training set. For each class, we still sample 20 training nodes but in a biased way. For the dominant class, the sample is biased towards nodes of high centrality; while for other classes, the sample is biased towards nodes of low centrality. We evaluate the relative ratio of False Positive Rate (FPR) for each class between the setup using manipulated training set and the setup using uniformly sampled training set.
|
| 262 |
+
|
| 263 |
+
As shown in Figure 5, compared to MLP, the GNN models have significantly worse FPR for the dominant class when the training nodes are biased. This is because, after feature aggregation, there will be a larger proportion of test nodes that are closer to the training nodes of higher centrality. And the learned GNN model will be heavily biased towards the training labels of these nodes.
|
| 264 |
+
|
| 265 |
+
# 6 Conclusion
|
| 266 |
+
|
| 267 |
+
We present a novel PAC-Bayesian analysis for the generalization ability of GNNs on node-level semi-supervised learning tasks. As far as we know, this is the first generalization bound for GNNs for non-IID node-level tasks without strong assumptions on the data generating mechanism. One advantage of our analysis is that it can be applied to arbitrary subgroups of the test nodes, which allows us to investigate an accuracy-disparity style of fairness for GNNs. Both the theoretical and empirical results suggest that there is an accuracy disparity across subgroups of test nodes that have varying distance to the training set, and nodes with larger distance to the training nodes suffer from a lower classification accuracy. In the future, we would like to utilize our theory to analyze the fairness of GNNs on real-world applications and develop principled methods to mitigate the unfairness.
|
| 268 |
+
|
| 269 |
+
# Acknowledgements
|
| 270 |
+
|
| 271 |
+
This work was in part supported by the National Science Foundation under grant number 1633370.
|
| 272 |
+
The authors claim no competing interests.
|
| 273 |
+
References
|
| 274 |
+
[1] Chirag Agarwal, Himabindu Lakkaraju, and Marinka Zitnik. Towards a unified framework for fair and stable graph representation learning. CoRR, abs/2102.13186, 2021. URL https: //arxiv.org/abs/2102.13186.
|
| 275 |
+
[2] Pierre Alquier, James Ridgway, and Nicolas Chopin. On the properties of variational approximations of gibbs posteriors. The Journal of Machine Learning Research, 17(1):8374–8414, 2016.
|
| 276 |
+
[3] Aseem Baranwal, Kimon Fountoulakis, and Aukosh Jagannath. Graph convolution for semisupervised classification: Improved linear separability and out-of-distribution generalization. arXiv preprint arXiv:2102.06966, 2021.
|
| 277 |
+
[4] Luc Bégin, Pascal Germain, François Laviolette, and Jean-Francis Roy. Pac-bayesian theory for transductive learning. In Artificial Intelligence and Statistics, pages 105–113. PMLR, 2014.
|
| 278 |
+
[5] Avishek Joey Bose and William L. Hamilton. Compositional fairness constraints for graph embeddings. CoRR, abs/1905.10674, 2019. URL http://arxiv.org/abs/1905.10674.
|
| 279 |
+
[6] Maarten Buyl and Tijl De Bie. The kl-divergence between a graph model and its fair i-projection as a fairness regularizer. CoRR, abs/2103.01846, 2021. URL https://arxiv.org/abs/2103. 01846.
|
| 280 |
+
[7] Enyan Dai and Suhang Wang. Say no to the discrimination: Learning fair graph neural networks with limited sensitive attribute information. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, WSDM ’21, page 680–688, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450382977. doi: 10.1145/3437963. 3441752. URL https://doi.org/10.1145/3437963.3441752.
|
| 281 |
+
[8] Yash Deshpande, Subhabrata Sen, Andrea Montanari, and Elchanan Mossel. Contextual stochastic block models. In NeurIPS, 2018.
|
| 282 |
+
[9] Simon S Du, Kangcheng Hou, Barnabás Póczos, Ruslan Salakhutdinov, Ruosong Wang, and Keyulu Xu. Graph neural tangent kernel: Fusing graph neural networks with graph kernels. arXiv preprint arXiv:1905.13192, 2019.
|
| 283 |
+
[10] Gintare Karolina Dziugaite, Kyle Hsu, Waseem Gharbieh, Gabriel Arpino, and Daniel Roy. On the role of data in pac-bayes. In International Conference on Artificial Intelligence and Statistics, pages 604–612. PMLR, 2021.
|
| 284 |
+
[11] Vikas Garg, Stefanie Jegelka, and Tommi Jaakkola. Generalization and representational limits of graph neural networks. In International Conference on Machine Learning, pages 3419–3430. PMLR, 2020.
|
| 285 |
+
[12] Pascal Germain, Alexandre Lacasse, Francois Laviolette, Mario March, and Jean-Francis Roy. Risk bounds for the majority vote: From a pac-bayesian analysis to a learning algorithm. Journal of Machine Learning Research, 16(26):787–860, 2015.
|
| 286 |
+
[13] Marco Gori, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In Proceedings. 2005 IEEE International Joint Conference on Neural Networks, 2005., volume 2, pages 729–734. IEEE, 2005.
|
| 287 |
+
[14] Benjamin Guedj. A primer on pac-bayesian learning. arXiv preprint arXiv:1901.05353, 2019.
|
| 288 |
+
[15] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. In The Collected Works of Wassily Hoeffding, pages 409–426. Springer, 1994.
|
| 289 |
+
|
| 290 |
+
[16] Yifan Hou, Jian Zhang, James Cheng, Kaili Ma, Richard TB Ma, Hongzhi Chen, and MingChang Yang. Measuring and improving the use of graph information in graph neural networks. In International Conference on Learning Representations, 2019.
|
| 291 |
+
|
| 292 |
+
[17] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. arXiv preprint arXiv:2005.00687, 2020.
|
| 293 |
+
|
| 294 |
+
[18] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In International Conference on Machine Learning, pages 2323–2332. PMLR, 2018.
|
| 295 |
+
|
| 296 |
+
[19] Ahmad Khajehnejad, Moein Khajehnejad, Mahmoudreza Babaei, Krishna P. Gummadi, Adrian Weller, and Baharan Mirzasoleiman. Crosswalk: Fairness-enhanced node representation learning, 2021.
|
| 297 |
+
|
| 298 |
+
[20] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 299 |
+
|
| 300 |
+
[21] Johannes Klicpera, Aleksandar Bojchevski, and Stephan Günnemann. Predict then propagate: Graph neural networks meet personalized pagerank. In ICLR, 2019.
|
| 301 |
+
|
| 302 |
+
[22] Charlotte Laclau, Ievgen Redko, Manvi Choudhary, and Christine Largeron. All of the fairness for edge prediction with optimal transport. CoRR, abs/2010.16326, 2020. URL https: //arxiv.org/abs/2010.16326.
|
| 303 |
+
|
| 304 |
+
[23] John Langford and John Shawe-Taylor. Pac-bayes & margins. Advances in neural information processing systems, pages 439–446, 2003.
|
| 305 |
+
|
| 306 |
+
[24] Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
|
| 307 |
+
|
| 308 |
+
[25] Renjie Liao, Raquel Urtasun, and Richard Zemel. A pac-bayesian approach to generalization bounds for graph neural networks. In ICLR, 2021.
|
| 309 |
+
|
| 310 |
+
[26] Yao Ma, Xiaorui Liu, Neil Shah, and Jiliang Tang. Is homophily a necessity for graph neural networks? arXiv preprint arXiv:2106.06134, 2021.
|
| 311 |
+
|
| 312 |
+
[27] David McAllester. Simplified pac-bayesian margin bounds. In Learning theory and Kernel machines, pages 203–215. Springer, 2003.
|
| 313 |
+
|
| 314 |
+
[28] Miller McPherson, Lynn Smith-Lovin, and James M Cook. Birds of a feather: Homophily in social networks. Annual review of sociology, 27(1):415–444, 2001.
|
| 315 |
+
|
| 316 |
+
[29] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5115–5124, 2017.
|
| 317 |
+
|
| 318 |
+
[30] Behnam Neyshabur, Srinadh Bhojanapalli, and Nathan Srebro. A pac-bayesian approach to spectrally-normalized margin bounds for neural networks. 2018.
|
| 319 |
+
|
| 320 |
+
[31] Hoang NT and Takanori Maehara. Revisiting graph neural networks: All we have is low-pass filters. arXiv preprint arXiv:1905.09550, 2019.
|
| 321 |
+
|
| 322 |
+
[32] Tahleen Rahman, Bartlomiej Surma, Michael Backes, and Yang Zhang. Fairwalk: Towards fair graph embedding. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 3289–3295. International Joint Conferences on Artificial Intelligence Organization, 7 2019. doi: 10.24963/ijcai.2019/456. URL https: //doi.org/10.24963/ijcai.2019/456.
|
| 323 |
+
|
| 324 |
+
[33] Omar Rivasplata. Subgaussian random variables: An expository note. Internet publication, PDF, 2012.
|
| 325 |
+
|
| 326 |
+
[34] Ryoma Sato. A survey on the expressive power of graph neural networks. arXiv preprint arXiv:2003.04078, 2020.
|
| 327 |
+
[35] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE transactions on neural networks, 20(1):61–80, 2008.
|
| 328 |
+
[36] Franco Scarselli, Ah Chung Tsoi, and Markus Hagenbuchner. The vapnik–chervonenkis dimension of graph and recursive neural networks. Neural Networks, 108:248–259, 2018.
|
| 329 |
+
[37] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina EliassiRad. Collective classification in network data. AI magazine, 29(3):93–93, 2008.
|
| 330 |
+
[38] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. CoRR, abs/1811.05868, 2018. URL http:// arxiv.org/abs/1811.05868.
|
| 331 |
+
[39] Indro Spinelli, Simone Scardapane, Amir Hussain, and Aurelio Uncini. Biased edge dropout for enhancing fairness in graph representation learning, 2021.
|
| 332 |
+
[40] Joel A Tropp. An introduction to matrix concentration inequalities. Foundations and Trends in Machine Learning, 8(1-2):1–230, 2015.
|
| 333 |
+
[41] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph attention networks. In ICLR, 2018.
|
| 334 |
+
[42] Saurabh Verma and Zhi-Li Zhang. Stability and generalization of graph convolutional neural networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1539–1548, 2019.
|
| 335 |
+
[43] Minjie Wang, Da Zheng, Zihao Ye, Quan Gan, Mufei Li, Xiang Song, Jinjing Zhou, Chao Ma, Lingfan Yu, Yu Gai, et al. Deep graph library: A graph-centric, highly-performant package for graph neural networks. arXiv preprint arXiv:1909.01315, 2019.
|
| 336 |
+
[44] Duncan J Watts and Steven H Strogatz. Collective dynamics of ‘small-world’networks. nature, 393(6684):440–442, 1998.
|
| 337 |
+
[45] Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. Simplifying graph convolutional networks. In International conference on machine learning, pages 6861–6871. PMLR, 2019.
|
| 338 |
+
[46] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and S Yu Philip. A comprehensive survey on graph neural networks. IEEE transactions on neural networks and learning systems, 2020.
|
| 339 |
+
[47] Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning, pages 40–48. PMLR, 2016.
|
| 340 |
+
[48] Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 974–983, 2018.
|
| 341 |
+
[49] Bing Yu, Haoteng Yin, and Zhanxing Zhu. Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting. In Proceedings of the 27th International Joint Conference on Artificial Intelligence, pages 3634–3640, 2018.
|
| 342 |
+
[50] Ziqian Zeng, Rashidul Islam, Kamrun Naher Keya, James R. Foulds, Yangqiu Song, and Shimei Pan. Fair representation learning for heterogeneous information networks. CoRR, abs/2104.08769, 2021. URL https://arxiv.org/abs/2104.08769.
|
| 343 |
+
[51] Wenda Zhou, Victor Veitch, Morgane Austern, Ryan P Adams, and Peter Orbanz. Nonvacuous generalization bounds at the imagenet scale: a pac-bayesian compression approach. In International Conference on Learning Representations, 2018.
|
md/train/BJgklhAcK7/BJgklhAcK7.md
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# META-LEARNING WITH LATENT EMBEDDING OPTIMIZATION
|
| 2 |
+
|
| 3 |
+
Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero & Raia Hadsell
|
| 4 |
+
|
| 5 |
+
DeepMind, London, UK {andreirusu, dushyantr, sygi, vinyals, razp, osindero, raia}@google.com
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Gradient-based meta-learning techniques are both widely applicable and proficient at solving challenging few-shot learning and fast adaptation problems. However, they have practical difficulties when operating on high-dimensional parameter spaces in extreme low-data regimes. We show that it is possible to bypass these limitations by learning a data-dependent latent generative representation of model parameters, and performing gradient-based meta-learning in this lowdimensional latent space. The resulting approach, latent embedding optimization (LEO), decouples the gradient-based adaptation procedure from the underlying high-dimensional space of model parameters. Our evaluation shows that LEO can achieve state-of-the-art performance on the competitive miniImageNet and tieredImageNet few-shot classification tasks. Further analysis indicates LEO is able to capture uncertainty in the data, and can perform adaptation more effectively by optimizing in latent space.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Humans have a remarkable ability to quickly grasp new concepts from a very small number of examples or a limited amount of experience, leveraging prior knowledge and context. In contrast, traditional deep learning approaches (LeCun et al., 2015; Schmidhuber, 2015) treat each task independently and hence are often data inefficient – despite providing significant performance improvements across the board, such as for image classification (Simonyan & Zisserman, 2014; He et al., 2016), reinforcement learning (Mnih et al., 2015; Silver et al., 2017), and machine translation (Cho et al., 2014; Sutskever et al., 2014). Just as humans can efficiently learn new tasks, it is desirable for learning algorithms to quickly adapt to and incorporate new and unseen information.
|
| 14 |
+
|
| 15 |
+
Few-shot learning tasks challenge models to learn a new concept or behaviour with very few examples or limited experience (Fei-Fei et al., 2006; Lake et al., 2011). One approach to address this class of problems is meta-learning, a broad family of techniques focused on learning how to learn or to quickly adapt to new information. More specifically, optimization-based meta-learning approaches (Ravi & Larochelle, 2017; Finn et al., 2017) aim to find a single set of model parameters that can be adapted with a few steps of gradient descent to individual tasks. However, using only a few samples (typically 1 or 5) to compute gradients in a high-dimensional parameter space could make generalization difficult, especially under the constraint of a shared starting point for task-specific adaptation.
|
| 16 |
+
|
| 17 |
+
In this work we propose a new approach, named Latent Embedding Optimization (LEO), which learns a low-dimensional latent embedding of model parameters and performs optimization-based meta-learning in this space. Intuitively, the approach provides two advantages. First, the initial parameters for a new task are conditioned on the training data, which enables a task-specific starting point for adaptation. By incorporating a relation network into the encoder, this initialization can better consider the joint relationship between all of the input data. Second, by optimizing in the lower-dimensional latent space, the approach can adapt the behaviour of the model more effectively. Further, by allowing this process to be stochastic, the ambiguities present in the few-shot data regime can be expressed.
|
| 18 |
+
|
| 19 |
+
We demonstrate that LEO achieves state-of-the-art results on both the miniImageNet and tieredImageNet datasets, and run an ablation study and further analysis to show that both conditional parameter generation and optimization in latent space are critical for the success of the method. Source code for our experiments is available at https://github.com/deepmind/leo.
|
| 20 |
+
|
| 21 |
+
# 2 MODEL
|
| 22 |
+
|
| 23 |
+
# 2.1 PROBLEM DEFINITION
|
| 24 |
+
|
| 25 |
+
We define the $N$ -way $K$ -shot problem using the episodic formulation of Vinyals et al. (2016). Each task instance $\mathcal { T } _ { i }$ is a classification problem sampled from a task distribution $p ( \mathcal { T } )$ . The tasks are divided into a training meta-set $\mathcal { S } ^ { t \bar { r } }$ , validation meta-set $S ^ { v a l }$ , and test meta-set $\mathcal { S } ^ { t e s t }$ , each with a disjoint set of target classes (i.e., a class seen during testing is not seen during training). The validation meta-set is used for model selection, and the testing meta-set is used only for final evaluation.
|
| 26 |
+
|
| 27 |
+
Each task instance $\begin{array} { r } { T _ { i } \sim p \left( T \right) } \end{array}$ is composed of a training set $\mathcal { D } ^ { t r }$ and validation set $\mathcal { D } ^ { v a l }$ , and only contains $N$ classes randomly selected from the appropriate meta-set (e.g. for a task instance in the training meta-set, the classes are a subset of those available in ${ \mathcal { S } } ^ { t r }$ ). In most setups, the training set $\check { \mathcal { D } ^ { t r } } = \left\{ ( \mathbf { x } _ { n } ^ { k } , y _ { n } ^ { k } ) \ | \ k = 1 \ldots K ; n = 1 \ldots N \right\}$ contains $K$ samples for each class. The validation set $\mathcal { D } ^ { v a l }$ can contain several other samples from the same classes, providing an estimate of generalization performance on the $N$ classes for this problem instance. We note that the validation set of a problem instance $\mathcal { D } ^ { v a l }$ (used to optimize a meta-learning objective) should not be confused with the held-out validation meta-set $S ^ { v a \hat { l } }$ (used for model selection).
|
| 28 |
+
|
| 29 |
+
# 2.2 MODEL-AGNOSTIC META-LEARNING
|
| 30 |
+
|
| 31 |
+
Model-agnostic meta-learning (MAML) (Finn et al., 2017) is an approach to optimization-based meta-learning that is related to our work. For some parametric model $f _ { \theta }$ , MAML aims to find a single set of parameters $\theta$ which, using a few optimization steps, can be successfully adapted to any novel task sampled from the same distribution. For a particular task instance $\mathcal { T } _ { i } \dot { ~ } = ( \dot { \mathcal { D } } ^ { t r } , \mathcal { D } ^ { v a l } )$ , the parameters are adapted to task-specific model parameters $\theta _ { i } ^ { \prime }$ by applying some differentiable function, typically an update rule of the form:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\begin{array} { r } { \theta _ { i } ^ { \prime } = \mathcal { G } \left( \boldsymbol { \theta } , \mathcal { D } ^ { t r } \right) , } \end{array}
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $\mathcal { G }$ is typically implemented as a step of gradient descent on the few-shot training set $\mathcal { D } ^ { t r }$ , $\theta _ { i } ^ { \prime } = \theta - \alpha \nabla _ { \theta } \mathcal { L } _ { T _ { i } } ^ { t r } \left( \mathbf { \bar { \it f } } _ { \theta } \right)$ . Generally, multiple sequential adaptation steps can be applied. The learning rate $\alpha$ can also be meta-learned concurrently, in which case we refer to this algorithm as MetaSGD (Li et al., 2017). During meta-training, the parameters $\theta$ are updated by back-propagating through the adaptation procedure, in order to reduce errors on the validation set $\dot { \mathcal { D } } ^ { v a l }$ :
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\theta \theta - \eta \nabla _ { \theta } \sum _ { \mathcal { T } _ { i } \sim p ( \mathcal { T } ) } \mathcal { L } _ { \mathcal { T } _ { i } } ^ { v a l } ( f _ { \theta _ { i } ^ { \prime } } )
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
The approach includes the main ingredients of optimization-based meta-learning with neural networks: initialization is done by maintaining an explicit set of model parameters $\theta$ ; the adaptation procedure, or “inner loop”, takes $\theta$ as input and returns $\theta _ { i } ^ { \prime }$ adapted specifically for task instance $\mathcal { T } _ { i }$ , by iteratively using gradient descent (Eq. 1); and termination, which is handled simply by choosing a fixed number of optimization steps in the “inner loop”. MAML updates $\theta$ by differentiating through the “inner loop” in order to minimize errors of instance-specific adapted models $f _ { \theta _ { i } ^ { \prime } }$ on the corresponding validation set (Eq. 2). We refer to this process as the “outer loop” of meta-learning. In the next section we use the same stages to describe Latent Embedding Optimization (LEO).
|
| 44 |
+
|
| 45 |
+
# 2.3 LATENT EMBEDDING OPTIMIZATION FOR META-LEARNING
|
| 46 |
+
|
| 47 |
+
The primary contribution of this paper is to show that it is possible, and indeed beneficial, to decouple optimization-based meta-learning techniques from the high-dimensional space of model parameters. We achieve this by learning a stochastic latent space with an information bottleneck, conditioned on the input data, from which the high-dimensional parameters are generated.
|
| 48 |
+
|
| 49 |
+
# Algorithm 1 Latent Embedding Optimization
|
| 50 |
+
|
| 51 |
+
Require: Training meta-set $S ^ { t r } \in \mathcal { T }$
|
| 52 |
+
Require: Learning rates $\alpha$ , $\eta$
|
| 53 |
+
1: Randomly initialize $\phi _ { e } , \phi _ { r } , \phi _ { d }$
|
| 54 |
+
2: Let $\phi = \{ \phi _ { e } , \phi _ { r } , \phi _ { d } , \alpha \}$
|
| 55 |
+
3: while not converged do
|
| 56 |
+
4: for number of tasks in batch do
|
| 57 |
+
5: Sample task instance $\mathcal { T } _ { i } \sim \mathcal { S } ^ { t r }$
|
| 58 |
+
6: Let $\left( \hat { \mathcal { D } } ^ { t r } , \mathcal { D } ^ { v a l } \right) = \mathcal { T } _ { i }$
|
| 59 |
+
7: Encode Dtr to z using gφe and gφr
|
| 60 |
+
8: Decode z to initial params θi using gφd
|
| 61 |
+
9: Initialize $\mathbf { z } ^ { \prime } = \mathbf { z }$ , $\theta _ { i } ^ { \prime } = \theta _ { i }$
|
| 62 |
+
10: for number of adaptation steps do
|
| 63 |
+
11: Compute training loss $\mathcal { L } _ { T _ { i } } ^ { t \hat { r } } \left( f _ { \theta _ { i } ^ { \prime } } \right)$
|
| 64 |
+
12: Perform gradient step w.r.t. $\mathbf { z } ^ { \prime }$ :
|
| 65 |
+
$\mathbf { z } ^ { \prime } \mathbf { z } ^ { \prime } - \alpha \nabla _ { \mathbf { z } ^ { \prime } } \mathcal { L } _ { T _ { i } } ^ { t r } ( f _ { \boldsymbol { \theta } _ { i } ^ { \prime } } )$
|
| 66 |
+
13: Decode $\mathbf { z } ^ { \prime }$ to obtain $\theta _ { i } ^ { \prime }$ using $g _ { \phi _ { d } }$
|
| 67 |
+
14: end for
|
| 68 |
+
15: Compute validation loss $\mathcal { L } _ { \mathcal { T } _ { i } } ^ { v a l } \left( f _ { \theta _ { i } ^ { \prime } } \right)$
|
| 69 |
+
16: end for
|
| 70 |
+
17: Perform gradient step w.r.t $\phi$ :
|
| 71 |
+
$\begin{array} { r l } { \phi \phi - \eta \nabla _ { \phi } \sum _ { T _ { i } } \hat { \mathcal { L } } _ { T _ { i } } ^ { v a l } \big ( \dot { f } _ { \theta _ { i } ^ { \prime } } \big ) } & { { } } \end{array}$
|
| 72 |
+
|
| 73 |
+
18: end while
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 1: High-level intuition for LEO. While MAML operates directly in a high dimensional parameter space $\Theta$ , LEO performs meta-learning within a low-dimensional latent space $\mathcal { Z }$ , from which the parameters are generated.
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
Figure 2: Overview of the architecture of LEO.
|
| 80 |
+
|
| 81 |
+
Instead of explicitly instantiating and maintaining a unique set of model parameters $\theta$ , as in MAML, we learn a generative distribution of model parameters which serves the same purpose. This is a natural extension: we relax the requirement of finding a single optimal $\theta ^ { \ast } \in \Theta$ to that of approximating a data-dependent conditional probability distribution over $\Theta$ , which can be more expressive. The choice of architecture, composed of an encoding process, and decoding (or parameter generation) process, enables us to perform the MAML gradient-based adaptation steps (or “inner loop”) in the learned, low-dimensional embedding space of the parameter generative model (Figure 1).
|
| 82 |
+
|
| 83 |
+
# 2.3.1 MODEL OVERVIEW
|
| 84 |
+
|
| 85 |
+
The high-level operation is then as follows (Algorithm 1). First, given a task instance $\mathcal { T } _ { i }$ , the inputs $\{ \mathbf { x } _ { n } ^ { k } \}$ are passed through a stochastic encoder to produce a latent code $\mathbf { z }$ , which is then decoded to parameters $\theta _ { i }$ using a parameter generator1. Given these instantiated model parameters, one or more adaptation steps are applied in the latent space, by differentiating the loss with respect to $\mathbf { z }$ , taking a gradient step to get $\mathbf { z } ^ { \prime }$ , decoding new model parameters, and obtaining the new loss. Finally, optimized codes are decoded to produce the final adapted parameters $\theta _ { i } ^ { \prime }$ , which can be used to perform the task, or compute the task-specific meta-loss. In this way, LEO incorporates aspects of model-based and optimization-based meta-learning, producing parameters that are first conditioned on the input data and then adapted by gradient descent.
|
| 86 |
+
|
| 87 |
+
Figure 2 shows the architecture of the resulting network. Intuitively, the decoder is akin to a generative model, mapping from a low-dimensional latent code to a distribution over model parameters. The encoding process ensures that the initial latent code and parameters before gradient-based adaptation are already data-dependent. This encoding process also exploits a relation network that allows the latent code to be context-dependent, considering the pairwise relationship between all classes in the problem instance. In the following sections, we explain the LEO procedure more formally.
|
| 88 |
+
|
| 89 |
+
# 2.3.2 INITIALIZATION: GENERATING PARAMETERS CONDITIONED ON A FEW EXAMPLES
|
| 90 |
+
|
| 91 |
+
The first stage is to instantiate the model parameters that will be adapted to each task instance. Whereas MAML explicitly maintains a single set of model parameters, LEO utilises a datadependent latent encoding which is then decoded to generate the actual initial parameters. In what follows, we describe an encoding scheme which leverages a relation network to map the few-shot examples into a single latent vector. This design choice allows the approach to consider context when producing a parameter initialization. Intuitively, decision boundaries required for fine-grained distinctions between similar classes might need to be different from those for broader classification.
|
| 92 |
+
|
| 93 |
+
Encoding The encoding process involves a simple feed-forward mapping of each data point, followed by a relation network that considers the pair-wise relationship between the data in the problem instance. The overall encoding process is defined in Eq. 3, and proceeds as follows. First, each example from a problem instance $\mathcal { T } _ { i } = \left( \mathcal { D } ^ { t r } , \mathcal { D } ^ { v a l } \right) \sim \dot { \mathbf { \sigma } } p \left( \mathcal { T } \right)$ is processed by an encoder network $g _ { \phi _ { e } } : \mathcal { R } ^ { n _ { x } } \mathcal { R } ^ { n _ { h } }$ , which maps from input space to a code in an intermediate hidden-layer code space $\mathcal { H }$ . Then, codes in $\mathcal { H }$ corresponding to different training examples are concatenated pair-wise (resulting in $( N K ) ^ { 2 }$ pairs in the case of $K$ -shot classification) and processed by a relation network $g _ { \phi _ { r } }$ , in a similar fashion to Oreshkin et al. (2018) and Sung et al. (2017). The $( N K ) ^ { 2 }$ outputs are grouped by class and averaged within each group to obtain the $( 2 \times N )$ parameters of a probability distribution in a low-dimensional space $\mathcal { Z } = \mathcal { R } ^ { n _ { z } }$ , where $n _ { z } \ll \dim ( \theta )$ , for each of the $N$ classes.
|
| 94 |
+
|
| 95 |
+
Thus, given the $K$ -shot training samples corresponding to a class $n$ : $\mathcal { D } _ { n } ^ { t r } ~ = ~ \left\{ \left( \mathbf { x } _ { n } ^ { k } , y _ { n } ^ { k } \right) ~ \vert ~ k ~ = ~ \right.$ $1 \ldots K \}$ the encoder $g _ { \phi _ { e } }$ and relation network $g _ { \phi _ { r } }$ together parameterize a class-conditional multivariate Gaussian distribution with a diagonal covariance, which we can sample from in order to output a class-dependent latent code $\mathbf { z } _ { n } \in { \mathcal { Z } }$ as follows:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\begin{array} { c } { { \displaystyle { \pmb { \mu } } _ { n } ^ { e } , { \pmb \sigma } _ { n } ^ { e } = \frac 1 { N K ^ { 2 } } \sum _ { k _ { n } = 1 } ^ { K } \sum _ { m = 1 } ^ { N } \sum _ { k _ { m } = 1 } ^ { K } g _ { \phi _ { r } } \left( g _ { \phi _ { e } } \left( \mathbf { x } _ { n } ^ { k _ { n } } \right) , g _ { \phi _ { e } } \left( \mathbf { x } _ { m } ^ { k _ { m } } \right) \right) } } \\ { { \mathbf { z } _ { n } \sim q \left( \mathbf { z } _ { n } | \mathcal { D } _ { n } ^ { t r } \right) = \mathcal { N } \left( \mu _ { n } ^ { e } , d i a g ( { \pmb \sigma } _ { n } ^ { e 2 } ) \right) } } \end{array}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Intuitively, the encoder and relation network define a stochastic mapping from one or more class examples to a single code in the latent embedding space $\mathcal { Z }$ corresponding to that class. The final latent code can be obtained as the concatenation of class-dependent codes: ${ \bf z } = [ { \bf z } _ { 1 } , { \bf z } _ { 2 } , \ldots , { \bf z } _ { N } ]$ .
|
| 102 |
+
|
| 103 |
+
Decoding Without loss of generality, for few-shot classification, we can use the class-specific latent codes to instantiate just the top layer weights of the classifier. This allows the meta-learning in latent space to modulate the important high-level parameters of the classifier, without requiring the generator to produce very high-dimensional parameters. In this case, $f _ { \theta _ { i } ^ { \prime } }$ is a $N$ -way linear softmax classifier, with model parameters $\theta _ { i } ^ { \prime } = \left\{ \mathbf { w } _ { n } \mid n = 1 \ldots N \right\}$ , and each $\mathbf { x } _ { n } ^ { k }$ can be either the raw input or some learned representation2. Then, given the latent codes $\mathbf { z } _ { n } \in \mathcal { Z } , n = 1 \ldots N$ , the decoder function $g _ { \phi _ { d } } \colon { \mathcal { Z } } \to \Theta$ is used to parameterize a Gaussian distribution with diagonal covariance in model parameter space $\Theta$ , from which we can sample class-dependent parameters ${ \bf w } _ { n }$ :
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\begin{array} { c } { \mu _ { n } ^ { d } , { \pmb \sigma } _ { n } ^ { d } = g _ { \phi _ { d } } \left( \mathbf { z } _ { n } \right) } \\ { \mathbf { w } _ { n } \sim p \left( \mathbf { w } | \mathbf { z } _ { n } \right) = \mathcal { N } \left( \pmb { \mu } _ { n } ^ { d } , d i a g ( { \pmb \sigma } _ { n } ^ { d } ^ { 2 } ) \right) } \end{array}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
In other words, codes $\mathbf { z } _ { n }$ are mapped independently to the top-layer parameters $\theta _ { i }$ of a softmax classifier using the decoder $g _ { \phi _ { d } }$ , which is essentially a stochastic generator of model parameters.
|
| 110 |
+
|
| 111 |
+
# 2.3.3 ADAPTATION BY LATENT EMBEDDING OPTIMIZATION (LEO) (THE “INNER LOOP”)
|
| 112 |
+
|
| 113 |
+
Given the decoded parameters, we can then define the “inner loop” classification loss using the cross-entropy function, as follows:
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\mathcal { L } _ { \mathcal { T } _ { i } } ^ { t r } \left( f _ { \theta _ { i } } \right) = \sum _ { ( \mathbf { x } , y ) \in \mathcal { D } ^ { t r } } \bigg [ - \mathbf { w } _ { y } \cdot \mathbf { x } + \log \Big ( \sum _ { j = 1 } ^ { N } e ^ { \mathbf { w } _ { j } \cdot \mathbf { x } } \Big ) \bigg ]
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
It is important to note that the decoder $g _ { \phi _ { d } }$ is a differentiable mapping between the latent space $\mathcal { Z }$ and the higher-dimensional model parameter space $\Theta$ . Primarily, this allows gradient-based optimization of the latent codes with respect to the training loss, with ${ \bf z } _ { n } ^ { \prime } = { \bf z } _ { n } - \alpha \nabla _ { { \bf z } _ { n } } \mathcal { L } _ { T _ { i } } ^ { t r }$ . The decoder $g _ { \phi _ { d } }$ will convert adapted latent codes $\mathbf { z } _ { n } ^ { \prime }$ to effective model parameters $\theta _ { i } ^ { \prime }$ for each adaptation step, which can be repeated several times, as in Algorithm 1. In addition, by backpropagating errors through the decoder, the encoder and relation net can learn to provide a data-conditioned latent encoding $\mathbf { z }$ that produces an appropriate initialization point $\theta _ { i }$ for the classifier model.
|
| 120 |
+
|
| 121 |
+
# 2.3.4 META-TRAINING STRATEGY (THE “OUTER LOOP”)
|
| 122 |
+
|
| 123 |
+
For each task instance $\mathcal { T } _ { i }$ , the initialization and adaptation procedure produce a new classifier $f _ { \theta _ { i } ^ { \prime } }$ tailored to the training set $\mathcal { D } ^ { t r }$ of the instance, which we can then evaluate on the validation set of that instance $\mathcal { D } ^ { v a l }$ . During meta-training we use that evaluation to differentiate through the “inner loop” and update the encoder, relation, and decoder network parameters: $\phi _ { e }$ , $\phi _ { r }$ , and $\phi _ { d }$ . Meta-training is performed by minimizing the following objective:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\operatorname* { m i n } _ { \phi _ { c } , \phi _ { r } , \phi _ { d } } \sum _ { T _ { i } \sim p ( T ) } \left[ \mathcal { L } _ { T _ { i } } ^ { v a l } \left( f _ { \theta _ { i } ^ { \prime } } \right) + \beta D _ { K L } \left( q ( \mathbf { z } _ { n } | \mathcal { D } _ { n } ^ { t r } ) | | p ( \mathbf { z } _ { n } ) \right) + \gamma | | \mathrm { s t o p g r a d } ( \mathbf { z } _ { n } ^ { \prime } ) - \mathbf { z } _ { n } | | _ { 2 } ^ { 2 } \right] + R ( \mathbf { z } _ { n } | \mathbf { z } _ { n } ) ,
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $p ( \mathbf { z } _ { n } ) = \mathcal { N } ( 0 , \mathcal { T } )$ . Similar to the loss defined in (Higgins et al., 2017) we use a weighted KL-divergence term to regularize the latent space and encourage the generative model to learn a disentangled embedding, which should also simplify the LEO “inner loop” by removing correlations between latent space gradient dimensions. The third term in Eq. (6) encourages the encoder and relation net to output a parameter initialization that is close to the adapted code, thereby reducing the load of the adaptation procedure if possible.
|
| 130 |
+
|
| 131 |
+
$L _ { 2 }$ regularization was used with all weights of the model, as well as a soft, layer-wise orthogonality constraint on decoder network weights, which encourages the dimensions of the latent code as well as the decoder network to be maximally expressive. In the case of linear encoder, relation, and decoder networks, and assuming that $\mathcal { C } _ { d }$ is the correlation matrix between rows of $\phi _ { d }$ , then the regularization term takes the following form:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
R = \lambda _ { 1 } \Big ( | | \phi _ { e } | | _ { 2 } ^ { 2 } + | | \phi _ { r } | | _ { 2 } ^ { 2 } + | | \phi _ { d } | | _ { 2 } ^ { 2 } \Big ) + \lambda _ { 2 } | | \mathcal { C } _ { d } - \mathcal { T } | | _ { 2 }
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
# 2.3.5 BEYOND CLASSIFICATION AND LINEAR OUTPUT LAYERS
|
| 138 |
+
|
| 139 |
+
Thus far we have used few-shot classification as a working example to highlight our proposed method, and in this domain we generate only a single linear output layer. However, our approach can be applied to any model $f _ { \theta _ { i } }$ which maps observations to outputs, e.g. a nonlinear MLP or LSTM, by using a single latent code $\mathbf { z }$ to generate the entire parameter vector $\theta _ { i }$ with an appropriate decoder. In the general case, $\mathbf { z }$ is conditioned on $\mathcal { D } ^ { t r }$ by passing both inputs and labels to the encoder. Furthermore, the loss $\mathcal { L } _ { T _ { i } }$ is not restricted to be a classification loss, and can be replaced by any differentiable loss function which can be computed on $\mathcal { D } ^ { t r }$ and $\mathcal { D } ^ { v a l }$ sets of a task instance $\mathcal { T } _ { i }$ .
|
| 140 |
+
|
| 141 |
+
# 3 RELATED WORK
|
| 142 |
+
|
| 143 |
+
The problem of few-shot adaptation has been approached in the context of fast weights (Hinton & Plaut, 1987; Ba et al., 2016), learning-to-learn (Schmidhuber, 1987; Thrun & Pratt, 1998; Hochreiter et al., 2001; Andrychowicz et al., 2016), and through meta-learning. Many recent approaches to meta-learning can be broadly categorized as metric-based methods, which focus on learning similarity metrics for members of the same class (e.g. Koch et al., 2015; Vinyals et al., 2016; Snell et al.,
|
| 144 |
+
|
| 145 |
+
2017); memory-based methods, which exploit memory architectures to store key training examples or directly encode fast adaptation algorithms (e.g. Santoro et al., 2016; Ravi & Larochelle, 2017); and optimization-based methods, which search for parameters that are conducive to fast gradientbased adaptation to new tasks (e.g. Finn et al., 2017; 2018).
|
| 146 |
+
|
| 147 |
+
Related work has also explored the use of one neural network to produce (some fraction of) the parameters of another (Ha et al., 2016; Krueger et al., 2017), with some approaches focusing on the goal of fast adaptation. Munkhdalai et al. (2017) meta-learn an algorithm to change additive biases across deep networks conditioned on the few-shot training samples. In contrast, Gidaris & Komodakis (2018) use an attention kernel to output class conditional mixing of linear output weights for novel categories, starting from a pre-trained deep model. Qiao et al. (2017) learn to output top linear layer parameters from the activations provided by a pre-trained feature embedding, but they do not make use of gradient-based adaptation. None of the aforementioned approaches to fast adaptation explicitly learn a probability distribution over model parameters, or make use of latent variable generative models to characterize it.
|
| 148 |
+
|
| 149 |
+
Approaches which use optimization-based meta-learning include MAML (Finn et al., 2017) and REPTILE (Nichol & Schulman, 2018). While MAML backpropagates the meta-loss through the “inner loop”, REPTILE simplifies the computation by incorporating an $L _ { 2 }$ loss which updates the meta-model parameters towards the instance-specific adapted models. These approaches use the full, high-dimensional set of model parameters within the “inner loop”, while Lee & Choi (2018) learn a layer-wise subspace in which to use gradient-based adaptation. However, it is not clear how these methods scale to large expressive models such as residual networks (especially given the uncertainty in the few-shot data regime), since MAML is prone to overfitting (Mishra et al., 2018). Recognizing this issue, Zhou et al. (2018) train a deep input representation, or “concept space”, and use it as input to an MLP meta-learner, but perform gradient-based adaptation directly in its parameter space, which is still comparatively high-dimensional. As we will show, performing adaptation in latent space to generate a simple linear layer can lead to superior generalization.
|
| 150 |
+
|
| 151 |
+
Probabilistic meta-learning approaches such as those of Bauer et al. (2017) and Grant et al. (2018) have shown the advantages of learning Gaussian posteriors over model parameters. Concurrently with our work, Kim et al. (2018) and Finn et al. (2018) propose probabilistic extensions to MAML that are trained using a variational approximation, using simple posteriors. However, it is not immediately clear how to extend them to more complex distributions with a more diverse set of tasks. Other concurrent works have introduced deep parameter generators (Lacoste et al., 2018; Wu et al., 2018) that can better capture a wider distribution of model parameters, but do not employ gradientbased adaptation. In contrast, our approach employs both a generative model of parameters, and adaptation in a low-dimensional latent space, aided by a data-dependent initialization.
|
| 152 |
+
|
| 153 |
+
Finally, recently proposed Neural Processes (Garnelo et al., 2018a;b) bear similarity to our work: they also learn a mapping to and from a latent space that can be used for few-shot function estimation. However, coming from a Gaussian processes perspective, their work does not perform “inner loop” adaptation and is trained by optimizing a variational objective.
|
| 154 |
+
|
| 155 |
+
# 4 EVALUATION
|
| 156 |
+
|
| 157 |
+
We evaluate the proposed approach on few-shot regression and classification tasks. This evaluation aims to answer the following key questions: (1) Is LEO capable of modeling a distribution over model parameters when faced with uncertainty? (2) Can LEO learn from multimodal task distributions and is this reflected in ambiguous problem instances, where multiple distinct solutions are possible? (3) Is LEO competitive on large-scale few-shot learning benchmarks?
|
| 158 |
+
|
| 159 |
+
# 4.1 FEW-SHOT REGRESSION
|
| 160 |
+
|
| 161 |
+
To answer the first two questions we adopt the simple regression task of Finn et al. (2018). 1D regression problems are generated in equal proportions using either a sine wave with random amplitude and phase, or a line with random slope and intercept. Inputs are sampled randomly, creating a multimodal task distribution. Crucially, random Gaussian noise with standard deviation 0.3 is added to regression targets. Coupled with the small number of training samples (5-shot), the task is challenging for 2 main reasons: (1) learning a distribution over models becomes necessary, in order to account for the uncertainty introduced by noisy labels; (2) problem instances may be likely under both modes: in some cases a sine wave may fit the data as well as a line. Faced with such ambiguity, learning a generative distribution of model parameters should allow several different likely models to be sampled, in a similar way to how generative models such as VAEs can capture different modes of a multimodal data distribution.
|
| 162 |
+
|
| 163 |
+
We used a 3-layer MLP as the underlying model architecture of $f _ { \theta }$ , and we produced the entire parameter tensor $\theta$ with the LEO generator, conditionally on $D ^ { t r }$ , the few-shot training inputs concatenated with noisy labels. For further details, see Appendix A.
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 3: Meta-learning with LEO of a multimodal task distribution with sines and lines, using 5-shot regression with noisy targets. Our model outputs a distribution of possible solutions, which is also multimodal in ambiguous cases. True regression targets are plotted in black, while the 5 training examples are highlighted with red circles and vertical dashed lines. Several samples from our model are plotted with dotted lines (best seen in color).
|
| 167 |
+
|
| 168 |
+
In Figure 3 we show samples from a single model trained on noisy sines and lines, with true regression targets in black and training samples marked with red circles and vertical dashed lines. Plots (a) and (b) illustrate how LEO captures some of the uncertainty in ambiguous problem instances within each mode, especially in parts of the input space far from any training samples. Conversely, in parts which contain data, models fit the regression target well. Interestingly, when both sines and lines could explain the data, as shown in panels (c) and (d), we see that LEO can sample very different models, from both families, reflecting its ability to represent parametric uncertainty appropriately.
|
| 169 |
+
|
| 170 |
+
# 4.2 FEW-SHOT CLASSIFICATION
|
| 171 |
+
|
| 172 |
+
In order to answer the final question we scale up our approach to 1-shot and 5-shot classification problems defined using two commonly used ImageNet subsets.
|
| 173 |
+
|
| 174 |
+
# 4.2.1 DATASETS
|
| 175 |
+
|
| 176 |
+
The miniImageNet dataset (Vinyals et al., 2016) is a subset of 100 classes selected randomly from the ILSVRC-12 dataset (Russakovsky et al., 2014) with 600 images sampled from each class. Following the split proposed by Ravi & Larochelle (2017), the dataset is divided into training, validation, and test meta-sets, with 64, 16, and 20 classes respectively.
|
| 177 |
+
|
| 178 |
+
The tieredImageNet dataset (Ren et al., 2018) is a larger subset of ILSVRC-12 with 608 classes (779,165 images) grouped into 34 higher-level nodes in the ImageNet human-curated hierarchy (Deng et al., 2009a). This set of nodes is partitioned into 20, 6, and 8 disjoint sets of training, validation, and testing nodes, and the corresponding classes form the respective meta-sets. As argued in Ren et al. (2018), this split near the root of the ImageNet hierarchy results in a more challenging, yet realistic regime with test classes that are less similar to training classes.
|
| 179 |
+
|
| 180 |
+
# 4.2.2 PRE-TRAINED FEATURES
|
| 181 |
+
|
| 182 |
+
Two potential difficulties of using LEO to instantiate parameters with a generator network are: (1) modeling distributions over very high-dimensional parameter spaces; and (2) requiring metalearning (and hence, gradient computation in the inner loop) to be performed with respect to a high-dimensional input space. We address these issues by pre-training a visual representation of the data and then using the generator to instantiate the parameters for the final layer - a linear softmax classifier operating on this representation. We train a 28-layer Wide Residual Network (WRN-28- 10) (Zagoruyko & Komodakis, 2016a) with supervised classification using only data and classes from the training meta-set. Recent state-of-the-art approaches use the penultimate layer representation (Zhou et al., 2018; Qiao et al., 2017; Bauer et al., 2017; Gidaris & Komodakis, 2018); however, we choose the intermediate feature representation in layer 21, given that higher layers tend to specialize to the training distribution (Yosinski et al., 2014). For details regarding the training, evaluation, and network architectures, see Appendix B.
|
| 183 |
+
|
| 184 |
+
# 4.2.3 FINE-TUNING
|
| 185 |
+
|
| 186 |
+
Following the LEO adaptation procedure (Algorithm 1) we also use fine-tuning3 by performing a few steps of gradient-based adaptation directly in parameter space using the few-shot set $\mathcal { D } ^ { t r }$ . This is similar to the adaptation procedure of MAML, or Meta-SGD (Li et al., 2017) when the learning rates are learned, with the important difference that starting points of fine-tuning are custom generated by LEO for every task instance $\mathcal { T } _ { i }$ . Empirically, we find that fine-tuning applies a very small change to the parameters with only a slight improvement in performance on supervised classification tasks.
|
| 187 |
+
|
| 188 |
+
# 4.3 RESULTS
|
| 189 |
+
|
| 190 |
+
<table><tr><td>Model</td><td colspan="2">miniImageNet test accuracy</td></tr><tr><td></td><td>1-shot</td><td>5-shot</td></tr><tr><td>Matching networks (Vinyals et al.,2016) Meta-learnerLSTM(Ravi &Larochelle,2017)</td><td>43.56± 0.84% 43.44±0.77%</td><td>55.31±0.73%</td></tr><tr><td>MAML (Finn et al.,2017)</td><td></td><td>60.60 ± 0.71%</td></tr><tr><td></td><td>48.70±1.84%</td><td>63.11 ± 0.92%</td></tr><tr><td>LLAMA (Grant et al.,2018) REPTILE (Nichol & Schulman,2018)</td><td>49.40 ± 1.83%</td><td></td></tr><tr><td>PLATIPUS (Finn et al., 2018)</td><td>49.97 ±0.32% 50.13 ±1.86%</td><td>65.99 ± 0.58%</td></tr><tr><td>Meta-SGD (our features)</td><td>54.24±0.03%</td><td></td></tr><tr><td>SNAIL (Mishra et al.,2018)</td><td>55.71 ±0.99%</td><td>70.86 ± 0.04%</td></tr><tr><td>(Gidaris & Komodakis,2018)</td><td></td><td>68.88 ±0.92%</td></tr><tr><td>(Bauer et al.,2017)</td><td>56.20±0.86%</td><td>73.00 ± 0.64%</td></tr><tr><td>(Munkhdalai et al.,2017)</td><td>56.30 ±0.40%</td><td>73.90 ± 0.30%</td></tr><tr><td>DEML+Meta-SGD (Zhou et al.,2018) 4</td><td>57.10±0.70%</td><td>70.04± 0.63%</td></tr><tr><td></td><td>58.49 ± 0.91%</td><td>71.28 ± 0.69%</td></tr><tr><td>TADAM(Oreshkin et al.,2018)</td><td>58.50±0.30%</td><td>76.70±0.30%</td></tr><tr><td>(Qiao et al., 2017)</td><td>59.60 ± 0.41%</td><td>73.74± 0.19%</td></tr><tr><td>LEO (ours)</td><td>61.76 ±0.08%</td><td>77.59 ±0.12%</td></tr><tr><td rowspan="2">Model</td><td>tieredImageNet test accuracy</td><td></td></tr><tr><td>1-shot</td><td>5-shot</td></tr><tr><td rowspan="4">MAML(deeper net,evaluated in Liu et al.(2018)) Prototypical Nets (Ren et al.,2018) Relation Net (evaluated in Liu et al. (2018)) Transductive Prop.Nets (Liu et al.,2018)</td><td>51.67 ± 1.81%</td><td>70.30 ± 0.08%</td></tr><tr><td>53.31± 0.89%</td><td>72.69 ±0.74%</td></tr><tr><td>54.48 ± 0.93%</td><td>71.32 ± 0.78%</td></tr><tr><td>57.41 ± 0.94%</td><td>71.55 ± 0.74%</td></tr><tr><td rowspan="2">Meta-SGD (our features) LEO (ours)</td><td>62.95±0.03%</td><td>79.34± 0.06%</td></tr><tr><td>66.33 ± 0.05%</td><td>81.44 ±0.09%</td></tr></table>
|
| 191 |
+
|
| 192 |
+
Table 1: Test accuracies on miniImageNet and tieredImageNet. For each dataset, the first set of results use convolutional networks, while the second use much deeper residual networks, predominantly in conjuction with pre-training.
|
| 193 |
+
|
| 194 |
+
The classification accuracies for LEO and other baselines are shown in Table 1. LEO sets the new state-of-the-art performance on the 1-shot and 5-shot tasks for both miniImageNet and tieredImageNet datasets. We also evaluated LEO on the “multi-view” feature representation used by Qiao et al. (2017) with miniImageNet, which involves significant data augmentation compared to the approaches in Table 1. LEO is state-of-the-art using these features as well, with $6 3 . 9 7 \pm 0 . 2 0 \%$ and $7 9 . 4 9 \pm 0 . 7 0 \%$ test accuracies on the 1-shot and 5-shot tasks respectively.
|
| 195 |
+
|
| 196 |
+
# 4.4 ABLATION STUDY
|
| 197 |
+
|
| 198 |
+
To assess the effects of different components, we also performed an ablation study, with detailed results in Table 2. To ensure a fair comparison, all approaches begin with the same pre-trained features (Section 4.2.2). The Meta-SGD case performs gradient-based adaption directly in the parameter space in the same way as MAML, but also meta-learns the inner loop learning rate (as we do for LEO). The main approach, labeled as LEO in the table, uses a stochastic parameter generator for several steps of latent embedding optimization, followed by fine-tuning steps in parameter space (see subsection 4.2.3). All versions of LEO are at or above the previous state-of-the-art on all tasks.
|
| 199 |
+
|
| 200 |
+
Table 2: Ablation study and comparison to Meta-SGD. Unless otherwise specified, LEO stands for using the stochastic generator for latent embedding optimization followed by fine-tuning.
|
| 201 |
+
|
| 202 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">miniImageNet test accuracy</td><td colspan="2">tieredImageNet test accuracy</td></tr><tr><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>Meta-SGD (our features)</td><td>54.24 ±0.03%</td><td>70.86 ±0.04%</td><td>62.95 ±0.03%</td><td>79.34± 0.06%</td></tr><tr><td>Conditional generator only</td><td>60.33 ± 0.11%</td><td>74.53 ± 0.11%</td><td>65.17±0.15%</td><td>78.77 ± 0.03%</td></tr><tr><td>Conditional generator + fine-tuning</td><td>60.62 ± 0.31%</td><td>76.42 ±0.09%</td><td>65.74±0.28%</td><td>80.65 ±0.07%</td></tr><tr><td>Previous SOTA</td><td>59.60 ± 0.41%</td><td>76.70±0.30%</td><td>57.41 ± 0.94%</td><td>72.69 ± 0.74%</td></tr><tr><td>LEO (random prior)</td><td>61.01±0.12%</td><td>77.27±0.05%</td><td>65.39±0.10%</td><td>80.83±0.13%</td></tr><tr><td>LEO (deterministic)</td><td>61.48 ± 0.05%</td><td>76.53 ± 0.24%</td><td>66.18 ± 0.17%</td><td>82.06 ±0.08%</td></tr><tr><td>LEO (no fine-tuning)</td><td>61.62 ±0.15%</td><td>77.46 ± 0.12%</td><td>66.14± 0.17%</td><td>80.89 ± 0.11%</td></tr><tr><td>LEO (ours)</td><td>61.76 ± 0.08%</td><td>77.59±0.12%</td><td>66.33 ± 0.05%</td><td>81.44± 0.09%</td></tr></table>
|
| 203 |
+
|
| 204 |
+
The largest difference in performance is between Meta-SGD and the other cases (all of which exploit a latent representation of model parameters), indicating that the low-dimensional bottleneck is critical for this application. The “conditional generator only” case (without adaptation in latent space) yields a poorer result than LEO, and even adding fine-tuning in parameter space does not recover performance; this illustrates the efficacy of the latent adaptation procedure. The importance of the data-dependent encoding is highlighted by the “random prior” case, in which the encoding process is replaced by the prior $p ( \mathbf { z } _ { n } )$ , and performance decreases. We also find that incorporating stochasticity can be important for miniImageNet, but not for tieredImageNet, which we hypothesize is because the latter is much larger. Finally, the fine-tuning steps only yield a statistically significant improvement on the 5-shot tieredImageNet task. Thus, both the data-conditional encoding and latent space adaptation are critical to the performance of LEO.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 4: t-SNE plot of latent space codes before and after adaptation: (a) Initial codes $\mathbf { z } _ { n }$ (blue) and adapted codes $\mathbf { z } _ { n } ^ { \prime }$ (orange); (b) Same as (a) but colored by class; (c) Same as (a) but highlighting codes $\mathbf { z } _ { n }$ for validation class “Jellyfish” (left) and corresponding adapted codes $ { \mathbf { z } } _ { n } ^ { \prime }$ (right).
|
| 208 |
+
|
| 209 |
+
# 4.5 LATENT EMBEDDING VISUALIZATION
|
| 210 |
+
|
| 211 |
+
To qualitatively characterize the learnt embedding space, we plot codes produced by the relational encoder before and after the LEO procedure, using a 5-way 1-shot model and 1000 task instances from the validation meta-set of miniImageNet. Figure 4 shows a t-SNE projection of class conditional encoder outputs $\mathbf { z } _ { n }$ as well as their respective final adapted versions $ { \mathbf { z } } _ { n } ^ { \prime }$ . If the effect of LEO were minimal, we would expect latent codes to have roughly the same structure before and after adaptation. In contrast, Figure 4(a) clearly shows that latent codes change substantially during LEO, since encoder output codes form a large cluster (blue) to which adapted codes (orange) do not belong. Figure 4(b) shows the same t-SNE embedding as (a) colored by class label. Note that encoder outputs, on the left side of plot (b), have a lower degree of class conditional separation compared to $ { \mathbf { z } } _ { n } ^ { \prime }$ clusters on the right, suggesting that qualitatively different structure is introduced by the LEO procedure. We further illustrate this point by highlighting latent codes for the “Jellyfish” validation class in Figure 4(c), which are substantially different before and after adaptation.
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 5: Curvature and coverage metrics for a number of different models, computed over 1000 problem instances drawn uniformly from the test meta-set. For all plots, the whiskers span from the $\mathrm { { \bar { 5 } ^ { t h } } }$ to $9 5 ^ { \mathrm { t h } }$ percentile of the observed quantities.
|
| 215 |
+
|
| 216 |
+
The additional structure of adapted codes $\mathbf { z } _ { n } ^ { \prime }$ may explain LEO’s superior performance over approaches predicting parameters directly from inputs, since the decoder may not be able to produce sufficiently different weights for different classes given very similar latent codes, especially when the decoder is linear. Conversely, LEO can reduce the uncertainty of the encoder mapping, which is inherent in the few-shot regime, by adapting latent codes with a generic, gradient-based procedure.
|
| 217 |
+
|
| 218 |
+
# 4.6 CURVATURE AND COVERAGE ANALYSIS
|
| 219 |
+
|
| 220 |
+
We hypothesize that by performing the inner-loop optimization in a lower-dimensional latent space, the adapted solutions do not need to be close together in parameter space, as each latent step can cover a larger region of parameter space and effect a greater change on the underlying function. To support this intuition, we compute a number of curvature and coverage measures, shown in Figure 5.
|
| 221 |
+
|
| 222 |
+
The curvature provides a measure of the sensitivity of a function with respect to some space. If adapting in latent space allows as much control over the function as in parameter space, one would expect similar curvatures. However, as demonstrated in Figure 5(a), the curvature for LEO in $\mathbf { z }$ space (the absolute eigenvalues of the Hessian of the loss) is 2 orders of magnitude higher than in $\theta$ , indicating that a fixed step in $\mathbf { z }$ will change the function more drastically than taking the same step directly in $\theta$ . This is also observed in the “gen+ft” case, where the latent embedding is still used, but adaptation is performed directly in $\theta$ space. This suggests that the latent bottleneck is responsible for this effect. Figure 5(b) shows that this is due to the expansion of space caused by the decoder. In this case the decoder is linear, and the singular values describe how much a vector projected through this decoder grows along different directions, with a value of one preserving volume. We observe that the decoder is expanding the space by at least one order of magnitude. Finally, Figure 5(c) demonstrates this effect along the specific gradient directions used in the inner loop adaptation: the small gradient steps in $\mathbf { z }$ taken by LEO induce much larger steps in $\theta$ space, larger than the gradient steps taken by Meta-SGD in $\theta$ space directly. Thus, the results support the intuition that LEO is able to ‘transport’ models further during adaptation by performing meta-learning in the latent space.
|
| 223 |
+
|
| 224 |
+
# 5 CONCLUSIONS AND FUTURE WORK
|
| 225 |
+
|
| 226 |
+
We have introduced Latent Embedding Optimization (LEO), a meta-learning technique which uses a parameter generative model to capture the diverse range of parameters useful for a distribution over tasks, and demonstrated a new state-of-the-art result on the challenging 5-way 1- and 5-shot miniImageNet and tieredImageNet classification problems. LEO achieves this by learning a lowdimensional data-dependent latent embedding, and performing gradient-based adaptation in this space, which means that it allows for a task-specific parameter initialization and can perform adaptation more effectively.
|
| 227 |
+
|
| 228 |
+
Future work could focus on replacing the pre-trained feature extractor with one learned jointly through meta-learning, or using LEO for tasks in reinforcement learning or with sequential data.
|
| 229 |
+
|
| 230 |
+
# REFERENCES
|
| 231 |
+
|
| 232 |
+
Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, Brendan Shillingford, and Nando De Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, pp. 3981–3989, 2016.
|
| 233 |
+
|
| 234 |
+
Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Advances in Neural Information Processing Systems, pp. 4331–4339, 2016.
|
| 235 |
+
|
| 236 |
+
M. Bauer, M. Rojas-Carulla, J. Bartłomiej Swia¸tkowski, B. Sch ´ olkopf, and R. E. Turner. Discrimi- ¨ native k-shot learning using probabilistic models. ArXiv e-prints, June 2017.
|
| 237 |
+
|
| 238 |
+
Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Fethi Bougares, Holger Schwenk, and ¨ Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. CoRR, abs/1406.1078, 2014. URL http://arxiv.org/abs/1406. 1078.
|
| 239 |
+
|
| 240 |
+
J. Deng, W. Dong, R. Socher, L. Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp. 248–255, June 2009a.
|
| 241 |
+
|
| 242 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009b.
|
| 243 |
+
|
| 244 |
+
Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE transactions on pattern analysis and machine intelligence, 28(4):594–611, 2006.
|
| 245 |
+
|
| 246 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pp. 1126–1135, 2017.
|
| 247 |
+
|
| 248 |
+
Chelsea Finn, Kelvin Xu, and Sergey Levine. Probabilistic model-agnostic meta-learning. arXiv preprint arXiv:1806.02817, 2018.
|
| 249 |
+
|
| 250 |
+
Marta Garnelo, Dan Rosenbaum, Christopher Maddison, Tiago Ramalho, David Saxton, Murray Shanahan, Yee Whye Teh, Danilo Rezende, and S. M. Ali Eslami. Conditional neural processes. 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. 1704–1713, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018a. PMLR. URL http://proceedings.mlr.press/v80/garnelo18a.html.
|
| 251 |
+
|
| 252 |
+
Marta Garnelo, J. Schwarz, D. Rosenbaum, F. Viola, D. J. Rezende, S. M. A. Eslami, and Y. Whye Teh. Neural Processes. ArXiv e-prints, July 2018b.
|
| 253 |
+
|
| 254 |
+
Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. CoRR, abs/1804.09458, 2018. URL http://arxiv.org/abs/1804.09458.
|
| 255 |
+
|
| 256 |
+
Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradientbased meta-learning as hierarchical bayes. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018.
|
| 257 |
+
|
| 258 |
+
David Ha, Andrew Dai, and Quoc V Le. Hypernetworks. arXiv preprint arXiv:1609.09106, 2016.
|
| 259 |
+
|
| 260 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 261 |
+
|
| 262 |
+
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. Beta-VAE: Learning basic visual concepts with a constrained variational framework. ICLR, 2017.
|
| 263 |
+
|
| 264 |
+
Geoffrey E Hinton and David C Plaut. Using fast weights to deblur old memories. In Proceedings of the ninth annual conference of the Cognitive Science Society, pp. 177–186, 1987.
|
| 265 |
+
|
| 266 |
+
Sepp Hochreiter, A. Steven Younger, and Peter R. Conwell. Learning to learn using gradient descent. In Proceedings of the International Conference on Artificial Neural Networks, ICANN ’01, pp. 87–94, London, UK, UK, 2001. Springer-Verlag. ISBN 3-540-42486-5. URL http://dl. acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 646258.684281.
|
| 267 |
+
|
| 268 |
+
T. Kim, J. Yoon, O. Dia, S. Kim, Y. Bengio, and S. Ahn. Bayesian Model-Agnostic Meta-Learning. ArXiv e-prints, June 2018.
|
| 269 |
+
|
| 270 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
|
| 271 |
+
|
| 272 |
+
Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In ICML Deep Learning Workshop, volume 2, 2015.
|
| 273 |
+
|
| 274 |
+
D. Krueger, C.-W. Huang, R. Islam, R. Turner, A. Lacoste, and A. Courville. Bayesian Hypernetworks. ArXiv e-prints, October 2017.
|
| 275 |
+
|
| 276 |
+
A. Lacoste, B. Oreshkin, W. Chung, T. Boquet, N. Rostamzadeh, and D. Krueger. Uncertainty in Multitask Transfer Learning. ArXiv e-prints, June 2018.
|
| 277 |
+
|
| 278 |
+
Brenden Lake, Ruslan Salakhutdinov, Jason Gross, and Joshua Tenenbaum. One shot learning of simple visual concepts. In Proceedings of the Annual Meeting of the Cognitive Science Society, volume 33, 2011.
|
| 279 |
+
|
| 280 |
+
Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436, 2015.
|
| 281 |
+
|
| 282 |
+
Y. Lee and S. Choi. Gradient-Based Meta-Learning with Learned Layerwise Metric and Subspace. ArXiv e-prints, January 2018.
|
| 283 |
+
|
| 284 |
+
Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few shot learning. CoRR, abs/1707.09835, 2017. URL http://arxiv.org/abs/1707. 09835.
|
| 285 |
+
|
| 286 |
+
Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, and Yi Yang. Transductive propagation network for few-shot learning. arXiv preprint arXiv:1805.10002, 2018.
|
| 287 |
+
|
| 288 |
+
Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive metalearner. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018.
|
| 289 |
+
|
| 290 |
+
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.
|
| 291 |
+
|
| 292 |
+
Tsendsuren Munkhdalai, Xingdi Yuan, Soroush Mehri, Tong Wang, and Adam Trischler. Learning rapid-temporal adaptations. CoRR, abs/1712.09926, 2017. URL http://arxiv.org/abs/ 1712.09926.
|
| 293 |
+
|
| 294 |
+
Alex Nichol and John Schulman. Reptile: a scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2018.
|
| 295 |
+
|
| 296 |
+
B. N. Oreshkin, P. Rodriguez, and A. Lacoste. TADAM: Task dependent adaptive metric for improved few-shot learning. ArXiv e-prints, May 2018.
|
| 297 |
+
|
| 298 |
+
Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan Yuille. Few-shot image recognition by predicting parameters from activations. arXiv preprint arXiv:1706.03466, 2017.
|
| 299 |
+
|
| 300 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In Proceedings of the 5th International Conference on Learning Representations (ICLR), 2017.
|
| 301 |
+
|
| 302 |
+
Mengye Ren, Sachin Ravi, Eleni Triantafillou, Jake Snell, Kevin Swersky, Josh B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. Meta-learning for semi-supervised few-shot classification. In International Conference on Learning Representations, 2018. URL https://openreview. net/forum?id ${ . } = { }$ HJcSzz-CZ.
|
| 303 |
+
|
| 304 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and FeiFei Li. Imagenet large scale visual recognition challenge. CoRR, abs/1409.0575, 2014. URL http://arxiv.org/abs/1409.0575.
|
| 305 |
+
|
| 306 |
+
Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In International conference on machine learning, pp. 1842–1850, 2016.
|
| 307 |
+
|
| 308 |
+
Jurgen Schmidhuber. ¨ Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-... hook. PhD thesis, Technische Universitat M¨ unchen, 1987. ¨
|
| 309 |
+
|
| 310 |
+
Jurgen Schmidhuber. Deep learning in neural networks: An overview. ¨ Neural networks, 61:85–117, 2015.
|
| 311 |
+
|
| 312 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, Yutian Chen, Timothy Lillicrap, Fan Hui, Laurent Sifre, George van den Driessche, Thore Graepel, and Demis Hassabis. Mastering the game of go without human knowledge. Nature, 550:354–, October 2017. URL http: //dx.doi.org/10.1038/nature24270.
|
| 313 |
+
|
| 314 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 315 |
+
|
| 316 |
+
Jake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning. CoRR, abs/1703.05175, 2017. URL http://arxiv.org/abs/1703.05175.
|
| 317 |
+
|
| 318 |
+
Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip H. S. Torr, and Timothy M. Hospedales. Learning to compare: Relation network for few-shot learning. CoRR, abs/1711.06025, 2017. URL http://arxiv.org/abs/1711.06025.
|
| 319 |
+
|
| 320 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. CoRR, abs/1409.3215, 2014. URL http://arxiv.org/abs/1409.3215.
|
| 321 |
+
|
| 322 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
|
| 323 |
+
|
| 324 |
+
Sebastian Thrun and Lorien Pratt. Learning to learn: Introduction and overview. In Learning to learn, pp. 3–17. Springer, 1998.
|
| 325 |
+
|
| 326 |
+
Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pp. 3630–3638, 2016.
|
| 327 |
+
|
| 328 |
+
T. Wu, J. Peurifoy, I. L. Chuang, and M. Tegmark. Meta-learning autoencoders for few-shot prediction. ArXiv e-prints, July 2018.
|
| 329 |
+
|
| 330 |
+
Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? CoRR, abs/1411.1792, 2014. URL http://arxiv.org/abs/1411. 1792.
|
| 331 |
+
|
| 332 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In British Machine Vision Conference, 2016a.
|
| 333 |
+
|
| 334 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. CoRR, abs/1605.07146, 2016b. URL http://arxiv.org/abs/1605.07146.
|
| 335 |
+
|
| 336 |
+
Fengwei Zhou, Bin Wu, and Zhenguo Li. Deep meta-learning: Learning to learn in the concept space. CoRR, abs/1802.03596, 2018. URL http://arxiv.org/abs/1802.03596.
|
| 337 |
+
|
| 338 |
+
# A EXPERIMENTAL SETUP - REGRESSION
|
| 339 |
+
|
| 340 |
+
# A.1 REGRESSION TASK DESCRIPTION
|
| 341 |
+
|
| 342 |
+
We used the experimental setup of Finn et al. (2018) for 1D 5-shot noisy regression tasks. Inputs were sampled uniformly from $[ - 5 , 5 ]$ . A multimodal task distribution was used. Half of the problem instances were sinusoids with amplitude and phase sampled uniformly from [0.1, 5] and $[ 0 , \pi ]$ respectively. The other half were lines with slope and intercept sampled uniformly from the interval $[ - 3 , 3 ]$ . Gaussian noise with standard deviation 0.3 was added to regression targets.
|
| 343 |
+
|
| 344 |
+
# A.2 LEO NETWORK ARCHITECTURE
|
| 345 |
+
|
| 346 |
+
As Table 3 shows, the underlying model $f _ { \theta }$ (for which parameters $\theta$ were generated) was a 3-layer MLP with 40 units in all hidden layers and rectifier nonlinearities. A single code $\mathbf { z }$ was used to generate $\theta$ with the decoder, conditioned on concatenated inputs and regression targets from $\mathcal { D } ^ { t r }$ which were passed as inputs to the encoder. Sampling of latent codes and parameters was used both during training and evaluation.
|
| 347 |
+
|
| 348 |
+
The encoder was a 3-layer MLP with 32 units per layer and rectifier nonlinearities; the bottleneck embedding space size was: $n _ { z } = 1 6$ . The relation network and decoder were both 3-layer MLPs with 32 units per layer. For simplicity we did not use biases in any layer of the encoder, decoder nor the relation network. Note that the last dimension of the relation network and decoder outputs are two times larger than $n _ { z }$ and $\dim ( \theta )$ respectively, as they are used to parameterize both the means and variances of the corresponding Gaussian distributions.
|
| 349 |
+
|
| 350 |
+
Table 3: Architecture details for 5-way 1-shot miniImageNet and tieredImageNet. The shapes correspond to the meta-training phase. We used a meta-batch of 12 task instances in parallel.
|
| 351 |
+
|
| 352 |
+
<table><tr><td rowspan=1 colspan=1>Part of the model</td><td rowspan=1 colspan=1>Architecture</td><td rowspan=1 colspan=1> Hidden layer size|Shape of the output</td><td rowspan=1 colspan=1> Hidden layer size|Shape of the output</td></tr><tr><td rowspan=1 colspan=1>Inference model (fe)</td><td rowspan=1 colspan=1> 3-layer MLP with ReLU</td><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>(12,5,1)</td></tr><tr><td rowspan=1 colspan=1>Encoder</td><td rowspan=1 colspan=1> 3-layer MLP with ReLU</td><td rowspan=1 colspan=1>16</td><td rowspan=1 colspan=1>(12,5,16)</td></tr><tr><td rowspan=1 colspan=1>Relation network</td><td rowspan=1 colspan=1> 3-layer MLP with ReLU</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>(12,2 × 16)</td></tr><tr><td rowspan=1 colspan=1>Decoder</td><td rowspan=1 colspan=1>3-layer MLP with ReLU</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>(12,2 × 1761)</td></tr></table>
|
| 353 |
+
|
| 354 |
+
# B EXPERIMENTAL SETUP - CLASSIFICATION
|
| 355 |
+
|
| 356 |
+
# B.1 DATA PREPARATION
|
| 357 |
+
|
| 358 |
+
We used the standard 5-way 1-shot and 5-shot classification setups, where each task instance involves classifying images from 5 different categories sampled randomly from one of the meta-sets, and $\mathcal { D } ^ { t r }$ contains 1 or 5 training examples respectively. $\mathcal { D } ^ { v a l }$ contains 15 samples during metatraining, as decribed in Finn et al. (2017), and all the remaining examples during validation and testing, following Qiao et al. (2017).
|
| 359 |
+
|
| 360 |
+
We did not employ any data augmentation or feature averaging during meta-learning, or any other data apart from the corresponding training and validation meta-sets. The only exception is the special case of “multi-view” embedding results, where features were averaged over representations of 4 corner and central crops and their horizontal mirrored versions, which we provide for full comparison with Qiao et al. (2017). Apart from the differences described here, the feature training pipeline closely followed that of Qiao et al. (2017).
|
| 361 |
+
|
| 362 |
+
# B.2 FEATURE PRE-TRAINING
|
| 363 |
+
|
| 364 |
+
As described in Section 4.2.2, we trained dataset specific feature embeddings before meta-learning, in a similar fashion to Qiao et al. (2017) and Bauer et al. (2017). A Wide Residual Network WRN28-10 (Zagoruyko & Komodakis, 2016b) with 3 steps of dimensionality reduction was used to classify images of $8 0 \times 8 0$ pixels from only the meta-training set into the corresponding training classes (64 in case of miniImageNet and 351 for tieredImageNet). We used dropout $( p _ { k e e p } = 0 . 5 )$ inside residual blocks, as described in (Zagoruyko & Komodakis, 2016b), which is turned off during evaluation and for dataset export. An L2 regularization term of $5 e ^ { - 4 }$ was used, 0.9 Nesterov momentum, and SGD with a learning rate schedule. The initial learning rate was 0.1 and it was multiplied with 0.2 at the steps given in Table 4. Mini-batches were of size of 1024. Data augmentation for pre-training was similar to the inception pipeline (Szegedy et al.), with color distortions and image deformations and scaling in training mode. For 64-way evaluation accuracy and dataset export we used only the center crop (with a ratio of $\frac { 8 0 } { 9 2 }$ : about $8 5 . 9 5 \%$ of the image) which was then resized to $8 0 \times 8 0$ and passed to the network.
|
| 365 |
+
|
| 366 |
+
<table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>Step 1</td><td rowspan=1 colspan=1>Step 2</td><td rowspan=1 colspan=1>Step 3</td><td rowspan=1 colspan=1>Step 4</td><td rowspan=1 colspan=1>Step 5</td><td rowspan=1 colspan=1>Total Steps</td></tr><tr><td rowspan=1 colspan=1>miniImageNet</td><td rowspan=1 colspan=1>3×103</td><td rowspan=1 colspan=1>5×10³</td><td rowspan=1 colspan=1>7×103</td><td rowspan=1 colspan=1>8×103</td><td rowspan=1 colspan=1>9×103</td><td rowspan=1 colspan=1>1×104</td></tr><tr><td rowspan=1 colspan=1>tieredImageNet</td><td rowspan=1 colspan=1>2×104</td><td rowspan=1 colspan=1>2.5×104</td><td rowspan=1 colspan=1>3×104</td><td rowspan=1 colspan=1>3.5×104</td><td rowspan=1 colspan=1>4×104</td><td rowspan=1 colspan=1>5×104</td></tr></table>
|
| 367 |
+
|
| 368 |
+
Table 4: Learning rate annealing schedules used to train feature extractors for miniImageNet and tieredImageNet.
|
| 369 |
+
|
| 370 |
+
Activations in layer 21, with average pooling over spatial dimensions, were precomputed and saved as feature embeddings with $n _ { x } = \dim ( \mathbf { x } ) = 6 4 0$ , which substantially simplified the meta-learning process.
|
| 371 |
+
|
| 372 |
+
# B.3 LEO NETWORK ARCHITECTURE
|
| 373 |
+
|
| 374 |
+
We used the same network architecture of parameter generator for all datasets and tasks. The encoder and decoder networks were linear with the bottleneck embedding space of size $n _ { z } ~ = ~ 6 4$ . The relation network was a 3-layer fully connected network with 128 units per layer and rectifier nonlinearities. For simplicity we did not use biases in any layer of the encoder, decoder nor the relation network. Table 5 summarizes this information. Note that the last dimension of the relation network and decoder outputs are two times larger than $n _ { z }$ and $\dim ( \mathbf { x } )$ respectively, as they are used to parameterize both the means and variances of the corresponding Gaussian distributions.
|
| 375 |
+
|
| 376 |
+
The “Meta-SGD (our features)” baseline used the same one-layer softmax classifier as base model.
|
| 377 |
+
|
| 378 |
+
Table 5: Architecture details for 5-way 1-shot miniImageNet and tieredImageNet. The shapes correspond to the meta-training phase. We used a meta-batch of 12 task instances in parallel.
|
| 379 |
+
|
| 380 |
+
<table><tr><td rowspan=1 colspan=1>Part of the model</td><td rowspan=1 colspan=1>Architecture</td><td rowspan=1 colspan=1>Shape of the output</td><td rowspan=1 colspan=1>When trained?</td></tr><tr><td rowspan=1 colspan=1>Feature extractor</td><td rowspan=1 colspan=1>WRN-28-10</td><td rowspan=1 colspan=1>(12,5,1,640)</td><td rowspan=1 colspan=1>before LEO</td></tr><tr><td rowspan=1 colspan=1>Encoder</td><td rowspan=1 colspan=1>linear</td><td rowspan=1 colspan=1>(12,5,1,64)</td><td rowspan=1 colspan=1>during outer loop</td></tr><tr><td rowspan=1 colspan=1>Relation network</td><td rowspan=1 colspan=1> 3-layer MLP with ReLU</td><td rowspan=1 colspan=1>(12,5V,2 × 64)</td><td rowspan=1 colspan=1>during outer loop</td></tr><tr><td rowspan=1 colspan=1>Decoder</td><td rowspan=1 colspan=1>linear</td><td rowspan=1 colspan=1>(12,2 × 640)</td><td rowspan=1 colspan=1>during outer loop</td></tr></table>
|
| 381 |
+
|
| 382 |
+
# B.4 OPTIMIZATION
|
| 383 |
+
|
| 384 |
+
We used a parallel implementation similar to that of Finn et al. (2017), where the “inner loop” is performed in parallel on a batch 12 problem instances for every meta-update. Using a relation network in the encoder has negligible computational cost given that $k ^ { 2 }$ is small in typical $k$ -shot learning domains, and the relation network is only used once per problem instance, to get the initial model parameters before adaptation. Within the LEO “inner loop” we perform 5 steps of adaptation in latent space, followed by 5 steps of fine-tuning in parameter space. The learning rates for these spaces were meta-learned in a similar fashion to Meta-SGD (Li et al., 2017), after being initialized to 1 and
|
| 385 |
+
|
| 386 |
+
0.001 for the latent and parameter spaces respectively. We applied dropout independently on the feature embedding in every step, with the probability of not being dropped out $p _ { k e e p }$ chosen (together with other hyperparameters) using random search based on the validation meta-set accuracy.
|
| 387 |
+
|
| 388 |
+
Parameters of the encoder, relation, and decoder networks as well as per-parameter learning rates in latent and parameter spaces were optimized jointly using Adam (Kingma & Ba, 2014) to minimize the meta-learning objective (Eq. 6) over problem instances from the training meta-set, iterating for up to 100 000 steps, with early stopping using validation accuracy.
|
| 389 |
+
|
| 390 |
+
Meta-learning objectives can lead to difficult optimization processes in practice, specifically when coupled with stochastic sampling in latent and parameters spaces. For ease of experimentation we clip the meta-gradient, as well as its norm, at an absolute value of 0.1. Please note this was only done for the encoder, relation, decoder networks and learning rates, not the inner loop latent space adaptation gradients.
|
| 391 |
+
|
| 392 |
+
B.5 HYPER-PARAMETERS
|
| 393 |
+
|
| 394 |
+
<table><tr><td rowspan="2">Hyperparameter</td><td colspan="2">miniImageNet</td><td colspan="2">tieredImageNet</td></tr><tr><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>η (Algorithm 1)</td><td>0.00043653954</td><td>0.00117573555</td><td>0.00040645397</td><td>0.00073469522</td></tr><tr><td>γ (Eq. (6))</td><td>1.33365371e-9</td><td>5.39245830e-6</td><td>1.24305386e-8</td><td></td></tr><tr><td>β (Eq. (6))</td><td>0.124171967</td><td></td><td></td><td>3.05077069e-6</td></tr><tr><td>入1 (Eq. (7))</td><td>0.000108982953</td><td>0.0440372182</td><td>7.10800960e-6</td><td>0.00188644980</td></tr><tr><td>入2 (Eq. (7))</td><td></td><td>3.75922509e-6</td><td>3.10725285e-8</td><td>4.90658551e-8</td></tr><tr><td></td><td>303.216647</td><td>0.00844225971</td><td>5180.09554</td><td>0.0081711619</td></tr><tr><td>Pkeep</td><td>0.711524088</td><td>0.755402644</td><td>0.644395979</td><td>0.628325359</td></tr></table>
|
| 395 |
+
|
| 396 |
+
Table 6: Values of hyperparameters chosen to maximize meta-validation accuracy during random search.
|
| 397 |
+
|
| 398 |
+
To find the best values of hyperparameters, we performed a random grid search and we choose the set which lead to highest validation meta-set accuracy. The reported performance of our models is an average $\pm$ a standard deviation) over 5 independent runs (using different random seeds) with the best hyperparameters kept fixed. The result of a single run is an average accuracy over 50000 task instances. After choosing hyperparameters (given in Table 6) we used both meta-training and meta-validation sets for training, in line with recent state-of-the-art approaches, e.g. Qiao et al. (2017).
|
| 399 |
+
|
| 400 |
+
The evaluation of each of the LEO baselines follow the same procedure; in particular, we perform a separate random search for each of them.
|
| 401 |
+
|
| 402 |
+
# B.6 TRAINING TIME
|
| 403 |
+
|
| 404 |
+
Training of LEO took 1-2 hours for miniImageNet and around 5 hours for tieredImageNet on a multi-core CPU (for each of the 5 independent runs). Our approach allows for caching the feature embeddings before training LEO, which leads to a very efficient meta-learning process.
|
| 405 |
+
|
| 406 |
+
Training of the image extractor was more compute-intensive, taking 5 hours for miniImageNet and around a day for tieredImageNet using 32 GPUs.
|
| 407 |
+
|
| 408 |
+
# B.7 OVERVIEW OF THE TRAINING PROCEDURE
|
| 409 |
+
|
| 410 |
+
In summary, there are three stages in our approach to meta-training:
|
| 411 |
+
|
| 412 |
+
1. In the first stage we use 64-way classification to pre-train the feature embedding only on the meta-training set, hence without the meta-validation classes.
|
| 413 |
+
2. In the second stage we train LEO on the meta-training set with early stopping on metavalidation, and we choose the best hyperparameters using random grid search.
|
| 414 |
+
|
| 415 |
+
3. In the third stage we train LEO again from scratch 5 times using the embedding trained in stage 1 and the chosen set of hyperparameters from stage 2. However, in this stage we metalearn on embeddings from both meta-train and meta-validation sets, with early-stopping on meta-validation.
|
| 416 |
+
|
| 417 |
+
While it may not be intuitive to use early stopping on meta-validation in stage 3, it is still a proxy for good generalization since it favors models with high performance on classes excluded during feature embedding pre-training.
|
| 418 |
+
|
| 419 |
+
# B.8 OVERVIEW OF THE EVALUATION PROCEDURE
|
| 420 |
+
|
| 421 |
+
The procedure for evaluation is similar to meta-training, except that we disable stochasticity and dropout. Naturally, instead of computing the meta-training loss, the parameters (adapted based on $\mathcal { L } _ { \mathcal { T } _ { i } } ^ { t r }$ ) are only used for inference on that particular task. That is:
|
| 422 |
+
|
| 423 |
+
1. A problem instance is drawn from the evaluation meta-set.
|
| 424 |
+
2. The few-shot samples are encoded to latent space, then decoded; the means are used to initialize the parameters of the inference model.
|
| 425 |
+
3. A few steps of adaptation are performed in latent space, followed (optionally) by a few steps of adaptation in parameter space.
|
| 426 |
+
4. The resulting parameters are used as the final adapted model for that particular problem instance.
|
md/train/BJlBSkHtDS/BJlBSkHtDS.md
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PADÉ ACTIVATION UNITS: END-TO-END LEARNING OF FLEXIBLE ACTIVATION FUNCTIONS IN DEEP NETWORKS
|
| 2 |
+
|
| 3 |
+
Alejandro Molina1, Patrick Schramowski1, Kristian Kersting1,2 1 AI and Machine Learning Group, CS Department, TU Darmstadt, Germany 2 Centre for Cognitive Science, TU Darmstadt, Germany {molina,schramowski,kersting}@cs.tu-darmstadt.de
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The performance of deep network learning strongly depends on the choice of the non-linear activation function associated with each neuron. However, deciding on the best activation is non-trivial, and the choice depends on the architecture, hyper-parameters, and even on the dataset. Typically these activations are fixed by hand before training. Here, we demonstrate how to eliminate the reliance on first picking fixed activation functions by using flexible parametric rational functions instead. The resulting Padé Activation Units (PAUs) can both approximate common activation functions and also learn new ones while providing compact representations. Our empirical evidence shows that end-to-end learning deep networks with PAUs can increase the predictive performance. Moreover, PAUs pave the way to approximations with provable robustness.
|
| 8 |
+
|
| 9 |
+
https://github.com/ml-research/pau
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
An important building block of deep learning is the non-linearities introduced by the activation functions $f ( x )$ . They play a major role in the success of training deep neural networks, both in terms of training time and predictive performance. Consider e.g. Rectified Linear Unit (ReLU) due to Nair and Hinton (2010). The demonstrated benefits in training deep networks, see e.g. (Glorot et al., 2011), brought renewed attention to the development of new activation functions. Since then, several ReLU variations with different properties have been introduced such as LeakyReLUs (Maas et al., 2013), ELUs (Clevert et al., 2016), RReLUs (Xu et al., 2015), among others. Another line of research, such as (Ramachandran et al., 2018) automatically searches for activation functions. It identified the Swish unit empirically as a good candidate. However, for a given dataset, there are no guarantees that Swish unit behaves well and the proposed search algorithm is computationally quite demanding.
|
| 14 |
+
|
| 15 |
+
The activation functions are traditionally fixed and, in turn, impose a set of inductive biases on the network. One attempt to relax this bias are for instance PReLUs (He et al., 2015), where the negative slope is subject to optimization allowing for more flexibility than other ReLU variants. Learnable activation functions generalize this idea. They exploit parameterizations of the activation functions, adapted in an end-to-end fashion to different network architectures and datasets during training. For instance, Maxout (Goodfellow et al., 2013) and Mixout (Zhao et al., 2017) use a fixed set of piecewise linear components and optimized their (hyper-)parameters. Although they are theoretically universal function approximators, they heavily increase the number of parameters of the network and strongly depend on hyper-parameters such as the number of components to realize this potential. Vercellino and Wang (2017) used a meta-learning approach for learning task-specific activation functions (hyperactivations). However, as Vercellino and Wang admit, the implementation of hyperactivations, while easy to express notationally, can be frustrating to implement for generalizability over any given activation network. Recently, Goyal et al. (2019) proposed a learnable activation function based on Taylor approximation and suggested a transformation strategy to avoid exploding gradients. However, relying on polynomials suffers from well-known limitations such as exploding values and a tendency to oscillate (Trefethen, 2012).
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Approximations of common activation functions (ReLU, Sigmoid, Tanh, Swish and Leaky ReLU $\mathrm { \Delta } \alpha = 0 . 2 0 )$ ) using PAUs (marked with $^ *$ ). As one can see, PAUs can encode common activation functions very well. (Best viewed in color)
|
| 19 |
+
|
| 20 |
+
As an alternative, we here introduce a learnable activation function based on the Padé approximation, i.e., rational functions. In contrast to approximations for high accuracy hardware implementation of the hyperbolic tangent and the sigmoid activation functions (Hajduk, 2018), we do not assume fixed coefficients. The resulting Padé Activation Units (PAU) can be learned using standard stochastic gradient and, hence, seamlessly integrated into the deep learning stack. PAUs provide more flexibility and increase the predictive performance of deep neural networks, as we demonstrate.
|
| 21 |
+
|
| 22 |
+
We proceed as follows. We start off by introducing PAUs. Then introduce Padé networks and show that they are universal approximators. Before concluding, we present our empirical evaluation.
|
| 23 |
+
|
| 24 |
+
# 2 PADÉ ACTIVATION UNITS (PAU)
|
| 25 |
+
|
| 26 |
+
Our starting point is the set of intuitive assumptions activation functions should ultimately fulfill shown in Tab. 1. The assumptions (i,v) concern the ability of neural networks to approximate functions. Rational functions can fulfill assumptions (i,iv), and our experimental evaluation demonstrates that assumptions (ii,iii,v) also hold.
|
| 27 |
+
|
| 28 |
+
(i) They must allow the networks to be universal function approximators.
|
| 29 |
+
(ii) They should ameliorate gradient vanishing.
|
| 30 |
+
(iii) They should be stable.
|
| 31 |
+
(iv) They should be parsimonious on the number of parameters.
|
| 32 |
+
(v) They should provide networks with high predictive performance.
|
| 33 |
+
|
| 34 |
+
<table><tr><td colspan="2"></td><td colspan="4">Assumptions</td></tr><tr><td>Activation</td><td>Learnable</td><td>i ii</td><td>ii</td><td>iv</td><td>V</td></tr><tr><td>ReLU</td><td>N</td><td></td><td>Y</td><td></td><td>Y</td></tr><tr><td>ReLU6</td><td>N</td><td></td><td>Y</td><td></td><td></td></tr><tr><td>RReLU</td><td>N</td><td></td><td></td><td></td><td></td></tr><tr><td>LReLU</td><td>N</td><td></td><td></td><td></td><td></td></tr><tr><td>ELU</td><td>N</td><td></td><td>YYY</td><td></td><td></td></tr><tr><td>CELU</td><td>N</td><td>YYYYYYY</td><td>YYYYYY Y</td><td></td><td></td></tr><tr><td>Swish</td><td>N</td><td></td><td>? Y</td><td></td><td></td></tr><tr><td>PReLU</td><td>Y</td><td>Y</td><td>Y</td><td></td><td></td></tr><tr><td>Maxout</td><td>Y</td><td></td><td>Y</td><td>YN</td><td></td></tr><tr><td>Mixture</td><td>Y</td><td></td><td></td><td></td><td>Y</td></tr><tr><td>APL</td><td>Y</td><td></td><td>YY</td><td>YYY</td><td>Y</td></tr><tr><td>SReLU</td><td>Y</td><td>YYYYYY</td><td>YYYY Y</td><td></td><td>Y</td></tr><tr><td>SLAF</td><td>Y</td><td></td><td>Y</td><td>N Y</td><td>?</td></tr><tr><td>PAU</td><td>Y</td><td>Y</td><td>Y</td><td>Y</td><td>Y Y</td></tr></table>
|
| 35 |
+
|
| 36 |
+
Table 1: (Left) The intuitive assumptions activation functions (AFs) should ultimately fulfill. (Right) Existing ELU, CELU and ReLU like AFS do not fulfill them. Only learnable AFs allow one to tune their shape at training time, ignoring hyper-parameters such as $\alpha$ for LReLU. For Swish, our experimental results do not indicate problems with vanishing gradients. SLAF (Goyal et al., 2019) showed undefined values (iii), and we could not judge their performance (v).
|
| 37 |
+
|
| 38 |
+
# 2.1 PADÉ APPROXIMATION OF ACTIVATION FUNCTIONS
|
| 39 |
+
|
| 40 |
+
Let us now formally introduce PAUs. Assume for the moment that we start with a fixed activation function $f ( x )$ . The Padé approximant (Brezinski and Van Iseghem, 1994) is the “best” approximation of $f ( x )$ by a rational function of given orders $m$ and $n$ . Applied to typical actication functions, Fig. 1 shows that they can be approximated well using rational functions.
|
| 41 |
+
|
| 42 |
+
More precisely, given $f ( x )$ , the Padé approximant is the rational function $F ( x )$ over polynomials $P ( x ) , Q ( x )$ of order $m$ , $n$ of the form
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
F ( x ) = { \frac { P ( x ) } { Q ( x ) } } = { \frac { \sum _ { j = 0 } ^ { m } a _ { j } x ^ { j } } { 1 + \sum _ { k = 1 } ^ { n } b _ { k } x ^ { k } } } = { \frac { a _ { 0 } + a _ { 1 } x + a _ { 2 } x ^ { 2 } + \cdot \cdot \cdot + a _ { m } x ^ { m } } { 1 + b _ { 1 } x + b _ { 2 } x ^ { 2 } + \cdot \cdot \cdot + b _ { n } x ^ { n } } } ~ ,
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
which agrees with $f ( x )$ the best. The Padé approximant often gives a better approximation of a function $f ( x )$ than truncating its Taylor series, and it may still work where the Taylor series does not converge. For these reasons, it has been used before in the context of graph convolutional networks (Chen et al., 2018). However, they have not been considered so far for general deep networks. Padé Activation Units (PAUs) go one step further, instead of fixing the coefficients $a _ { j } , b _ { k }$ to approximate a particular activation function, we allow them to be free parameters that can be optimized end-to-end with the rest of the neural network. This allows the optimization process to find the activation function needed at each layer automatically.
|
| 49 |
+
|
| 50 |
+
The flexibility of Padé is not only a blessing but might also be a curse: it can model processes that contain poles. For a learnable activation function, however, a pole may produce undefined values depending on the input as well as instabilities at learning and inference time. Therefore we consider a restriction, called safe $P A U$ , that guarantees that the polynomial $Q ( x )$ is not 0, i.e., we avoid poles. In general, restricting $Q ( x )$ implies that either $Q ( x ) \mapsto \mathbb { R } _ { > 0 }$ or $Q ( \dot { x } ) \mapsto \mathbb R _ { < 0 }$ , but as $P ( x ) \mapsto \mathbb { R }$ we can focus on $Q ( x ) \mapsto \mathbb { R } _ { > 0 }$ wlog. However, as $\begin{array} { r } { \operatorname* { l i m } _ { Q ( x ) \to 0 ^ { + } } F ( x ) \to \infty } \end{array}$ learning and inference become unstable. To fix this, we impose a stronger constraint, namely $Q ( x ) \geq q \gg 0$ . In this work, $q = 1$ , i.e., $\forall x : Q ( x ) \geq 1$ , preventing poles and allowing for safe computation on $\mathbb { R }$ :
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
F ( x ) = { \frac { P ( x ) } { Q ( x ) } } = { \frac { \sum _ { j = 0 } ^ { m } a _ { j } x ^ { j } } { 1 + | \sum _ { k = 1 } ^ { n } b _ { k } x ^ { k } | } } = { \frac { a _ { 0 } + a _ { 1 } x + a _ { 2 } x ^ { 2 } + \dotsb + a _ { m } x ^ { m } } { 1 + | b _ { 1 } x + b _ { 2 } x ^ { 2 } + \dotsb + b _ { n } x ^ { n } | } } \ .
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
Other values for $q \in ( 0 , 1 )$ might still be interesting, as they could provide gradient amplification due to the partial derivatives having $Q ( X )$ in the denominator. However, we leave this for future work.
|
| 57 |
+
|
| 58 |
+
# 2.2 LEARNING SAFE PADÉ APPROXIMATIONS USING BACKPROPAGATION
|
| 59 |
+
|
| 60 |
+
In contrast to the standard way of fitting Padé approximants where the coefficients are found via derivatives and algebraic manipulation against a given function, we optimize their polynomials via backpropagation and (stochastic) gradient descent. To do this, we have to compute the gradients with respect to the parameters $\begin{array} { r } { \frac { \partial F } { \partial a _ { j } } , \frac { \partial \check { F } } { \partial b _ { k } } } \end{array}$ as well as the gradient for the input $\textstyle { \frac { \partial F } { \partial x } }$ . A simple alternative is to implement the forward pass as described in Eq. 2, and let automatic differentiation do the job. To be more efficient, however, we can also implement PAUs directly in CUDA (Nickolls et al. (2008)), and for this we need to compute the gradients ourselves:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\frac { \partial F } { \partial x } = \frac { \partial P ( x ) } { \partial x } \frac { 1 } { Q ( x ) } - \frac { \partial Q ( x ) } { \partial x } \frac { P ( x ) } { Q ( x ) ^ { 2 } } , \quad \frac { \partial F } { \partial a _ { j } } = \frac { x ^ { j } } { Q ( x ) } \quad \mathrm { a n d } \quad \frac { \partial F } { \partial b _ { k } } = - x ^ { k } \frac { A ( X ) } { | A ( X ) | } \frac { P ( X ) } { Q ( x ) ^ { 2 } } ,
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where ) = a1 + 2a2x + · · · + mamxm−1 , ∂Q(x) $\begin{array} { r } { \frac { \partial Q ( x ) } { \partial x } = \frac { A ( X ) } { | A ( X ) | } \left( b _ { 1 } + 2 b _ { 2 } x + \cdot \cdot \cdot + n b _ { n } x ^ { n - 1 } \right) } \end{array}$ , $A ( X ) = b _ { 1 } x + b _ { 2 } x ^ { 2 } + \cdot \cdot \cdot + b _ { n } x ^ { n }$ , and $Q ( x ) = 1 + | A ( X ) |$ . Here we reuse the expressions to reduce computations. To avoid divisions by zero when computing the gradients, we define $\frac { z } { | z | }$ as the sign of $z$ . With the gradients at hand, PAUs can seamlessly be placed together with other modules onto the differentiable programming stack.
|
| 67 |
+
|
| 68 |
+
# 3 PADÉ NETWORKS
|
| 69 |
+
|
| 70 |
+
Having PAUs at hand, one can define Padé networks as follows: Padé networks are feedforward networks with PAU activation functions that may include convolutional and residual architectures with pooling layers. To use Padé networks effectively, one simply replaces the standard activation functions in a neural network by PAUs and then proceed to optimize all the parameters and use the network as usual. However, even if every PAU contains a low number of parameters (coefficients $a _ { j } , b _ { k } )$ , in the extreme case, learning one PAU per neuron may considerably increase the complexity of the networks and in turn the learning time. To ameliorate this and inspired by the idea of weightsharing as introduced by Teh and Hinton (2001), we propose to learn one PAU per layer. Therefore we only add $\phi$ many parameters, where $\phi = L * ( m + n )$ and $L$ is the number of activation layers in the network. In our experiments we set $\phi = 1 0 L$ , a rather small number of parameters (iv).
|
| 71 |
+
|
| 72 |
+
The last step missing before we can start the optimization process is to initialize the coefficients of the PAUs. Surely, one can do random initialization of the coefficients and allow the optimizer to train the network end-to-end. However, we obtained better results after initializing all PAUs with coefficients that approximate standard activation functions. For a discussion on how to obtain different PAU coefficients, we refer to Sec. A.1.
|
| 73 |
+
|
| 74 |
+
Before evaluating Padé Networks empirically, let us touch upon their expressivity and how to sparsify them.
|
| 75 |
+
|
| 76 |
+
# 3.1 PADÉ NETWORKS ARE UNIVERSAL FUNCTION APPROXIMATORS
|
| 77 |
+
|
| 78 |
+
A standard multi-layer perceptron (MLP) with enough hidden units and non-polynomial activation functions is a universal approximator, see e.g. (Hornik et al., 1989; Leshno et al., 1993). Padé Networks are also universal approximators.
|
| 79 |
+
|
| 80 |
+
Theorem 1. Let $\rho \colon \mathbb { R } \mathbb { R }$ be a PAU activation function. Let ${ \mathcal { N } } ^ { \rho }$ represent the class of neural networks with activation function $\rho$ . Let $K \subseteq \mathbb { R } ^ { n }$ be compact. Then ${ \mathcal { N } } ^ { \rho }$ is dense in $C ( K )$ .
|
| 81 |
+
|
| 82 |
+
The proof holds for both PAUs and safe PAUs as it makes no assumptions on the form of the denominator $Q ( x )$ , and is a direct application of the following propositions:
|
| 83 |
+
|
| 84 |
+
Proposition 1. (From Theorem 1.1 in (Kidger and Lyons, 2019)) Let $\rho \colon \mathbb { R } \mathbb { R }$ be any continuous function. Let $\mathcal { N } _ { n } ^ { \rho }$ represent the class of neural networks with activation function $\rho _ { i }$ , with n neurons in the input layer, one neuron in the output layer, and one hidden layer with an arbitrary number of neurons. Let $K \subseteq \mathbb { R } ^ { n }$ be compact. Then $\mathcal { N } _ { n } ^ { \rho }$ is dense in $C ( K )$ if and only if $\rho$ is non-polynomial.
|
| 85 |
+
|
| 86 |
+
Proposition 2. (From Theorem 3.2 in (Kidger and Lyons, 2019)) Let $\rho \colon \mathbb { R } \mathbb { R }$ be any continuous point. Let function which is continuously differentiable at at least one point, with nonzero derivative at that $K \subseteq \mathbb { R } ^ { n }$ be compact. Then $\mathcal { N N } _ { n , m , n + m + 2 } ^ { \rho }$ is dense in $C ( K ; \mathbb { R } ^ { m } )$ .
|
| 87 |
+
|
| 88 |
+
Proof. Let $\rho ( x ) = P ( x ) / Q ( x )$ , we have to consider the following two cases:
|
| 89 |
+
|
| 90 |
+
Case 1: $Q ( x ) \neq 1$ , by definition, $\rho ( x )$ is non-polynomial. Then by proposition 1, we get that $\mathcal { N } _ { n } ^ { \rho }$ is dense in $C ( K )$ .
|
| 91 |
+
|
| 92 |
+
Case 2: $Q ( x ) = 1$ , here $\textstyle \rho ( x ) = \sum _ { j = 0 } ^ { m } a _ { j } x ^ { j }$ , is polynomial, continuous and continuously differentiable in propositi $\mathbb { R }$ . Let any 2, we get $a _ { j > 0 } > 0$ re exists a p is dense in $\alpha \in \mathbb { R }$ such that $\rho ^ { \prime } ( \alpha ) \neq 0$ and then by $\mathcal { N N } _ { n , m , n + m + 2 } ^ { \rho }$ $C ( K ; \mathbb { R } ^ { m } )$
|
| 93 |
+
|
| 94 |
+
# 3.2 SPARSE PADÉ NETWORKS AND RANDOMIZED PAUS
|
| 95 |
+
|
| 96 |
+
Padé Networks can $\epsilon$ -approximate neural networks with ReLU activations (Telgarsky, 2017). This implies that by using PAUs, we are embedding a virtual network into the networks we want to use. This, in turn, is the operating assumption of the lottery ticket hypothesis due to Frankle and Carbin (2019). Thus, we expect that lottery ticket pruning can find well-performing Padé networks that are smaller than their original counterparts while reducing inference time and potentially improving the predictive performance.
|
| 97 |
+
|
| 98 |
+
Generally, overfitting is an important practical concern when training neural networks. Usually, we can apply regularization techniques such as Dropout (Srivastava et al., 2014). Unfortunately, although each PAU approximates a small ReLU network section, we do not have access to the internal representation of this virtual network. Therefore, we can not regularize the activation function via standard Dropout. An alternative for regularizing activation functions was introduced in Randomized Leaky ReLUs (RReLUs, Xu et al. (2015)), where the negative slope parameter is sampled uniformly on a range. This makes the activation function behave differently at training time for every input $x$ , forwarding and backpropagating according to $x$ and the sampled noise.
|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
Figure 2: PAU compared to baseline activation function units over 5 runs on Fashion-MNIST using the LeNet architecture: (left) mean test-accuracy (the higher, the better) and (right) mean train-loss (the lower, the better). As one can see, PAU outperforms all baseline activations and enable the networks to achieve a lower loss during training compared to all baselines. (Best viewed in color)
|
| 102 |
+
|
| 103 |
+
We can employ a similar technique to make PAUs resistant to overfitting. Consider a PAU with coefficients $\mathbf { C } = \{ a _ { 0 } , \cdot \cdot \cdot , a _ { m } , b _ { 0 } , \cdot \cdot \cdot , b _ { n } \}$ . We can introduce additive noise during training into each coefficient $c _ { i } \in \mathbf { C }$ for every input $x _ { j }$ via $c _ { i , j } = c _ { i } + z _ { i , j }$ where $z _ { i , j } \sim U ( l _ { i } , u _ { i } )$ , $l _ { i } = ( 1 - \alpha \% ) * c _ { i }$ and reciprocally $u _ { i } = \left( 1 + \alpha \% \right) * { \check { c } } _ { i }$ . This results in Randomized PAU (RPAU):
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
R ( x _ { j } ) = \frac { c _ { 0 , j } + c _ { 1 , j } x + c _ { 2 , j } x ^ { 2 } + \cdot \cdot \cdot + c _ { m , x } x ^ { m } } { 1 + | c _ { m + 1 } x + c _ { m + 2 } x ^ { 2 } + \cdot \cdot \cdot + c _ { m + n } x ^ { n } | } .
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
We compute the gradients as before and simply replace the coefficients by their noisy counterparts.
|
| 110 |
+
|
| 111 |
+
# 4 EXPERIMENTAL EVALUATION
|
| 112 |
+
|
| 113 |
+
Our intention here is to investigate the behavior and performance of PAUs as well as to compare them to other activation functions using standard deep neural networks. All our experiments are implemented in PyTorch with PAU implemented in CUDA, and were executed on an NVIDIA DGX-2 system. In all experiments, we initialized PAUs with coefficients that approximate LeakyReLUs for a rational function of order $m = 5 , n = 4$ . In all experiments except for ImageNet, we report the mean of 5 runs initialized with different seeds for the accuracy on the test-set after training. And, we compared PAU to the following activation functions: ReLU, ReLU6, Leaky ReLU (LReLU), Random ReLU (RReLU), ELU, CELU, Swish, Parametric ReLU (PReLU), Maxout, Mixture of activations (Mixture), SLAF, APL and SReLU. For details on all the activation functions, we refer to Appendix A.2. As datasets we considered MNIST, Fahion-MNIST, CIFAR-10 and ImageNet.
|
| 114 |
+
|
| 115 |
+
4.1 EMPIRICAL RESULTS ON MNIST AND FASHION-MNIST BENCHMARKS
|
| 116 |
+
|
| 117 |
+
First we evaluated PAUs on MNIST (LeCun et al., 2010) and Fashion-MNIST (Xiao et al., 2017) using two different architectures: LeNet (LeCun et al., 1998) and VGG-8 (Simonyan and Zisserman, 2015). For more details on the architectures, learning settings, and results, we refer to Sec. A.3.
|
| 118 |
+
|
| 119 |
+
As can be seen in Fig. 2 and Tab. 2, PAU outperformed on average the baseline activation functions on every network in terms of predictive performance. Moreover, the results are stable on different runs (c.f. mean $\pm$ std). PAUs also enable the networks to achieve a lower loss during training compared to all baselines on all networks. Actually, PAU achieved the best results on both datasets and on Fashion-MNIST it provides the best results for both architectures. As expected, reducing the bias is beneficial in this experiment. Comparing the baseline activation functions on the MNIST dataset and the different architectures, there is no clear choice of activation that achieves the best performance. However, PAU always matches or even outperforms the best performing baseline activation function. This shows that a learnable activation function relieves the network designer of having to commit to a potentially suboptimal choice. Moreover, Fig. 2 also shows that PAU is more stable than SLAF. This is not unexpected as Taylor approximations tend to oscillate and overshoot (Trefethen, 2012). We also observed undefined values at training time for SLAF; therefore, we do not compare against it in the following experiments. Finally, when considering the number of parameters used by PAU, we can see that they are very efficient. The VGG-8 network uses 9.2 million parameters, PAU here uses 50 parameters, and for LeNet, the network uses 0.5 million parameters while PAU uses only 40.
|
| 120 |
+
|
| 121 |
+
Table 2: Performance comparison of activation functions on MNIST and Fashion-MNIST (the higher, the better) on two common deep architectures. Shown are the results averaged over 5 reruns as well as the top result among these 5 runs. The best $( \vphantom { \sqrt [ 4 ] { 3 } } \cdots )$ and runner-up $( ^ { 6 6 } \circ ^ { 7 3 } )$ results per architecture are bold. As one can see, PAUs consistently outperform the other activation functions on average and yields the top performance on each dataset.
|
| 122 |
+
|
| 123 |
+
<table><tr><td rowspan="3"></td><td colspan="2">VGG-8 best</td><td colspan="2">LeNet</td><td colspan="2">VGG-8</td><td colspan="2">LeNet</td></tr><tr><td colspan="2">mean ± std</td><td>mean ± std</td><td>best</td><td>mean ± std</td><td>best</td><td>mean ± std</td><td>best</td></tr><tr><td colspan="9"></td></tr><tr><td colspan="9"></td></tr><tr><td>ReLU</td><td>99.17 ±0.10</td><td>MNIST 99.30</td><td>99.17 ± 0.05</td><td>99.25</td><td>89.11 ± 0.43</td><td>Fashion-MNIST 89.69</td><td>89.86 ± 0.32</td><td>90.48</td></tr><tr><td>ReLU6</td><td>99.28 ± 0.04</td><td>99.31</td><td>99.09 ±0.09</td><td>99.22</td><td>89.87 ±0.62</td><td>90.38</td><td>89.74±0.27</td><td>89.96</td></tr><tr><td>LReLU</td><td>99.13 ± 0.11</td><td>99.27</td><td>99.10 ± 0.06</td><td>99.22</td><td>89.37 ± 0.30</td><td>89.74</td><td>89.74± 0.24</td><td>90.02</td></tr><tr><td>RReLU</td><td>99.16 ±0.13</td><td>99.28</td><td>99.20±0.13 099.38</td><td></td><td>88.46±0.85</td><td>89.32</td><td>89.74±0.19</td><td>89.88</td></tr><tr><td>ELU</td><td>99.15 ± 0.09</td><td>99.28</td><td>99.15 ±0.06</td><td>99.22</td><td>89.65 ± 0.33</td><td>90.06</td><td>89.84± 0.47</td><td>90.25</td></tr><tr><td>CELU</td><td>99.15 ± 0.09</td><td>99.28</td><td>99.15 ±0.06</td><td>99.22</td><td>89.65 ± 0.33</td><td>90.06</td><td>89.84± 0.47</td><td>90.25</td></tr><tr><td>Swish</td><td>99.10 ±0.06</td><td>99.20</td><td>99.19 ±0.09</td><td>99.29</td><td>88.54±0.59</td><td>89.36</td><td>89.54± 0.22</td><td>89.89</td></tr><tr><td>PReLU</td><td>99.16 ± 0.09</td><td>99.25</td><td>99.14±0.09</td><td>99.24</td><td>88.82 ±0.51</td><td>89.54</td><td>90.09 ±0.22090.29</td><td></td></tr><tr><td>SLAF</td><td></td><td></td><td></td><td></td><td>90.60 ± 0.00</td><td>90.60</td><td>89.33 ± 0.28</td><td>89.80</td></tr><tr><td>APL</td><td>099.35±0.11·99.50</td><td></td><td>99.18±0.10</td><td>99.33</td><td>91.41±0.48·92.25</td><td></td><td>89.72 ± 0.30</td><td>90.01</td></tr><tr><td>SReLU</td><td>99.15 ± 0.03</td><td>99.20</td><td>99.13±0.14</td><td>99.27</td><td>89.65 ±0.42</td><td>90.31</td><td>89.83 ±0.30</td><td>90.28</td></tr><tr><td>PAU</td><td>99.30±0.05 099.40</td><td></td><td>099.21±0.04</td><td>99.26</td><td>091.25±0.18091.56</td><td></td><td>90.33±0.15·90.62</td><td></td></tr><tr><td>RPAU</td><td>·99.35±0.04 99.38 99.26±0.11·99.42</td><td></td><td></td><td></td><td></td><td></td><td>91.23±0.15 91.41090.20±0.11 090.29</td><td></td></tr></table>
|
| 124 |
+
|
| 125 |
+
In summary, this shows that PAUs are stable, parsimonious and can improve the predictive performance of deep neural networks (iii,iv,v).
|
| 126 |
+
|
| 127 |
+
# 4.2 LEARNED ACTIVATION FUNCTIONS ON MNIST AND FASHION-MNIST
|
| 128 |
+
|
| 129 |
+
When looking at the activation functions learned from the data, we can see that the PAU family is flexible yet presents similarities to standard functions. In particular, Fig. 3 illustrates that some of the learned activations seem to be smoothed versions of Leaky ReLUs, since V-shaped activations are simply Leaky ReLUs with negative $\alpha$ values. This is not surprising as we initialize PAUs with coefficients that match Leaky ReLUs. Finding different initialization and optimization parameters is left as future work. In contrast, when learning piecewise approximations of the same activations using Maxout, we would require a high $k$ . This significantly increases the number of parameters of the network. This again provides more evidence in favor of PAUs being flexible and parsimonious (iv). SLAF produced undefined values during training on all networks except Fashion-MNIST where LeNet finished 4 runs and VGG only one run.
|
| 130 |
+
|
| 131 |
+
# 4.3 EMPIRICAL RESULTS ON CIFAR-10
|
| 132 |
+
|
| 133 |
+
After investigating PAU on MNIST and Fashion-MNIST, we considered a more challenging setting: CIFAR-10 (Krizhevsky et al. (2009)). We also considered other learnable activation functions, namely Maxout $( \mathrm { k } \mathrm { = } 2 )$ and Mixture of activations (Id and ReLU) as well as another popular deep network architectures: MobileNetV2 (Sandler et al., 2018), ResNet101 (He et al., 2016) and DenseNet121 (Huang et al., 2017). For more details on the learning settings and results, we refer to Sec. A.4.
|
| 134 |
+
|
| 135 |
+
Let us start by considering the results for VGG-8 and MobileNetV2 on CIFAR-10. These networks are the smallest of this round of experiments and, therefore, could benefit more from bias reduction. Indeed, we can see in Tab. 3 that both networks take advantage of learnable activation functions, i.e., Maxout, PAU, and RPAU. As expected, adding more capacity to VGG-8 helps and this is what Maxout is doing. Moreover, even if Mixtures do not seem to provide a significant benefit on VGG-8, they do help in MobileNetV2. Here, we see again that PAU and RPAU are either in the lead or close to the best when it comes to predictive performance, without having to make a choice apriori.
|
| 136 |
+
|
| 137 |
+
Table 3: Performance comparison of activation functions on CIFAR-10 (the higher, the better) on four state-of-the-art deep neural architectures. Shown are the results averaged over 5 reruns as well as the top result among these 5 runs. The best $( \vphantom { \sqrt [ 4 ] { 3 } } \cdots )$ and runner-up (“◦”) results per architecture are bold. As one can see, PAUs are either in the lead or close to the best. $( ^ { 6 6 } { } ^ { \ast } { } ^ { \ast } { } ^ { \ast } { } ^ { \ast } { } ^ { \ast } { } ^ { \ast } )$ are experiments that did not finish on time.
|
| 138 |
+
|
| 139 |
+
<table><tr><td rowspan="2"></td><td colspan="2">VGG-8</td><td colspan="2">MobileNetV2</td><td colspan="2">ResNet101</td><td colspan="2">DenseNet121</td></tr><tr><td>mean ± std</td><td>best</td><td>mean ± std</td><td>best</td><td>mean ± std</td><td>best</td><td>mean ± std</td><td>best</td></tr><tr><td></td><td colspan="6"></td><td></td><td></td></tr><tr><td>ReLU</td><td>92.32 ± 0.16</td><td>92.58</td><td>91.51 ± 0.28</td><td>91.82</td><td>95.07 ± 0.17</td><td></td><td>95.36095.36±0.18 095.63</td><td></td></tr><tr><td>ReLU6</td><td>92.36 ±0.06</td><td>92.47</td><td>91.30 ± 0.23</td><td>91.57</td><td>95.11 ± 0.24</td><td>95.29</td><td>95.33 ± 0.14</td><td>95.46</td></tr><tr><td>LReLU</td><td>92.43 ± 0.14</td><td>92.65</td><td>91.94 ± 0.12</td><td>92.08</td><td>95.08 ±0.19</td><td>95.29</td><td>·95.42±0.17·95.65</td><td></td></tr><tr><td>RReLU</td><td>92.32 ± 0.07</td><td>92.42</td><td>094.66±0.16</td><td>6094.94</td><td>95.21±0.23</td><td>095.51</td><td>95.00 ±0.12</td><td>95.14</td></tr><tr><td>ELU</td><td>91.24 ± 0.09</td><td>91.33</td><td>90.43 ±0.14</td><td>90.61</td><td>94.04± 0.14</td><td>94.24</td><td>90.78 ±0.29</td><td>91.23</td></tr><tr><td>CELU</td><td>91.24 ± 0.09</td><td>91.33</td><td>90.69 ±0.27</td><td>90.97</td><td>93.80 ±0.36</td><td>94.25</td><td>90.88 ±0.19</td><td>91.08</td></tr><tr><td>PReLU</td><td>92.22 ±0.26</td><td>92.51</td><td>93.54± 0.45</td><td>93.95</td><td>94.15 ± 0.39</td><td>94.50</td><td>94.98 ±0.16</td><td>95.15</td></tr><tr><td>Swish</td><td>91.58 ±0.18</td><td>91.86</td><td>92.04±0.13</td><td>92.21</td><td>91.83 ± 1.61</td><td>92.84</td><td>93.04±0.16</td><td>93.32</td></tr><tr><td>Maxout</td><td>·93.03±0.11</td><td>·93.23</td><td>94.41 ±0.10</td><td>94.54</td><td>95.11 ± 0.13</td><td>95.23</td><td>***</td><td>***</td></tr><tr><td>Mixture</td><td>91.86 ±0.14</td><td>92.06</td><td>94.06 ± 0.16</td><td>94.25</td><td>94.50± 0.25</td><td>94.71</td><td>93.33 ±0.17</td><td>93.59</td></tr><tr><td>APL</td><td>91.63 ± 0.13</td><td>91.82</td><td>93.62 ±0.64</td><td>94.50</td><td>94.12 ± 0.36</td><td>94.50</td><td>94.45 ±0.23</td><td>94.78</td></tr><tr><td>SReLU</td><td>092.66± 0.27 093.13</td><td></td><td>94.03 ± 0.11</td><td>94.25</td><td>095.24±0.13</td><td>95.38</td><td>94.77 ±0.24</td><td>95.20</td></tr><tr><td>PAU</td><td>92.51± 0.16</td><td>92.70</td><td>94.57±0.21</td><td>94.90</td><td>95.16±0.13</td><td>95.28</td><td>95.03±0.07</td><td>95.16</td></tr><tr><td>RPAU</td><td>92.50 ±0.09</td><td>92.62</td><td>·94.82±0.21·95.13</td><td></td><td>·95.34±0.13·95.54</td><td></td><td>95.27±0.10</td><td>95.41</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 140 |
+
|
| 141 |
+
Now, let us have a look at the performance of PAU and RPAU on the larger networks ResNet101 and DenseNet121. As these networks are so expressive, we do not expect the flexibility of the learnable activation functions to have a big impact on the performance. Tab. 3 confirms this. Nevertheless, they are still competitive and their performance is stable as shown by the standard deviation. On ResNet101, PAUs actually provided the top performance.
|
| 142 |
+
|
| 143 |
+
# 4.4 FINDING SPARSE PADÉ NETWORKS
|
| 144 |
+
|
| 145 |
+
As discussed in Sec. 3.2, using PAUs in a network is equivalent to introducing virtual networks of ReLUs in the middle of the network, effectively adding virtual depth to the networks. Therefore, we also investigated whether pruning can help one to unmask smaller sub-networks whose performance is similar to the original network. In a sense, we are removing blocks of the real network as they get replaced by the virtual network. Here, we only do pruning on the convolutional layers. For details about the algorithm and hyper-parameters, wee refer to Sec. A.4.3.
|
| 146 |
+
|
| 147 |
+
Specifically, we compared PAU against the best activation functions for the different architectures. However, we discarded Maxout, as instead of pruning it introduces many more parameters into the network defeating the original purpose. As one can see in Fig. 4, pruning on the already sizeoptimized networks VGG-8 and MobileNetV2 has an effect on the predictive performance. However, the performance of PAU remains above the other activation functions despite the increase in pruning pressure. In contrast, when we look at ResNet101, we see that the performance of PAU is not influenced by pruning, showing that indeed we can find sparse Padé network without major loss in accuracy. And what is more, PAU enables the ResNet101 subnetwork, pruned by $30 \%$ , to achieve a higher accuracy compared to all pruned and not pruned networks.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 3: Estimated activation functions after training the VGG-8 network with RPAU on FashionMNIST. The center line indicates the PAU while the surrounding area indicates the space of the additive noise in RPAUs. As one can see, the PAU family differs from common activation functions but capture characteristics of them. (Best viewed in color)
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 4: Comparison of the predictive accuracy (higher is better) for the architectures VGG-8, MobileNetV2 and ResNet101 between PAU and the best activation functions according to Tab. 3. PAU is consistently better. On ResNet101 PAU is not affected by the increase pruning pressure. Furthermore, PAU enables the ResNet101 subnetwork, pruned by $30 \%$ , to achieve a higher accuracy compared to all pruned and not pruned networks. (Best viewed in color)
|
| 154 |
+
|
| 155 |
+
# 4.5 EMPIRICAL RESULTS ON IMAGENET
|
| 156 |
+
|
| 157 |
+
Finally, we investigated the performance on a much larger dataset, namely ImageNet (Russakovsky et al. (2015)) used to train MobileNetV2. As can be seen in Fig. 5 and Tab. 4, PAU and Swish clearly dominate in performance (v). PAU leads in top-1 accuracy and Swish in top-5 accuracy. Moreover, both PAU and Swish show faster learning compared to the other activation functions.
|
| 158 |
+
|
| 159 |
+
Furthermore, we argue that the rapid learning rate of PAU in all the experiments indicate that they do not exhibit vanishing gradient issues (ii).
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 5: MobileNetV2 top-1 test accuracy on the left (higher is better) and training loss on the right (lower is better) for multiple activation functions in ImageNet. PAU achieves higher accuracy and lower loss values in fewer epochs. (Best viewed in color)
|
| 163 |
+
|
| 164 |
+
Table 4: MobileNetV2 top-1 and top-5 accuracies in ImageNet (higher is better) for different activations. Best $( \mathbf { \ddot { \sigma } } \mathbf { \dot { \sigma } } )$ and runner-up (“◦”) are shown in bold. PAU is the best in top-1 accuracy and runner-up for top-5.
|
| 165 |
+
|
| 166 |
+
<table><tr><td>MobileNetV2</td><td>ReLU</td><td>ReLU6</td><td>LReLU</td><td>RReLU</td><td>ELU</td><td>CELU</td><td>PReLU</td><td>Swish</td><td>SReLU</td><td>PAU</td></tr><tr><td>Acc@1</td><td>69.65</td><td>69.83</td><td>70.03</td><td>69.12</td><td>69.13</td><td>69.17</td><td>68.61</td><td>071.24</td><td>70.62</td><td>·71.35</td></tr><tr><td>Acc@5</td><td>89.09</td><td>89.34</td><td>89.26</td><td>88.80</td><td>88.46</td><td>88.59</td><td>88.51</td><td>·89.95</td><td>89.59</td><td>089.85</td></tr></table>
|
| 167 |
+
|
| 168 |
+
# 4.6 SUMMARIZED RESULTS
|
| 169 |
+
|
| 170 |
+
Finally, we compare the PAU family of activation functions to all the other activation functions and we aggregate the number of occurrences where PAU performed better or worse in comparison. The aggregate results can be found in Tab. 5. These results are the aggregates of all the experiments on all datasets and all architectures. As we can see, the PAU family is very competitive.
|
| 171 |
+
|
| 172 |
+
<table><tr><td>Baselines</td><td></td><td>ReLUReLU6LReLURReLUELU</td><td></td><td></td><td></td><td>CELUPReLU|</td><td></td><td>SwishMaxoutMixturel</td><td></td><td></td><td>APL</td><td>SReLU</td></tr><tr><td>PAU/RPAU>= Baseline</td><td>34</td><td>35</td><td>34</td><td>33</td><td>40</td><td>40</td><td>39</td><td>41</td><td>9</td><td>20</td><td>32</td><td>33</td></tr><tr><td>PAU/RPAU<Baseline</td><td>8</td><td>7</td><td>8</td><td>9</td><td>2</td><td>2</td><td>3</td><td>1</td><td>6</td><td>0</td><td>7</td><td>8</td></tr></table>
|
| 173 |
+
|
| 174 |
+
Table 5: The number of models on which PAU and RPAU outperforms or underperforms each baseline activation function we compared against in our experiments.
|
| 175 |
+
|
| 176 |
+
To summarize, PAUs satisfy all the assumptions (i-v). They allow the network to be universal function approximators (i) as shown by theorem 1. They present a fast and stable learning behavior (ii, iii) as shown in Figs. (5,6,7,8). The number of parameters introduced by PAUs is minimal in comparison to the size of the networks. In our experiments, we add 10 parameters per layer, showing that PAUs are parsimonious (iv). Finally, they allow deep neural networks to provide high predictive performance (v) as shown in Tab. 5.
|
| 177 |
+
|
| 178 |
+
# 5 CONCLUSIONS
|
| 179 |
+
|
| 180 |
+
We have presented a novel learnable activation function, called Padé Activation Unit (PAU). PAUs encode activation functions as rational functions, trainable in an end-to-end fashion using backpropagation. This makes it easy for practitioners to replace standard activation functions with PAU units in any neural network. The results of our empirical evaluation for image classification demonstrate that PAUs can indeed learn new activation functions and in turn novel neural networks that are competitive to state-of-the-art networks with fixed and learned activation functions. Actually, across all activation functions and architectures, Padé networks are among the top performing networks. This clearly shows that the reliance on first picking fixed, hand-engineered activation functions can be eliminated and that learning activation functions is actually beneficial and simple. Moreover, our results provide the first empirically evidence that the open question “Can rational functions be used to design algorithms for training neural networks?” raised by Telgarsky (2017) can be answered affirmatively for common deep architectures.
|
| 181 |
+
|
| 182 |
+
Our work provides several interesting avenues for future work. One should explore more the space between safe and unsafe PAUs, in order to gain even more predictive power. Most interestingly, since Padé networks can be reduced to ReLU networks. one should explore globally optimal training (Arora et al., 2018) as well as provable robustness (Croce et al., 2019) of Padé approximations of general deep networks.
|
| 183 |
+
|
| 184 |
+
Acknowledgments. PS and KK were supported by funds of the German Federal Ministry of Food and Agriculture (BMEL) based on a decision of the Parliament of the Federal Republic of Germany via the Federal Office for Agriculture and Food (BLE) under the innovation support program, project “DePhenS” (FKZ 2818204715).
|
| 185 |
+
|
| 186 |
+
REFERENCES
|
| 187 |
+
F. Agostinelli, M. D. Hoffman, P. J. Sadowski, and P. Baldi. Learning activation functions to improve deep neural networks. In Workshop Track Proceedings of the International Conference on Learning Representations, 2015.
|
| 188 |
+
R. Arora, A. Basu, P. Mianjy, and A. Mukherjee. Understanding deep neural networks with rectified linear units. In International Conference on Learning Representations, 2018.
|
| 189 |
+
J. T. Barron. Continuously differentiable exponential linear units. arXiv preprint arXiv:1704.07483, 2017.
|
| 190 |
+
C. Brezinski and J. Van Iseghem. Padé approximations. Handbook of numerical analysis, 3:47–222, 1994.
|
| 191 |
+
Z. Chen, F. Chen, R. Lai, X. Zhang, and C.-T. Lu. Rational neural networks for approximating graph convolution operator on jump discontinuities. In 2018 IEEE International Conference on Data Mining (ICDM). IEEE, 2018.
|
| 192 |
+
D. Clevert, T. Unterthiner, and S. Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). In 4th International Conference on Learning Representations (ICLR), 2016.
|
| 193 |
+
F. Croce, M. Andriushchenko, and M. Hein. Provable robustness of relu networks via maximization of linear regions. In The 22nd International Conference on Artificial Intelligence and Statistics (AISTATS), pages 2057–2066, 2019.
|
| 194 |
+
J. Frankle and M. Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In ICLR, 2019.
|
| 195 |
+
X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics (AISTATS), pages 315–323, 2011.
|
| 196 |
+
I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. C. Courville, and Y. Bengio. Maxout networks. In Proceedings of the 30th International Conference on Machine Learning (ICML), pages 1319–1327, 2013.
|
| 197 |
+
M. Goyal, R. Goyal, and B. Lall. Learning activation functions: A new paradigm of understanding neural networks. arXiv preprint arXiv:1906.09529, 2019.
|
| 198 |
+
Z. Hajduk. Hardware implementation of hyperbolic tangent and sigmoid activation functions. Bulletin of the Polish Academy of Sciences. Technical Sciences, 66(5), 2018.
|
| 199 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026–1034, 2015.
|
| 200 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
|
| 201 |
+
K. Hornik, M. B. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 2(5):359–366, 1989.
|
| 202 |
+
G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700–4708, 2017.
|
| 203 |
+
X. Jin, C. Xu, J. Feng, Y. Wei, J. Xiong, and S. Yan. Deep learning with s-shaped rectified linear activation units. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, 2016.
|
| 204 |
+
P. Kidger and T. Lyons. Universal approximation with deep narrow networks. arXiv preprint arXiv:1905.08539, 2019.
|
| 205 |
+
D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, (ICLR), 2015.
|
| 206 |
+
A. Krizhevsky and G. Hinton. Convolutional deep belief networks on cifar-10. 2010.
|
| 207 |
+
A. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Computer Science Department, University of Toronto, 2009.
|
| 208 |
+
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of IEEE, 86(11):2278–2324, 1998.
|
| 209 |
+
Y. LeCun, C. Cortes, and C. Burges. Mnist handwritten digit database. at&t labs, 2010.
|
| 210 |
+
M. Leshno, V. Y. Lin, A. Pinkus, and S. Schocken. Multilayer feedforward networks with a nonpolynomial activation function can approximate any function. Neural Networks, 6(6):861–867, 1993.
|
| 211 |
+
A. L. Maas, A. Y. Hannun, and A. Y. Ng. Rectifier nonlinearities improve neural network acoustic models. In in ICML Workshop on Deep Learning for Audio, Speech and Language Processing, 2013.
|
| 212 |
+
F. Manessi and A. Rozza. Learning combinations of activation functions. In 2018 24th International Conference on Pattern Recognition (ICPR), pages 61–66. IEEE, 2018.
|
| 213 |
+
V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pages 807–814, 2010.
|
| 214 |
+
J. Nickolls, I. Buck, and M. Garland. Scalable parallel programming. In 2008 IEEE Hot Chips 20 Symposium (HCS), pages 40–53. IEEE, 2008.
|
| 215 |
+
N. Qian. On the momentum term in gradient descent learning algorithms. Neural networks, 12(1): 145–151, 1999.
|
| 216 |
+
P. Ramachandran, B. Zoph, and Q. V. Le. Searching for activation functions. In Proceedings of the Workshop Track of the 6th International Conference on Learning Representations (ICLR), 2018.
|
| 217 |
+
O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. S. Bernstein, A. C. Berg, and F. Li. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
|
| 218 |
+
M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4510–4520, 2018.
|
| 219 |
+
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In Proceedings of the 3rd International Conference on Learning Representations(ICLR), 2015.
|
| 220 |
+
N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1): 1929–1958, 2014.
|
| 221 |
+
Y. W. Teh and G. E. Hinton. Rate-coded restricted boltzmann machines for face recognition. In Prcoeedings of Neural Information Processing Systems (NIPS), pages 908–914, 2001.
|
| 222 |
+
M. Telgarsky. Neural networks and rational functions. In Proceedings of the 34th International Conference on Machine Learning (ICML), pages 3387–3393, 2017.
|
| 223 |
+
L. N. Trefethen. Approximation Theory and Approximation Practice. SIAM, 2012. ISBN 978-1-611- 97239-9.
|
| 224 |
+
C. J. Vercellino and W. Y. Wang. Hyperactivations for activation function exploration. In 31st Conference on Neural Information Processing Systems (NIPS 2017), Workshop on Meta-learning. Long Beach, USA, 2017.
|
| 225 |
+
H. Xiao, K. Rasul, and R. Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, 2017.
|
| 226 |
+
B. Xu, N. Wang, T. Chen, and M. Li. Empirical evaluation of rectified activations in convolutional network. CoRR, 2015.
|
| 227 |
+
H.-Z. Zhao, F.-X. Liu, and L.-Y. Li. Improving deep convolutional neural networks with mixed maxout units. PloS one, 12(7), 2017.
|
| 228 |
+
|
| 229 |
+
# A APPENDIX
|
| 230 |
+
|
| 231 |
+
# A.1 INITIALIZATION COEFFICIENTS
|
| 232 |
+
|
| 233 |
+
As show in Table 6 we compute initial coefficients for PAU approximations to different known activation functions. We predefined the orders to be [5,4] and for Sigmoid, Tanh and Swish, we have computed the Padé approximant using the standard techniques. For the different variants of PRelu, LeakyRelu and Relu we optimized the coefficients using least squares over the line range between [-3,3] in steps of 0.000001.
|
| 234 |
+
|
| 235 |
+
<table><tr><td></td><td>Sigmoid</td><td>Tanh</td><td>Swish</td><td>ReLU</td><td>LReLU(0.01)</td><td>LReLU(0.20)</td><td>LReLU(0.25)</td><td>LReLU(0.30)</td><td>LReLU(-0.5)</td></tr><tr><td>ao</td><td>1/2</td><td>0</td><td>0</td><td>0.02996348</td><td>0.02979246</td><td>0.02557776</td><td>0.02423485</td><td>0.02282366</td><td>0.02650441</td></tr><tr><td>α1</td><td>1/4</td><td>1</td><td>1/2</td><td>0.61690165</td><td>0.61837738</td><td>0.66182815</td><td>0.67709718</td><td>0.69358438</td><td>0.80772912</td></tr><tr><td>a2</td><td>1/18</td><td>0</td><td>b/4</td><td>2.37539147</td><td>2.32335207</td><td>1.58182975</td><td>1.43858363</td><td>1.30847432</td><td>13.56611639</td></tr><tr><td>a3</td><td>1/144</td><td>1/9</td><td>362/56</td><td>3.06608078</td><td>3.05202660</td><td>2.94478759</td><td>2.95497990</td><td>2.97681599</td><td>7.00217900</td></tr><tr><td>a4</td><td>1/2016</td><td>0</td><td>63/168</td><td>1.52474449</td><td>1.48548002</td><td>0.95287794</td><td>0.85679722</td><td>0.77165297</td><td>11.61477781</td></tr><tr><td>a5</td><td>1/60480</td><td>1/945</td><td>b4/3360</td><td>0.25281987</td><td>0.25103717</td><td>0.23319681</td><td>0.23229612</td><td>0.23252265</td><td>0.68720375</td></tr><tr><td>b1</td><td>0</td><td>0</td><td>0</td><td>1.19160814</td><td>1.14201226</td><td>0.50962605</td><td>0.41014746</td><td>0.32849543</td><td>13.70648993</td></tr><tr><td>b2</td><td>1/9</td><td>4/9</td><td>362/28</td><td>4.40811795</td><td>4.39322834</td><td>4.18376890</td><td>4.14691964</td><td>4.11557902</td><td>6.07781733</td></tr><tr><td>b</td><td>0</td><td>0</td><td>0</td><td>0.91111034</td><td>0.87154450</td><td>0.37832090</td><td>0.30292546</td><td>0.24155603</td><td>12.32535229</td></tr><tr><td>b4</td><td>1/10008</td><td>1/63</td><td>64 /1680</td><td>0.34885983</td><td>0.34720652</td><td>0.32407314</td><td>0.32002850</td><td>0.31659365</td><td>0.54006880</td></tr></table>
|
| 236 |
+
|
| 237 |
+
Table 6: Initial coefficients to approximate different activation functions.
|
| 238 |
+
|
| 239 |
+
# A.2 LIST OF ACTIVATION FUNCTIONS
|
| 240 |
+
|
| 241 |
+
For our experiments, we compare against the following activation functions with their respective parameters.
|
| 242 |
+
|
| 243 |
+
• ReLU (Nair and Hinton, 2010): $y = \operatorname* { m a x } ( x , 0 )$
|
| 244 |
+
• ReLU6 (Krizhevsky and Hinton, 2010): $y = \operatorname* { m i n } ( \operatorname* { m a x } ( x , 0 ) , 6 )$ , a variation of ReLU with an upper bound.
|
| 245 |
+
• Leaky ReLU (Maas et al., 2013): $y = \operatorname* { m a x } ( 0 , x ) + \alpha * \operatorname* { m i n } ( 0 , x )$ with the negative slope, which is defined by the parameter $\alpha$ . Leaky ReLU enables a small amount of information to flow when $x < 0$ . Random ReLU ( $\mathrm { X u }$ et al., 2015): a randomized variation of Leaky ReLU. ELU (Clevert et al., 2016): $y = \operatorname* { m a x } ( 0 , x ) + \operatorname* { m i n } ( 0 , \alpha * ( \exp ( x ) - 1 ) ) .$
|
| 246 |
+
• CELU (Barron, 2017): $y = \operatorname* { m a x } ( 0 , x ) + \operatorname* { m i n } ( 0 , \alpha * ( \exp ( x / \alpha ) - 1 ) )$ . Swish (Ramachandran et al., 2018): $y = x * \mathrm { s i g m o i d } ( x )$ , which tends to work better than ReLU on deeper models across a number of challenging datasets.
|
| 247 |
+
• Parametric ReLU (PReLU) (He et al., 2015) $y = \operatorname* { m a x } ( 0 , x ) + \alpha * \operatorname* { m i n } ( 0 , x )$ , where the leaky parameter $\alpha$ is a learn-able parameter of the network.
|
| 248 |
+
• Maxout (Goodfellow et al., 2013): $y = \operatorname* { m a x } ( z _ { i j } )$ , where $z _ { i j } = x ^ { T } W _ { \dots i j } + b _ { i j }$ , and $W \in R ^ { d \times m \times k }$ and $b \in R ^ { m \times k }$ are learned parameters.
|
| 249 |
+
Mixture of activations (Manessi and Rozza, 2018): a combination of weighted activation functions e.g. {id, ReLU}, where the weight is a learnable parameter of the network. SLAF (Goyal et al., 2019): a learnable activation function based on a Taylor approximation.
|
| 250 |
+
• APL (Agostinelli et al., 2015): a learnable piecewise linear activation function.
|
| 251 |
+
• SReLU (Jin et al., 2016): a learnable S-shaped rectified linear activation function.
|
| 252 |
+
|
| 253 |
+
A.3 DETAILS OF THE MNIST AND FASHION-MNIST EXPERIMENT
|
| 254 |
+
|
| 255 |
+
# A.3.1 NETWORK ARCHITECTURES
|
| 256 |
+
|
| 257 |
+
Here we describe the architectures for the networks VGG and LeNet, along with the number of trainable parameters. The number of parameters of the activation function is reported for using PAU. Common not trainable activation functions do not have trainable parameters. PReLU has one
|
| 258 |
+
|
| 259 |
+
trainable parameter. In total the VGG network as 9224508 parameters with 50 for PAU, and the LeNet network has 61746 parameters with 40 for PAU.
|
| 260 |
+
|
| 261 |
+
Table 7: Architecture of Simple Convolutional Neural Networks
|
| 262 |
+
|
| 263 |
+
<table><tr><td>No.</td><td>VGG</td><td># params</td><td>LeNet # params</td></tr><tr><td>1</td><td>Convolutional</td><td>Convolutional 640 5x5x6</td><td>156</td></tr><tr><td>2</td><td>3x3x64 Activation</td><td>10 Activation</td><td>10</td></tr><tr><td>3</td><td>Max-Pooling</td><td>0</td><td>Max-Pooling 0</td></tr><tr><td>4</td><td>Convolutional 3x3x128</td><td>73856 5x5x16</td><td>Convolutional 2416</td></tr><tr><td>5</td><td>Activation</td><td>10</td><td>Activation 10</td></tr><tr><td>6</td><td>Max-Pooling</td><td>0</td><td>Max-Pooling 0</td></tr><tr><td>7</td><td>Convolutional 3x3x256</td><td>295168 5x5x120</td><td>Convolutional 48120</td></tr><tr><td>8</td><td>Convolutional 3x3x256</td><td>590080</td><td>Activation 10</td></tr><tr><td>9</td><td>Activation</td><td>Linear 10 84</td><td>10164</td></tr><tr><td>10</td><td>Max-Pooling</td><td>0</td><td>Activation 10</td></tr><tr><td>11</td><td>Convolutional 3x3x512</td><td>Linear 1180160 10</td><td>850</td></tr><tr><td>12</td><td>Convolutional 3x3x512</td><td>2359808</td><td>Softmax 0</td></tr><tr><td>13</td><td>Activation</td><td>10</td><td></td></tr><tr><td>14</td><td>Max-Pooling</td><td>0</td><td></td></tr><tr><td>15</td><td>Convolutional 3x3x512</td><td>2359808</td><td></td></tr><tr><td>16</td><td>Convolutional 3x3x512</td><td>2359808</td><td></td></tr><tr><td>17</td><td>Activation</td><td>10</td><td></td></tr><tr><td>18</td><td>Max-Pooling</td><td>0</td><td></td></tr><tr><td>19</td><td>Linear 10</td><td>5130</td><td></td></tr><tr><td>20</td><td>Softmax</td><td>0</td><td></td></tr></table>
|
| 264 |
+
|
| 265 |
+
# A.3.2 LEARNING PARAMETERS
|
| 266 |
+
|
| 267 |
+
The parameters of the networks, both the layer weights and the coefficients of the PAUs, were trained over 100 epochs using Adam (Kingma and Ba, 2015) with a learning rate of 0.002 or SGD (Qian, 1999) with a learning rate of 0.01, momentum set to 0.5, and without weight decay. In all experiments we used a batch size of 256 samples. The weights of the networks were initialized randomly and the coefficients of the PAUs were initialized with the initialization constants of Leaky ReLU, see Tab. 6. We report the mean of 5 different runs for both the accuracy on the test-set and the loss on the train-set after each training epoch.
|
| 268 |
+
|
| 269 |
+
# A.3.3 PREDICTIVE PERFORMANCE
|
| 270 |
+
|
| 271 |
+

|
| 272 |
+
MNIST
|
| 273 |
+
Figure 6: PAU compared to baseline activation function units on 5 runs of MNIST using the VGG and LeNet: first column mean test-accuracy, second column mean train-loss. PAU consistently outperforms or matches the best performances of the baseline activations. Moreover, PAUs enable the networks to achieve a lower loss during training compared to all baselines.
|
| 274 |
+
|
| 275 |
+

|
| 276 |
+
Fashion-MNIST
|
| 277 |
+
Figure 7: PAU compared to baseline activation function units on 5 runs of Fashion-MNIST using the VGG and LeNet architectures: first column mean test-accuracy, second column mean train-loss. PAU consistently outperforms the baselines activation functions in terms of performance and training time, especially on the VGG.
|
| 278 |
+
|
| 279 |
+
# A.4 DETAILS OF THE CIFAR10 AND IMAGENET EXPERIMENT
|
| 280 |
+
|
| 281 |
+
# A.4.1 LEARNING PARAMETERS
|
| 282 |
+
|
| 283 |
+
The parameters of the networks, both the layer weights and the coefficients of the PAUs, were trained over 400 epochs using SGD with momentum set to 0.9. On the Cifar10 dataset we have different optimizer setups for PAU layers and the rest of the network. For the PAU layers we use constant learning rates per networks and no weight decay. For updating the rest of the network we use initial learning rate of 0.1, and learning rate decay of 0.985 per epoch and set weight decay to $5 e - 4$ . In all experiments we used a batch size of 64 samples. The weights of the networks were initialized randomly and the coefficients of the PAUs were initialized with the initialization constants of Leaky ReLU, see Tab. A.1. The additive noise of the Randomized PAUs is set to $\alpha = 1 \%$ training the networks VGG8 and MobileNetV2, respectively $\alpha = 1 0 \%$ for ResNet101.
|
| 284 |
+
|
| 285 |
+
On the Imagenet dataset we use the same optimizer for PAU and the rest of the network. We follow the default setup provided by Pytorch and use an initial learning rate of 0.1, and decay the learning rate by $10 \%$ after 30, 60 and 90 epochs.
|
| 286 |
+
|
| 287 |
+
# A.4.2 NETWORK ARCHITECTURES
|
| 288 |
+
|
| 289 |
+
The network architectures were taken from reference implementations in PyTorch and we modified them to use PAUs. All architectures are the same among the different activation functions except for Maxout. The default amount of trainable parameters of VGG8 (Simonyan and Zisserman, 2015) is 3,918,858. Using PAU 50 additional parameters are introduced. Maxout is extending the VGG8 network to a total number of 7,829,642 parameters. MobileNetV2 (Sandler et al., 2018) is contains by default 2,296,922 trainable parameters. PAU adds 360 additional parameters. The Maxout activation function is results in a total number of 3,524,506 parameters. With respect to the number of parameters ResNet101 (He et al., 2016) is the largest network we train. By default it contains 42,512,970 trainable parameters, we introduce 100 PAUs and therefore add 1000 additional parameters to the network. If one is replacing each activation function using Maxout the resulting ResNet101 network contains 75,454,090 trainable parameters. The default DenseNet121 (Huang et al., 2017) network has 6,956,298 parameters. Replacing the activation functions with PAU adds 1200 parameters to the network.
|
| 290 |
+
|
| 291 |
+
# A.4.3 PRUNING EXPERIMENT
|
| 292 |
+
|
| 293 |
+
For the pruning experiment, we implement the "Lottery ticket hypothesis" (Frankle and Carbin (2019)) in PyTorch. We compare PAUs against the best activation for the network architecture according to the average predictive accuracy from Tab. 3. More precisely, we compare the predictive performance under pruning for the networks $N _ { 1 } = \{ \mathrm { V G G - } 8 _ { \mathrm { p a u } }$ , MobileNetV2pau, $\mathrm { R e s N e t 1 0 1 _ { p a u } } \big \}$ against the networks $N _ { 2 } = \mathrm { \{ V G G - 8 _ { L R e L U } } $ , MobileNetV2RReLU, $\mathrm { R e s N e t 1 0 1 _ { p a u } } \}$ . Here we avoided Maxout as it heavily increases the parameters in the model, defeating the purpose of pruning. Unlike the original paper, we compress the convolutions using a fixed pruning parameter per iteration of $p \% = \bar { 1 } 0 , 2 \bar { 0 } , \bar { 3 0 } , 4 0 , 5 0 , 6 0$ and evaluated once per network. After each training iteration we remove $p \%$ of filters in every convolution and the filters we remove are the ones where the sum of its weights is lowest. After pruning, we proceed to re-initialize the network and repeat the training and pruning proceedure with the next $p \%$ parameter.
|
| 294 |
+
|
| 295 |
+
# A.4.4 PREDICTIVE PERFORMANCE CIFAR10
|
| 296 |
+
|
| 297 |
+

|
| 298 |
+
Figure 8: PAU compared to baseline activation function units on 5 runs of CIFAR-10. Accuracy on the left column and loss on the right one. (Best viewed in color)
|
md/train/BJlS634tPr/BJlS634tPr.md
ADDED
|
Binary file (53.8 kB). View file
|
|
|
md/train/ByZmGjkA-/ByZmGjkA-.md
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNDERSTANDING GROUNDED LANGUAGE LEARNINGAGENTS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Neural network-based systems can now learn to locate the referents of words and phrases in images, answer questions about visual scenes, and even execute symbolic instructions as first-person actors in partially-observable worlds. To achieve this so-called grounded language learning, models must overcome certain well-studied learning challenges that are also fundamental to infants learning their first words. While it is notable that models with no meaningful prior knowledge overcome these learning obstacles, AI researchers and practitioners currently lack a clear understanding of exactly how they do so. Here we address this question as a way of achieving a clearer general understanding of grounded language learning, both to inform future research and to improve confidence in model predictions. For maximum control and generality, we focus on a simple neural network-based language learning agent trained via policy-gradient methods to interpret synthetic linguistic instructions in a simulated 3D world. We apply experimental paradigms from developmental psychology to this agent, exploring the conditions under which established human biases and learning effects emerge. We further propose a novel way to visualise and analyse semantic representation in grounded language learning agents that yields a plausible algorithmic account of the observed effects.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
The learning challenge faced by children acquiring their first words has long fascinated cognitive scientists and philosophers (Quine, 1960; Brown, 1973). To start making sense of language, an infant must induce structure in a constant stream of continuous visual input, slowly reconcile this structure with consistencies in the available linguistic observations, store this knowledge in memory, and apply it to inform decisions about how best to respond.
|
| 12 |
+
|
| 13 |
+
Many neural network models also overcome a learning task that is – to varying degrees – analogous to early human word learning. Image classification tasks such as the ImageNet Challenge (Deng et al., 2009) require models to induce discrete semantic classes, in many cases aligned to words, from unstructured pixel representations of large quantities of photographs (Krizhevsky et al., 2012). Visual question answering (VQA) systems (Antol et al., 2015; Xiong et al., 2016; Xu & Saenko, 2016) must reconcile raw images with (arbitrary-length) sequences of symbols, in the form of natural language questions, in order to predict lexical or phrasal answers. Recently, situated language learning agents have been developed that learn to understand sequences of linguistic symbols not only in terms of the contemporaneous raw visual input, but also in terms of past visual input and the actions required to execute an appropriate motor response (Oh et al., 2017; Chaplot et al., 2017; Hermann et al., 2017; Misra et al., 2017). The most advanced such agents learn to execute a range of phrasal and multi-task instructions, such as find the green object in the red room, pick up the pencil in the third room on the right or go to the small green torch, in a continous, simulated 3D world. To solve these tasks, an agent must execute sequences of hundreds of fine-grained actions, conditioned on the available sequence of language symbols and active (first-person) visual perception of the surroundings. Importantly, the knowledge acquired by such agents while mastering these tasks also permits the interpretation of familiar language in entirely novel surroundings, and the execution of novel instructions composed of combinations of familiar words (Chaplot et al., 2017; Hermann et al., 2017).
|
| 14 |
+
|
| 15 |
+
The potential impact of situated linguistic agents, VQA models and other grounded language learning systems is vast, as a basis for human users to interact with situated learning applications such as self-driving cars and domestic robotic tools. However, our understanding of how these agents learn and behave is limited. The challenges of interpreting the factors or reasoning behind the decisions and predictions of neural networks are well known. Indeed, a concerted body of research in both computer vision (Zeiler & Fergus, 2014; Simonyan et al., 2014; Yosinski et al., 2015) and natural language processing (Linzen et al., 2016; Strobelt et al., 2016) has focused on addressing this uncertainty. As grounded language learning agents become more prevalent, then, understanding their learning dynamics, representation and decision-making will become increasingly important, both to inform future research and to build confidence in users who interact with such models.
|
| 16 |
+
|
| 17 |
+
We therefore aim to establish a better understanding of neural network-based models of grounded language learning, noting the parallels with research in neuroscience and psychology that aims to understand human language acquisition. Extending the approach of Ritter et al. (2017), we adapt various experimental techniques initially developed by experimental psychologists (Landau et al., 1988; Markman, 1990; Hollich et al., 2000; Colunga & Smith, 2005). In line with typical experiments on humans, our experimental simulations are conducted in a highly controlled environment: a simulated 3D world with a limited set of objects and properties, and corresponding unambiguous, symbolic linguistic stimuli (Figure 1). However, the simplicity and generality of our architecture and the form of the inputs to the model (continuous visual plus symbolic linguistic) make the proposed methods and approach directly applicable to VQA and other tasks that combine linguistic and visual data. Using these methods, we explore how the training environment of our agent affects its learning outcomes and speed, measure the generality and robustness of its understanding of certain fundamental linguistic concepts, and test for biases in the decisions it takes once trained. Further, by applying layerwise attention, a novel tool for visualising computation in grounded language learning models, we obtain a plausible algorithmic account of some of the effects in terms of representation and processing. Our principal findings about this canonical grounded language learning architecture are the following:
|
| 18 |
+
|
| 19 |
+
Shape / colour biases When the agent is trained on an equal number of shape and colour words, it develops a propensity to extend labels for ambiguous new words according to colour rather than shape (color bias). A human-like bias towards shapes can be induced in the agent, but only if it experiences many more shape terms than colour terms during training.
|
| 20 |
+
|
| 21 |
+
The problem of learning negation The agent learns to execute negated instructions, but if trained on small amounts of data it tends to represent negation in an ad hoc way that does not generalise.
|
| 22 |
+
|
| 23 |
+
Curriculum effects for vocabulary growth The agent learns words more quickly if the range of words to which it is exposed is limited at first and expanded gradually as its vocabulary develops.
|
| 24 |
+
|
| 25 |
+
Semantic processing and representation differences The agent learns words of different semantic classes at different speeds and represents them with features that require different degrees of visual processing depth (or abstraction) to compute.
|
| 26 |
+
|
| 27 |
+
Before describing the experiments that reveal these effects, we briefly outline details of the environment and agent used for the simulations.
|
| 28 |
+
|
| 29 |
+
# 2 A 3D WORLD FOR LANGUAGE LEARNING
|
| 30 |
+
|
| 31 |
+
Our experiments take place in the DeepMind Lab simulated world (Beattie et al., 2016), modified to include a language channel. An agent in this environment receives textual instructions, such as find the pencil, and is rewarded for satisfying the instruction, in this case by executing movement actions (move-left, turn right etc.) that allow it to locate a (3D, rotating) pencil and move into the space that it occupies. At each timestep in such an episode, the agent receives a continuous (RGB) pixel tensor of visual input and a symbolic (word-level) textual instruction,1 and must execute a movement action. To solve tasks and receive rewards, the agent must therefore first learn to perceive this environment, actively controlling what it sees via movement of its head (turning actions), and to navigate its surroundings via meaningful sequences of actions.
|
| 32 |
+
|
| 33 |
+
A typical simulation involves specifying certain aspects of the environment while leaving others to be determined randomly. For instance, in an object identification task, we might wish to specify the overall layout of the world, the range of positions in which objects can appear, a list of objects that can appear in each position, a probability of appearance and rewards associated with selecting each object. The environment engine is then responsible for randomly instantiating episodes that satisfy these constraints together with corresponding language instructions. Even with a detailed specification and a finite inventory of objects, properties and instruction words, there are tens of millions of unique episodes that the agent can encounter during training, each involving different object shapes, colours, patterns, shades, sizes and/or relative positions. With respect to the goal of understanding models of grounded language learning, this simulated environment and synthetic language is a useful asset: we can straightforwardly apply the methods of behavioural psychologists, testing how agents respond to precisely crafted training and test stimuli.
|
| 34 |
+
|
| 35 |
+
# 3 A SITUATED LANGUAGE LEARNING AGENT
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1: Left: Schematic agent architecture. Right: An example of the word learning environment common to all experiments in this paper. The agent observes two 3D rotating objects and a language instruction and must select the object that matches the instruction. In this case the instruction is a shape word (chair). The confounding object (a refrigerator) and the colours of both objects are selected at random and will vary across the agent’s experience of the word chair.
|
| 39 |
+
|
| 40 |
+
For maximum generality, our simulations involve an agent that combines standard modules for processing sequential symbolic input (a recurrent network) and visual input (a convolutional network). At each time step $t$ , the visual input $v _ { t }$ is encoded by the convolutional vision module $\mathbf { V }$ and a recurrent (LSTM, Hochreiter & Schmidhuber (1997)) language module L encodes the instruction string $l _ { t }$ . A mixing module M determines how these signals are combined before they are passed to a LSTM action module A: here M is simply a feedforward linear layer operating on the concatenation of the output from $\mathbf { V }$ and $\mathbf { L }$ . The hidden state $s _ { t }$ of $\mathbf { A }$ is fed to a policy function, which computes a probability distribution over possible motor actions $\pi ( \boldsymbol { a } _ { t } | \boldsymbol { s } _ { t } )$ , and a state-value function approximator $V a l ( s _ { t } )$ , which computes a scalar estimate of the agent value function for optimisation. Val estimates the expected discounted future return, by approximating the state-value function $\begin{array} { r } { V a l _ { \pi } ( s ) = \mathbb { E } _ { \pi } [ \sum _ { k = 0 } ^ { \infty } \lambda ^ { k } \hat { r } _ { t + k + 1 } \mid S _ { t } = s ] } \end{array}$ where $S _ { t }$ is the state of the environment at time when following policy $\pi$ and $r _ { t }$ is the reward received following the action performed at time . $0 \leq \lambda \leq 1$ represents a discount parameter. Note that this architecture is a simplified version of that proposed by Hermann et al. (2017), without auxiliary learning components.
|
| 41 |
+
|
| 42 |
+
Weight updates are computed according to the asynchronous advantage actor-critic (A3C) algorithm (Mnih et al., 2016), in conjunction with the RMSProp update rule (Tieleman & Hinton, 2012). During training, a single parameter vector is shared across 16 CPU cores, which offers a suitable tradeoff between training time and loss of accuracy due to the asynchronous updates.
|
| 43 |
+
|
| 44 |
+
# 4 EXPERIMENTS
|
| 45 |
+
|
| 46 |
+
# 4.1 WORD LEARNING BIASES
|
| 47 |
+
|
| 48 |
+
One effect that is considered instrumental in allowing children to overcome the challenges of early word learning is the human shape bias (Landau et al., 1988), whereby infants tend to to presume that novel words refer to the shape of an unfamiliar object rather than, for instance, its colour, size or texture.
|
| 49 |
+
|
| 50 |
+
Our simulated environment permits the replication of the original experiment by Landau et al. (1988) designed to demonstrate the shape bias in humans. During training, the agent learns word meanings in a room containing two objects, one that matches the instruction word (positive reward) and a confounding object that does not (negative reward). Using this method, the agent is taught the meaning of a set $C$ of colour terms, $S$ of shape terms and $A$ of ambiguous terms (in the original experiment, the terms $a \in A$ were the nonsense terms ‘dax’ and ‘riff’). The target referent for a shape term $s \in S$ can be of any colour $c \in C$ and, similarly, the target referent when learning the colours in $C$ can be of any shape. In contrast, the ambiguous terms in $A$ always correspond to objects with a specific colour $c _ { a } \notin C$ and shape $s _ { a } \notin S$ (e.g. ‘dax’ always referred to a black pencil, and neither black nor pencils were observed in any other context) . Note also that colour terms refer to a range of RGB space through the application of Gaussian noise to prototypical RGB codes, so that two instances of red objects will have subtly different colours.
|
| 51 |
+
|
| 52 |
+
As the agent learns, we periodically measure its bias by means of test episodes for which no learning takes place. In a test episode, the agent receives an instruction $a \in A$ (‘dax’) and must decide between two objects, $o _ { 1 }$ , whose shape is $s _ { a }$ and whose colour is ${ \hat { c } } \notin C \cup \{ c _ { a } \}$ (a blue pencil), and $o _ { 2 }$ , whose shape is $\hat { s } \notin S \cup \{ s _ { a } \}$ and whose colour is $c _ { a }$ (a black fork). Note that in the present example neither the colour blue nor the shape fork are observed by the agent during training. As with the original human experiment, the degree of shape bias in the agent can be measured, as the agent is learning, by its propensity to select $o _ { 1 }$ in preference to $o _ { 2 }$ . Moreover, by varying the size of sets $S$ and $C$ , we can examine the effect of different training regimes on this bias exhibited by the agent.
|
| 53 |
+
|
| 54 |
+
Figure 2 illustrates how a shape/colour bias develops in agents exposed to three different training regimes. An agent that is taught exclusively colour words $( \mid S \ \bar { \mid } = 0 , \mid C \ \lvert = \ 8 )$ unsurprisingly develops a strong colour bias. More interestingly, an agent that is taught an equal number of shape and colour terms $( \mid S \mid = 8 , \mid C \mid = 8 )$ develops a colour bias. This suggests that the canonical architecture employed in our agent (convolutional vision network combined with language instruction embedding) naturally promotes a colour bias. In order to induce a (human-like) shape bias, it was necessary to train the agent exclusively on a larger set of $( \mid S \mid = 2 0 , \mid C \mid = 0 )$ shapes before it began to exhibit a notable shape bias.
|
| 55 |
+
|
| 56 |
+
The fact that the network so readily develops biases that are pertinent to word learning provides insight into established effects of neural networks such as rapid acceleration of word learning (see e.g. Plunkett & Schafer (2001); Hermann et al. (2017)); it is precisely the progressive specialisation of the agent’s object recognition and labelling mechanisms (towards shapes, colours or both, as determined by the training regime) that narrows the space of possible referents, permitting faster word learning as training progresses.2
|
| 57 |
+
|
| 58 |
+
These conclusions can be incorporated with those of Ritter et al. (2017), who observe a shape bias in convolutional networks trained on the ImageNet Challenge training set. Our experiments with a single canonical architecture exposed to different training stimuli indicate the cause of this effect to be the training data distribution (the ImageNet data indeed contains many more shape-based than colourbased categories) rather than the convolutional architecture itself. Indeed, our findings suggest that a feed-forward convolutional architecture operating (bottom-up) on image pixels promotes a colour rather than shape bias. On the other hand, a typical linguistic environment (for American children at least3) and, perhaps by extension, most broad-coverage machine-learning datasets, contains many more instances of shape categories than colour categories.
|
| 59 |
+
|
| 60 |
+

|
| 61 |
+
Figure 2: Degrees of shape bias for different training regimes: An agent that is trained only on shape words (right) more readily presumes that ambiguous words refer to object shape than to object colour. This tendency is measured across all combinations of known and confounding objects and labels and represented by the blue line. The magnitude of the bias on the scale $[ - 1 0 , 1 0 ]$ is the mean ‘score’ (10 for the object matching the instruction in shape and 10 for the object matching in colour) over 1000 random test episodes. In contrast, an agent trained only on colour words (left) exhibits a colour bias. Interestingly, an agent trained on 8 colour and 8 shape words (middle) also exhibits a colour bias. Data (in this and proceeding figures) show mean and standard error across five fastest-learning agents of 16 different hyperparameter settings, sampled at random from ranges specified in in supplementary material 6.1.
|
| 62 |
+
|
| 63 |
+
# 4.2 THE PROBLEM OF LEARNING NEGATION
|
| 64 |
+
|
| 65 |
+
The interpretation of negated sentences such as tell me a joke that is not offensive is a fundamental facet of natural language understanding, and potentially critical for artificial agents receiving instructions from human users. Despite its communicative importance, negation can be challenging to acquire for human language learners. For instance, negated utterances pose greater production and comprehension difficulties than the equivalent non-negated language (Nordmeyer & Frank, 2014; Pea, 1980). To explore the acquisition of negation in grounded language learning models, we designed a simulation in which, as before, our agent was placed in a single room and required to select one of two objects matching an instruction. From a full set of training words $I$ (e.g. red or ball), a subset, $I _ { 1 } \subset I$ , was sampled and presented to the agent in both positive and negative forms (ball, not ball) and a disjoint subset, $I _ { 2 } \subset I$ , was provided only in positive forms (pencil). To test whether the agent could learn to understand the instruction form pick something that is not an $X$ in a generally applicable way, we periodically measured its ability to interpret negated versions of the instructions in $I _ { 2 }$ .
|
| 66 |
+
|
| 67 |
+
As illustrated in Figure 3, the agent learned to follow both positive and negative instructions, for various sets of instruction words $I$ . However, unlike other linguistic operations such as adjective-noun modification (Hermann et al., 2017), the agent exhibited difficulty generalising the notion of negation acquired in the context of $I _ { 1 }$ to the held-out items $I _ { 2 }$ . This difficulty was most acute when $I$ consisted of 12 colour terms split evenly into $I _ { 1 }$ and $I _ { 2 }$ . Indeed, the ability to generalise negation improved as the size of $I$ increased to include 40 shapes, from just above chance (a small positive average reward) to $7 5 \%$ (yielding an average reward of $\approx 5 / 1 0 $ ). There was also a small but interesting difference in generalisation when negating shape terms vs. colour terms, which is consistent with the processing differences discussed above and in more detail in Section 4.4.
|
| 68 |
+
|
| 69 |
+
We conjecture that negation does not generalise easily because, for a word $i _ { n } \in I$ and corresponding extension set of objects $s _ { n } \in S$ , the agent can perform perfectly on the training set by simply associating instructions of the form ‘not $w '$ with the extension $s _ { 1 } \cup \cdot \cdot \cdot s _ { n - 1 } \cup s _ { n + 1 } \cdot \cdot \cdot$ . This understanding of negation would generalise much worse than an interpretation of ‘not $w ^ { i }$ ’ that involved identifying and avoiding an object of type $w$ . For small training sets, the results suggest that the model prefers the former interpretation, but also that its tendency to discover the latter more generalisable understanding increases as the set of negated concepts to which it is exposed grows. Thus, with appropriately broad exposure to instances of negation during training, neural networks without bespoke biases or regularization can learn to respond effectively to negated stimuli pertaining to their perceptible surroundings. However, tailored architectures and computational biases may be required in cases where agents learn from, and act on, constrained sets of linguistic stimuli.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 3: The problem of learning negation in language learning agents: The agent must be exposed to negative instructions in a sufficiently diverse range of contexts in order to learn a useful generalisable notion of negation. If trained to interpret positive commands involving 12 terms and negative commands involving 6 of those 12 terms (left, colour terms, middle, shape terms), the agent does not effectively interpret negative commands involving the remaining 6 terms. When exposed to 40 shape terms and trained to interpret negative commands involving 20 of those terms, the agent generalises the negation operation more effectively, but still not perfectly. When the two-word negative instructions are encoded with an LSTM rather than additive BOW encoder, an almost identical pattern of gradually improving generalisation is observed.
|
| 73 |
+
|
| 74 |
+
# 4.3 CURRICULUM LEARNING
|
| 75 |
+
|
| 76 |
+
The idea that learning is more successful if simpler things are studied before more complex things is a basic tenet of human education. There is some consensus that early exposure to simple, clear linguistic input helps child language acquisition (Fernald et al., 2010), although this is not unanimous (Shore, 1997). Controlled experiments with artificial neural networks trained directly on symbolic (languagelike) data have alse revealed faster or more effective learning when training examples are ordered by some metric of complexity (Elman, 1993). This approach is now typically referred to as curriculum learning (Bengio et al., 2009). However, robust improvements due to curriculum learning can be difficult to achieve in the context of text-based learning (Mikolov et al., 2011; Graves et al., 2017), and curricula are not ordinarily applied when training text-based neural language models. Recent evidence suggests that the benefits of curriculum training can be more easily realised for agents learning to act conditioned on language than those learning to map between linguistic inputs and outputs. Both Hermann et al. (2017) and Oh et al. (2017) observed that curricula were essential for agents learning to execute linguistic instructions that require both resolving of referring expressions (get the red ball..) and non-trivial action policies such as exploration (..in the green room).
|
| 77 |
+
|
| 78 |
+
Here, we chose to explore curriculum learning in a more controlled way in grounded language learning agents. To do so, we trained our agent to learn the meaning of 40 shape words (as exhibited by its ability to respond appropriately) under two conditions. In one condition, the agent was presented with the 40 words (together with corresponding target and confounding objects) sampled randomly throughout training. In another condition, the agent was only presented with a subset of the 40 words (selected at random) until these were mastered (as indicated by an average reward of $9 . 8 / 1 0$ over 1000 consecutive trials), at which point this subset was expanded to include more words. This process was iterated for subsets of size 2, 5, 10 and eventually 40 words.
|
| 79 |
+
|
| 80 |
+

|
| 81 |
+
Figure 4: Curriculum training expedites vocabulary growth: An agent that is presented with stimuli sampled uniformly from a set $S$ of 40 shape words (red line) learns more slowly than one whose stimuli are constrained to a two-word subset $S _ { 1 } , S _ { 1 } \subset S$ , until the agent learns both words, then extended to a 5-word subset $S _ { 2 } , S _ { 1 } \subset S _ { 2 } \subset S$ , then a 10-word subset $S _ { 3 } , S _ { 2 } \subset S _ { 3 } \subset S$ . This strong effect of ‘curriculum learning’ can be observed both when comparing average reward when agents in the two conditions are learning words sampled from $S$ (left - note that the agent in the curriculum condition begins reporting performance on $S$ after prior training on the restricted subsets) and by measuring vocabulary size as a function of training episodes (right).5
|
| 82 |
+
|
| 83 |
+
As shown in Figure 4, an agent that followed the curriculum (i.e. in the second condition) learned notably faster overall than one presented directly with a large group of new words. This result further corroborates the importance of training curricula for grounded language learning agents. Moreover, unlike the effect observed by Hermann et al. (2017), which focused on tasks requiring the agent to explore a large maze, the present simulation demonstrates strong curriculum effects simply when learning to associate objects with words. Thus, the development of core linguistic and semantic knowledge in situated or grounded agents can be clearly expedited by starting small and easy and slowly increasing the language learning challenge faced by the agent.
|
| 84 |
+
|
| 85 |
+
# 4.4 PROCESSING AND REPRESENTATION DIFFERENCES
|
| 86 |
+
|
| 87 |
+
Many studies aiming to understand linguistic processing in humans do so by uncovering connections between different semantic or conceptual domains and distinct processing or patterns of representation. These effects emerge via both behavioural methods (measuring differences in how subjects learn, use or even forget concepts of different types (Bowerman & Choi, 2001; Paivio et al., 1994)) and neuroimaging (associating words of different types with spatially and structurally distinct brain regions (Huth et al., 2016; Patterson et al., 2007)). Neuroscientific theories of memory, representation and learning have been developed to account for these effects (Rogers & McClelland, 2004; Binder & Desai, 2011). In the pursuit of a better understanding of artificial agents, we can similarly explore links between word classes, semantic domains and patterns of learning, behaviour, processing or representation. This knowledge could ultimately be essential for informing the process of designing architectures capable of learning not just the simple language studied here, but also the full range of abstract semantic phenomena inherent in adult language.
|
| 88 |
+
|
| 89 |
+
Word learning speeds The order in which words of different types are acquired has been used to inform theories of child language acquisition (Gentner, 1982) and human semantic processing more generally (Ghyselinck et al., 2004). To explore the order of word learning in our agent, we exposed it to randomly interleaved training instances for words of six different classes (shapes, colours, patterns, sizes, shades and superordinate category terms, such as furniture), for multiple shapes. We compared the rates of word learning in two conditions. In the fixed class-size, each class was restricted to two exemplars. In the variable class-size condition, each class was represented by a different number of members, a more faithful reflection of natural language, where one word class (e.g. prepositions) can have a different number of members from another (e.g. nouns).6 In both conditions, the training stimuli were sampled random uniformly from all word types (not word classes), so that an agent in the variable class-size condition received approximately four times as much exposure to shape words as to colour words, for instance.
|
| 90 |
+
|
| 91 |
+
As illustrated in Figure 5, there were clear differences in the speed with which the agent learned words of different classes. In the fixed class-size condition, the first words to be learned were blue (a colour word) and diagonal-striped (a pattern), with the second colour word, brown, learned around the same time as the two shapes chair and suitcase and the relative size terms larger and smaller. Category terms were learned after shape terms.7 In contrast, in the variable class-size condition the variable exposure to different word classes seems to cause a degree of specialisation in shape words, so that the agent learns all 40 shape words well before it acquires the 12 colour words.
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 5: Words from different semantic classes are learned at different speeds: In the fixed class-size condition (left), the agent learns two words from each class. In the variable class-size condition (right) each class has a different number of members, as per supplementary material 6.2.
|
| 95 |
+
|
| 96 |
+
Layer-wise attention To complement our behavioural analysis we developed a method for better understanding semantic processing and representation in the agent. The method, which we call layerwise attention, involves modifying the agent architecture to expose processing differences in the visual features that are most pertinent to each lexical concept. In the standard agent, a distributed representation of the linguistic input is concatenated with the output from the top layer of a 3-layer convolutional visual module at each timestep, fed through a multi-layer perceptron and then passed to the agent’s (recurrent) core. We modify this agent so that it can learn to attend to the output from different layers of its visual processing module, conditioned on the linguistic input available at a particular moment.
|
| 97 |
+
|
| 98 |
+
Let $e _ { l }$ be the representation of a language instruction $l$ and $\mathbf { v } _ { i }$ be the output of layer $i = { 1 , 2 , 3 }$ of the visual module with dimension $n _ { i } \times n _ { i } \times k _ { i }$ , where $k _ { i }$ is the number of feature maps. In the layerwise attention module, the $\mathbf { v } _ { i }$ are first passed through 3 independent linear layers to $\mathbf { v } _ { \ i } ^ { \prime }$ with common final dimension $n _ { i } \times n _ { i } \times K$ , such that $K$ is also the dimensionality of $e _ { l }$ . The $\mathbf { v } _ { \ i } ^ { \prime }$ are then stacked into a single tensor $T$ of dimension $d \times K$ , where $\begin{array} { r } { d = \sum _ { i = 1 } ^ { 3 } n _ { i } ^ { 2 } } \end{array}$ . $T$ is then multiplied by $e _ { l }$ and passed through a softmax layer to yield a $d$ dimensional discrete probability distribution over all (pixel-like) locations represented in each layer of the visual module $\mathbf { V }$ . These values are applied multiplicatively to each of the $k _ { i }$ -dimension) representations returned by $\mathbf { V }$ , before a pooling step (mirroring that of the final layer in the original agent) and then concatenation.
|
| 99 |
+
|
| 100 |
+
Layerwise attention provides a measure not only of which image locations contain the most important information for the agent when choosing actions at a given timestep, but also at what level of (visual) abstraction that information is most useful. This insight can be visualised by applying the method of Simonyan et al. (2014), propagating the probability mass from the attention distribution back onto the input image. Figure 6 illustrates the effect of backpropagating the attention probabilities corresponding to each layer of the convnet onto (grayscale copies of) the visual input.8 As is clear from these visualisations, an agent that is exposed only to shape words will learn to rely on features from the upper-most layers of its visual module when considering objects in its surroundings. In contrast, an agent trained to interpret only colour terms focuses with feature detectors from the lower layers of its visual module in order to distinguish between objects of interest. It is well established that convolutional networks trained to classify images also exhibit differential specialisation of feature detectors between layers (see e.g. LeCun et al. (2010)). Layerwise attention provides a means to quantify the magnitude of this specialisation, and to measure the importance of each layer with respect to particular linguistic stimuli. It is also notable that a more conventional 2D (T-SNE) visualisation of the word embeddings in the input layer of $\mathbf { L }$ provides further evidence of of word-class-specific processing, as illustrated in Figure 6.
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 6: Representation and processing differences between colour and shape words. ‘Dashboards’ for interpreting processing in an agent with layerwise attention. The large pane at the top left of the dashboard shows the input to the agent. The bar chart on the bottom left shows the attention distribution over all 520 ‘locations’ from the agent’s visual representations. 400 red bars show the attention on the $( 2 0 \times 2 0 )$ locations output from the lowest layer of the convnet, 81 green bars show the attention on the $( 9 \times 9 )$ locations from the middle layer and 49 blue bars show the attention on the $( 7 \times 7 )$ locations from the top layer. The small windows on the right side illustrate these attention weights (grouped by layer) propagated back to and superimposed over a greyscale copy of the input image, as described by Simonyan et al. (2014). An agent trained exclusively on colour words (A) relies more on the first and second layers of the convnet than an agent trained exclusively on shape words $\mathbf { ( B ) }$ , which uses second and upper layer visual features. C: A schematic of layerwise attention in the agent architecture. D: A 2D (t-SNE) visualisation of the space of the word embeddings weights in the language module $\mathbf { \Pi } ( \mathbf { L } )$ of an agent trained on different word types, illustrating that words cluster naturally according to semantic classes in the linguistic memory of the agent.
|
| 104 |
+
|
| 105 |
+
# 5 CONCLUSION
|
| 106 |
+
|
| 107 |
+
Models that are capable of grounded language learning promise to significantly advance the ways in which humans and intelligent technology can interact. In this study, we have explored how a situated language learning agent built from canonical neural-network components overcomes the challenge of early language learning. We measured the behaviour exhibited once the first words and simple phrases are acquired, tested factors that speed up this learning, explored aspects of language that pose particular problems and presented a technique, layerwise attention, for better understanding semantic and visual processing in such agents.
|
| 108 |
+
|
| 109 |
+
The application of experimental paradigms from cognitive psychology to better understand deep neural nets was proposed by Ritter et al. (2017), who observed that convolutional architectures exhibit a shape bias when trained on the ImageNet Challenge data. The ability to control precisely both training and test stimuli in our simulated environment allowed us to isolate this effect as deriving from the training data, and indeed to reach the opposite conclusion about the architecture itself. This study also goes beyond that of Ritter et al. (2017) in exploring more abstract linguistic operations (negation, abstract category terms) and studying curriculum effects on the dynamics of word learning. Further, we complement these behavioural observations with computatoinal analysis of representation and processing, via layerwise attention.
|
| 110 |
+
|
| 111 |
+
While the control and precision afforded by the simulated environment in the present study has made these analyses and conclusions possible, in future, as our understanding of language learning agents develops, it will be essential to verify conclusions on agents trained on more naturalistic data. At first, this might involve curated sets of images, videos and naturally-occurring text etc, and, ultimately, experiments on robots trained to communicate about perceptible surroundings with human interlocutors. In a world with agents capable of learning such advanced linguistic behaviour, it would certainly be more challenging, but also even more crucial, to understand not just what they can do, but also how they learn to do it.
|
| 112 |
+
|
| 113 |
+
# REFERENCES
|
| 114 |
+
|
| 115 |
+
Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C. Lawrence Zitnick, and Devi Parikh. VQA: Visual Question Answering. In International Conference on Computer Vision (ICCV), 2015.
|
| 116 |
+
|
| 117 |
+
Charles Beattie, Joel Z. Leibo, Denis Teplyashin, Tom Ward, Marcus Wainwright, Heinrich Kuttler, ¨ Andrew Lefrancq, Simon Green, V´ıctor Valdes, Amir Sadik, Julian Schrittwieser, Keith Anderson, ´ Sarah York, Max Cant, Adam Cain, Adrian Bolton, Stephen Gaffney, Helen King, Demis Hassabis, Shane Legg, and Stig Petersen. Deepmind lab. CoRR, abs/1612.03801, 2016. URL http: //arxiv.org/abs/1612.03801.
|
| 118 |
+
|
| 119 |
+
Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ Proceedings of the 26th annual international conference on machine learning, pp. 41–48. ACM, 2009.
|
| 120 |
+
|
| 121 |
+
Jeffrey R Binder and Rutvik H Desai. The neurobiology of semantic memory. Trends in cognitive sciences, 15(11):527–536, 2011.
|
| 122 |
+
|
| 123 |
+
Melissa Bowerman and Soonja Choi. Shaping meanings for language: universal and language-specific in the acquisition of semantic categories. In Language acquisition and conceptual development, pp. 475–511. Cambridge University Press, 2001.
|
| 124 |
+
|
| 125 |
+
Roger Brown. A first language: The early stages. Harvard U. Press, 1973.
|
| 126 |
+
|
| 127 |
+
Devendra Singh Chaplot, Kanthashree Mysore Sathyendra, Rama Kumar Pasumarthi, Dheeraj Rajagopal, and Ruslan Salakhutdinov. Gated-attention architectures for task-oriented language grounding. arXiv preprint arXiv:1706.07230, 2017.
|
| 128 |
+
|
| 129 |
+
Eliana Colunga and Linda B Smith. From the lexicon to expectations about kinds: A role for associative learning. Psychological review, 112(2):347–382, 2005.
|
| 130 |
+
|
| 131 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009.
|
| 132 |
+
|
| 133 |
+
Jeffrey L Elman. Learning and development in neural networks: The importance of starting small. Cognition, 48(1):71–99, 1993.
|
| 134 |
+
|
| 135 |
+
Anne Fernald, Kirsten Thorpe, and Virginia A. Marchman. Blue car, red car: Developing efficiency in online interpretation of adjectivenoun phrases. Cognitive Psychology, 60(3):190 – 217, 2010.
|
| 136 |
+
|
| 137 |
+
Michael C Frank, Mika Braginsky, Daniel Yurovsky, and Virginia A Marchman. Wordbank: An open repository for developmental vocabulary data. Journal of child language, 44(3):677–694, 2017.
|
| 138 |
+
|
| 139 |
+
Dedre Gentner. Why nouns are learned before verbs: Linguistic relativity versus natural partitioning. Center for the Study of Reading Technical Report; no. 257, 1982.
|
| 140 |
+
|
| 141 |
+
Mandy Ghyselinck, Michael B Lewis, and Marc Brysbaert. Age of acquisition and the cumulativefrequency hypothesis: A review of the literature and a new multi-task investigation. Acta psychologica, 115(1):43–67, 2004.
|
| 142 |
+
|
| 143 |
+
Alex Graves, Marc G Bellemare, Jacob Menick, Remi Munos, and Koray Kavukcuoglu. Automated curriculum learning for neural networks. Proceedings of ICML, 2017.
|
| 144 |
+
|
| 145 |
+
Karl Moritz Hermann, Felix Hill, Simon Green, Fumin Wang, Ryan Faulkner, Hubert Soyer, David Szepesvari, Wojtek Czarnecki, Max Jaderberg, Denis Teplyashin, et al. Grounded language learning in a simulated 3d world. arXiv preprint arXiv:1706.06551, 2017.
|
| 146 |
+
|
| 147 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 148 |
+
|
| 149 |
+
George J Hollich, Kathy Hirsh-Pasek, Roberta Michnick Golinkoff, Rebecca J Brand, Ellie Brown, He Len Chung, Elizabeth Hennon, Camille Rocroi, and Lois Bloom. Breaking the language barrier: An emergentist coalition model for the origins of word learning. Monographs of the society for research in child development, pp. i–135, 2000.
|
| 150 |
+
|
| 151 |
+
Marjorie S Horton and Ellen M Markman. Developmental differences in the acquisition of basic and superordinate categories. Child development, pp. 708���719, 1980.
|
| 152 |
+
|
| 153 |
+
Alexander G Huth, Wendy A de Heer, Thomas L Griffiths, Fred´ eric E Theunissen, and Jack L Gallant. ´ Natural speech reveals the semantic maps that tile human cerebral cortex. Nature, 532(7600): 453–458, 2016.
|
| 154 |
+
|
| 155 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 156 |
+
|
| 157 |
+
Barbara Landau, Linda B Smith, and Susan S Jones. The importance of shape in early lexical learning. Cognitive development, 3(3):299–321, 1988.
|
| 158 |
+
|
| 159 |
+
Yann LeCun, Koray Kavukcuoglu, and Clement Farabet. Convolutional networks and applications in ´ vision. In Circuits and Systems (ISCAS), Proceedings of 2010 IEEE International Symposium on, pp. 253–256. IEEE, 2010.
|
| 160 |
+
|
| 161 |
+
Tal Linzen, Emmanuel Dupoux, and Yoav Goldberg. Assessing the ability of lstms to learn syntaxsensitive dependencies. arXiv preprint arXiv:1611.01368, 2016.
|
| 162 |
+
|
| 163 |
+
Ellen M Markman. Constraints children place on word meanings. Cognitive Science, 14(1):57–77, 1990.
|
| 164 |
+
|
| 165 |
+
Toma´s Mikolov, Anoop Deoras, Daniel Povey, Luk ˇ a´s Burget, and Jan ˇ Cernock ˇ y. Strategies for \` training large scale neural network language models. In Automatic Speech Recognition and Understanding (ASRU), 2011 IEEE Workshop on, pp. 196–201. IEEE, 2011.
|
| 166 |
+
|
| 167 |
+
Dipendra K Misra, John Langford, and Yoav Artzi. Mapping instructions and visual observations to actions with reinforcement learning. Proceedings of EMNLP, 2017.
|
| 168 |
+
|
| 169 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 2016.
|
| 170 |
+
|
| 171 |
+
Ann E Nordmeyer and Michael C Frank. The role of context in young childrens comprehension of negation. Journal of Memory and Language, 77:25–39, 2014.
|
| 172 |
+
|
| 173 |
+
Junhyuk Oh, Satinder Singh, Honglak Lee, and Pushmeet Kohli. Zero-shot task generalization with multi-task deep reinforcement learning. Proceedings of ICML, 2017.
|
| 174 |
+
|
| 175 |
+
Allan Paivio, Mary Walsh, and Trudy Bons. Concreteness effects on memory: When and why? Journal of Experimental Psychology: Learning, Memory, and Cognition, 20(5):1196, 1994.
|
| 176 |
+
|
| 177 |
+
Karalyn Patterson, Peter J Nestor, and Timothy T Rogers. Where do you know what you know? the representation of semantic knowledge in the human brain. Nature reviews. Neuroscience, 8(12): 976, 2007.
|
| 178 |
+
|
| 179 |
+
Roy D Pea. The development of negation in early child language. The social foundations of language and thought, pp. 156–186, 1980.
|
| 180 |
+
|
| 181 |
+
Kim Plunkett and Graham Schafer. Early speech perception and word learning. The development of language, pp. 51–72, 2001.
|
| 182 |
+
|
| 183 |
+
W. V. O. Quine. Word & Object. MIT Press, 1960.
|
| 184 |
+
|
| 185 |
+
Samuel Ritter, David GT Barrett, Adam Santoro, and Matt M Botvinick. Cognitive psychology for deep neural networks: A shape bias case study. Proceedings of ICML, 2017.
|
| 186 |
+
|
| 187 |
+
Timothy T Rogers and James L McClelland. Semantic cognition: A parallel distributed processing approach. MIT press, 2004.
|
| 188 |
+
|
| 189 |
+
Rima Shore. Rethinking the brain: New insights into early development. 1997.
|
| 190 |
+
|
| 191 |
+
K. Simonyan, A. Vedaldi, and A. Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. In Workshop at International Conference on Learning Representations, 2014.
|
| 192 |
+
|
| 193 |
+
Hendrik Strobelt, Sebastian Gehrmann, Bernd Huber, Hanspeter Pfister, and Alexander M Rush. Visual analysis of hidden state dynamics in recurrent neural networks. arXiv preprint arXiv:1606.07461, 2016.
|
| 194 |
+
|
| 195 |
+
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), 2012.
|
| 196 |
+
|
| 197 |
+
Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. In International Conference on Machine Learning, pp. 2397–2406, 2016.
|
| 198 |
+
|
| 199 |
+
Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In European Conference on Computer Vision, pp. 451–466. Springer, 2016.
|
| 200 |
+
|
| 201 |
+
Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. ICML Deep Learning workshop, 2015.
|
| 202 |
+
|
| 203 |
+
Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014.
|
| 204 |
+
|
| 205 |
+
# 6 SUPPLEMENTARY MATERIAL
|
| 206 |
+
|
| 207 |
+
# 6.1 AGENT DETAILS
|
| 208 |
+
|
| 209 |
+
Table 1: Agent hyperparameters that are fixed throughout our experimentation but otherwise not specified in the text.
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Hyperparameter</td><td>Value</td><td>Description</td></tr><tr><td>train_steps</td><td>640m</td><td>Theoretical maximum number of time steps (across all episodes) for which the agent willbe trained.</td></tr><tr><td>env_steps-per_core_step</td><td>4</td><td>Number of time steps between each action decision (action smoothing)</td></tr><tr><td>num_workers</td><td>32</td><td>Number of independent workers running replicas of the environment with asynchronous updating.</td></tr><tr><td>unroll_length</td><td>50</td><td>Number of time steps through which error is backpropagated in the core LSTM action module</td></tr><tr><td>visual encoder</td><td></td><td></td></tr><tr><td>numayers</td><td>3</td><td>Layers in the convolutional vision network.</td></tr><tr><td>outputchannels</td><td>(32,64,64)</td><td>Number of feature maps in each layer of the network.</td></tr><tr><td>kernels hapes</td><td>(8,4,3)</td><td>Shapes of the (square) convolutional kernels in each layer of the network.</td></tr><tr><td>strides</td><td>(4,2,1)</td><td>Convolution stride length in each layer of the network.</td></tr><tr><td>activation</td><td>relu</td><td>Activation function applied after all except the final layer of the visual encoder.</td></tr><tr><td>language encoder</td><td></td><td></td></tr><tr><td>encoder-type embeddingdim</td><td>BOW</td><td>Whetherthe language encoderuses anadditive bag-of-words (BOW)oranLSTMarchitecture(with tanh nonlinearity).</td></tr><tr><td></td><td>128</td><td>Dimension of the word and instruction embeddings.</td></tr><tr><td>cost calculation additional_discounting</td><td></td><td></td></tr><tr><td>cost_base</td><td>0.99</td><td>Discount used to compute the long-term return R_t in the A3C objective</td></tr><tr><td></td><td>0.5</td><td>Multiplicative scaling of all computed gradients on the backward pass in the network</td></tr><tr><td>optimisation clip-grad_norm</td><td></td><td></td></tr><tr><td>decay</td><td>100 0.99</td><td>Limit on the norm of the gradient across all agent network parameters (if above,scale down)</td></tr><tr><td>epsilon</td><td>0.1</td><td>Decay term in RMSprop gradient averaging function</td></tr><tr><td>learning_rate_finish</td><td>0</td><td>Epsilon term in RMSprop gradient averaging function</td></tr><tr><td>momentum</td><td></td><td>Learning rate at the end of training,based on which linear annealing of is applied.</td></tr><tr><td></td><td>0</td><td>Momentum parameter in RMSprop gradient averaging function</td></tr></table>
|
| 212 |
+
|
| 213 |
+
Table 2: Agent hyperparameters that randomly sampled in order to yield different replicas of our agents for training. uniform $( x , y )$ indicates that values are sampled uniformly from the range $[ x , y ]$ . loguniform $( x , y )$ indicates that values are sampled from a uniform distribution in log-space (favouring lower values) on the range $[ x , y ]$ .
|
| 214 |
+
|
| 215 |
+
<table><tr><td>Hyperparameter</td><td>Value</td><td>Description</td></tr><tr><td>language encoder embed_init</td><td>uniform(0.5,1)</td><td>Standard deviation of normal distribution (mean = O) for sampling initial valuesofword-embeddingweights inL.</td></tr><tr><td>optimisation entropy_cost learning_rate_start</td><td>uniform(0.0005,0.005) loguniform(0.0001,0.002)</td><td>Strength of the (additive) entropy regularisation term in the A3C cost function. Learning rate at the beginning of training annealed linearly to reach learning_rate_finish at the end of train_steps.</td></tr></table>
|
| 216 |
+
|
| 217 |
+
# 6.2 EXPERIMENT DETAILS
|
| 218 |
+
|
| 219 |
+
Table 3: Word classes (class size) used in the word learning speed experiment in Section 4.4. Superscript indicates if the shape a word refers to is also in the extension of a category word.
|
| 220 |
+
|
| 221 |
+
<table><tr><td>Word class</td><td>Words</td></tr><tr><td>Shapes (40)</td><td>chair, suitcase,tv,ball,balloon,cow',zebra’ cake,can’,cassete,chair, guitar, hair-brush, hat,ice-lolydder,il²,e,buh²,ey²,le,re,, fridge,hammer²,knife²,spoon²,apple³,banana³ flower,jug,pig',pincer²,plant,saxophone,</td></tr><tr><td>Colours (12)</td><td>shoe4,tennis-racket, tomato',tree³,wine-glass5 blue,brown, pink,yellow,red, green, cyan, magenta, white, grey, purple</td></tr><tr><td>Categories (5)</td><td>1:animals, 2:tools, 3:plants, 4:clothing, 5:containers</td></tr><tr><td>Patterns (3)</td><td>diagonal-striped,chequered, spotted</td></tr><tr><td>Shades (2)</td><td>lighter, darker</td></tr><tr><td>Sizes (2)</td><td>larger, smaller</td></tr></table>
|
md/train/Byj54-bAW/Byj54-bAW.md
ADDED
|
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A TENSOR ANALYSIS ON DENSE CONNECTIVITY VIA CONVOLUTIONAL ARITHMETIC CIRCUITS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Several state of the art convolutional networks rely on inter-connecting different layers to ease the flow of information and gradient between their input and output layers. These techniques have enabled practitioners to successfully train deep convolutional networks with hundreds of layers. Particularly, a novel way of interconnecting layers was introduced as the Dense Convolutional Network (DenseNet) and has achieved state of the art performance on relevant image recognition tasks. Despite their notable empirical success, their theoretical understanding is still limited. In this work, we address this problem by analyzing the effect of layer interconnection on the overall expressive power of a convolutional network. In particular, the connections used in DenseNet are compared with other types of inter-layer connectivity. We carry out a tensor analysis on the expressive power inter-connections on convolutional arithmetic circuits (ConvACs) and relate our results to standard convolutional networks. The analysis leads to performance bounds and practical guidelines for design of ConvACs. The generalization of these results are discussed for other kinds of convolutional networks via generalized tensor decompositions.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Recently, densely connected networks such as FractalNet (Larsson et al., 2016), ResNet (He et al., 2016), and DenseNet (Huang et al., 2016), have obtained state of the art performance on large problems where highly deep network configurations are used. Adding dense connections between different layers of a network virtually shortens its depth, thus allowing a better flow of information and gradient through the network. This makes possible the training of highly deep models. Models with these types of connections have been successfully trained with hundreds of layers. More specifically, DenseNets have achieved state of the art performance on the CIFAR-10, CIFAR-100, SVHN, and ImageNet datasets, using models of up to 1 thousand layers in depth. Nevertheless, whether these connections provide a fundamental enhancement on the expressive power of a network, or just improve the training of the model, is still an open question. In Huang et al. (2016), DenseNet models with 3 times less parameters than its counterpart (ResNets) were able to achieve the same performance on the ImageNet challenge. Moreover, a theoretical understanding of why the connections used by DenseNets lead to better performance compared with FractalNets or ResNets is still pending.
|
| 12 |
+
|
| 13 |
+
Despite the popularity of these models, there are few theoretical frameworks explaining the power of these models and providing insights to their performance. In Cohen et al. (2016a), the authors considered convolutional networks with linear activations and product pooling layers, called convolutional arithmetic circuits (ConvACs), and argued for the expressiveness of deep networks using a tensor based analysis. This analysis has been extended to rectifier based convolutional networks via generalization of the tensor product Cohen & Shashua (2016a). In Cohen & Shashua (2016a), it was shown that ConvACs enjoy a greater expressive power than rectifier based models despite the popularity of rectifier based networks in practice. Indeed the empirical relevance of ConvAC was demonstrated through an architecture called SimNets Cohen et al. (2016b). In addition, the generative ConvAC of Sharir et al. (2016) achieved state of the art performance in classification of images with missing pixels. These results served as motivation for the works of Cohen & Shashua (2016b); Cohen et al. (2017); Levine et al. (2017); Sharir & Shashua (2017), where different aspects of ConvACs were studied from a theoretical perspective.
|
| 14 |
+
|
| 15 |
+
In Cohen & Shashua (2016b) the inductive bias introduced by pooling geometries was studied. Later, Levine et al. (2017) makes use of the quantum entanglement measure to analyze the inductive bias introduced by the correlations among the channels of ConvACs. Moreover, Sharir & Shashua (2017) generalizes the convolutional layer of ConvACs by allowing overlapping receptive fields, in other words permitting stride values lower than the convolution patch size. These locally overlapping connections led to an enhancement on the expressive capacity of ConvACs. The notion of inter-layer connectivity for ConvACs was addressed by Cohen et al. (2017) in the context of sequential data processing, such as audio and text related tasks. In that work, the expressive capabilities of interconnecting processing blocks from a sequence was studied. Nevertheless, these types of interconnections are related to the sequential nature of the problem and different from the ones used in ResNet, FractalNet and DenseNet.
|
| 16 |
+
|
| 17 |
+
In this work, we extend the tensor analysis framework of Cohen et al. (2016a) to obtain insightful knowledge about the effect of dense connections, from the kind used in DenseNets, FractalNet and ResNet, on the expressiveness of deep ConvACs. We study the expressive capabilities provided by different types of dense connections. Moreover, from these results we derive performance bounds and practical guidelines for selection of the hyperparameters of a deep ConvAC, such as layer widths and the topology of dense connections. These results serve as the first step into understanding dense connectivity in rectifier networks as well, since they can be further extended to include rectifier linear units, in the same spirit as the generalization of the tensor products done by Cohen & Shashua (2016a).
|
| 18 |
+
|
| 19 |
+
The remainder of this paper is organized as follows. In Section 2, we introduce the notation and basic concepts from tensor algebra. In Section 3, we present the tensor representation of ConvACs as introduced by Cohen et al. (2016a), and later in Section 4, we obtain tensor representations for densely connected ConvACs. In Section 5, performance bounds and design guidelines are derived for densely connected ConvACs.
|
| 20 |
+
|
| 21 |
+
# 2 PRELIMINARIES
|
| 22 |
+
|
| 23 |
+
The term tensor refers to a multi-dimensional array, where the order of the tensor corresponds to the number of indexes required to access one of its entries. For instance, a vector is a tensor of order 1 while a matrix is a tensor of order 2. In general a tensor $\mathcal { A }$ of order $N$ requires $N$ indexes $( d _ { 1 } , \dots , d _ { N } )$ to access one of its elements. For the sake of notation, given $I \in \mathbb { N }$ , we use the expression $[ I ]$ to denote the set $\{ 1 , 2 , \ldots , I \}$ . In addition, the $( d _ { 1 } , \ldots , d _ { N } )$ -th entry of a given tensor of order $N$ and size $M _ { 1 } \times M _ { 2 } \times \cdot \cdot \cdot \times M _ { N }$ is denoted as $\mathcal { A } _ { d _ { 1 } , \dots , d _ { N } }$ , where $d _ { i } \in$ $[ M _ { i } ]$ for all $i \in [ N ]$ . Moreover, for the particular case of tensors of order $N$ with symmetric sizes $M _ { 1 } = M _ { 2 } \stackrel { . } { = } \dot { \cdot } \cdot \cdot = M _ { N } = M$ , we use $( \mathbb { R } ^ { M } ) ^ { \otimes N }$ as shorthand notation for $\mathbb { R } ^ { M \times \cdots \times M }$ . A crucial operator in tensor analysis is the tensor product $\otimes$ , since it is necessary for defining the rank of a tensor. For two tensors $\mathbf { \dot { \boldsymbol { B } } } \in \mathbb { R } ^ { M _ { 1 } \times \dots \times M _ { p } }$ and $\mathcal { C } \in \mathbb { R } ^ { M _ { p + 1 } \times \cdots \times M _ { p + q } }$ , the tensor product is defined such that $\pmb { { B } } \otimes \pmb { { C } } \in \mathbb { R } ^ { M _ { 1 } \times \cdots \times M _ { p + q } }$ and $( \mathcal { B } \otimes \mathcal { C } ) _ { d _ { 1 } , . . . , d _ { p + q } } = \mathcal { B } _ { d _ { 1 } , . . . , d _ { p } } \mathcal { C } _ { d _ { p + 1 } , . . . , d _ { p + q } }$ for all $( d _ { 1 } , \dotsc , d _ { p + q } )$ . In tensor algebra, a tensor $\mathcal { A } \in \mathbb { R } ^ { M _ { 1 } \times M _ { 2 } \times \cdots \times M _ { N } }$ is said to have rank 1 if it can be expressed as $\mathcal { A } = \mathbf { v } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { v } ^ { ( N ) }$ , where $\mathbf { v } ^ { ( i ) } \in \mathbb { R } ^ { M _ { i } }$ for all $i \in [ N ]$ . Moreover, any tensor $\mathcal { A } \in \dot { \mathbb { R } } ^ { M _ { 1 } \times M _ { 2 } \times \cdots \times M _ { N } }$ can be expressed as a sum of rank-1 tensors, that is
|
| 24 |
+
|
| 25 |
+
$$
|
| 26 |
+
\mathcal { A } = \sum _ { z = 1 } ^ { Z } \mathbf { v } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { v } _ { z } ^ { ( N ) } ,
|
| 27 |
+
$$
|
| 28 |
+
|
| 29 |
+
where $Z ~ \in ~ \mathbb { N }$ is sufficiently large and $\mathbf { v } _ { z } ^ { ( i ) } \in \mathbb { R } ^ { M _ { i } }$ for $i \in [ N ]$ . Note that this statement is trivial for $\begin{array} { r } { Z = \prod _ { i = 1 } ^ { N } M _ { i } } \end{array}$ . On the other hand, when $Z$ is the minimum number such that (1) is satisfied, the rank of the tensor is defined to be $\operatorname { r a n k } ( \mathcal { A } ) \ = \ Z$ and (1) becomes equivalent to the well known CANDECOMP/PARAFAC (CP) decomposition of $\mathcal { A }$ . Another operator, that is on the core of the former works of Cohen & Shashua (2016a); Cohen et al. (2016a); Levine et al. (2017), is the matricization operator. The operator $[ A ]$ denotes the matricization of a tensor $\mathcal { A } \in \mathbb { R } ^ { M _ { 1 } \times \cdots \times M _ { N } }$ $N$ matrwith f the tensorin the row $\mathcal { A }$ $\left[ \mathcal { A } \right] \in \mathbb { R } ^ { M _ { 1 } \cdot M _ { 3 } \cdots M _ { N - 1 } \times M _ { 2 } \cdot M _ { 4 } \cdots M _ { N } }$ $A _ { d _ { 1 } , \dots , d _ { N } } ^ { y }$ $\begin{array} { r } { 1 + \sum _ { i = 1 } ^ { N / 2 } ( d _ { 2 i - 1 } - 1 ) \prod _ { j = i + 1 } ^ { N / 2 } M _ { 2 j - 1 } } \end{array}$ and column $\begin{array} { r } { 1 + \sum _ { i = 1 } ^ { N / 2 } ( d _ { 2 i - 1 } - 1 ) \prod _ { j = i + 1 } ^ { N / 2 } M _ { 2 j } } \end{array}$ . This is operator is of eat use since it enjoys properties such as $[ \mathcal { A } \otimes \mathcal { B } ] = [ \mathcal { A } ] \odot [ \mathcal { B } ]$ and $\operatorname { r a n k } ( \mathcal { A } ) \geq \operatorname { r a n k } ( [ \mathcal { A } ] )$ $\odot$
|
| 30 |
+
|
| 31 |
+
product of two matrices. Note that, since the Kronecker product is multiplicative in the rank, we have that $\operatorname { r a n k } ( \mathcal { A } \otimes \mathcal { B } ) \geq \operatorname { r a n k } ( [ \mathcal { A } \otimes \mathcal { B } ] ) = \operatorname { r a n k } ( [ \mathcal { A } ] ) \operatorname { r a n k } ( [ \mathcal { B } ] )$ which is a central property of this theoretical analysis framework.
|
| 32 |
+
|
| 33 |
+
# 3 CONVOLUTIONAL ARITHMETIC CIRCUITS AS TENSOR DECOMPOSITIONS
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: (a) Example of a shallow (i.e., $L = 1$ ) convolutional arithmetic circuit. (b) Example of a deep convolutional arithmetic circuit.
|
| 37 |
+
|
| 38 |
+
A ConvAC is a convolutional neural network that utilizes linear activation functions with product pooling, unlike most popular convolutional networks which make use of rectifier activations with max or average pooling. Moreover, the input of the network is modeled by $\mathbf { X } = ( \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { N } ) \in$ $( \mathbb { R } ^ { s } ) ^ { N }$ , where $\mathbf { x } _ { i } ~ \in ~ \mathbb { R } ^ { s }$ denotes the vectorization of the $i$ -th patch of the input image. For this analysis, it is assumed that a set of $M$ features is obtained from every patch, that is $f _ { \theta _ { d } } \big ( \mathbf { x } _ { i } \big ) \in \mathbb { R }$ for all $i \in [ N ] , d \in [ M ]$ . These features are selected from a given parametric family $\mathcal { F } = \{ f _ { \theta } : \mathbb { R } ^ { s } $ $\mathbb { R } : \theta \in \Theta \}$ , such as Gaussian kernels, wavelet functions, or learned features. Then, to determine whether an input $\mathbf { X }$ belongs to a class belonging to the set $\mathcal { V }$ , the network evaluates the some score functions $h _ { y } ( \mathbf { X } ) \in \mathbb { R }$ and decides for the class $y \in \mathcal { V }$ such that
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
h _ { y } ( \mathbf { X } ) = \operatorname* { m a x } _ { y \in \mathcal { V } } h _ { y } ( \mathbf { X } ) .
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
Using this formulation, in Figure 1(a) we observe an example of a single hidden layer ConvAC, while in Figure $1 ( \mathbf { b } )$ we observe the general case of a deep arithmetic circuit of $L$ layers. As shown by Cohen et al. (2016a), any score function of a ConvAC can be expressed as an homogeneous polynomial with degree $N$ on the input features of the form
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
h _ { y } ( { \mathbf { X } } ) = \sum _ { d _ { 1 } , \ldots , d _ { N } = 1 } ^ { M } \mathcal { A } _ { d _ { 1 } , \ldots , d _ { N } } ^ { y } \prod _ { i = 1 } ^ { N } f _ { \theta _ { d _ { i } } } ( \mathbf { x } _ { i } ) ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $\mathcal { A } _ { d _ { 1 } , . . . , d _ { N } } ^ { y } \ \in \ \mathbb { R }$ are the polynomial coefficients stored in the grid-tensor $\mathcal { A } ^ { y } \in ( \mathbb { R } ^ { M } ) ^ { \otimes ^ { N } }$ . In other words, a score function $h _ { y } ( \mathbf { X } )$ is a polynomial of $M N$ variables $f _ { \theta _ { d } } ( \mathbf { x } _ { i } ) ~ \in \mathbb { R }$ for all $i \in [ N ] , d \in [ M ]$ , degree $N$ , and $M ^ { N }$ polynomial coefficients stored in the grid-tensor $\mathcal { A } ^ { y }$ .
|
| 51 |
+
|
| 52 |
+
For the special case of a shallow ConvAC with $1 \times 1$ convolutions and $Z$ hidden units1, shown in Figure 1(a), the score functions are computed from the weight vectors $\mathbf { a } ^ { z , i } \triangleq [ a _ { 1 } ^ { z , i } , \hdots , a _ { M } ^ { z , i } ] ^ { \mathrm { T } } \in \mathbb { R } ^ { M }$ and $\mathbf { a } ^ { y } \triangleq [ a _ { 1 } ^ { y } , \hdots , a _ { Z } ^ { y } ] ^ { \mathrm { T } } \in \mathbb { R } ^ { Z }$ for all $i \in [ N ]$ and $z \in [ Z ]$ . This leads to the score function
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
h _ { y } ( { \mathbf { X } } ) = \langle { \mathbf { a } } ^ { y } , \mathrm { p o o l } ( : ) \rangle = \sum _ { z = 1 } ^ { Z } a _ { z } ^ { y } \mathrm { p o o l } ( z ) = \sum _ { z = 1 } ^ { Z } a _ { z } ^ { y } \prod _ { i = 1 } ^ { N } \sum _ { d = 1 } ^ { M } a _ { d } ^ { z , i } f _ { \theta _ { d } } ( \mathbf { x } _ { i } ) .
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
The first step of the tensor analysis framework is to obtain an expression (in terms of the network parameters $a _ { z } ^ { y }$ and $a _ { d } ^ { z , i }$ ) of the grid-tensor $\mathcal { A } ^ { y }$ that represents this concrete network architecture. In other words, obtaining the expression for $\mathcal { A } ^ { y }$ that transforms (2) into (3). This expression was already obtained in Cohen & Shashua (2016a) as
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\mathcal { A } ^ { y } = \sum _ { z = 1 } ^ { Z } a _ { z } ^ { y } \mathbf { a } ^ { z , 1 } \otimes \mathbf { a } ^ { z , 2 } \otimes \cdots \otimes \mathbf { a } ^ { z , N } ,
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $\otimes$ denotes the tensor product. Note that (4) is in the form of a standard CP decomposition of the grid tensor $\mathcal { A } ^ { y }$ . This implies that the rank of $\mathcal { A } ^ { y }$ is bounded by $\operatorname { r a n k } ( \mathcal { A } ^ { y } ) \leq Z$ . Moreover, the obtained results where generalized in Cohen et al. (2016a) for the case of a deep ConvAC with size-2 pooling windows2, thus $L = \log _ { 2 } N$ hidden layers as shown in Figure $1 ( \mathbf { b } )$ , leading to a grid-tensor given by the hierarchical tensor decomposition
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r l r } { \phi ^ { l , j , \gamma } = } & { \displaystyle \sum _ { \alpha = 1 } ^ { r _ { 0 } } a _ { \alpha } ^ { l , j , \gamma } \mathfrak { x } _ { \alpha } ^ { 0 , 0 , 2 j - 1 , \alpha } \otimes \mathtt { a } ^ { 0 , 2 j , \alpha } } & \\ & { \vdots } & \\ { \phi ^ { l , j , \gamma } = } & { \displaystyle \sum _ { \alpha = 1 } ^ { r _ { L - 1 } } a _ { \alpha } ^ { l , j , \gamma } \phi ^ { l - 1 , 2 j - 1 , \alpha } \otimes \phi ^ { l - 1 , 2 j , \alpha } } & \\ & { \vdots } & \\ { \vdots } & { \vdots } & \\ { A ^ { y } = \phi ^ { l , 1 , 1 } = } & { \displaystyle \sum _ { \alpha = 1 } ^ { r _ { L - 1 } } a _ { \alpha } ^ { l , 1 , y } \phi ^ { l - 1 , 1 , \alpha } \otimes \phi ^ { l - 1 , 2 , \alpha } , } & \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $r _ { 0 } , \ldots , r _ { L - 1 } \in \mathbb { N }$ are the number of channels in the hidden layers, $\{ \mathbf { a } ^ { 0 , j , \gamma } \in \mathbb { R } ^ { M } \} _ { j \in [ N ] , \gamma \in [ r _ { 0 } ] }$ are the weights in the first hidden convolutions, $\{ \mathbf { a } ^ { l , j , \gamma } \in \mathbb { R } ^ { M } \} _ { j \in [ N / 2 ^ { l } ] , \gamma \in [ r _ { l } ] }$ are the weights of the hidden layers, and $\mathbf { a } ^ { L , 1 , y } \in \mathbb { R } ^ { r _ { L - 1 } }$ stores the weights corresponding to the output $y$ in the output layer.
|
| 71 |
+
|
| 72 |
+
# 4 DENSELY CONNECTED ARITHMETIC CIRCUITS
|
| 73 |
+
|
| 74 |
+
The recent empirical success of densely connected networks (DenseNets), presented by Huang et al. (2016), has served as motivation for our theoretical analysis on dense connectivity. Dense connectivity in a convolutional neural network refers to the case when a number $k \in \mathbb N$ (known as growth rate) of previous layers serve as input of the forthcoming layer. More precisely, in Huang et al. (2016), a DenseNet performs this via concatenation along the feature dimension of the current layer inputs with the preceding layer features. Note that these feature must have compatible sizes along the spatial dimension for the concatenation to be possible. To address this issue, Huang et al. (2016) proposed to group blocks of the same spatial dimensions into a dense block, as shown in Figure 2. These dense blocks do not contain operations such as pooling, that alter the spatial dimensions of the input features. Moreover, in the DenseNet architecture the layers that perform the pooling operation are called transition layers, since they serve as transition between dense blocks. For example, in Figure 2 we depict a dense block of 4 layers with growth rate $k = 2$ , followed by a transition layer.
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
Figure 2: Example of a dense block of size 4 with growth rate $k = 2$ .
|
| 78 |
+
|
| 79 |
+
In the original DenseNet these transition layers included one convolution layer before the pooling operation. Nevertheless, for this work we consider transition layers composed of only pooling operations. Note that this does not affect the generality of the model, since avoiding dense connections on the convolutional layer preceding the transition layer is equivalent to including a convolution in that transition layer3.
|
| 80 |
+
|
| 81 |
+
In the case of ConvACs, any dense block of size greater than 1 can be represented as a dense block of size 1, since the activation function is the linear function (the non-linearity comes from the product pooling operator in the transition layer). Therefore, for ConvACs, it is only reasonable to analyze dense blocks of size 1. Note that, if we only allow dense connections between hidden layers within a dense block, a ConvAC is limited to a maximum growth rate of $k = 1$ . In order to analyze the effect of broader connectivity we extend the concept of growth rate by allowing dense connections between dense blocks. With proper pooling, outputs of hidden layers belonging to different dense blocks can also be concatenated along the feature dimension. In the reminder of this paper we refer to the dense connections between hidden layers of the same block as intra-block connections, while the connections between hidden layers of different blocks as inter-block connections.
|
| 82 |
+
|
| 83 |
+
# 4.1 DENSE INTRA-BLOCK CONNECTIONS
|
| 84 |
+
|
| 85 |
+
In this section we analyze the effect of intra-block connections. We first start by constructing a densely connected version of a single hidden layer ConvAC. The resulting network with growth rate $k = 1$ is shown in Figure 3(a). In the same manner as in (3), this architecture leads to the score function
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
h _ { y } ( { \bf X } ) = \sum _ { z = 1 } ^ { Z } a _ { z } ^ { y } \prod _ { i = 1 } ^ { N } \sum _ { d = 1 } ^ { M } a _ { d } ^ { z , i } f _ { \theta _ { d } } ( { \bf x } _ { i } ) + \sum _ { z = Z + 1 } ^ { Z + M } a _ { z } ^ { y } \prod _ { i = 1 } ^ { N } f _ { \theta _ { z - z } } ( { \bf x } _ { i } ) .
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
Then, we present the following proposition regarding shallow ConvACs with dense connections of growth rate $k = 1$ .
|
| 92 |
+
|
| 93 |
+
Proposition 1 The network’s function of a densely connected shallow ConvAC shown in (6) corresponds to the grid tensor
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\mathcal { A } ^ { y } = \sum _ { z = 1 } ^ { Z } a _ { z } ^ { y } \mathbf { a } ^ { z , 1 } \otimes \mathbf { a } ^ { z , 2 } \otimes \cdot \cdot \cdot \otimes \mathbf { a } ^ { z , N } + \mathrm { S d i a g } \left\{ a _ { z + Z } ^ { y } \right\} _ { z = 1 } ^ { M } ,
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where SdiagN ayz+Z Mz=1 $\mathrm { S d i a g } _ { N } \left\{ a _ { z + Z } ^ { y } \right\} _ { z = 1 } ^ { M } \ \in \ ( \mathbb { R } ^ { M } ) ^ { \otimes N }$ denotes the super-diagonal tensor of order $N$ with $a _ { Z + 1 } ^ { y } , \dotsc , a _ { Z + M } ^ { y }$ in its diagonal.
|
| 100 |
+
|
| 101 |
+
# Proof See appendix B.1.
|
| 102 |
+
|
| 103 |
+
Note that the rank of this tensor is now bounded by $\operatorname { r a n k } ( \mathcal { A } ^ { y } ) \leq Z + M$ instead of $Z$ , but adding these dense connections increases the number of parameters of the network from $M N Z + Z$ to
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 3: (a) Example of a shallow $( L = 1$ ) convolutional arithmetic circuit with one intra-block connection. (b) Example of a 3 layered $L = 3 ,$ ) convolutional arithmetic circuit with multiple intrablock connections. (c) Example of a 3 layered $L = 3$ ) convolutional arithmetic circuit with one inter-block connection.
|
| 107 |
+
|
| 108 |
+
$M N Z + Z + M$ . Then, for large values of $N$ , there is no clear advantage on using dense connections on a shallow ConvAC. Nevertheless, in Section 5 we show that dense connections are capable of increasing the expressive power of deep ConvACs, specially for large values of $N$ .
|
| 109 |
+
|
| 110 |
+
We now generalize the obtained results for the case of a $L$ -layered dense arithmetic circuit, with growth rare $k = 1$ , as the one in Figure 3(b). Similarly to (5), the obtained grid tensor has the hierarchical decomposition given by
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\begin{array} { c } { { \phi ^ { 1 , j , \gamma } = \displaystyle \sum _ { \alpha = 1 } ^ { r _ { 0 } } a _ { \alpha } ^ { 1 , j , \gamma } { \bf a } ^ { 0 , 2 j - 1 , \alpha } \otimes { \bf a } ^ { 0 , 2 j , \alpha } + \mathrm { S d i a g } \left\{ a _ { \alpha + r _ { 0 } } ^ { 1 , j , \gamma } \right\} ^ { M } } } \\ { { { } } } \\ { { \phi ^ { 2 , j , \gamma } = \displaystyle \sum _ { \alpha = 1 } ^ { r _ { 1 } } a _ { \alpha } ^ { 2 , j , \gamma } \phi ^ { 1 , 2 j - 1 , \alpha } \otimes \phi ^ { 1 , 2 j , \alpha } + \mathrm { S d i a g } \left\{ a _ { \alpha + r _ { 1 } } ^ { 2 , j , \gamma } \right\} _ { \alpha = 1 } ^ { r _ { 0 } } } } \\ { { { } } } \\ { { \vdots } } \\ { { { } d ^ { y } = \phi ^ { L , 1 , 1 } = \displaystyle \sum _ { \alpha = 1 } ^ { r _ { L - 1 } } a _ { \alpha } ^ { L , 1 , y } \phi ^ { L - 1 , 1 , \alpha } \otimes \phi ^ { L - 1 , 2 , \alpha } + \mathrm { S d i a g } \left\{ a _ { \alpha + r _ { L - 1 } } ^ { L , j , \gamma } \right\} _ { \alpha = 1 } ^ { r _ { L - 2 } } . } } \end{array}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
From this result we observe that inter block connections account for virtually increasing the width of the network’s hidden layers from $r _ { l }$ to $\tilde { r } _ { l } \ \triangleq r _ { l } + r _ { l - 1 }$ for all $l = 0 , 1 , \ldots , L - 1$ , where $r _ { - 1 } \triangleq$
|
| 117 |
+
|
| 118 |
+
$M$ . Note that this increased width comes at the expense of increasing the network’s parameters. Moreover, in Section 5 we discuss whether increasing the network’s width via intra block dense connections leads to an enhancement in its overall expressive power.
|
| 119 |
+
|
| 120 |
+
# 4.2 DENSE INTER-BLOCK CONNECTIONS
|
| 121 |
+
|
| 122 |
+
In this section we study broader connectivity via dense inter-block connections. As discussed in Section 4, proper pooling of the preceding features must take place before the concatenating them into the current layer. Since this type of connections have not been considered in the former DenseNets, we propose 3 possible ways of realizing such connections (via product, average, or max pooling). For a ConvAC with pooling window size $w _ { \mathrm { p o o l } }$ , an inter block connection that connects block $l \in [ L ]$ with block $p \in [ L ]$ is said to be of jump length $L _ { \mathrm { j u m p } } \in [ L - 1 ]$ if $p = l + L _ { \mathrm { j u m p } }$ . An example of an inter block connection of jump length $L _ { \mathrm { j u m p } } = \mathrm { 1 }$ can be seen in Figure 3(c). To perform this inter block connections, the sizes along the spatial dimensions of preceding features must be reduced by $L _ { \mathrm { j u m p } } w _ { \mathrm { p o o l } }$ , before concatenating them along the feature dimension of layer $l$ . This spatial size reduction may be realized via pooling of the preceding features with window size $L _ { \mathrm { j u m p } } w _ { \mathrm { p o o l } }$ . When using a pooling layer the size along the feature dimension remains unchanged. Moreover, the type of pooling employed (product, average, or maximum) affects the expressive potential of the resulting ConvAC. Furthermore, the following proposition addresses the effect that adding dense inter block connections, via average pooling, has on the network function of a ConvAC.
|
| 123 |
+
|
| 124 |
+
Proposition 2 Adding inter block connections via average pooling of jump length $L _ { j u m p } \geq 1$ to $a$ standard ConvAC with grid-tensor $\mathcal { A } ^ { y } \in ( \mathbb { R } ^ { M } ) ^ { \otimes N }$ leads to a network function of the form
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
h _ { y } ( { \bf X } ) = \sum _ { d _ { 1 } , \ldots , d _ { N } = 1 } ^ { M } { \cal A } _ { d _ { 1 } , \ldots , d _ { N } } ^ { y } \prod _ { i = 1 } ^ { N } f _ { \theta _ { d _ { i } } } ( { \bf x } _ { i } ) + g ( { \bf X } ) ,
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where $g ( \mathbf { X } )$ contains polynomial terms on $f _ { \theta _ { d } } ( \mathbf { x } _ { i } )$ for $d \in [ M ] , i \in [ N ]$ of degree lower than $N$
|
| 131 |
+
|
| 132 |
+
Remark 1 This result is also valid when the connections are done by addition instead of concatenation, as it is done in ResNet and FractalNet.
|
| 133 |
+
|
| 134 |
+
Proof See appendix B.2.
|
| 135 |
+
|
| 136 |
+
From this proposition we conclude that adding inter block connections average pooling does not alter the grid tensor $\mathcal { A } ^ { y }$ , instead these connections account for extra polynomial terms of degree strictly less than $N$ . Note that, for the special case where the input features belong to an exponential kernel family, such as ${ \mathcal { F } } = \{ f _ { \theta } ( \mathbf { x } ) = e ^ { \theta ^ { \mathrm { { T } } } \mathbf { x } } : \mathbb { R } ^ { s } \mathbb { R } : \theta \in { \dot { \Theta } } \}$ or $\mathcal { F } = \{ f _ { \theta } ( \mathbf { x } ) = e ^ { \Vert \theta - \mathbf { x } \Vert _ { p } } : \mathbb { R } ^ { s } \mathbb { R } :$ $\theta \in \Theta \}$ where $\| \cdot \| _ { p }$ denotes the $\ell _ { p }$ norm with $p \in \mathbb N$ , the number of polynomial terms is equivalent to the number of exponential basis that the network function can realize. Therefore, the another valid measure of expressiveness is the number of polynomial terms a ConvAC is able to realize. Given a certain ConvAC topology, the number of polynomial terms can be computed inductively by expanding the polynomial products of every layer via generalized binomial expansions. Such an analysis is left for future contributions. Moreover, if we perform this connections via product poling, the features to be concatenated correspond to polynomial terms of the same order. This leads to a generalization of the intra-block connections from 4.1, leading to virtually increased widths $\tilde { r } _ { l } \triangleq \overline { { r _ { l } } } + \sum _ { q = 1 } ^ { L _ { \mathrm { j u m p } } } r _ { l - 1 - q }$ . Finally, we leave the analysis of inter-block connections via maximum pooling for future work and consider only product pooling inter-block connections in the remainder of this paper.
|
| 137 |
+
|
| 138 |
+
# 5 PRACTICAL IMPLICATIONS
|
| 139 |
+
|
| 140 |
+
For the sake of comparison, let us assume networks with hidden layer widths $r _ { l }$ decaying (or increasing) at an exponential rate of $\lambda \in \mathbb { R }$ . Formally, this is $r _ { l } = \lambda r _ { l - 1 } \in \mathbb { N }$ , thus $r _ { l } = \check { ( } \lambda ) ^ { \tilde { l } _ { r } }$ for all $l = 0 , 1 , \ldots , L - 1$ , where $r \triangleq r _ { 0 }$ . To shorten the notation, we denote as $( L , r , \lambda , k )$ to a ConvAC with of exponential width decay $\lambda \in \mathbb { R }$ , length $L \in \mathbb { N }$ , initial with $r \in \mathbb N$ and growth-rate $k \in \mathbb N$ . A growth-rate of $k = 0$ refers to a standard ConvAC with no dense connections.
|
| 141 |
+
|
| 142 |
+
Definition 1 Suppose that the weights of a $( L , r , \lambda , k )$ ConvAC, with $L , k \in \mathbb { N }$ and $r , \lambda \in \mathbb { R } ,$ , are randomly drawn according to some continuous non-vanishing distribution. Then, this $( L , r , \lambda , k )$ ConvAC is said to have weak dense gain $G _ { w } \in \mathbb { R }$ if, with probability $p > 0$ , we obtain score functions that cannot be realized by a $( L , r ^ { \prime } , \lambda , 0 )$ ConvAC with $r ^ { \prime } < G _ { w } r$ . When $p = 1$ , this $( L , r , \lambda , k )$ ConvAC is said to have a strong dense gain $G _ { s } = G _ { w } \in \mathbb { R }$ .
|
| 143 |
+
|
| 144 |
+
Using this definition we present a bound for the weak dense gain $G _ { \mathrm { w } }$ in the following theorem.
|
| 145 |
+
|
| 146 |
+
dense gain is bounden by Theorem 5.1 Given $M \in \mathbb { N }$ $G _ { w } \leq { \frac { M } { \lambda r } }$ , any a . $( L , r , \lambda , k )$ ConvAC with $L > 1 , r \leq M , \lambda \leq 1 , k > 0$ has $a$
|
| 147 |
+
|
| 148 |
+
Proof See appendix B.3.
|
| 149 |
+
|
| 150 |
+
This general bound may serve as guideline for tayloring $M$ and the widths $r _ { 0 } , \ldots , r _ { L - 1 }$ such that we exploit the expressiveness added by dense connections.
|
| 151 |
+
|
| 152 |
+
Theorem 5.2 For the particular case of theorem 5.1 when $k = 1$ , the weak dense gain is bounded by $\begin{array} { r } { G _ { w } \leq \operatorname* { m i n } \left( 1 + \frac { 1 } { \lambda } , \dot { \frac { M } { \lambda r } } \right) } \end{array}$ .
|
| 153 |
+
|
| 154 |
+
Proof See appendix B.3.
|
| 155 |
+
|
| 156 |
+
Using this result, we able able to quantify the expressive gain provided by dense inter block connections. If a ConvAC has a dense gain $\begin{array} { r } { G _ { \mathrm { w } } = ( 1 + \frac { 1 } { \lambda } ) } \end{array}$ that is already close to the general bound from Theorem 5.1 it is less encouraging to include broader dense connections, since it would increase the number of parameters of the model while there is no room for a significant expressive gain increase. In this scenario, connections as the ones in ResNet and FractalNet may result more beneficial since they do not increase the size of the model, while at the same time enhancing its trainability.
|
| 157 |
+
|
| 158 |
+
Theorem 5.3 For the particular case of theorem 5.1 when $k = 1$ , $\begin{array} { r } { i f r \le \frac { 1 } { 1 + \lambda } \sqrt { M } } \end{array}$ , then the bound of theorem 5.2 is achieved with equality and strong dense gain $\begin{array} { r } { G _ { s } = 1 + \frac { 1 } { \lambda } } \end{array}$ .
|
| 159 |
+
|
| 160 |
+
Proof See appendix B.3.
|
| 161 |
+
|
| 162 |
+
This last theorem shows that there exist a regime where this bounds can be achieved with strong dense gain. Whether this is true outside this regime is still an open question, since further knowledge about the rank of random tensors is limited. Moreover, these theorems does not consider the additional amount of parameters added by dense connections. We complete our analysis by addressing this issue in the following proposition.
|
| 163 |
+
|
| 164 |
+
Proposition 3 Let $\varDelta P _ { d e n s e } ~ \in ~ \mathbb { N }$ be the additional number of parameters that are added to a $( L , r , \lambda , 0 )$ ConvAC when we introduce dense connections of growth-rate $k > 0$ . In the same manner, let $\varDelta P _ { s t a n d } \in \mathbb { N }$ be the number of parameters that are added to a $( L , r , \lambda , 0 )$ ConvAC when we increase its initial width $r$ by a factor $G \in \mathbb { R }$ . Then the ratio between $\varDelta P _ { d e n s e }$ and $\varDelta P _ { s t a n d }$ is greater than
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
{ \frac { \varDelta P _ { s t a n d } } { \varDelta P _ { d e n s e } } } \geq { \frac { ( G - 1 ) M } { r \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } \sum _ { l = 1 } ^ { L } ( { \frac { \lambda ^ { 2 } } { 2 } } ) ^ { l } } } + { \frac { ( G ^ { 2 } - 1 ) } { \sum _ { q = 1 } ^ { k } \lambda ^ { - q } } } .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
Proof See appendix B.4.
|
| 171 |
+
|
| 172 |
+
The factor $G$ from this proposition directly relates to the dense gain of a ConvAC, thus this ratio may be used to decide whether is interesting to add dense connections to a model (we want this ratio to be as large as possible). Finally Theorems 5.1 and 5.2 directly bound this ratio, which give the practitioner a guideline to decide which connections (if any) should be added to a given model.
|
| 173 |
+
|
| 174 |
+
# REFERENCES
|
| 175 |
+
|
| 176 |
+
Richard Caron and Tim Traynor. The zero set of a polynomial. WSMR Report, pp. 05–02, 2005.
|
| 177 |
+
|
| 178 |
+
Nadav Cohen and Amnon Shashua. Convolutional rectifier networks as generalized tensor decompositions. 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. 955–963, New York, New York, USA, 20–22 Jun 2016a. PMLR. URL http://proceedings.mlr.press/v48/cohenb16.html.
|
| 179 |
+
|
| 180 |
+
Nadav Cohen and Amnon Shashua. Inductive bias of deep convolutional networks through pooling geometry. CoRR, abs/1605.06743, 2016b. URL http://arxiv.org/abs/1605.06743.
|
| 181 |
+
|
| 182 |
+
Nadav Cohen, Or Sharir, and Amnon Shashua. On the expressive power of deep learning: A tensor analysis. In Vitaly Feldman, Alexander Rakhlin, and Ohad Shamir (eds.), 29th Annual Conference on Learning Theory, volume 49 of Proceedings of Machine Learning Research, pp. 698–728, Columbia University, New York, New York, USA, 23–26 Jun 2016a. PMLR. URL http:// proceedings.mlr.press/v49/cohen16.html.
|
| 183 |
+
|
| 184 |
+
Nadav Cohen, Or Sharir, and Amnon Shashua. Deep simnets. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016b.
|
| 185 |
+
|
| 186 |
+
Nadav Cohen, Ronen Tamari, and Amnon Shashua. Boosting dilated convolutional networks with mixed tensor decompositions. CoRR, abs/1703.06846, 2017. URL http://arxiv.org/ abs/1703.06846.
|
| 187 |
+
|
| 188 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 189 |
+
|
| 190 |
+
Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016.
|
| 191 |
+
|
| 192 |
+
Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. arXiv preprint arXiv:1605.07648, 2016.
|
| 193 |
+
|
| 194 |
+
Yoav Levine, David Yakira, Nadav Cohen, and Amnon Shashua. Deep learning and quantum entanglement: Fundamental connections with implications to network design. CoRR, abs/1704.01552, 2017. URL http://arxiv.org/abs/1704.01552.
|
| 195 |
+
|
| 196 |
+
Or Sharir and Amnon Shashua. On the expressive power of overlapping operations of deep networks. arXiv preprint arXiv:1703.02065, 2017.
|
| 197 |
+
|
| 198 |
+
Or Sharir, Ronen Tamari, Nadav Cohen, and Amnon Shashua. Tractable generative convolutional arithmetic circuits. CoRR, abs/1610.04167, 2016. URL http://arxiv.org/abs/1610. 04167.
|
| 199 |
+
|
| 200 |
+
# A PRELIMINARY LEMMAS
|
| 201 |
+
|
| 202 |
+
Lemma 1 Given $Z \in \mathbb { N } ,$ , let $\mathcal { A } \in ( \mathbb { R } ^ { M } ) ^ { \otimes ^ { P } }$ be a random tensor of even order $P \geq 2$ such that
|
| 203 |
+
|
| 204 |
+
$$
|
| 205 |
+
\mathcal { A } = \sum _ { z = 1 } ^ { Z } \mathbf { a } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { a } _ { z } ^ { ( P ) } ,
|
| 206 |
+
$$
|
| 207 |
+
|
| 208 |
+
where $\mathbf { a } _ { z } ^ { ( k ) } \in \mathbb { R } ^ { M }$ are randomly drawn from a non-vanishing continuous distribution for all $k \in [ P ]$ and $z \in [ Z ]$ . Then, if $\mathbf { \dot { Z } } \le M ^ { P / 2 }$ we have that $\operatorname { r a n k } ( { \mathcal { A } } ) = \operatorname { r a n k } ( [ A ] ) = Z$ with probability $^ { l }$ . This lemma also holds when for a subset $\mathcal { Z } \subseteq [ Z ]$ we have that $\mathbf { a } _ { z } ^ { ( k ) } = a _ { z } \mathbf { e } _ { z } \in \mathbb { R } ^ { M }$ for all $z \in { \mathcal { Z } }$ , where $a _ { z } \in \mathbb { R }$ are randomly drawn from a non-vanishing continuous distribution.
|
| 209 |
+
|
| 210 |
+
Proof Using the definition of the matricization operator, we get that the matricization $\mathcal { A }$ is
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
[ A ] = \sum _ { z = 1 } ^ { Z } ( \underbrace { \mathbf { a } _ { z } ^ { ( 1 ) } \odot \mathbf { a } _ { z } ^ { ( 3 ) } \odot \cdots \odot \mathbf { a } _ { z } ^ { ( P - 1 ) } } _ { \tilde { \mathbf { a } } _ { z } ^ { ( \infty \mathrm { d } ) } } ) ( \underbrace { \mathbf { a } _ { z } ^ { ( 2 ) } \odot \mathbf { a } _ { z } ^ { ( 4 ) } \odot \cdots \odot \mathbf { a } _ { z } ^ { ( P ) } } _ { \tilde { \mathbf { a } } _ { z } ^ { ( \infty \mathrm { w } ) } } ) ^ { \mathrm { T } } \in \mathbb { R } ^ { M ^ { ( P / 2 ) } \times M ^ { ( P / 2 ) } } .
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
Note that, from this expression, it is straight forward to see that the rank of $[ A ]$ is always less or equal than $Z$ .
|
| 217 |
+
|
| 218 |
+
Let $\tilde { \mathcal { Z } } \subseteq [ M ^ { P / 2 } ]$ be the subset $\begin{array} { r } { \tilde { \mathcal { Z } } ~ = ~ \{ \tilde { z } ~ : ~ \tilde { z } ~ = ~ \frac { M ^ { ( P / 2 ) } - 1 } { M - 1 } ( z - 1 ) + 1 ~ : ~ z ~ \in ~ [ Z ] \} } \end{array}$ and ${ \textbf { U } } \in$ RM(P/2)×M(P/2) be a permuted version of [A] such that the first Z rows of U correspond to the rows $\tilde { z } \in \tilde { \mathcal { Z } }$ of $[ A ]$ , and the first $Z$ columns of $\mathbf { U }$ correspond to the columns $\tilde { z } \in \tilde { \mathcal { Z } }$ of $[ A ]$ . Since permuting the rows and the columns of a matrix does not alter its rank, we have that $\mathbf { U }$ has the same rank as $[ A ]$ . Now, let us partition $\mathbf { U }$ into blocks as
|
| 219 |
+
|
| 220 |
+
$$
|
| 221 |
+
{ \bf U } = \left[ \begin{array} { l l } { { \bf P } } & { { \bf Q } } \\ { { \bf W } } & { { \bf Z } } \end{array} \right] ,
|
| 222 |
+
$$
|
| 223 |
+
|
| 224 |
+
where $\mathbf { P }$ is of size $Z$ -by- $Z$ , and $\mathbf { Q } , \mathbf { W } , \mathbf { Z }$ have matching dimensions. Note that, if $\operatorname { r a n k } ( \mathbf { P } ) = Z$ then ${ \mathrm { r a n k } } ( \mathbf { U } ) \geq Z$ , which leads to $Z \ \le \ \mathrm { r a n k } ( \mathbf { U } ) \ = \ \mathrm { r a n k } ( [ A ] ) \ \le \ Z$ , thus $\operatorname { r a n k } ( [ A ] ) = Z$ . Therefore, it is sufficient to show that ran $\operatorname { k } ( \mathbf { P } ) = Z$ with probability 1 to conclude this proof. To that end, let us define the mapping from $\mathbf { x } \in \mathbb { R } ^ { M P Z }$ to $\mathbf { P } = \mathbf { P } ( \mathbf { x } )$ as
|
| 225 |
+
|
| 226 |
+
$$
|
| 227 |
+
\mathbf { x } \triangleq \left[ \mathbf { a } _ { 1 } ^ { ( 1 ) ^ { \mathrm { T } } } , \hdots , \mathbf { a } _ { Z } ^ { ( 1 ) ^ { \mathrm { T } } } , \mathbf { a } _ { 1 } ^ { ( 2 ) ^ { \mathrm { T } } } , \hdots , \mathbf { a } _ { Z } ^ { ( P ) ^ { \mathrm { T } } } \right] ^ { \mathrm { T } } .
|
| 228 |
+
$$
|
| 229 |
+
|
| 230 |
+
Note that this definition of $\mathbf { x }$ implies that $\mathbf { a } _ { z } ^ { ( i ) } = \mathbf { a } _ { z } ^ { ( i ) } ( \mathbf { x } )$ for all $z \in [ Z ]$ and $i \in [ P ]$ . Therefore, since $[ A ]$ is computed as in (10), we have that $[ \mathcal { A } ] = [ \mathcal { A } ] ( \mathbf { x } )$ , thus $\dot { \mathbf { Q } } \equiv \mathbf { Q } ( \mathbf { x } )$ and $\mathbf { P } = \mathbf { P } ( \mathbf { x } )$ . Now, det $\mathbf { P } ( \mathbf { x } )$ is a polynomial on $\mathbf { x }$ , then it either vanishes in a set of measure zero or its the zero-polynomial (see Caron & Traynor (2005)).
|
| 231 |
+
|
| 232 |
+
If we set $\mathbf { x }$ to be equal to some $\mathbf { x } _ { 0 } \in \mathbb { R } ^ { M P Z }$ such that $\mathbf { a } _ { z } ^ { ( i ) } = \mathbf { e } _ { z }$ for all $z \in [ Z ]$ and $i \in [ P ]$ , we have that a˜(odd)z $\widetilde { \mathbf { a } } _ { z } ^ { ( \mathrm { o d d } ) } = \widetilde { \mathbf { a } } _ { z } ^ { ( \mathrm { e v e n } ) } = \mathbf { e } _ { \widetilde { z } } \in \mathbb { R } ^ { M ^ { P / 2 } }$ with $\begin{array} { r } { \tilde { z } \triangleq ( \sum _ { n = 0 } ^ { P / 2 - 1 } M ^ { n } ) ( z - 1 ) + 1 = \frac { M ^ { ( P / 2 ) } - 1 } { M - 1 } ( z - } \end{array}$ 1) + 1. Therefore, since [A] is calculated as in (10) and a˜(odd)z a˜(even)Tz i s now a matrix with 1 on the entry and zero elsewhere, we have that $[ \mathcal { A } ] ( \mathbf { x } _ { 0 } )$ is a diagonal matrix with ones on the diagonal elements $\tilde { z } \in \tilde { \mathcal { Z } }$ and zero elsewhere. This leads to $\mathbf { P } ( \mathbf { x } _ { 0 } ) = \mathbf { I } _ { Z }$ which has a determinant det $\mathbf { P } ( \mathbf { x } _ { 0 } ) \neq 0$ . Finally, since there exist $\mathbf { x } _ { \mathrm { 0 } }$ such that the polynomial det $\mathbf { P } ( \mathbf { x } _ { \mathrm { 0 } } )$ is not zero, we conclude that det $\mathbf { P } ( \mathbf { x } )$ is not the zero-polynomial, which means that det $\mathbf P ( \mathbf x ) \neq 0$ with probability 1, thus proving this lemma.
|
| 233 |
+
|
| 234 |
+
Lemma 2 Let $\mathcal { A } \in ( \mathbb { R } ^ { M } ) ^ { \otimes ^ { P } }$ and $\pmb { { \cal B } } \in ( \mathbb { R } ^ { M } ) ^ { \otimes ^ { P } }$ be random tensors of even order $P \geq 2$ and $Z \in \mathbb { N }$ be tensors such that
|
| 235 |
+
|
| 236 |
+
$$
|
| 237 |
+
\mathcal { A } = \sum _ { z = 1 } ^ { Z _ { 1 } } \mathbf { a } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { a } _ { z } ^ { ( P ) } , \qquad \mathcal { B } = \sum _ { z = 1 } ^ { Z _ { 2 } } \mathbf { b } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { b } _ { z } ^ { ( P ) } ,
|
| 238 |
+
$$
|
| 239 |
+
|
| 240 |
+
where $\mathbf { a } _ { z } ^ { ( i ) } \in \mathbb { R } ^ { M }$ and $\mathbf { b } _ { z } ^ { ( i ) } \in \mathbb { R } ^ { M }$ are randomly drawn from a non-vanishing continuous distribution. Then, if $Z _ { 1 } \le M ^ { P / 2 }$ and $Z _ { 2 } \le M ^ { P / 2 }$ , we have that rank $( \mathcal { A } \otimes \mathcal { B } ) = Z _ { 1 } Z _ { 2 }$ with probability 1.
|
| 241 |
+
|
| 242 |
+
Proof Let $\mathcal { C } \in ( \mathbb { R } ^ { M } ) ^ { \otimes 2 P }$ be a random tensor defined as ${ \mathcal { C } } = { \mathcal { A } } \otimes B$ . Therefore, we may express $\mathcal { C }$ as
|
| 243 |
+
|
| 244 |
+
$$
|
| 245 |
+
\mathcal { C } = \sum _ { z = 1 } ^ { Z } \sum _ { q = 1 } ^ { Z } \mathbf { a } _ { q } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { a } _ { q } ^ { ( P ) } \otimes \mathbf { b } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { b } _ { z } ^ { ( P ) } .
|
| 246 |
+
$$
|
| 247 |
+
|
| 248 |
+
Then, we define rank-1 tensors $\mathcal { C } ^ { ( q , z ) }$ to be $\mathcal { C } ^ { ( q , z ) } = \mathbf { a } _ { q } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { a } _ { q } ^ { ( P ) } \otimes \mathbf { b } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { b } _ { z } ^ { ( P ) }$ to get
|
| 249 |
+
|
| 250 |
+
$$
|
| 251 |
+
\mathcal { C } = \sum _ { q , z = 1 } ^ { Z } \mathcal { C } ^ { ( q , z ) } .
|
| 252 |
+
$$
|
| 253 |
+
|
| 254 |
+
Since $\mathcal { C }$ is now expressed as a sum of $Z _ { 1 } Z _ { 2 }$ rank-1 tensors, we have that $\operatorname { r a n k } ( { \mathcal { C } } ) \leq Z _ { 1 } Z _ { 2 }$ .
|
| 255 |
+
|
| 256 |
+
Since $Z _ { 1 } \le M ^ { P / 2 }$ and $Z _ { 2 } \ \le \ M ^ { P / 2 }$ we may use Lemma 1, this leads to $\operatorname { r a n k } ( [ A ] ) = Z _ { 1 }$ and $\mathrm { r a n k } ( [ \boldsymbol { B } ] ) = Z _ { 2 }$ with probability 1. Finally we, use the properties of the Kronecker product to obtain the rank of the matricization $\mathcal { C }$ as $\mathrm { r a n k } ( [ \dot { \mathcal { C } } ] ) = \mathrm { r a n k } ( [ \hat { A } \otimes \mathcal { B } ] ) = \mathrm { r a n k } ( [ A ] ) \mathrm { r a n k } ( [ \hat { B } ] )$ , leading to
|
| 257 |
+
|
| 258 |
+
$$
|
| 259 |
+
\mathrm { r a n k } ( [ { \mathcal C } ] ) = Z _ { 1 } Z _ { 2 } \Rightarrow Z _ { 1 } Z _ { 2 } = \mathrm { r a n k } ( [ { \mathcal C } ] ) \leq \mathrm { r a n k } ( { \mathcal C } ) \leq Z _ { 1 } Z _ { 2 } \Rightarrow \mathrm { r a n k } ( { \mathcal C } ) = Z _ { 1 } Z _ { 2 }
|
| 260 |
+
$$
|
| 261 |
+
|
| 262 |
+
with probability 1, thus proving the Lemma.
|
| 263 |
+
|
| 264 |
+
Lemma 3 Let $\mathcal { A } \in ( \mathbb { R } ^ { M } ) ^ { \otimes ^ { P } }$ and $B \in ( \mathbb { R } ^ { M } ) ^ { \otimes ^ { P } }$ be tensors of order $P > 2$ and $Z \in \mathbb { N }$ be tensors such that
|
| 265 |
+
|
| 266 |
+
$$
|
| 267 |
+
\mathcal { A } = \sum _ { z = 1 } ^ { Z _ { 1 } } \mathbf { a } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { a } _ { z } ^ { ( P ) } , \qquad \mathcal { B } = \sum _ { z = 1 } ^ { Z _ { 2 } } \mathbf { b } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { b } _ { z } ^ { ( P ) } ,
|
| 268 |
+
$$
|
| 269 |
+
|
| 270 |
+
where $\mathbf { a } _ { z } ^ { ( i ) } \in \mathbb { R } ^ { M }$ and $\mathbf { b } _ { z } ^ { ( i ) } \in \mathbb { R } ^ { M }$ are randomly drawn from a non-vanishing continuous distribution. Then, if $\cdot Z _ { 1 } + Z _ { 2 } \le M ^ { P / 2 }$ , we have that rank $( \mathcal { A } + \mathcal { B } ) = Z _ { 1 } + Z _ { 2 }$ with probability $I$ .
|
| 271 |
+
|
| 272 |
+
Proof Let $\mathcal { C } \in \mathbb { R } ^ { M \times \cdots \times M }$ be a tensor of order $P$ defined as ${ \mathcal { C } } = A + B$ . Therefore, we may express $\mathcal { C }$ as
|
| 273 |
+
|
| 274 |
+
$$
|
| 275 |
+
\mathcal { C } = \sum _ { z = 1 } ^ { Z _ { 1 } } \mathbf { a } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { a } _ { z } ^ { ( P ) } + \sum _ { z = 1 } ^ { Z _ { 2 } } \mathbf { b } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { b } _ { z } ^ { ( P ) } = \sum _ { z = 1 } ^ { Z _ { 1 } + Z _ { 2 } } \mathbf { c } _ { z } ^ { ( 1 ) } \otimes \cdots \otimes \mathbf { c } _ { z } ^ { ( P ) } ,
|
| 276 |
+
$$
|
| 277 |
+
|
| 278 |
+
where
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\mathbf { c } _ { z } ^ { ( i ) } \triangleq \left\{ \begin{array} { l l } { \mathbf { a } _ { z } ^ { ( i ) } } & { 0 < z \le Z _ { 1 } } \\ { \mathbf { b } _ { z } ^ { ( i ) } } & { Z _ { 1 } < z \le Z _ { 1 } + Z _ { 2 } } \end{array} \right. .
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
Since $Z _ { 1 } + Z _ { 2 } \le M ^ { P / 2 }$ we may use Lemma 1, leading to r $\operatorname { a n k } \left( { \mathcal { C } } \right) = Z _ { 1 } + Z _ { 2 }$ with probability 1, thus proving this Lemma.
|
| 285 |
+
|
| 286 |
+
Corollary 1 Let ${ \mathcal { A } } , { \mathcal { B } } , { \mathcal { C } }$ be tensors of the same size with ranks $Z _ { A } \triangleq \operatorname { r a n k } ( \mathcal { A } ) , Z _ { B } \triangleq \operatorname { r a n k } ( \mathcal { B } ) ,$ and $Z _ { C } \triangleq { \mathrm { r a n k } } \left( { \mathcal { C } } \right)$ . Then, the following statements hold true.
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\begin{array} { r l } & { \mathrm { r a n k } \left( \boldsymbol { A } + \boldsymbol { B } + \boldsymbol { \mathcal { C } } \right) = Z _ { A } + Z _ { B } + Z _ { C } \Rightarrow \mathrm { r a n k } \left( \boldsymbol { A } + \boldsymbol { B } \right) = Z _ { A } + Z _ { B } } \\ & { \mathrm { r a n k } \left( \left( \boldsymbol { A } + \boldsymbol { B } \right) \otimes \boldsymbol { \mathcal { C } } \right) = ( Z _ { A } + Z _ { B } ) Z _ { C } \Rightarrow \mathrm { r a n k } \left( \boldsymbol { A } \otimes \boldsymbol { \mathcal { C } } \right) = Z _ { A } Z _ { C } . } \end{array}
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
# B DEFERRED PROOFS
|
| 293 |
+
|
| 294 |
+
# B.1 PROOF PROPOSITION 1
|
| 295 |
+
|
| 296 |
+
Proof We reformulate this (6) to have the same form as (3). To that end we define $a _ { z } ^ { d , i }$ , for $z =$ $\begin{array} { r } { \sum _ { d = 1 } ^ { M } a _ { d } ^ { z , i } f _ { \theta _ { d } } ( \mathbf { x } _ { i } ) = f _ { \theta _ { z - Z } } ( \mathbf { x } _ { i } ) } \end{array}$ $Z + 1 , \dots , Z + M$ , to be $a _ { d } ^ { z , i } = 1$ for if $z = Z + 1 , \dots , Z + M$ $z - Z = d$ and zero otherwise. This definition of . Using this relation we get $a _ { d } ^ { z , i }$ leads to
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
\begin{array} { l } { { \displaystyle h _ { y } ( { \bf X } ) = \sum _ { z = 1 } ^ { Z } a _ { z } ^ { y } \prod _ { i = 1 } ^ { N } \sum _ { d = 1 } ^ { M } a _ { d } ^ { z , i } f _ { \theta _ { d } } ( { \bf x } _ { i } ) + \sum _ { z = Z + 1 } ^ { Z + M } a _ { z } ^ { y } \prod _ { i = 1 } ^ { N } \sum _ { d = 1 } ^ { M } a _ { d } ^ { z , i } f _ { \theta _ { d } } ( { \bf x } _ { i } ) } } \\ { { \displaystyle ~ = \sum _ { z = 1 } ^ { Z + M } a _ { z } ^ { y } \prod _ { i = 1 } ^ { N } \sum _ { d = 1 } ^ { M } a _ { d } ^ { z , i } f _ { \theta _ { d } } ( { \bf x } _ { i } ) } , } \end{array}
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
which has the same form as (3). Therefore, as done in (4), we obtain the grid tensor for this architecture as
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
\begin{array} { r l } & { \mathcal { A } ^ { \nu } = \displaystyle \sum _ { z = 1 } ^ { Z + M } a _ { z } ^ { \nu } \mathfrak { a } ^ { z , 1 } \otimes \mathfrak { a } ^ { z , 2 } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } } \\ & { \quad = \displaystyle \sum _ { z = 1 } ^ { Z } a _ { z } ^ { \nu } \mathfrak { a } ^ { z , 1 } \otimes \mathfrak { a } ^ { z , 2 } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } + \displaystyle \sum _ { z = Z + 1 } ^ { Z + M } a _ { z } ^ { \nu } \mathfrak { a } ^ { z , 1 } \otimes \mathfrak { a } ^ { z , 2 } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } } \\ & { \quad = \displaystyle \sum _ { z = 1 } ^ { Z } a _ { z } ^ { \nu } \mathfrak { a } ^ { z , 1 } \otimes \mathfrak { a } ^ { z , 2 } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } + \displaystyle \sum _ { z = Z + 1 } ^ { Z + M } a _ { z } ^ { \nu } \mathfrak { e } _ { z - Z } \otimes \mathfrak { e } _ { z - Z } \otimes \cdots \otimes \mathfrak { e } _ { z - Z } } \\ & { \quad = \displaystyle \sum _ { z = 1 } ^ { Z } a _ { z } ^ { \nu } \mathfrak { a } ^ { z , 1 } \otimes \mathfrak { a } ^ { z , 2 } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } + \displaystyle \sum _ { x = Z + 1 } ^ { Z + M } a _ { z } ^ { \nu } \mathfrak { a } ^ { z } \mathfrak { e } _ { z - Z } \otimes \mathfrak { e } _ { z - Z } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } } \\ & { \quad = \displaystyle \sum _ { z = 1 } ^ { Z } a _ { z } ^ { \nu } \mathfrak { a } ^ { z , 1 } \otimes \mathfrak { a } ^ { z , 2 } \otimes \cdots \otimes \mathfrak { a } ^ { z , N } + \displaystyle \sum _ { N } ^ { N } a _ { z } ^ { \nu } \mathfrak { a } ^ { z } \mathfrak { a } ^ { z } \mathfrak { z } _ { \nu = 1 } ^ { M } , } \end{array}
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
thus proving this proposition.
|
| 309 |
+
|
| 310 |
+
# B.2 PROOF PROPOSITION 2
|
| 311 |
+
|
| 312 |
+
Proof Given $\begin{array} { r } { \textbf { x } \triangleq [ f _ { \theta _ { 1 } } ( \mathbf { x } _ { 1 } ) , \cdot \cdot \cdot , f _ { \theta _ { M } } ( \mathbf { x } _ { 1 } ) , f _ { \theta _ { 2 } } ( \mathbf { x } _ { 1 } ) , \cdot \cdot \cdot , f _ { \theta _ { M } } ( \mathbf { x } _ { N } ) ] ^ { \mathrm { T } } ~ \in ~ \mathbb { R } ^ { M N } } \end{array}$ , the output of the $l$ -th layer of a $( L , r , \lambda , 0 )$ ConvAC can be stored into the vectors of mappings $\delta ^ { l , j } ( \mathbf { x } ) \ \triangleq$ $[ \delta _ { 1 } ^ { l , j } ( \mathbf { x } ) , \ldots , \delta _ { r _ { l } } ^ { l , j } ( \mathbf { x } ) ] ^ { \mathrm { T } } \ \in \ \mathbb { R } ^ { r _ { l } }$ for $j \in [ N / 2 ^ { l } ]$ and $l \in [ L ]$ . Moreover, since the entries of these vectors are the result of $l - 1$ convolution-pooling layers with product pooling of window size 2, all the mappings $\delta _ { 1 } ^ { l , j } ( { \bf x } )$ can be expressed as a sum of polynomial terms on $\mathbf { x }$ of degree $2 ^ { l }$ .
|
| 313 |
+
|
| 314 |
+
Now, let the coefficient vectors $\mathbf { a } ^ { l , j , \gamma } \triangleq [ a _ { 1 } ^ { l , j , \gamma } , \hdots , a _ { r _ { l } } ^ { l , j , \gamma } ] ^ { \mathrm { T } } \in \mathbb { R } ^ { r _ { l } }$ for $j \in [ N / 2 ^ { l } ]$ and $\gamma \in [ r _ { l + 1 } ]$ , be the weight vectors for the convolution of the $l$ -th layer. To shorten the notation we use $\langle \mathbf { a } ^ { l , j , \gamma } , \delta ^ { l , j } \rangle =$ $\textstyle \sum _ { d = 1 } ^ { r _ { l } } a _ { d } ^ { \bar { l } , j , \gamma } \delta _ { d } ^ { l , j }$ as shorthand for the convolution between these vectors. Then, the outputs the the layer $l$ of this ConvAC are given by $\pmb { \delta } ^ { l + 1 , j } \in \mathbb { R } ^ { r _ { l + 1 } }$ with $\delta _ { \gamma } ^ { l + 1 , j } = \langle { { \bf { a } } ^ { l , 2 j - 1 , \gamma } , \delta ^ { l , 2 j - 1 } } \rangle \langle { { \bf { a } } ^ { l , 2 j , \gamma } , \delta ^ { l , 2 j } } \rangle$ for $j \in [ N / 2 ^ { l + 1 } ] , \gamma \in [ r _ { l + 1 } ]$ . If we recursively calculate these out vectors up to the $L$ -th layer we obtain the score functions $h _ { \mathrm { s t a n d } } ^ { \bar { y } } ( \mathbf { x } ) \triangleq \pmb { \delta } ^ { L , 1 } ( \mathbf { x } ) = \delta _ { 1 } ^ { L , 1 } ( \mathbf { x } ) \in \mathbb { R }$ .
|
| 315 |
+
|
| 316 |
+
We now consider the effecct of adding dense connections via average pooling from some $k \in \mathbb N$ preceding layers $l - 1 , \ldots , l - k$ . To this end, let $\begin{array} { r } { \tilde { r } _ { l } = \sum _ { q = 1 } ^ { k } r _ { l - q } } \end{array}$ be the total size along the feature dimesnion of the vectors to be concatenated. In addition, let $\boldsymbol { \omega } ^ { l , j } ( \mathbf { x } ) \triangleq [ \omega _ { 1 } ^ { l , j } ( \mathbf { x } ) , \dots , \omega _ { \tilde { r } _ { l } } ^ { l , j } ( \mathbf { x } ) ] ^ { \mathrm { T } } \in$ $\mathbb { R } ^ { \tilde { r } _ { l } }$ be the vectors of mappings of the corresponding preceeding features at the layer $l$ for $j \in [ N / r _ { l } ]$ . In order to compute the convolutions of this layer, an additional vector of coefficients is required as $\mathbf { b } ^ { l , j , \gamma } \triangleq [ b _ { 1 } ^ { l , j , \gamma } , \hdots , b _ { \tilde { r } _ { l } } ^ { l , j , \gamma } ] ^ { \mathrm { T } } \in \mathbb { R } ^ { \tilde { r } _ { l } }$ . Then, the outputs of the $l$ -th layer of this $( L , r , \lambda , k )$ ConvAC are the denoted as the vectors $\tilde { \delta } ^ { l , j } ( \mathbf { x } ) \triangleq [ \tilde { \delta } _ { 1 } ^ { l , j } ( \mathbf { x } ) , \dots , \tilde { \delta } _ { r _ { l + 1 } } ^ { l , j } ( \mathbf { x } ) ] ^ { \mathrm { T } } \in \mathbb { R } ^ { r _ { l + 1 } }$ for $j \in [ N / 2 ^ { l + 1 } ]$ where
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\begin{array} { r } { \tilde { \delta } ^ { l + 1 , j } = \langle \sum _ { \mathbf { b } ^ { l , 2 j - 1 , \gamma } } ^ { \left[ \mathbf { a } ^ { l , 2 j - 1 , \gamma } \right] } , \left[ \mathbf { \Delta } _ { \omega ^ { l , 2 j - 1 } } ^ { \delta ^ { l , 2 j - 1 } } \right] \rangle \langle \left[ \mathbf { a } ^ { l , 2 j , \gamma } \right] , \left[ \mathbf { \Delta } _ { \omega ^ { l , 2 j } } ^ { \delta ^ { l , 2 j } } \right] \rangle . } \end{array}
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
From this expression it follows
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\begin{array} { r l } & { \tilde { \delta } ^ { l + 1 , j } = ( \langle \mathbf { a } ^ { l , 2 j - 1 , \gamma } , \delta ^ { l , 2 j - 1 } \rangle + \langle \mathbf { b } ^ { l , 2 j - 1 , \gamma } , \omega ^ { l , 2 j } \rangle ) ( \langle \mathbf { a } ^ { l , 2 j , \gamma } , \delta ^ { l , 2 j } \rangle + \langle \mathbf { b } ^ { l , 2 j , \gamma } , \omega ^ { l , 2 j } \rangle ) } \\ & { \qquad = \delta ^ { l + 1 , j } + \omega ^ { l + 1 , j } , } \end{array}
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
where
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\begin{array} { r l } & { \omega ^ { l + 1 , j } = \langle \mathbf { b } ^ { l , 2 j - 1 , \gamma } , \omega ^ { l , 2 j - 1 } \rangle \langle \mathbf { a } ^ { l , 2 j , \gamma } , \delta ^ { l , 2 j } \rangle + \langle \mathbf { a } ^ { l , 2 j - 1 , \gamma } , \delta ^ { l , 2 j - 1 } \rangle \langle \mathbf { b } ^ { l , 2 j , \gamma } , \omega ^ { l , 2 j } \rangle } \\ & { \qquad + \langle \mathbf { b } ^ { l , 2 j - 1 , \gamma } , \omega ^ { l , 2 j - 1 } \rangle \langle \mathbf { b } ^ { l , 2 j , \gamma } , \omega ^ { l , 2 j } \rangle . } \end{array}
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
Note that the entries of $\omega ^ { l , j } ( \mathbf { x } )$ are assumed to come from preceding layers with an appropiate average pooling. Since performing avergae pooling does not increase the degree of the polynomial terms involved (only product pooling does) and the jump length Ljump is at least 1, the entries of $\omega ^ { l , j } ( \mathbf { x } )$ have at most polynomial degree $2 ^ { l - 1 }$ , which is strictly less than the degree of the entries of $\delta ^ { l , j } ( \mathbf { x } )$ (i.e., $2 ^ { l }$ ). Therefore, from the obtained expression of $\omega ^ { l + 1 , j }$ we observe that it has polynomials withb degree no greater than $2 ^ { l } + 2 ^ { l - 1 }$ , while the entries of $\delta ^ { l + 1 , j }$ have a strictly higher degree of $2 ^ { l } + 2 ^ { l } = 2 ^ { l + 1 }$ .
|
| 335 |
+
|
| 336 |
+
Moreover, since $\langle \mathbf { a } ^ { l , j , \gamma } , \delta ^ { l , j } + \omega ^ { l , j } \rangle$ can be expressed as
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
\langle \mathbf { a } ^ { l , j , \gamma } , \delta ^ { l , j } + \omega ^ { l , j } \rangle = \langle \mathbf { \overline { { a } } } ^ { l , j , \gamma } ] , [ \delta ^ { l , j } ] \rangle
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
we can make use of the obtained results in an unductive manner up to the $L$ -th layer, thus leading to
|
| 343 |
+
|
| 344 |
+
$$
|
| 345 |
+
h _ { \mathrm { d e n s e } } ^ { y } ( \mathbf { x } ) = h _ { \mathrm { s t a n d } } ^ { y } ( \mathbf { x } ) + g ( \mathbf { x } ) ,
|
| 346 |
+
$$
|
| 347 |
+
|
| 348 |
+
where $g ( \mathbf { x } )$ contains polynomial terms of $\mathbf { x }$ of order strictly less than $N$ , thus proving this theorem. Note that this result also applies to additive and resudial connections, as de ones used in ResNet and FractalNet, since they can be expressed as in (11).
|
| 349 |
+
|
| 350 |
+
# B.3 PROOF OF THEOREMS 5.1 TO 5.3
|
| 351 |
+
|
| 352 |
+
Proof Given $M \in \mathbb { N }$ , a $( L , r , \lambda , 0 )$ ConvAC with $L > 1 , r \leq M , \lambda \leq 1$ has a grid tensor $\mathcal { A } _ { \mathrm { s t a n d } } ^ { y } \in$ $( \mathbb { R } ^ { M } ) ^ { \otimes N }$ . For the forthcoming analysis let us assume $r _ { 0 } \leq M$ . This assumption is done, so that we can write $\operatorname* { m i n } \{ r _ { 0 } , M \} = r _ { 0 }$ , merely for notation purposes since we show that this does not affect the generality of the results. Using this assumption, we upper bound the rank of the grid tensor as
|
| 353 |
+
|
| 354 |
+
$$
|
| 355 |
+
\begin{array} { l } { { \mathrm { r a n k } \left( { \phi ^ { 1 , j , \gamma } } \right) = \displaystyle \operatorname * { r a n k } \left( \sum _ { \alpha = 1 } ^ { r _ { 0 } } a _ { \alpha } ^ { 1 , j , \gamma } { \bf \hat { a } } ^ { 0 , 2 j - 1 , \alpha } \otimes { \bf \hat { a } } ^ { 0 , 2 j , \alpha } \right) \leq \operatorname* { m i n } \{ r _ { 0 } , \mathcal { M } \} = r _ { 0 } } } \\ { { \mathrm { r a n k } \left( { \phi ^ { 2 , j , \gamma } } \right) \leq \displaystyle \sum _ { \alpha = 1 } ^ { r _ { 1 } } \mathrm { r a n k } \left( { \phi ^ { 1 , 2 j - 1 , \alpha } } \otimes { \phi ^ { 1 , 2 j , \alpha } } \right) \leq \displaystyle \sum _ { \alpha = 1 } ^ { r _ { 1 } } \mathrm { r a n k } \left( { \phi ^ { 1 , 2 j - 1 , \alpha } } \right) \mathrm { r a n k } \left( { \phi ^ { 1 , 2 j , \alpha } } \right) = r _ { 1 } r _ { 0 } ^ { 2 } } } \\ { \vdots } \\ { { \mathrm { r a n k } \left( { \phi ^ { l , j , \gamma } } \right) \leq \displaystyle \sum _ { \alpha = 1 } ^ { r _ { l - 1 } } \mathrm { r a n k } \left( { \phi ^ { l - 1 , 2 j - 1 , \alpha } } \otimes { \phi ^ { l - 1 , 2 j , \alpha } } \right) \leq \displaystyle \sum _ { \alpha = 1 } ^ { r _ { l - 1 } } \mathrm { r a n k } \left( { \phi ^ { l - 1 , 2 j - 1 , \alpha } } \right) \mathrm { r a n k } \left( { \phi ^ { l - 1 , 2 j , \alpha } } \right) . } } \end{array}
|
| 356 |
+
$$
|
| 357 |
+
|
| 358 |
+
It was shown in Cohen & Shashua (2016a) that, when the weights are independently generated from some continuous distribution, we have that rank $\left( \phi ^ { 1 , j , \gamma } \right) = \mathsf { \bar { m i n } } \{ r _ { 0 } , M \}$ with probability 1. Note that, the bounds obtained for $r _ { 0 }$ values greater than $M$ is the same as for $r _ { 0 } = M$ , thus implying that the assumption of $r _ { 0 } \leq M$ does not affect the generality of the results. Finally, by induction up to the $L$ -th layer, we obtain a bound for the grid tensor rank as
|
| 359 |
+
|
| 360 |
+
$$
|
| 361 |
+
\mathrm { r a n k } \left( \mathcal { A } _ { \mathrm { s t a n d } } ^ { y } \right) = \mathrm { r a n k } \left( \phi ^ { L , 1 , 1 } \right) \leq \sum _ { \alpha = 1 } ^ { r _ { L - 1 } } \mathrm { r a n k } \left( \phi ^ { L - 1 , 1 , \alpha } \right) \mathrm { r a n k } \left( \phi ^ { L - 1 , 2 , \alpha } \right) = \prod _ { l = 0 } ^ { L - 1 } r _ { l } ^ { 2 ^ { L - l - 1 } } .
|
| 362 |
+
$$
|
| 363 |
+
|
| 364 |
+
Since we assumed networks with hidden layer widths $r _ { l }$ decaying (or increasing) at an exponential rate of $\lambda \in \mathbb { R }$ . Formally, this is $r _ { l } = \lambda r _ { l - 1 } \in \mathbb { N }$ , thus $r _ { l } = ( \bar { \lambda ( } ) ^ { l } r$ for all $l = 0 , 1 , \ldots , L - 1$ , where
|
| 365 |
+
|
| 366 |
+
$r \triangleq r _ { 0 }$ . Therefore, we may simplify the obtained bound to
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\mathrm { r a n k } \left( \mathcal { A } _ { \mathrm { s t a n d } } ^ { y } \right) \leq \prod _ { l = 0 } ^ { L - 1 } ( ( \lambda ) ^ { l } r ) ^ { 2 ^ { L - l - 1 } } = ( \lambda ) ^ { \sum _ { l = 0 } ^ { L - 1 } l 2 ^ { L - l - 1 } } r ^ { \sum _ { l = 0 } ^ { L - 1 } 2 ^ { L - l - 1 } } = ( \lambda ) ^ { 2 ^ { L } - 1 - L } r ^ { 2 ^ { L } - 1 } .
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
We this analysis by proving Theorem 5.1. To that end let y $\mathcal { A } _ { \mathrm { d e n s e } } ^ { y }$ be the grid tensor of a dense0 ConvAC with s discussed in S , while 4, this d $A _ { \mathrm { s t a n d } } ^ { y }$ dense is the grid tensor rsion of the former ConvAC withvAC is equiva$r ^ { \prime } \in \mathbb { R }$ $( L , r , \lambda , 0 )$ lent to virtually increasing the widths of the ConvAC, which translates extra additive terms in the expressions from 12. Moreover, using corollary 1 we observe that, if the ranks of the tensors $\phi ^ { l , j , \gamma }$ are additive and multiplicative up to $\bar { \mathrm { r a n k } } ( \bar { \mathcal { A } } _ { \mathrm { d e n s e } } ^ { y } ) > \mathrm { r a n k } ( \bar { \mathcal { A } } _ { \mathrm { s t a n d } } ^ { y } )$ , so they are up to $\mathrm { r a n k } ( \mathcal { A } _ { \mathrm { s t a n d } } ^ { y } )$ . A weak dense gain value $G _ { \mathrm { w } } \in \mathbb { R }$ is achieved when there is a set of functions realized by the $( L , r , \lambda , k )$ ConvAC that cannot be realized by $( L , r ^ { \prime } , \lambda , 0 )$ ConvAC unless $r ^ { \prime } = G _ { \mathrm { w } } r$ . To bound this gain, let us assume the best case scenario where rank $\cdot A _ { \mathrm { d e n s e } } ^ { y } )$ reaches the maximum possible rank, from the size of Aydense this can be at most $\mathrm { r a n k } ( \mathcal { A } _ { \mathrm { d e n s e } } ^ { y } ) = M ^ { 2 ^ { L } - 1 }$ . As discussed, would imply that the ranks of the tensors $\phi ^ { l , j , \gamma }$ are additive up to $M ^ { 2 ^ { L } - 1 }$ for both ConvACs. Therefore, $\mathcal { A } _ { \mathrm { s t a n d } } ^ { y }$ achieves its maximum rank given by rank $( \mathcal { A } _ { \mathrm { s t a n d } } ^ { y } ) = ( \lambda ) ^ { 2 ^ { L } - 1 - L } ( r ^ { \prime } ) ^ { 2 ^ { L } - 1 }$ . Then, a $( L , r ^ { \prime } , \lambda , 0 )$ ConvAC is able to realize the functions of a $( L , r , \lambda , k )$ ConvAC when $\operatorname { r a n k } { ( \mathcal { A } _ { \mathrm { s t a n d } } ^ { y } ) } = \operatorname { r a n k } { ( \mathcal { A } _ { \mathrm { d e n s e } } ^ { y } ) }$ , thus $( \lambda ) ^ { 2 ^ { L } - 1 - L } ( r ^ { \prime } ) ^ { 2 ^ { L } - 1 } = { M ^ { 2 ^ { L } - 1 } }$ . Finally, since $r ^ { \prime } = G _ { \mathrm { w } } r$ , this leads to a maximum value of
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
G _ { \mathrm { w } } = { \frac { M } { \lambda r } } \lambda ^ { \frac { L } { 2 L _ { - 1 } } } \leq { \frac { M } { \lambda r } } ,
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
which proves Theorem 5.1.
|
| 379 |
+
|
| 380 |
+
For Theorem 5.2 we use consider the particular case of $k = 1$ , which yields a core tensor given by the hierarchical tensor decomposition from (9). We use the same assumption of $r _ { 0 } \le M$ and define the virtually increased widths $\tilde { r } _ { l } \triangleq r _ { l } + r _ { l - 1 } \in \mathbb { N }$ for $l = 1 , \ldots , L - 1$ and $\tilde { r } _ { 0 } \triangleq M$ . This leads to
|
| 381 |
+
|
| 382 |
+
$\begin{array} { l } { \displaystyle \mathrm { r a n k } \left( \phi ^ { 1 , j , \gamma } \right) = \displaystyle \mathrm { r a n k } \left( \sum _ { \alpha = 1 } ^ { r _ { 0 } + M } a _ { \alpha } ^ { 1 , j , \gamma } \mathbf { a } ^ { 0 , 2 j - 1 , \alpha } \otimes \mathbf { a } ^ { 0 , 2 j , \alpha } \right) \leq \operatorname* { m i n } \{ r _ { 0 } + M , M \} = \tilde { r } _ { 0 } } \\ { \displaystyle \mathrm { r a n k } \left( \phi ^ { 2 , j , \gamma } \right) \leq \sum _ { \alpha = 1 } ^ { r _ { 1 } + r _ { 0 } } \mathrm { r a n k } \left( \phi ^ { 1 , 2 j - 1 , \alpha } \otimes \phi ^ { 1 , 2 j , \alpha } \right) \leq \sum _ { \alpha = 1 } ^ { \tilde { r } _ { 1 } } \mathrm { r a n k } \left( \phi ^ { 1 , 2 j - 1 , \alpha } \right) \mathrm { r a n k } \left( \phi ^ { 1 , 2 j , \alpha } \right) = \tilde { r } _ { 1 } \tilde { r } _ { 0 } ^ { 2 } } \end{array}$ $\cdot \mathrm { a n k } \left( \phi ^ { l , j , \gamma } \right) \leq \sum _ { \alpha = 1 } ^ { r _ { l - 1 } + r _ { l - 2 } } \mathrm { r a n k } \left( \phi ^ { l - 1 , 2 j - 1 , \alpha } \otimes \phi ^ { l - 1 , 2 j , \alpha } \right) \leq \sum _ { \alpha = 1 } ^ { \tilde { r } _ { l - 1 } } \mathrm { r a n k } \left( \phi ^ { l - 1 , 2 j - 1 , \alpha } \right) \mathrm { r a n k } \left( \phi ^ { l - 1 , 2 j , \alpha } \right)$ and
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\mathrm { r a n k } ( \mathcal { A } _ { \mathrm { d e n s } } ^ { y } ) = \mathrm { r a n k } \left( \phi ^ { L , 1 , 1 } \right) \leq \prod _ { l = 0 } ^ { L - 1 } \tilde { r } _ { l } ^ { 2 ^ { L - l - 1 } } .
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
Note that for $r _ { l } = \lambda r _ { l - 1 } \in \mathbb { N } ( \lambda \in \mathbb { R } )$ , we get virtually increased widths $\tilde { r } _ { l } = ( 1 + \lambda ) ^ { l } r =$ $\left( \lambda \left( 1 + \textstyle { \frac { 1 } { \lambda } } \right) \right) ^ { l } r$ , for all $l = 0 , 1 , \ldots , L - 1$ , leading to
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
\begin{array} { l } { \operatorname { r a n k } \left( \mathscr { A } _ { \sf d e n s } ^ { y } \right) \leq \displaystyle \prod _ { l = 0 } ^ { L - 1 } \left( \left( \lambda ( 1 + 1 / \lambda ) \right) ^ { l } r \right) ^ { 2 ^ { L - l - 1 } } = \left( \lambda ( 1 + 1 / \lambda ) \right) ^ { \sum _ { l = 0 } ^ { L - 1 } l 2 ^ { L - l - 1 } } r ^ { \sum _ { l = 0 } ^ { L - 1 } 2 ^ { L - l - 1 } } } \\ { = \left( \lambda ( 1 + 1 / \lambda ) \right) ^ { 2 ^ { L } - 1 - L } r ^ { 2 ^ { L } - 1 } . } \end{array}
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
As in for the proof of Theorem 5.1, the maximum dense gain $G _ { \mathrm { w } }$ is obtained when $\mathrm { r a n k } ( \mathcal { A } _ { \mathrm { d e n s e } } ^ { y } )$ reaches the maximum possible rank. In this particular case, this corresponds to $\begin{array} { r c l } { \operatorname { r a n k } ( \overset { \smile } { \mathcal { A } } _ { \mathrm { d e n s e } } ^ { y } ) } & { = } & { \operatorname* { m i n } \Big ( \big ( \lambda ( 1 + 1 / \lambda ) \big ) ^ { 2 ^ { L } - 1 - L } r ^ { 2 ^ { L } - 1 } , { M ^ { 2 ^ { L } - 1 } } \Big ) . } \end{array}$ . Furthermore, for obtaining $\operatorname { r a n k } { ( \mathcal { A } _ { \mathrm { s t a n d } } ^ { y } ) } = \operatorname { r a n k } { ( \mathcal { A } _ { \mathrm { d e n s e } } ^ { y } ) }$ a gain of
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
G _ { \mathrm { w } } \leq \operatorname* { m i n } \left( 1 + { \frac { 1 } { \lambda } } , { \frac { M } { \lambda r } } \right)
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
is required, thus proving Theorem 5.2.
|
| 401 |
+
|
| 402 |
+
Finally, for proving Theorem 5.3 we show that this bound can be attained with probability 1. Note that this bound is achieved when the inequalities from (12) hold with equality for all $\begin{array} { r l r l } { l } & { { } \in } & { [ L ] } \end{array}$ . The first inequality of (12) holds when the tensors $\left( \phi ^ { l - 1 , 2 j - 1 , 1 } \otimes \phi ^ { l - 1 , 2 j , 1 } \right) , \cdot \cdot \cdot , \left( \phi ^ { \bar { l } - 1 , 2 j - 1 , r _ { l - 1 } } \otimes \phi ^ { l - 1 , 2 j , r _ { l - 1 } } \right)$ are additive on the rank. This can be proven to be true with probability 1 when
|
| 403 |
+
|
| 404 |
+
$$
|
| 405 |
+
\sum _ { \alpha = 1 } ^ { r _ { l - 1 } } \operatorname { r a n k } \big ( \phi ^ { l - 1 , 2 j - 1 , \alpha } \otimes \phi ^ { l - 1 , 2 j , \alpha } \big ) \leq M ^ { 2 ^ { l - 1 } }
|
| 406 |
+
$$
|
| 407 |
+
|
| 408 |
+
by applying Lemma 3. In the same manner, the second inequality of (12) holds when the tensor pairs $\displaystyle \dot { \left( \phi ^ { l - 1 , 2 j - 1 , \alpha } , \phi ^ { l - 1 , 2 j , \alpha } \right) }$ are multiplicative in the tensor rank. We may use Lemma 2 to prove this is the case with probability 1 if we can bound
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\operatorname { r a n k } \left( \phi ^ { l - 1 , 2 j - 1 , \alpha } \right) \leq M ^ { 2 ^ { l - 2 } } .
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
In summary, if equations (16) and (17) hold, we may use Lemmas 3 and 2 to prove that (12) reaches equality with probability 1, thus implying that (13) also reaches equality everywhere outside a set Lebesgue measure zero. It is straight forward to see that, if (16) holds, so does (17).
|
| 415 |
+
|
| 416 |
+
For the case of a network with exponential width decay $\lambda$ and $r \leq { \frac { 1 } { \lambda } } { \sqrt { M } }$ we have that
|
| 417 |
+
|
| 418 |
+
$$
|
| 419 |
+
\sum _ { \alpha = 1 } ^ { r _ { l - 1 } } \operatorname { r a n k } \left( \phi ^ { l - 1 , 2 j - 1 , \alpha } \otimes \phi ^ { l - 1 , 2 j , \alpha } \right) \leq ( \lambda ) ^ { 2 ^ { l } - 1 - l } r ^ { 2 ^ { l } - 1 } \leq ( \lambda ) ^ { 2 ^ { l } } r ^ { 2 ^ { l } } \leq ( \lambda ) ^ { 2 ^ { l } } \left( { \frac { 1 } { \lambda } } { \sqrt { M } } \right) ^ { 2 ^ { l } } = M ^ { 2 ^ { l - 1 } }
|
| 420 |
+
$$
|
| 421 |
+
|
| 422 |
+
thus (16) holds. Therefore, within this regime of $r \leq { \frac { 1 } { \lambda } } { \sqrt { M } }$ , we may ensure that the tensor rank is additive and multiplicative with probability 1.
|
| 423 |
+
|
| 424 |
+
Now we apply the same reasoning for a densely connected arithmetic circuit of √ √ $L$ layers and width decay $\lambda$ such that $\begin{array} { r } { r \leq \frac { 1 } { 1 + \lambda } \sqrt { M } \stackrel { - } { = } \frac { 1 } { \lambda ( 1 + 1 / \lambda ) } \sqrt { M } } \end{array}$ 1λ(1+1/λ) M . In the same manner as for the standard ConvAC we bound
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
\begin{array} { r } { \displaystyle \sum _ { \alpha = 1 } ^ { r _ { l - 1 } } \operatorname { r a n k } \left( \phi ^ { l - 1 , 2 j - 1 , \alpha } \otimes \phi ^ { l - 1 , 2 j , \alpha } \right) \leq \left( \lambda ( 1 + 1 / \lambda ) \right) ^ { 2 ^ { l } - 1 - l } r ^ { 2 ^ { l } - 1 } \leq \left( \lambda ( 1 + 1 / \lambda ) \right) ^ { 2 ^ { l } } r ^ { 2 ^ { l } } } \\ { \leq \left( \lambda ( 1 + 1 / \lambda ) \right) ^ { 2 ^ { l } } \left( \displaystyle \frac { 1 } { \lambda ( 1 + 1 / \lambda ) } \sqrt { M } \right) ^ { 2 ^ { l } } = M ^ { 2 ^ { l - 1 } } , } \end{array}
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
which enables us to make use of Lemmas 3 and 2 to prove that (15) holds with equality everywhere√ √ except from a set of Lebesgue measure zero. Note that, for $\textstyle r \leq { \frac { 1 } { 1 + \lambda } } { \sqrt { M } } < { \frac { 1 } { \lambda } } { \bar { \sqrt { M } } }$ , we have that both equations (13) and (15) reach equality with probability 1, thus proving Theorem 5.3.
|
| 431 |
+
|
| 432 |
+
# B.4 PROOF PROPOSITION 3
|
| 433 |
+
|
| 434 |
+
Proof Let $P ( L , r , \lambda , k ) \in \mathbb { N }$ be the number of parameters of a $( L , r , \lambda , k )$ ConvAC. A standard $( L , r , \lambda , 0 )$ ConvAC is composed of the weights $\bar { \{ \mathbf { a } ^ { 0 , j , \gamma } \in \mathbb { R } ^ { M } \} } _ { j \in [ N ] , \gamma \in [ r _ { 0 } ] }$ in the first hidden convolutions, $\{ \mathbf { a } ^ { l , j , \gamma } \in \mathbb { R } ^ { M } \} _ { j \in [ N / 2 ^ { l } ] , \gamma \in [ r _ { l } ] }$ in the hidden layers, and $\mathbf { a } ^ { L , 1 , y } \in \mathbb { R } ^ { r _ { L - 1 } }$ in the weights corresponding to the output $y$ in the output layer. Therefore, this ConvAC has a number of weights
|
| 435 |
+
|
| 436 |
+
$$
|
| 437 |
+
P ( L , r , \lambda , 0 ) = M N r _ { 0 } + \sum _ { l = 1 } ^ { L } \frac { N } { 2 ^ { l } } r _ { l } r _ { l - 1 } + Y r _ { L }
|
| 438 |
+
$$
|
| 439 |
+
|
| 440 |
+
When adding dense connections of growth-rate $k$ , we need additional weights for the convolution ding layers and the current layer. Therefore, at the weights, which leads to $l$ -th layer we have an extra $\scriptstyle \sum _ { q = 1 } ^ { k } { \frac { N } { 2 ^ { l } } } r _ { l } r _ { l - 1 - q }$
|
| 441 |
+
|
| 442 |
+
$$
|
| 443 |
+
P ( L , r , \lambda , k ) = M N r _ { 0 } + \sum _ { l = 1 } ^ { L } \frac { N } { 2 ^ { l } } r _ { l } r _ { l - 1 } + \sum _ { l = 1 } ^ { L } \sum _ { q = 1 } ^ { k } \frac { N } { 2 ^ { l } } r _ { l } r _ { l - 1 - q } + Y r _ { L } .
|
| 444 |
+
$$
|
| 445 |
+
|
| 446 |
+
By definition, we have that $\begin{array} { r c l } { { \varDelta P _ { \mathrm { s t d } } } } & { { = } } & { { P ( L , G r , \lambda , 0 ) ~ - ~ P ( L , G r , \lambda , 0 ) } } \end{array}$ and $\begin{array} { r l } { \varDelta P _ { \mathrm { d e n s e } } } & { { } = } \end{array}$ $P ( L , G r , \lambda , k ) - P ( L , r , \lambda , 0 )$ , thus yielding
|
| 447 |
+
|
| 448 |
+
$$
|
| 449 |
+
\begin{array} { l } { { \displaystyle \varDelta P _ { \mathrm { s t d } } = ( G - 1 ) ( M N r _ { 0 } + Y r _ { L } ) + ( G ^ { 2 } - 1 ) \sum _ { l = 1 } ^ { L } \frac { N } { 2 ^ { l } } r _ { l } r _ { l - 1 } } } \\ { ~ } \\ { { \displaystyle ~ = ( G - 1 ) ( M N r + \lambda ^ { L } Y r ) + ( G ^ { 2 } - 1 ) \sum _ { l = 1 } ^ { L } \frac { N } { 2 ^ { l } } \lambda ^ { 2 l - 1 } r ^ { 2 } } } \\ { { \displaystyle ~ } } \\ { { \displaystyle ~ = ( G - 1 ) ( M N + \lambda ^ { L } Y ) r + ( G ^ { 2 } - 1 ) N \lambda ^ { - 1 } r ^ { 2 } \sum _ { l = 1 } ^ { L } ( \frac { \lambda ^ { 2 } } { 2 } ) ^ { l } } } \end{array}
|
| 450 |
+
$$
|
| 451 |
+
|
| 452 |
+
and
|
| 453 |
+
|
| 454 |
+
$$
|
| 455 |
+
\varDelta P _ { \mathrm { d e n s e } } = \sum _ { q = 1 } ^ { k } \sum _ { l = 1 } ^ { L } \frac { N } { 2 ^ { l } } r _ { l } r _ { l - 1 - q } = N r ^ { 2 } \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } \sum _ { l = 1 } ^ { L } ( \frac { \lambda ^ { 2 } } { 2 } ) ^ { l } .
|
| 456 |
+
$$
|
| 457 |
+
|
| 458 |
+
Finnaly, we use these expressions to compute the ratio of interest as
|
| 459 |
+
|
| 460 |
+
$$
|
| 461 |
+
\begin{array} { r l } & { \frac { \varDelta P _ { \mathrm { s t d } } } { \varDelta P _ { \mathrm { d e n s c } } } = \frac { ( G - 1 ) ( M N + \lambda ^ { L } Y ) r + ( G ^ { 2 } - 1 ) N \lambda ^ { - 1 } r ^ { 2 } \sum _ { l = 1 } ^ { L } ( \frac { \lambda ^ { 2 } } { 2 } ) ^ { l } } { N r ^ { 2 } \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } \sum _ { l = 1 } ^ { L } ( \frac { \lambda ^ { 2 } } { 2 } ) ^ { l } } } \\ & { \qquad = \frac { ( G - 1 ) ( M N + \lambda ^ { L } Y ) } { N r \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } \sum _ { l = 1 } ^ { L } ( \frac { \lambda ^ { 2 } } { 2 } ) ^ { l } } + \frac { ( G ^ { 2 } - 1 ) } { \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } } \geq \frac { ( G - 1 ) M } { r \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } \sum _ { l = 1 } ^ { L } ( \frac { \lambda ^ { 2 } } { 2 } ) ^ { l } } + \frac { ( G ^ { 2 } - 1 ) ^ { L } } { \sum _ { q = 1 } ^ { k } \lambda ^ { - 1 - q } } \geq \frac { ( G - 1 ) ^ { L } } { r ^ { 2 } } } \end{array}
|
| 462 |
+
$$
|
| 463 |
+
|
| 464 |
+
which proves this proposition.
|
md/train/BylaUTNtPS/BylaUTNtPS.md
ADDED
|
@@ -0,0 +1,582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RECURRENT INDEPENDENT MECHANISMS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Learning modular structures which reflect the dynamics of the environment can lead to better generalization and robustness to changes which only affect a few of the underlying causes. We propose Recurrent Independent Mechanisms (RIMs), a new recurrent architecture in which multiple groups of recurrent cells operate with nearly independent transition dynamics, communicate only sparingly through the bottleneck of attention, and are only updated at time steps where they are most relevant. We show that this leads to specialization amongst the RIMs, which in turn allows for dramatically improved generalization on tasks where some factors of variation differ systematically between training and evaluation.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Physical processes in the world often have a modular structure, with complexity emerging through combinations of simpler subsystems. Machine learning seeks to uncover and use regularities in the physical world. Although these regularities manifest themselves as statistical dependencies, they are ultimately due to dynamic processes governed by physics. These processes are often independent and only interact sparsely. For instance, we can model the motion of two balls as separate independent mechanisms even though they are both gravitationally coupled to Earth as well as (weakly) to each other. They may, however, occasionally strongly interact via collisions.
|
| 12 |
+
|
| 13 |
+
The notion of independent or autonomous mechanisms has been influential in the field of causal inference, where it is applied not only to dynamic processes but also to time independent datasets. For instance, it has been argued that the conditional distribution of the average annual temperature given the altitude of a place is an abstraction of a causal mechanism (subsuming complex physical processes involving air pressure, etc.) that is independent of the distribution of the altitudes of settlements (Peters et al., 2017), and will thus apply invariantly for, say, different countries in the same climate zone with different altitude distributions.
|
| 14 |
+
|
| 15 |
+
A complex generative model, temporal or not, can be thought of as the composition of independent mechanisms or “causal” modules. In the causality community, this is often considered a prerequisite of being able to perform localized interventions upon variables determined by such models (Pearl, 2009). It has been argued that the individual modules tend to remain robust or invariant even as other modules change, e.g., in the case of distribution shift (Schölkopf et al., 2012; Peters et al., 2017). One may hypothesize that if a brain is able to solve multiple problems beyond a single i.i.d. (independent and identically distributed) task, it would be economical to learn structures aligned with this, by learning independent mechanisms that can flexibly be reused, composed and re-purposed.
|
| 16 |
+
|
| 17 |
+
In the dynamic setting, we think of an overall system being assayed as composed of a number of fairly independent subsystems that evolve over time, responding to forces and interventions. A learning agent then need not devote equal attention to all subsystems at all times: only those aspects that significantly interact need to be considered jointly when taking a decision or forming a plan (Bengio, 2017). Such sparse interactions can reduce the difficulty of learning since few interactions need to be considered at a time, reducing unnecessary interference when a subsystem is adapted. Models learned this way may be more likely to capture the compositional generative (or causal) structure of the world, and thus better generalize across tasks where a (small) subset of mechanisms change while most of them remain invariant (Simon, 1991; Peters et al., 2017; Parascandolo et al., 2018). The central question motivating our work is how a machine learning approach can learn independent but sparsely interacting recurrent mechanisms in order to benefit from such modularity.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Illustration of Recurrent Independent Mechanisms (RIMs). A single step under the proposed model occurs in four stages (left figure shows two steps). In the first stage, individual RIMs produce a query which is used to read from the current input. In the second stage, an attention based competition mechanism is used to select which RIMs to activate (right figure) based on encoded visual input (blue RIMs are active, based on attention score, white RIMs remain inactive). In the third stage, individual activated RIMs follow their own default transition dynamics while non-activated RIMs remain unchanged. In the fourth stage, the RIMs sparsely communicate information between themselves, also using attention.
|
| 21 |
+
|
| 22 |
+
# 2 RECURRENT INDEPENDENT MECHANISMS WITH SPARSE INTERACTIONS
|
| 23 |
+
|
| 24 |
+
Our approach to modelling a dynamical system of interest divides the overall model into $k$ small subsystems (or modules), each of which is recurrent in order to be able to capture dynamics. We refer to these subsystems as Recurrent Independent Mechanisms $( R I M s )$ , where each RIM has distinct functions that are learned automatically from data1. We refer to RIM $k$ at time step $t$ as having state $h _ { t , k }$ , where $t = 1 , \dots , T$ . Each RIM has parameters $\theta _ { k }$ , which are shared across all time steps.
|
| 25 |
+
|
| 26 |
+
At a high level (see. Fig. 1), we want each RIM to have its own independent dynamics operating by default, and occasionally to interact with other relevant RIMs and with selected elements of the encoded input. The total number of parameters can be kept small since RIMs can specialize on simple sub-problems, similar to Parascandolo et al. (2018). This specialization and modularization not only has computational and statistical advantages (Baum & Haussler, 1989; Bengio et al., 2019), but also prevents individual RIMs from dominating and modelling complex, composite mechanisms. We expect this to lead to more robust systems than training one big homogeneous neural network (Schmidhuber, 2018). Moreover, modularity also has the desirable implication that a RIM should maintain its own independent functionality even as other RIMs are changed. A more detailed account of the desiderata for the model is given in Appendix A.
|
| 27 |
+
|
| 28 |
+
# 2.1 INDEPENDENT RIM DYNAMICS
|
| 29 |
+
|
| 30 |
+
Now, consider the default transition dynamics which we apply for each RIM independently and during which no information passes between RIMs. We use $\tilde { h }$ for the hidden state after the independent dynamics are applied (and before attention is applied). First, for the RIMs which are not activated (we refer to the activated set as $S _ { t }$ ), the hidden state remains unchanged:
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\tilde { h } _ { t + 1 , k } = h _ { t , k } \qquad \forall k \notin S _ { t } .
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
Note that the gradient still flows through a RIM on a step where it is not activated. For the RIMs that are activated, we run a per-RIM independent transition dynamics. The form of this is somewhat flexible, but in this work we opted to use either a GRU (Chung et al., 2015) or an LSTM (Hochreiter & Schmidhuber, 1997). We generically refer to these independent transition dynamics as $D _ { k }$ , and we emphasize that each RIM has its own separate parameters. Aside from being RIM-specific, the internal operation of the LSTM and GRU remain unchanged, and the active RIMs are updated by
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\tilde { h } _ { t + 1 , k } = D _ { k } ( h _ { t , k } ) = L S T M ( h _ { t , k } , A _ { k } ^ { ( i n ) } ; \theta _ { k } ^ { ( D ) } ) \qquad \forall k \in S _ { t }
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
as a function of the attention mechanism A(in)k applied on the current input, described in the next two subsections below, after explaining the key-value mechanism used to select arguments for this update.
|
| 43 |
+
|
| 44 |
+
2.2 KEY-VALUE ATTENTION TO PROCESS SETS OF NAMED INTERCHANGEABLE VARIABLES
|
| 45 |
+
|
| 46 |
+
Each RIM should be activated and updated when the input is relevant to it. We thus utilize competition to allocate representational and computational resources. As argued by Parascandolo et al. (2018), this tends to produce independence among learned mechanisms, provided the training data has been generated by a set of independent physical mechanisms. In contrast to Parascandolo et al. (2018), we use an attention mechanism for this purpose. In doing so, we are inspired by findings from experimental psychology in the study of the interplay of top-down attention and bottom-up information flow, conceptualized in the biased competition theory of selective attention (Desimone & Duncan, 1995): A brain’s capacity for parallel processing of complex entities is limited, and many brain systems representing visual information use competition (operating in parallel across the visual field) to allocate resources, often biased by feedback from higher brain areas.
|
| 47 |
+
|
| 48 |
+
The introduction of content-based soft-attention mechanisms (Bahdanau et al., 2014) has opened the door to neural networks which operate on sets of typed interchangeable objects. This idea has been remarkably successful and widely applied to most recent Transformer-style multi-head dot product self attention models (Vaswani et al., 2017; Santoro et al., 2018), achieving new state-of-the-art results in many tasks. Soft-attention uses the product of a query (or read key) $Q$ of dimensionality $N _ { r } \times d$ matrix $Q$ , and $d$ dimension of each key) to a set of $N _ { o }$ objects each associated with a key (or write-key) matrix $K ^ { T }$ $( N _ { o } \times d )$ , and after normalization with a softmax yields outputs in the convex hull of the values (or write-values) $V _ { i }$ (row $i$ of matrix $V$ ). Its result is computed as
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
{ \mathrm { A t t e n t i o n } } ( Q , K , V ) = { \mathrm { s o f t m a x } } \left( { \frac { Q K ^ { T } } { \sqrt { d } } } \right) V ,
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where the softmax is applied to each row of its argument matrix, yielding a set of convex weights. As a result, one obtains a convex combination of the values $V$ . If the attention is focused on one element for a particular row (i.e., the softmax is saturated), this simply selects one of the objects and copies its value to row $j$ of the result. Note that the $d$ dimensions in the key can be split into heads which then have their attention matrix and write values computed separately.
|
| 55 |
+
|
| 56 |
+
When the inputs and outputs of each RIM are a set of objects or entities (each associated with a key and value vector), the RIM processing becomes a generic object-processing machine which can operate on “variables” in a sense analogous to variables in a programming language: as interchangeable arguments of functions. Because each object has a key embedding (which one can understand both as a name and as a type), the same RIM processing can be applied to any variable which fits an expected "distributed type" (specified by a query vector). Each attention head then corresponds to a typed argument of the function computed by the RIM. When the key of an object matches the query, it can be used as input for the RIM. Whereas in regular neural networks (without attention) neurons operate on fixed variables (the neurons which are feeding them from the previous layer), the key-value attention mechanisms make it possible to select on the fly which variable instance (i.e. which entity or object) is going to be used as input for each of the arguments of the RIM dynamics, with a different set of query embeddings for each RIM. These inputs can come from the external input or from the output of other RIMs. So, if the individual RIMs can represent these “functions with typed arguments,” then they can “bind” to whatever input is currently available and best suited according to its attention score: the “input attention” mechanism would look at the candidate input object’s key and evaluate if its “type” matches with what this RIM expects (specified in the query).
|
| 57 |
+
|
| 58 |
+
# 2.3 SELECTIVE ACTIVATION OF RIMS AS A FORM OF TOP-DOWN MODULATION
|
| 59 |
+
|
| 60 |
+
The proposed model learns to dynamically select those RIMs for which the current input is relevant. We give each RIM the choice between attending to the actual input instances or a special null input. The null input consists entirely of zeros and thus contains no information. At each step, we select the top- $k _ { A }$ (out of $k _ { T }$ ) RIMs in terms of their value of the softmax for the real input. Intuitively, the RIMs must compete on each step to read from the input, and only the RIMs that win this competition will be able to read from the input and have their state updated.
|
| 61 |
+
|
| 62 |
+
In our use of key-value attention, the queries come from the RIMs, while the keys and values come from the current input. The mechanics of this attention mechanism follow from the Transformer (Vaswani et al., 2017) and the RMC (Santoro et al., 2018), with the modification that the parameters of the attention mechanism itself are separate for each RIM. The input attention for a particular RIM is described as follows. The input $x _ { t }$ at time $t$ is seen as a set of elements, structured as rows of a matrix (for image data, it can be the output of the CNN). We first concatenate a row full of zeros, to obtain
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
X = \varnothing \oplus x _ { t } .
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
$\oplus$ refers to the row-level concatenation operator. Then, linear transformations are used to construct keys $K = X W ^ { k }$ , one per input element and for the null element), values $\mathbf { \nabla } V = X W ^ { v }$ , again one per element), and queries $\mathbf { \bar { \rho } } Q = R W _ { k } ^ { q }$ , one per RIM attention head) where $R$ is a matrix with each row $r _ { i }$ corresponding to the hidden state of an individual RIM (i.e $h _ { t , k }$ ). $W ^ { v }$ is a simple matrix mapping from an input element to the corresponding value vector for the weighted attention and $W ^ { k }$ is similarly a weight matrix which maps the input to the keys. $\boldsymbol { W } _ { k } ^ { q }$ is a per-RIM weight matrix which maps from the RIM’s hidden state to its queries. The attention thus is
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
A _ { k } ^ { ( i n ) } = \mathrm { s o f t m a x } \left( \frac { R W _ { k } ^ { q } ( X W ^ { k } ) ^ { T } } { \sqrt { d _ { e } } } \right) X W ^ { v } , \mathrm { w h e r e } \theta _ { k } ^ { ( i n ) } = ( W _ { k } ^ { q } , W ^ { e } , W ^ { v } ) .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
Based on the softmax values in (4), we select the top $k _ { A }$ RIMs (out of the total $K$ RIMs) to be activated for each step, which have the least attention on the null input (and thus put the highest attention on the input), and we call this set $S _ { t }$ . Since the queries depend on the state of the RIMs, this enables individual RIMs to attend only to the part of the input that is relevant for that particular RIM, thus enabling selective attention based on a top-down attention process (see. Fig 1). In practice, we use multiheaded attention, and multi-headed attention doesn’t change the essential computation, but when we do use it for input-attention we compute RIM activation by averaging the attention scores over the heads.
|
| 75 |
+
|
| 76 |
+
# 2.4 COMMUNICATION BETWEEN RIMS
|
| 77 |
+
|
| 78 |
+
Although the RIMs operate independently by default, the attention mechanism allows sharing of information among the RIMs. Specifically, we allow the activated RIMs to read from all other RIMs (activated or not). The intuition behind this is that non-activated RIMs are not related to the current input, so their value should not change. However they may still store contextual information that is relevant for activated RIMs. For this communication between RIMs, we use a residual connection as in (Santoro et al., 2018) to prevent vanishing or exploding gradients over long sequences.
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\begin{array} { r l } & { Q _ { t , k } = \tilde { W } _ { k } ^ { q } \tilde { h } _ { t , k } , \quad \forall k \in \mathcal { S } _ { t } } \\ & { K _ { t , k } = \tilde { W } _ { k } ^ { e } \tilde { h } _ { t , k } , \quad \forall k } \\ & { V _ { t , k } = \tilde { W } _ { k } ^ { v } \tilde { h } _ { t , k } , \quad \forall k } \\ & { h _ { t + 1 , k } = \mathrm { s o f t m a x } \left( \frac { Q _ { t , k } \left( K _ { t , : } \right) ^ { T } } { \sqrt { d _ { e } } } \right) V _ { t , : } + \tilde { h } _ { t , k } \quad \forall k \in \mathcal { S } _ { t } , \mathrm { ~ w h e r e ~ } \theta _ { k } ^ { ( c ) } = ( \tilde { W } _ { k } ^ { q } , \tilde { W } _ { k } ^ { e } , \tilde { W } _ { k } ^ { v } ) . } \end{array}
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
As in the Transformer and RMC Vaswani et al. (2017); Santoro et al. (2018), we use multiple heads (as well as input attention (as in Sec 2.3) by producing different sets of queries, keys, and values to compute a linear transformation for each head (different heads have different parameters).
|
| 85 |
+
|
| 86 |
+
# 2.5 VARIATIONS ON THE RIMS ARCHITECTURE
|
| 87 |
+
|
| 88 |
+
The RIMs architecture that we study is highly homogeneous and generally the only hyperparameters are the number of RIMs $K$ and how many RIMs are activated on each time step $K _ { A }$ . All of the datasets that we consider are temporal, yet there is a distinction between datasets where the input on each time step is highly structured (such as a video, where each time step is an image) and where this is not the case (such as language modeling, where each step is a word or character). In the former case, we can get further improvements by making the activation of RIMs not just sparse across time but also sparse across the (spatial) structure.
|
| 89 |
+
|
| 90 |
+
# 3 RELATED WORK
|
| 91 |
+
|
| 92 |
+
Neural Turing Machine (NTM) and Relational Memory Core (RMC): the NTM (Graves et al., 2014a) consists of a sequence of independent memory cells, and uses an attention mechanism while performing targeted read and write operations. This shares a key idea with RIMs: that input information should only impact a sparse subset of the memory by default, while keeping most of the memory unaltered. RMC (Santoro et al., 2018) uses a multi-head attention mechanism to share information between multiple memory elements. We encourage the RIMs to remain separate as much as possible, whereas Santoro et al. (2018) allow information between elements to flow on each step in an unsconstrained way. Instead, each RIM has its own default dynamics, while in RMC, all the processes interact with each other.
|
| 93 |
+
|
| 94 |
+
Separate Recurrent Models: EnTNet (Henaff et al., 2016) and IndRNN (Li et al., 2018) can be viewed as a set of separate recurrent models. In IndRNN, each recurrent unit has completely independent dynamics, whereas EntNet uses an independent gate for writing to each memory slot. RIMs use different recurrent models (with separate parameters), but we allow the RIMs to communicate with each other sparingly using an attention mechanism.
|
| 95 |
+
|
| 96 |
+
Modularity and Neural Networks: A neural network is composed of several neural modules, where each module is meant to perform a distinct function, and hence can be seen as a combination of experts (Jacobs et al., 1991; Bottou & Gallinari, 1991; Ronco et al., 1997; Reed & De Freitas, 2015; Andreas et al., 2016; Parascandolo et al., 2018; Rosenbaum et al., 2017; Fernando et al., 2017; Shazeer et al., 2017; Kirsch et al., 2018; Rosenbaum et al., 2019) routing information through a gated activation of layers. These works generally assume that only a single expert is active at a particular time step. In the proposed method, multiple RIMs can be active, interact and share information.
|
| 97 |
+
|
| 98 |
+
Computation on demand: There are various architectures (El Hihi & Bengio, 1996; Koutnik et al., 2014; Chung et al., 2016; Neil et al., 2016; Jernite et al., 2016; Krueger et al., 2016) where parts of the LSTM’s hidden state are kept dormant at times. The major differences as compared to the proposed architecture are that (a) we modularize the dynamics of recurrent cells (using RIMs), and (b) we also control the inputs of each module (using transformer style attention), while many previous gating methods did not control the inputs of each module, but only whether they should be executed or not.
|
| 99 |
+
|
| 100 |
+
# 4 EXPERIMENTS
|
| 101 |
+
|
| 102 |
+
The main goal of our experiments is to show that the use of RIMs improves generalization across changing environments and/or in modular tasks, and to explore how it does so. Our goal is not to outperform highly optimized baselines; rather, we want to show the versatility of our approach by applying it to a range of diverse tasks, focusing on tasks that involve a changing environment. We organize our results by the capabilities they illustrate: we address generalization based on temporal patterns, based on objects, and finally consider settings where both of these occur together.
|
| 103 |
+
|
| 104 |
+
# 4.1 RIMS IMPROVE GENERALIZATION BY SPECIALIZING OVER TEMPORAL PATTERNS
|
| 105 |
+
|
| 106 |
+
We first show that when RIMs are presented with sequences containing distinct temporal patterns, they are able to specialize so that different RIMs are activated on different patterns. As a result, RIMs are able to generalize well when we modify a subset of the patterns (especially those unrelated to the class label) while most recurrent models fail to generalize well to these variations.
|
| 107 |
+
|
| 108 |
+
# 4.1.1 COPYING TASK
|
| 109 |
+
|
| 110 |
+
First we turn our attention to the task of receiving a short sequence of characters, then receiving blank inputs for a large number of steps, and then being asked to reproduce the original sequence. We can think of this as consisting of two temporal patterns which are independent: one where the sequence is received and another “dormant” pattern where no input is provided.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 2: Copying Task RIM Activation Pattern for a model with $K = 6$ RIMs and $K _ { A } = 3$ active RIMs per step (the activated RIMs are in black, non-activated in white). We can see that the RIM activation pattern is distinct during the dormant part of the sequence.
|
| 114 |
+
|
| 115 |
+
Table 1: Performance on the copying task (left) and sequential MNIST resolution task right). Error (CE on the last 10 time steps) on the copying task. Note that while all of the methods are able to learn to copy for the length seen during training, the RIMs model generalizes to sequences longer than those seen during training whereas the LSTM, RMC, and NTM degrade. Sequential MNIST resolution: Test Accuracy $\%$ on the Sequential MNIST resolution generalization task (see text) after 100 epochs. Both the proposed and the Baseline model (LSTM) were trained on $1 4 \mathrm { x } 1 4$ resolution but evaluated at different resolutions; results averaged over 3 different trials.
|
| 116 |
+
|
| 117 |
+
<table><tr><td colspan="2">Copying k</td><td>kA</td><td>hsize</td><td>Train(50) CE</td><td>Test(200) CE</td></tr><tr><td rowspan="5">RIMs</td><td>6</td><td></td><td>600</td><td>0.01</td><td>3.5</td></tr><tr><td>6</td><td>5 4</td><td>600</td><td>0.00</td><td>0.00</td></tr><tr><td>6</td><td>3</td><td>600</td><td>0.00</td><td>0.00</td></tr><tr><td>6</td><td>2</td><td>600</td><td>0.00</td><td>0.00</td></tr><tr><td>5</td><td>3</td><td>500</td><td>0.00</td><td>0.00</td></tr><tr><td rowspan="2">LSTM</td><td></td><td>=</td><td>300</td><td>0.00</td><td>2.28</td></tr><tr><td></td><td>=</td><td>600</td><td>0.00</td><td>3.56</td></tr><tr><td>NTM</td><td></td><td>=</td><td>-</td><td>0.00</td><td>2.54</td></tr><tr><td>RMC</td><td></td><td></td><td>-</td><td>0.00</td><td>0.13</td></tr><tr><td>Transformers -</td><td></td><td></td><td>-</td><td>0.00</td><td>0.54</td></tr></table>
|
| 118 |
+
|
| 119 |
+
<table><tr><td colspan="4">Sequential MNIST</td><td rowspan="2">16 x 16 19 x 19 Accuracy</td><td rowspan="2"></td><td rowspan="2">24 x 24 Accuracy</td></tr><tr><td>kT</td><td>kA</td><td>hsize</td><td>Accuracy</td></tr><tr><td rowspan="3">RIMs</td><td>6</td><td>6</td><td>600</td><td>85.5</td><td>56.2</td><td>30.9</td></tr><tr><td>6</td><td>5</td><td>600</td><td>88.3</td><td>43.1</td><td>22.1</td></tr><tr><td>6</td><td>4</td><td>600</td><td>90.0</td><td>73.4</td><td>38.1</td></tr><tr><td rowspan="2">LSTM</td><td></td><td>-</td><td>300</td><td>86.8</td><td>42.3</td><td>25.2</td></tr><tr><td></td><td>=</td><td>600</td><td>84.5</td><td>52.2</td><td>21.9</td></tr><tr><td>EntNet -</td><td></td><td>=</td><td>: 一</td><td>89.2</td><td>52.4</td><td>23.5</td></tr><tr><td>RMC</td><td></td><td></td><td>-|</td><td>89.58</td><td>54.23</td><td>27.75</td></tr><tr><td rowspan="2">DNC Transformers-</td><td></td><td></td><td></td><td>87.2</td><td>44.1</td><td>19.8</td></tr><tr><td></td><td></td><td></td><td>91.2</td><td>51.6</td><td>22.9</td></tr></table>
|
| 120 |
+
|
| 121 |
+
As an example of out-of-distribution generalization, we find that using RIMs, we can extend the length of this dormant phase from 50 during training to 200 during testing and retain perfect performance (Table 1), whereas baseline methods including LSTM, NTM, and RMC substantially degrade. In addition, we find that this result is robust to the number of RIMs used as well as to the number of RIMs activated per-step. Our results (Appendix C.5) show that communication between different RIMs as well as input attention is necessary to achieve good generalization. We consider this preliminary evidence that RIMs can specialize over distinct patterns in the data and improve generalization to settings where these patterns change.
|
| 122 |
+
|
| 123 |
+
# 4.1.2 SEQUENTIAL MNIST RESOLUTION TASK
|
| 124 |
+
|
| 125 |
+
RIMs are motivated by the hypothesis that generalization performance can be improved by having modules which only activate on relevant parts of the sequence. For further evidence that RIMs can achieve this out-of-distribuution, we consider the task of classifying MNIST digits as sequences of pixels (Krueger et al., 2016) and assay generalization to images of resolutions different from those seen during training. Our intuition is that the RIMs model should have distinct subsets of the RIMs activated for pixels with the digit and empty pixels. As a result, RIMs should generalize better to greater resolutions by keeping the RIMs which store pixel information dormant over the empty regions of the image.
|
| 126 |
+
|
| 127 |
+
Results: Table 1 shows the result of the proposed model on the Sequential MNIST Resolution Task. If the train and test sequence lengths agree, both models achieve comparable test set performance. However, the RIMs model was relatively robust to changing the sequence length (by changing the image resolution), whereas the LSTM performance degraded more severely. This can be seen as a more involved analogue of the copying task, as MNIST digits contain large empty regions. It is essential that the model be able to store information and pass gradients through these regions. The RIMs outperform strong baselines such as Transformers, EntNet, RMC, as well as the Differentiable Neural Computer (DNC) (Graves et al., 2016).
|
| 128 |
+
|
| 129 |
+
# 4.2 RIMS LEARN TO SPECIALIZE OVER OBJECTS AND GENERALIZE BETWEEN THEM
|
| 130 |
+
|
| 131 |
+
We have presented evidence that RIMs can specialize over temporal patterns. We now turn our attention to showing that RIMs can specialize to objects, and show improved generalization to settings where we add or remove objects at test time.
|
| 132 |
+
|
| 133 |
+
# 4.2.1 BOUNCING BALL ENVIRONMENT
|
| 134 |
+
|
| 135 |
+
We consider a synthetic “bouncing balls” task in which multiple balls (of different masses and sizes) move using basic Newtonian physics (Van Steenkiste et al., 2018). What makes this task particularly suited to RIMs is that the balls move independently most of the time, except when they collide. During training, we predict the next frame at each time step using teacher forcing (Williams & Zipser, 1989). We can then use this model to generate multi-step rollouts.
|
| 136 |
+
|
| 137 |
+
As a preliminary experiment, we train on sequences of length 51 (the previous standard), using a binary cross entropy loss when predicting the next frame. We consider LSTM as baseline. We then produce rollouts, finding that RIMs are better able to predict future motion (examples in Figure 3, Figure 10 in Appendix and quantitative comparisons in Figure 4).
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
Figure 3: Predicting Movement of Bouncing Balls. The first 15 frames of ground truth are given (last 6 of those shown) and then the system is rolled out for the next 15 time steps. We find that RIMs perform better than the LSTMs (predictions are in black, ground truth in blue). Notice the blurring of LSTM predictions.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 4: Handling Novel Out-of-Distribution Variations. Here, we study the performance of our proposed model compared to an LSTM baseline. The first 15 frames of ground truth are fed in and then the system is rolled out for the next 10 time steps. During the rollout phase, RIMs perform better than the LSTMs in accurately predicting the dynamics of the balls as reflected by the lower Cross Entropy (CE) [see blue for RIMs, purple for LSTM]. Notice the substantially better out-of-distribution generalization of RIMs when testing on a different number of objects than during training.
|
| 144 |
+
|
| 145 |
+
We take this further by evaluating RIMs on environments where the setup is different from the training setup. First we consider training with 4 balls and evaluating on an environment with 6-8 balls. Second, we consider training with 6-8 balls and evaluating with just 4 balls. Robustness in these settings requires a degree of invariance w.r.t. the number of balls.
|
| 146 |
+
|
| 147 |
+
In addition, we consider a task where we train on 4 balls and then evaluate on sequences where part of the visual space is occluded by a “curtain”. This allows us to assess the ability of balls to be tracked (or remembered) through the occluding region. Our experimental results on these generalization tasks (Figure 4) show that RIMs substantially improve over an LSTM baseline. We found that increasing the capacity of the LSTM from 256 to 512 units did not substantially change the performance gap, suggesting that the improvement from RIMs is not primarily a result of increased capacity.
|
| 148 |
+
|
| 149 |
+
# 4.2.2 ENVIRONMENT WITH NOVEL DISTRACTORS
|
| 150 |
+
|
| 151 |
+
We next consider an object-picking reinforcement learning task from BabyAI (Chevalier-Boisvert et al., 2018) in which an agent must retrieve a specific object in the presence of distractors. We use a partially observed formulation of the task, where the agent only sees a small number of squares ahead of it. These tasks are difficult to solve (Chevalier-Boisvert et al., 2018) with standard RL algorithms, due to (1) the partial observability of the environment and (2) the sparsity of the reward, given that the agent receives a reward only after reaching the goal. During evaluation, we introduce new distractors to the environment which were not observed during training.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 5 shows that RIMs outperform LSTMs on this task (details in appendix). When evaluating with known distractors, the RIM model achieves perfect performance while the LSTM struggles. When evaluating in an environment with novel unseen distractors the RIM doesn’t achieve perfect performance but still outperforms the LSTM. An LSTM with a single memory flow may struggle to keep the distracting elements separate from elements which are necessary for the task, while the RIMs model uses attention to control which RIMs receive infor
|
| 155 |
+
Figure 5: Robustness to Novel Distractors:. Left: performance of the proposed method compared to an LSTM baseline in solving the object picking task in the presence of distractors. Right: performance of proposed method and the baseline when novel distractors are added.
|
| 156 |
+
|
| 157 |
+
mation at each step as well as what information they receive (as a function of their hidden state). This "top-down" bias results in a diminished representation of the distractor, not only enhancing the target visual information, but also suppressing irrelevant information. The notion that enhancement of the relevant information necessarily results in suppression of irrelevant information is fundamental to biased competition theory (Desimone & Duncan, 1995).
|
| 158 |
+
|
| 159 |
+
# 4.3 RIMS IMPROVE GENERALIZATION IN COMPLEX ENVIRONMENTS
|
| 160 |
+
|
| 161 |
+
We have investigated how RIMs use specialization to improve generalization to changing important factors of variation in the data. While these improvements have often been striking, it raises a question: what factors of variation should be changed between training and evaluation? One setting where factors of variation change naturally is in reinforcement learning, as the data received from an environment changes as the agent learns and improves. We conjecture that when applied to reinforcement learning, an agent using RIMs may be able to learn faster as its specialization leads to improved generalization to previously unseen aspects of the environment.
|
| 162 |
+
|
| 163 |
+
To investigate this we use an RL agent trained using Proximal Policy Optimization (PPO) (Schulman et al., 2017) with a recurrent network producing the policy. We employ an LSTM as a baseline, and compare results to the RIMs architecture. This was a simple drop-in replacement and did not require changing any of the hyperparameters for PPO. We experiment on the whole suite of Atari games and find that simply replacing the LSTM with RIMs greatly improves performance (Figure 6).
|
| 164 |
+
|
| 165 |
+
There is also an intriguing connection between the selective activation in RIMs and the concept of affordances from cognitive psychology (Gibson, 1977; Cisek & Kalaska, 2010). To perform well in environments with a dynamic combination of risks and opportunities, an agent should be ready to adapt immediately, releasing into execution actions which are at least partially prepared. This suggests agents should process sensory information in a contextual manner, building representations of potential actions that the environment currently affords. For instance, in Demon Attack, one of the games where RIMs exhibit strong performance gains, the agent must quickly choose between targeting distant aliens to maximize points and avoiding fire from close-by aliens to avoid destruction (indeed both types of aliens are always present, but which is relevant depends on the player’s position). We hypothesize that in cases like this, selective activation of RIMs allows the agent to rapidly adapt its information processing to the types of actions relevant to the current context.
|
| 166 |
+
|
| 167 |
+
# 4.4 ABLATIONS
|
| 168 |
+
|
| 169 |
+
Role of Top-Down Modulation: Removing Input Attention We study the scenario where we remove the input attention process (Section 2.3) but still allow communication between RIMs (Section 2.4). We train this agent on 30 ATARI games for 30M time-steps each and compare the performance of this agent with the normal RIMs-PPO agent. We find that the RIMs agent still outperform this agent on 11 out of 30 games, while on 1 game (Frostbite) we see the proposed baseline agent substantially improves the performance. For more details regarding the training curves, refer to Fig. 25 (in Appendix).
|
| 170 |
+
|
| 171 |
+
Importance of communication between RIMs: For copying, we performed an ablation where we remove the communication between RIMs. We also varied the number of RIMs as well as the number of activated RIMs (Table 5). We found that the communication between RIMs is essential for good performance. We found similar results for the sequential MNIST resolution task.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 6: RIMs-PPO relative score improvement over LSTM-PPO baseline (Schulman et al., 2017) across all Atari games averaged over 3 trials per game. In both cases, PPO was used with the exact same settings, and the only change is the choice of recurrent architecture. More detailed experiments with learning curves are in Appendix C.
|
| 175 |
+
|
| 176 |
+
Importance of sparsity of activation of the RIMs For the copying task, as well as for the sequential MNIST changed resolution task, we performed an ablation where we kept all RIMs active for all time steps (Table 5). We found that we were not able to achieve strong generalization as compared to the best performing RIMs model. On Atari we found that using $k _ { A } = 5$ slightly improved over results compared with $k _ { A } = 4$ , but both had similar performance across the vast majority of games, suggesting that the $k _ { A }$ hyperparameter is reasonably flexible in practice.
|
| 177 |
+
|
| 178 |
+
Varying the number of attention heads for communication: Here, we study what happens if the output of RIMs only has one ’object’ rather than multiple ones (Section 2.2). The intuition is that RIM processing can be applied to any “head” which matches the query by an individual RIM. So, having more heads should help, as different heads could be used by different RIMs, rather than every RIM competing for the same head. We study this in the context of bouncing balls. We found that using multiple heads improves the performance, thus validating our hypothesis (Sec. 2.2). See Appendix C.11 for details.
|
| 179 |
+
|
| 180 |
+
Randomly Dropping Out RIMs: Modular structures are aggregates of mechanisms that can perform functions without affecting the remainder of the system, and interact as needed. To what extent are trained RIMs able to model meaningful phenomena when other RIMs are removed? We performed an experiment on moving MNIST digits where we train normally and “dropout” a random RIM at test time. We found that in the absence of selective activation (i.e. when $k _ { A } = k _ { T }$ Section C.13) the performance degraded very badly, but the performance degrades much less with selective activation. See Appendix C.13 for details.
|
| 181 |
+
|
| 182 |
+
# 5 CONCLUSION
|
| 183 |
+
|
| 184 |
+
Many systems of interest comprise multiple dynamical processes that operate relatively independently and only occasionally have meaningful interactions. Despite this, most machine learning models employ the opposite inductive bias, i.e., that all processes interact. This can lead to poor generalization (if data is limited) and lack of robustness to changing task distributions. We have proposed a new architecture, Recurrent Independent Mechanisms (RIMs), in which we learn multiple recurrent modules that are independent by default, but interact sparingly. Our positive experimental results lend support to the consciousness prior (Bengio, 2017), i.e., the importance of computational elements which focus on few mechanisms at a time in order to determine how a high-level state evolves over time, with many aspects of the state not being affected by this attentive dynamics (i.e., following default dynamics). For the purposes of this paper, we note that the notion of RIMs is not limited to the particular architecture employed here. The latter is used as a vehicle to assay and validate our overall hypothesis (cf. Appendix A), but better architectures for the RIMs model can likely be found.
|
| 185 |
+
|
| 186 |
+
# REFERENCES
|
| 187 |
+
|
| 188 |
+
Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 39–48, 2016.
|
| 189 |
+
|
| 190 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 191 |
+
|
| 192 |
+
Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
|
| 193 |
+
|
| 194 |
+
Eric B Baum and David Haussler. What size net gives valid generalization? In Advances in neural information processing systems, pp. 81–90, 1989.
|
| 195 |
+
|
| 196 |
+
Yoshua Bengio. The consciousness prior. arXiv preprint arXiv:1709.08568, 2017.
|
| 197 |
+
|
| 198 |
+
Yoshua Bengio, Tristan Deleu, Nasim Rahaman, Rosemary Ke, Sébastien Lachapelle, Olexa Bilaniuk, Anirudh Goyal, and Christopher Pal. A meta-transfer objective for learning to disentangle causal mechanisms. arXiv:1901.10912, 2019.
|
| 199 |
+
|
| 200 |
+
Léon Bottou and Patrick Gallinari. A framework for the cooperation of learning algorithms. In Advances in neural information processing systems, pp. 781–788, 1991.
|
| 201 |
+
|
| 202 |
+
Matthew Botvinick and Todd Braver. Motivation and cognitive control: from behavior to neural mechanism. Annual review of psychology, 66, 2015.
|
| 203 |
+
|
| 204 |
+
Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017.
|
| 205 |
+
|
| 206 |
+
Maxime Chevalier-Boisvert and Lucas Willems. Minimalistic gridworld environment for openai gym. https://github.com/maximecb/gym-minigrid, 2018.
|
| 207 |
+
|
| 208 |
+
Maxime Chevalier-Boisvert, Dzmitry Bahdanau, Salem Lahlou, Lucas Willems, Chitwan Saharia, Thien Huu Nguyen, and Yoshua Bengio. Babyai: First steps towards grounded language learning with a human in the loop. arXiv preprint arXiv:1810.08272, 2018.
|
| 209 |
+
|
| 210 |
+
Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pp. 2980–2988, 2015.
|
| 211 |
+
|
| 212 |
+
Junyoung Chung, Sungjin Ahn, and Yoshua Bengio. Hierarchical multiscale recurrent neural networks. arXiv preprint arXiv:1609.01704, 2016.
|
| 213 |
+
|
| 214 |
+
Paul Cisek and John F Kalaska. Neural mechanisms for interacting with a world full of action choices. Annual review of neuroscience, 33:269–298, 2010.
|
| 215 |
+
|
| 216 |
+
Emily Denton and Rob Fergus. Stochastic video generation with a learned prior. arXiv preprint arXiv:1802.07687, 2018.
|
| 217 |
+
|
| 218 |
+
Robert Desimone and Jody Duncan. Neural mechanisms of selective visual attention. Annual Review of Neuroscience, 18:193–222, 1995.
|
| 219 |
+
|
| 220 |
+
A. Dickinson. Actions and habits: the development of behavioural autonomy. Philosophical Transactions of the Royal Society B: Biological Sciences, 308(1135):67–78, 1985. ISSN 0080- 4622. doi: 10.1098/rstb.1985.0010. URL http://rstb.royalsocietypublishing. org/content/308/1135/67.
|
| 221 |
+
|
| 222 |
+
Salah El Hihi and Yoshua Bengio. Hierarchical recurrent neural networks for long-term dependencies. In Advances in neural information processing systems, pp. 493–499, 1996.
|
| 223 |
+
|
| 224 |
+
Chrisantha Fernando, Dylan Banarse, Charles Blundell, Yori Zwols, David Ha, Andrei A Rusu, Alexander Pritzel, and Daan Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. arXiv preprint arXiv:1701.08734, 2017.
|
| 225 |
+
|
| 226 |
+
James J Gibson. The theory of affordances. Hilldale, USA, 1(2), 1977.
|
| 227 |
+
|
| 228 |
+
Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1263–1272. JMLR. org, 2017.
|
| 229 |
+
|
| 230 |
+
Anirudh Goyal, Riashat Islam, Daniel Strouse, Zafarali Ahmed, Matthew Botvinick, Hugo Larochelle, Sergey Levine, and Yoshua Bengio. Infobot: Transfer and exploration via the information bottleneck. arXiv preprint arXiv:1901.10902, 2019a.
|
| 231 |
+
|
| 232 |
+
Anirudh Goyal, Shagun Sodhani, Jonathan Binas, Xue Bin Peng, Sergey Levine, and Yoshua Bengio. Reinforcement learning with competitive ensembles of information-constrained primitives. arXiv preprint arXiv:1906.10667, 2019b.
|
| 233 |
+
|
| 234 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014a.
|
| 235 |
+
|
| 236 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014b. URL http://arxiv.org/abs/1410.5401.
|
| 237 |
+
|
| 238 |
+
Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, et al. ´ Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471, 2016.
|
| 239 |
+
|
| 240 |
+
David Ha and Jürgen Schmidhuber. World models. arXiv preprint arXiv:1803.10122, 2018.
|
| 241 |
+
|
| 242 |
+
Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. Learning latent dynamics for planning from pixels. arXiv preprint arXiv:1811.04551, 2018.
|
| 243 |
+
|
| 244 |
+
Mikael Henaff, Jason Weston, Arthur Szlam, Antoine Bordes, and Yann LeCun. Tracking the world state with recurrent entity networks. arXiv preprint arXiv:1612.03969, 2016.
|
| 245 |
+
|
| 246 |
+
Geoffrey E Hinton, Sara Sabour, and Nicholas Frosst. Matrix capsules with em routing. 2018.
|
| 247 |
+
|
| 248 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997.
|
| 249 |
+
|
| 250 |
+
Robert A Jacobs, Michael I Jordan, Steven J Nowlan, Geoffrey E Hinton, et al. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991.
|
| 251 |
+
|
| 252 |
+
Yacine Jernite, Edouard Grave, Armand Joulin, and Tomas Mikolov. Variable computation in recurrent neural networks. arXiv preprint arXiv:1611.06188, 2016.
|
| 253 |
+
|
| 254 |
+
Nan Rosemary Ke, Anirudh Goyal, Olexa Bilaniuk, Jonathan Binas, Michael C Mozer, Chris Pal, and Yoshua Bengio. Sparse attentive backtracking: Temporal credit assignment through reminding. In Advances in Neural Information Processing Systems, pp. 7640–7651, 2018.
|
| 255 |
+
|
| 256 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 257 |
+
|
| 258 |
+
Thomas Kipf, Ethan Fetaya, Kuan-Chieh Wang, Max Welling, and Richard Zemel. Neural relational inference for interacting systems. arXiv preprint arXiv:1802.04687, 2018.
|
| 259 |
+
|
| 260 |
+
Louis Kirsch, Julius Kunze, and David Barber. Modular networks: Learning to decompose neural computation. In Advances in Neural Information Processing Systems, pp. 2408–2418, 2018.
|
| 261 |
+
|
| 262 |
+
Wouter Kool and Matthew Botvinick. Mental labour. Nature human behaviour, 2(12):899–908, 2018.
|
| 263 |
+
|
| 264 |
+
Ilya Kostrikov. Pytorch implementations of reinforcement learning algorithms. https://github. com/ikostrikov/pytorch-a2c-ppo-acktr-gail, 2018.
|
| 265 |
+
|
| 266 |
+
Jan Koutnik, Klaus Greff, Faustino Gomez, and Juergen Schmidhuber. A clockwork rnn. arXiv preprint arXiv:1402.3511, 2014.
|
| 267 |
+
|
| 268 |
+
David Krueger, Tegan Maharaj, János Kramár, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary Ke, Anirudh Goyal, Yoshua Bengio, Aaron Courville, and Chris Pal. Zoneout: Regularizing rnns by randomly preserving hidden activations. arXiv preprint arXiv:1606.01305, 2016.
|
| 269 |
+
|
| 270 |
+
Shuai Li, Wanqing Li, Chris Cook, Ce Zhu, and Yanbo Gao. Independently recurrent neural network (indrnn): Building a longer and deeper rnn. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5457–5466, 2018.
|
| 271 |
+
|
| 272 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
|
| 273 |
+
|
| 274 |
+
Daniel Neil, Michael Pfeiffer, and Shih-Chii Liu. Phased lstm: Accelerating recurrent network training for long or event-based sequences. In Advances in neural information processing systems, pp. 3882–3890, 2016.
|
| 275 |
+
|
| 276 |
+
Giambattista Parascandolo, Niki Kilbertus, Mateo Rojas-Carulla, and Bernhard Schölkopf. Learning independent causal mechanisms. In Proceedings of the 35th International Conference on Machine Learning (ICML), pp. 4033–4041, 2018. URL http://proceedings.mlr.press/v80/ parascandolo18a.html.
|
| 277 |
+
|
| 278 |
+
Judea Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, New York, NY, 2nd edition, 2009.
|
| 279 |
+
|
| 280 |
+
Jonas Peters, Dominik Janzing, and Bernhard Schölkopf. Elements of Causal Inference - Foundations and Learning Algorithms. MIT Press, Cambridge, MA, USA, 2017. ISBN 978-0-262-03731-0.
|
| 281 |
+
|
| 282 |
+
David Raposo, Adam Santoro, David Barrett, Razvan Pascanu, Timothy Lillicrap, and Peter Battaglia. Discovering objects and their relations from entangled scene representations. arXiv preprint arXiv:1702.05068, 2017.
|
| 283 |
+
|
| 284 |
+
Scott Reed and Nando De Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015.
|
| 285 |
+
|
| 286 |
+
Eric Ronco, Henrik Gollee, and Peter J Gawthrop. Modular neural networks and self-decomposition. Technical Report CSC-96012, 1997.
|
| 287 |
+
|
| 288 |
+
Clemens Rosenbaum, Tim Klinger, and Matthew Riemer. Routing networks: Adaptive selection of non-linear functions for multi-task learning. arXiv preprint arXiv:1711.01239, 2017.
|
| 289 |
+
|
| 290 |
+
Clemens Rosenbaum, Ignacio Cases, Matthew Riemer, and Tim Klinger. Routing networks and the challenges of modular and compositional computation. arXiv preprint arXiv:1904.12774, 2019.
|
| 291 |
+
|
| 292 |
+
Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.
|
| 293 |
+
|
| 294 |
+
Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. Dynamic routing between capsules. In Advances in neural information processing systems, pp. 3856–3866, 2017.
|
| 295 |
+
|
| 296 |
+
Adam Santoro, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. In Advances in neural information processing systems, pp. 4967–4976, 2017.
|
| 297 |
+
|
| 298 |
+
Adam Santoro, Ryan Faulkner, David Raposo, Jack W. Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Timothy P. Lillicrap. Relational recurrent neural networks. CoRR, abs/1806.01822, 2018. URL http://arxiv.org/abs/1806.01822.
|
| 299 |
+
|
| 300 |
+
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008.
|
| 301 |
+
|
| 302 |
+
Jürgen Schmidhuber. One big net for everything. arXiv preprint arXiv:1802.08864, 2018.
|
| 303 |
+
|
| 304 |
+
Bernhard Schölkopf, Dominik Janzing, Jonas Peters, Eleni Sgouritsa, Kun Zhang, and Joris Mooij. On causal and anticausal learning. In J. Langford and J. Pineau (eds.), Proceedings of the 29th International Conference on Machine Learning (ICML), pp. 1255–1262, New York, NY, USA, 2012. Omnipress.
|
| 305 |
+
|
| 306 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 307 |
+
|
| 308 |
+
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
|
| 309 |
+
|
| 310 |
+
Herbert A Simon. The architecture of complexity. In Facets of systems science, pp. 457–476. Springer, 1991.
|
| 311 |
+
|
| 312 |
+
Shagun Sodhani, Anirudh Goyal, Tristan Deleu, Yoshua Bengio, Sergey Levine, and Jian Tang. Learning powerful policies by using consistent dynamics model. arXiv preprint arXiv:1906.04355, 2019.
|
| 313 |
+
|
| 314 |
+
Andrea Tacchetti, H Francis Song, Pedro AM Mediano, Vinicius Zambaldi, Neil C Rabinowitz, Thore Graepel, Matthew Botvinick, and Peter W Battaglia. Relational forward models for multi-agent learning. arXiv preprint arXiv:1809.11044, 2018.
|
| 315 |
+
|
| 316 |
+
Yee Teh, Victor Bapst, Wojciech M Czarnecki, John Quan, James Kirkpatrick, Raia Hadsell, Nicolas Heess, and Razvan Pascanu. Distral: Robust multitask reinforcement learning. In Advances in Neural Information Processing Systems, pp. 4496–4506, 2017.
|
| 317 |
+
|
| 318 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012.
|
| 319 |
+
|
| 320 |
+
Sjoerd Van Steenkiste, Michael Chang, Klaus Greff, and Jürgen Schmidhuber. Relational neural expectation maximization: Unsupervised discovery of objects and their interactions. arXiv preprint arXiv:1802.10353, 2018.
|
| 321 |
+
|
| 322 |
+
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.
|
| 323 |
+
|
| 324 |
+
H. L. F. von Helmholtz. Handbuch der physiologischen Optik, volume III. Voss, 1867.
|
| 325 |
+
|
| 326 |
+
Erich von Holst and Horst Mittelstaedt. Das reafferenzprinzip. Naturwissenschaften, 37(20):464–476, Jan 1950. doi: 10.1007/BF00622503.
|
| 327 |
+
|
| 328 |
+
Nicholas Watters, Daniel Zoran, Theophane Weber, Peter Battaglia, Razvan Pascanu, and Andrea Tacchetti. Visual interaction networks: Learning a physics simulator from video. In Advances in neural information processing systems, pp. 4539–4547, 2017.
|
| 329 |
+
|
| 330 |
+
Ronald J Williams and David Zipser. A learning algorithm for continually running fully recurrent neural networks. Neural computation, 1(2):270–280, 1989.
|
| 331 |
+
|
| 332 |
+
# A DESIDERATA FOR RECURRENT INDEPENDENT MECHANISMS
|
| 333 |
+
|
| 334 |
+
We have laid out a case for building models composed of modules which by default operate independently and can interact in a limited manner. Accordingly, our approach to modelling the dynamics of the world starts by dividing the overall model into small subsystems (or modules), referred to as Recurrent Independent Mechanisms (RIMs), with distinct functions learned automatically from data.Our model encourages sparse interaction, i.e., we want most RIMs to operate independently and follow their default dynamics most of the time, only rarely sharing information. Below, we lay out desiderata for modules to capture modular dynamics with sparse interactions.
|
| 335 |
+
|
| 336 |
+
Competitive Mechanisms: Inspired by the observations in the main paper, we propose that RIMs utilize competition to allocate representational and computational resources. As argued by (Parascandolo et al., 2018), this tends to produce independence among learned mechanisms if the training data has been generated by independent physical mechanisms.
|
| 337 |
+
|
| 338 |
+
Top Down Attention: The points mentioned in Section 2 in principle pertain to synthetic and natural intelligent systems alike. Hence, it is not surprising that they also appear in neuroscience. For instance, suppose we are looking for a particular object in a large scene, using limited processing capacity. The biased competition theory of selective attention conceptualizes basic findings of experimental psychology and neuroscience (Desimone & Duncan, 1995): our capacity of parallel processing of and reasoning with high-level concepts is limited, and many brain systems representing visual information use competition to allocate resources. Competitive interactions among multiple objects occur automatically and operate in parallel across the visual field. Second, the principle of selectivity amounts to the idea that a perceiver has the ability to filter out unwanted information and selectively process the rest of the information. Third, top-down bias originating from higher brain areas enables us to selectively devote resources to input information that may be of particular interest or relevance. This may be accomplished by units matching the internal model of an object or process of interest being pre-activated and thus gaining an advantage during the competition of brain mechanisms.
|
| 339 |
+
|
| 340 |
+
Sparse Information Flow: Each RIMs’ dynamics should only be affected by RIMs which are deemed relevant. The fundamental challenge is centered around establishing sensible communication between RIMs. In the presence of noisy or distracting information, a large subset of RIMs should stay dormant, and not be affected by the noise. This way, training an ensemble of these RIMs can be more robust to out-of-distribution or distractor observations than training one big homogeneous neural network (Schmidhuber, 2018).
|
| 341 |
+
|
| 342 |
+
Modular Computation Flow and Modular Parameterization: Each RIM should have its own dynamics operating by default, in the absence of interaction with other RIMs. The total number of parameters (i.e. weights) can be reduced since the RIMs can specialize on simple sub-problems, similar to (Parascandolo et al., 2018). This can speed up computation and improve the generalisation ability of the system (Baum & Haussler, 1989). The individuals RIMs in the ensemble should be simple also to prevent individual RIMs from dominating and modelling complex, composite mechanisms. We refer to a parameterization as modular if most parameters are associated to individuals RIMs only. This has the desirable property that a RIM should maintain its own independent functionality even as other RIMs are changed (due to its behavior being determined by its own self-contained parameters).
|
| 343 |
+
|
| 344 |
+
# B EXTENDED RELATED WORK
|
| 345 |
+
|
| 346 |
+
Table 2: A concise comparison of recurrent models with modular memory.
|
| 347 |
+
|
| 348 |
+
<table><tr><td rowspan=1 colspan=1>Method /Property</td><td rowspan=1 colspan=1>ModularMemory</td><td rowspan=1 colspan=1>SparseInformation Flow</td><td rowspan=1 colspan=1>ModularComputation Flow</td><td rowspan=1 colspan=1>ModularParameterization</td></tr><tr><td rowspan=1 colspan=1>LSTM/RNN</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>X</td></tr><tr><td rowspan=1 colspan=1>Relational RNN (Santoro et al., 2018)</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>NTM (Graves et al.,2014b)</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>X</td></tr><tr><td rowspan=1 colspan=1>SAB(Ke et al., 2018)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>IndRNN(Li et al.,2018)</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>X</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>RIMs</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr></table>
|
| 349 |
+
|
| 350 |
+
The present section provides further details on related work, thus extending Section 3.
|
| 351 |
+
|
| 352 |
+
Neural Turing Machine (NTM). The NTM (Graves et al., 2014a) has a Turing machine inspired memory with a sequence of independent memory cells, and uses an attention mechanism to move heads over the cells while performing targeted read and write operations. This shares a key idea with RIMs: that input information should only impact a sparse subset of the memory by default, while keeping most of the memory unaltered. The RIM model introduces the idea that each RIM has its own independent dynamics, whereas the mechanism for updating memory cells update is shared.
|
| 353 |
+
|
| 354 |
+
Relational RNN. The Relational Models paper (Santoro et al., 2018) is based on the idea of using a multi-head attention mechanism to share information between multiple parts of memory. It is related to our idea but a key difference is that we encourage the RIMs to remain separate as much as possible, whereas (Santoro et al., 2018) allows information between the parts to flow on each step (in effect making the part distribution only relevant to a particular step). Additionally, RIMs has the notion of each RIM having its own independent transition dynamics which operate by default, whereas the Relational RNN only does computation and updating of the memory using attention.
|
| 355 |
+
|
| 356 |
+
Sparse Attentive Backtracking (SAB). The SAB architecture (Ke et al., 2018) explores RNNs with selfattention across time steps as well as variants where the attention is sparse in the forward pass and where the gradient is sparse in the backward pass. It shares the motivation of using sparse attention to keep different pieces of information separated, but differs from the RIMs model in that it considers separation between time steps rather than separation between RIMs.
|
| 357 |
+
|
| 358 |
+
Independently Recurrent Neural Network (IndRNN). The IndRNN (Li et al., 2018) replaces the full transition matrix in a vanilla RNN (between time steps) to a diagonal transition weight matrix. In other words, each recurrent unit has completely independent dynamics. Intriguingly they show that this gives much finer control over the gating of information, and allows for such an RNN to learn long-term dependencies without vanishing or exploding gradients. Analysis of the gradients shows that having smaller recurrent transition matrices mitigates the vanishing and exploding gradient issue. This may provide further explanation for why RIMs perform well on long sequences.
|
| 359 |
+
|
| 360 |
+
Consciousness Prior (Bengio, 2017): This is based on the assumption of a sparse graphical model describing the interactions between high-level variables, using gating mechanisms to select only a subset of high-level variables to interact at any particular time. This is closely related to our work in the sense high level abstract representation is based on the representations of the RIMs, which are activated sparsely and interact sparsely. Our paper thus helps to validate the consciousness prior idea.
|
| 361 |
+
|
| 362 |
+
Recurrent Entity Networks: EnTNet (Henaff et al., 2016) can be viewed as a set of separate recurrent models whose hidden states store the memory slots. These hidden states are either fixed by the gates, or modified through a simple RNN-style update. Moreover, EntNet uses an independent gate for writing to each memory slot. Our work is related in the sense that we also have different recurrent models (i.e.,RIMs, though each RIM has different parameters), but we allow the RIMs to communicate with each other sparingly using an attention mechanism.
|
| 363 |
+
|
| 364 |
+
Capsules and Dynamic Routing: EM Capsules (Hinton et al., 2018) and the preceding Dynamic Capsules (Sabour et al., 2017) use the poses of parts and learned part object relationships to vote for the poses of objects. When multiple parts cast very similar votes, the object is assumed to be present, which is facilitated by an interactive inference (routing) algorithm.
|
| 365 |
+
|
| 366 |
+
Relational Graph Based Methods: Recent graph-based architectures have studied combinatorial generalization in the context of modeling dynamical systems like physics simulation, multi-object scenes, and motion-capture data, and multiagent systems (Scarselli et al., 2008; Bronstein et al., 2017; Watters et al., 2017; Raposo et al., 2017; Santoro et al., 2017; Gilmer et al., 2017; Van Steenkiste et al., 2018; Kipf et al., 2018; Battaglia et al., 2018; Tacchetti et al., 2018). One can also view our proposed model as a relational graph neural network, where nodes are parameterized as individual RIMs and edges are parameterized by the attention mechanism. Though, its important to emphasize that the topology of the graph induced in the proposed model is dynamic, while in most graph neural networks the topology is fixed.
|
| 367 |
+
|
| 368 |
+
Default Behaviour: Our work is also related to work in behavioural research that deals with two modes of decision making (Dickinson, 1985; Botvinick & Braver, 2015; Kool & Botvinick, 2018): an automatic systems that relies on habits and a controlled system that uses some privileged information for making decision making. The proposed model also has two modes of input processing, RIMs which activate uses some external sensory information, and hence analogous to controlled system. RIMs which don’t activate, they are synonymous to habit based system. There is some work done trying in Reinforcement learning, trying to learn default policies, which have shown to improve transfer and generalization in multi-task RL (Teh et al., 2017; Goyal et al., 2019a). The proposed method is different in the sense, we are not trying to learn default policies which effect the environment, instead we want to learn mechanisms, which try to understand the environment. State dependent activation of different primitive policies was also studied in (Goyal et al., 2019b), and the authors showed that they can learn different primitives, but they also consider that only a single primitive can be active at a particular time step. Also, note that primitive policies try to effect the environment, whereas mechanism try to understand the enviornment.
|
| 369 |
+
|
| 370 |
+
# C EXPERIMENTAL DETAILS AND HYPERPARAMETERS
|
| 371 |
+
|
| 372 |
+
# C.1 RIMS IMPLEMENTATION
|
| 373 |
+
|
| 374 |
+
The RIMs model consists of three main components: the input attention, the process for selecting activated RIMs, and the communication between RIMs. The input attention closely follows the attention mechanism of (Santoro et al., 2018) but with a significant modification: that all of the weights within the attention mechanism are separate per-block. Thus we remove the normal linear layers and replace them with a batch matrix multiplication over the RIMs (as each block has its own weight matrix). Note that the read-key (or query) is a function of the hidden state of each RIM.
|
| 375 |
+
|
| 376 |
+
For selecting activated RIMs, we compute the top- $\mathbf { \nabla } \cdot \mathbf { k }$ attention weight on the null input over the RIMs. We then select the activated RIMs by using a mask.
|
| 377 |
+
|
| 378 |
+
We compute the independent dynamics over all RIMs by using a separate LSTM for each RIM. Following this, we compute the communication between RIMs as a multihead attention (Santoro et al., 2018), with the earlier-discussed modification of having separate weight parameters for each block, and also that we added a skip-connection around the attention mechanism. This attention mechanism used 4 heads and in general used a key size and value size of 32. We computed the updates for all RIMs but used the activated-block mask to selectively update only the activated subset of the RIMs.
|
| 379 |
+
|
| 380 |
+
The use of RIMs introduces two additional hyperparameters over an LSTM/GRU: the number of RIMs and the number of activated RIMs per step. We also observed that having too few activated RIMs tends to hurt optimization and having too many activated RIMs attenuates the improvements to generalization. For the future it would be interesting to explore dynamic ways of controlling how many RIMs to activate.
|
| 381 |
+
|
| 382 |
+
# C.2 DETAILED MODEL HYPERPARAMETERS
|
| 383 |
+
|
| 384 |
+
Table 3 lists the different hyperparameters.
|
| 385 |
+
|
| 386 |
+
Table 3: Hyperparameters
|
| 387 |
+
|
| 388 |
+
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Optimizer learning rate batch size</td><td>Adam(Kingma & Ba, 2014) 7·10-4 64</td></tr><tr><td>Inp keys Inp Values Inp Heads</td><td>64 Size of individual RIM * 4</td></tr><tr><td>Inp Dropout</td><td>4 0.1</td></tr><tr><td>Comm keys Comm Values</td><td>32 32</td></tr><tr><td>Comm heads Comm Dropout</td><td>4</td></tr></table>
|
| 389 |
+
|
| 390 |
+
# C.3 FUTURE ARCHITECTURAL CHANGES
|
| 391 |
+
|
| 392 |
+
We have not conducted systematic optimizations of the proposed architecture. We believe that even principled hyperparameter tuning may significantly improve performance for many of the tasks we have considered in the paper. We briefly mention a few architectural changes which we have studied:
|
| 393 |
+
|
| 394 |
+
• On the output side, we concatenate the representations of the different RIMs, and use the concatenated representation for learning a policy (in RL experiments) or for predicting the input at the next time step (for bouncing balls as well as all other experiments). We empirically found that adding another layer of (multi-headed) key value attention on the output seems to improve the results. We have not included this change In our experiments, we shared the same decoder for all the RIMs, i.e., we concatenate the representations of different RIMS, and feed the concatenated representations to the decoder. In the future it would be interesting to think of ways to allow a more “structured” decoder. The reason for this is that even if the RIMs generalize to new environments, the shared decoder can fail to do so. So changing the structure of decoder could be helpful.
|
| 395 |
+
|
| 396 |
+
• For the RL experiments, we also tried providing the previous actions, rewards, language instruction as input to decide the activation of RIMs. This is consistent with the idea of efference copies as proposed by von Helmholtz (1867); von Holst & Mittelstaedt (1950), i.e., using copies of motor signals as inputs. Preliminary experiments shows that this improves the performance in Atari games.
|
| 397 |
+
|
| 398 |
+
# C.4 LANGUAGE MODELING
|
| 399 |
+
|
| 400 |
+
Table 4: Wikitext-2 results
|
| 401 |
+
|
| 402 |
+
<table><tr><td>Approach</td><td>Num.Parameters</td><td>Train PPL</td><td>Valid PPL</td><td>Test PPL</td></tr><tr><td>LSTM (2-layer)</td><td>21.2M</td><td>39.78</td><td>109.25</td><td>102.53</td></tr><tr><td>Relational Memory (Santoro et al., 2018)</td><td>11M</td><td>n/a</td><td>112.77</td><td>107.21</td></tr><tr><td>RIMs (2-layer, kT = 6,k A = 6)</td><td>23.7M</td><td>41.27</td><td>103.60</td><td>98.66</td></tr></table>
|
| 403 |
+
|
| 404 |
+
We investigate the task of word-based language modeling. We ran experiments on the wikitext-2 dataset (Merity et al., 2016). We ran each experiment for a fixed 100 epochs. These results are in Table 4. Our goal in this experiment is to demonstrate the breadth of the approach by showing that RIMs performs well even on datasets which are noisy and drawn from the real-world.
|
| 405 |
+
|
| 406 |
+
# C.5 COPYING TASK
|
| 407 |
+
|
| 408 |
+
We used a learning rate of 0.001 with the Adam Optimizer and trained each model for 150 epochs (unless the model was stuck, we found that this was enough to bring the training error close to zero). For the RIMs model we used 600 units split across 6 RIMs (100 units per block). For the LSTM we used a total of 600 units. We did not explore this extensively but we qualitatively found that the results on copying were not very sensitive to the exact number of units.
|
| 409 |
+
|
| 410 |
+
The sequences to be copied first have 10 random digits (from 0-8), then a span of zeros of some length, followed by a special indicator “9” in the input which instructs the model to begin outputting the copied sequence.
|
| 411 |
+
|
| 412 |
+
In our experiments, we trained the models with “zero spans” of length 50 and evaluated on the model with “zero spans” of length 200. We note that all the ablations were run with the default parameters (i.e number of keys, values as for RIMs model) for 100 epochs. Tab. 5 shows the effect of two baselines as compared to the RIMs model (a) When we allow the input attention for activation of different RIMs but we dont allow different RIMs to communicate. (b) No Input attention, but we allow different RIMs to communicate with each other. Tab. 5 shows that the proposed method is better than both of these baselines. For copy task, we used 1 head in input attention, and 4 heads for RIMs communication. We note that even with 1 RIM, its not exactly same as a LSTM, because each RIM can still reference itself.
|
| 413 |
+
|
| 414 |
+
# C.6 SEQUENTIAL MNIST TASK
|
| 415 |
+
|
| 416 |
+
In this task we considered classifying binary MNIST digits by feeding the pixels to an RNN (in a fixed order scanning over the image). As the focus of this work is on generalization, we introduced a variant on this task where the training digits are at a resolution of $1 4 \times 1 4$ (sequence length of 196). We then evaluated on MNIST digits of different higher resolutions ( $1 6 \times 1 6$ , $1 9 \times 1 9$ , and $2 4 \times 2 4$ ). When re-scaling the images, we used the nearest-neighbor based down-scaling and performed binarization after re-scaling. We trained with a learning rate of 0.0001 and the Adam optimizer. For RIMs we used a total of 600 hidden units split across 6 RIMs (100 units per block). For the LSTM we used a total of 600 units. We ran proposed model as well as baselines for 100 epochs. For sequential MNIST task, we used 1 head in input attention, and 4 heads for RIMs communication.
|
| 417 |
+
|
| 418 |
+
C.7 IMITATION LEARNING: ROBUSTNESS TO NOISE IN STATE DISTRIBUTION
|
| 419 |
+
|
| 420 |
+
Here, we consider imitation learning where we have training trajectories generated from an expert (Table 6). We evaluate our model on continuous control tasks in Mujoco (in our case, Half-Cheetah) (Todorov et al., 2012). We take the rendered images as input and compared the proposed model with recurrent policy (i.e., LSTM). Since, using rendered image of the input does not tell anything about the velocity of the Half-Cheetah, it makes the task partially observable. In order to test how well the proposed model generalizes during test, we add some noise (in the joints of the half-cheetah body). As one can see, after adding noise LSTM baselines performs poorly. On the other hand, for the proposed model, there’s also a drop in performance but not as bad as for the LSTM baseline.
|
| 421 |
+
|
| 422 |
+
Table 5: Error (CE for last 10 time steps) on the copying task. Note that while all of the methods are able to learn to copy on the length seen during training, the RIMs model generalizes to sequences longer than those seen during training whereas the LSTM fails catastrophically.
|
| 423 |
+
|
| 424 |
+
<table><tr><td>Approach Train Length 50 Test Length 200</td></tr><tr><td>RIMs 0.00</td></tr><tr><td>0.00</td></tr><tr><td>With input Attention and No Communication</td></tr><tr><td>RIMs (kt=4,kA=2) 2.3 1.6</td></tr><tr><td>RIMs (kt=4,kA= 3) 1.7 4.3</td></tr><tr><td>RIMs (kT=5,kA=2) 2.5 4,7</td></tr><tr><td>RIMs (kT=5,kA=3) 0.4 4.0</td></tr><tr><td>RIMs (kT=5,kA=4) 0.2 0.7 3.3 2.4</td></tr><tr><td>RIMs(kT=6,kA=2) RIMs (kT=6,kA=3) 1.2 1.0</td></tr><tr><td>RIMs (kT=6,kA=4) 0.7 5.0</td></tr><tr><td>RIMs (kT=6,kA= 5) 0.22 0.56</td></tr><tr><td></td></tr><tr><td>With No input Attention and Full Communication</td></tr><tr><td>RIMs (kT =6,kA = 6, hdim =600) 0.0 0.7</td></tr><tr><td>RIMs (kT =5,kA=5,hdim =500) 0.0 1.7</td></tr><tr><td>RIMs(kT=2,kA=2,hdim= 256) 0.0 2.9</td></tr><tr><td>RIMs (kT =2,kA =2,hdim=512) 0.0 1.8 0.2</td></tr><tr><td>RIMs (kT =1,kA=1, hdim =512) 0.0</td></tr></table>
|
| 425 |
+
|
| 426 |
+
Table 6: Imitation Learning: Results on the half-cheetah imitation learning task. RIMs outperforms a baseline LSTM when we evaluate with perturbations not observed during training (left). An example of an input image fed to the model (right).
|
| 427 |
+
|
| 428 |
+
<table><tr><td>Method / Setting</td><td>Training Observed Reward</td><td>Perturbed States Observed Reward</td></tr><tr><td>LSTM (Recurrent Policy)</td><td>5400 ±100</td><td>2500 ± 300</td></tr><tr><td>RIMs (kT = 6, kA = 3)</td><td>5300 ± 200</td><td>3800± 200</td></tr><tr><td>RIMs (kt = 6, kA = 6)</td><td>5500 ±100</td><td>2700 ± 400</td></tr><tr><td>RIMs (without Input attention)</td><td>5400 ±100</td><td>3200 ± 50</td></tr></table>
|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
|
| 432 |
+
We use the convolutional network from (Ha & Schmidhuber, 2018) as our encoder, a GRU (Chung et al., 2015) with 600 units as deterministic path in the dynamics model, and implement all other functions as two fully connected layers of size 256 with ReLU activations. Since, here we are using images as input, which makes the task, partially observable. Hence, we concatenate the past 4 observations, and then feed the concatenated observations input to GRU (or our model). For our model, we use 6 RIMs, each of size 100, and we set $k _ { a } = 3$ . We follow the same setting as in (Hafner et al., 2018; Sodhani et al., 2019). We also compare the proposed method to the baseline where we dont include input attention (or top-down attention). AS 6 shows, there’s a decline in performance if we dont use input attention, hence justifying the importance
|
| 433 |
+
|
| 434 |
+
# C.8 GENERALIZATION TO DISTRACTORS: ALGORITHM IMPLEMENTATION DETAILS
|
| 435 |
+
|
| 436 |
+
We evaluate the proposed framework using Adavantage Actor-Critic (A2C) to learn a policy $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } , \boldsymbol { g } )$ conditioned on the goal. To evaluate the performance of proposed method, we use a range of maze multi-room tasks from the gym-minigrid framework (Chevalier-Boisvert & Willems, 2018) and the A2C implementation from (Chevalier-Boisvert & Willems, 2018). For the maze tasks, we used agent’s relative distance to the absolute goal position as "goal".
|
| 437 |
+
|
| 438 |
+
For the maze environments, we use A2C with 48 parallel workers. Our actor network and critic networks consist of two and three fully connected layers respectively, each of which have 128 hidden units. The encoder network is also parameterized as a neural network, which consists of 1 fully connected layer. We use RMSProp with an initial learning rate of 0.0007 to train the models. Due to the partially observable nature of the environment, we further use a LSTM to encode the state and summarize the past observations.
|
| 439 |
+
|
| 440 |
+

|
| 441 |
+
Figure 7: An example of the minigrid task.
|
| 442 |
+
|
| 443 |
+
# C.9 MINIGRID ENVIRONMENTS FOR OPENAI GYM
|
| 444 |
+
|
| 445 |
+
The MultiRoom environments used for this research are part of MiniGrid, which is an open source gridworld package2. This package includes a family of reinforcement learning environments compatible with the OpenAI Gym framework. Many of these environments are parameterizable so that the difficulty of tasks can be adjusted (e.g., the size of rooms is often adjustable).
|
| 446 |
+
|
| 447 |
+
# C.9.1 THE WORLD
|
| 448 |
+
|
| 449 |
+
In MiniGrid, the world is a grid of size NxN. Each tile in the grid contains exactly zero or one object. The possible object types are wall, door, key, ball, box and goal. Each object has an associated discrete color, which can be one of red, green, blue, purple, yellow and grey. By default, walls are always grey and goal squares are always green.
|
| 450 |
+
|
| 451 |
+
# C.9.2 REWARD FUNCTION
|
| 452 |
+
|
| 453 |
+
Rewards are sparse for all MiniGrid environments. In the MultiRoom environment, episodes are terminated with a positive reward when the agent reaches the green goal square. Otherwise, episodes are terminated with zero reward when a time step limit is reached. In the FindObj environment, the agent receives a positive reward if it reaches the object to be found, otherwise zero reward if the time step limit is reached.
|
| 454 |
+
|
| 455 |
+
The formula for calculating positive sparse rewards is $1 - 0 . 9 * ( s t e p \_ c o u n t / m a x \_ s t e p s )$ . That is, rewards are always between zero and one, and the quicker the agent can successfully complete an episode, the closer to 1 the reward will be. The max_steps parameter is different for each environment, and varies depending on the size of each environment, with larger environments having a higher time step limit.
|
| 456 |
+
|
| 457 |
+
# C.9.3 ACTION SPACE
|
| 458 |
+
|
| 459 |
+
There are seven actions in MiniGrid: turn left, turn right, move forward, pick up an object, drop an object, toggle and done. For the purpose of this paper, the pick up, drop and done actions are irrelevant. The agent can use the turn left and turn right action to rotate and face one of 4 possible directions (north, south, east, west). The move forward action makes the agent move from its current tile onto the tile in the direction it is currently facing, provided there is nothing on that tile, or that the tile contains an open door. The agent can open doors if they are right in front of it by using the toggle action.
|
| 460 |
+
|
| 461 |
+
# C.9.4 OBSERVATION SPACE
|
| 462 |
+
|
| 463 |
+
Observations in MiniGrid are partial and egocentric. By default, the agent sees a square of $7 { \bf x } 7$ tiles in the direction it is facing. These include the tile the agent is standing on. The agent cannot see through walls or closed doors. The observations are provided as a tensor of shape $7 \mathrm { x } 7 \mathrm { x } 3$ . However, note that these are not RGB images. Each tile is encoded using 3 integer values: one describing the type of object contained in the cell, one describing its color, and a flag indicating whether doors are open or closed. This compact encoding was chosen for space efficiency and to enable faster training. The fully observable RGB image view of the environments shown in this paper is provided for human viewing.
|
| 464 |
+
|
| 465 |
+
# C.9.5 LEVEL GENERATION
|
| 466 |
+
|
| 467 |
+
The level generation in this task works as follows: (1) Generate the layout of the map (X number of rooms with different sizes (at most size Y) and green goal) (2) Add the agent to the map at a random location in the first room. (3) Add the goal at a random location in the last room. A neural network parameterized as CNN is used to process the visual observation.
|
| 468 |
+
|
| 469 |
+
We follow the same architecture as (Chevalier-Boisvert & Willems, 2018) but we replace the LSTM layer with BlockLSTM.
|
| 470 |
+
|
| 471 |
+
# C.10 BOUNCING BALLS
|
| 472 |
+
|
| 473 |
+
We use the bouncing-ball dataset from (Van Steenkiste et al., 2018). The dataset consists of 50,000 training examples and 10,000 test examples showing ${ \sim } 5 0$ frames of either 4 solid balls bouncing in a confined square geometry, 6-8 balls bouncing in a confined geometry, or 3 balls bouncing in a confined geometry with a random occluded region. In all cases, the balls bounce off the wall as well as off one another. We train baselines as well as proposed model for about 100 epochs using 0.0007 as learning rate and using Adam as optimizer (Kingma & Ba, 2014). We use the same architecture for encoder as well as decoder as in (Van Steenkiste et al., 2018). We train the proposed model as well as the baselines for 100 epochs. Our goal in this section is to give more thorough experimental results omitted from the main paper for the sake of brevity. Below, we highlight a few different results.
|
| 474 |
+
|
| 475 |
+

|
| 476 |
+
C.10.1 DIFFERENT RIMS ATTEND TO DIFFERENT BALLS
|
| 477 |
+
Figure 8: Different RIMs attending to Different Balls. For understanding what each RIM is actually doing, we associate each with a separate encoder, which are spatially masked. Only 4 encoders can be active at any particular instant and there are four different balls. We did this to check if there would be the expected geometric activation of RIMs. 1.) Early in training, RIM activations correlated more strongly with the locations of the four different balls. Later in training, this correlation decreased and the active strips did not correlate as strongly with the location of balls. As the model got better at predicting the location, it needed to attend less to the actual objects. The top row shows every 5th frame when the truth is fed in and the bottom shows the results during rollout. The gray region shows the active block. In the top row, the orange corresponds to the prediction and in the bottom, green corresponds to the prediction.
|
| 478 |
+
|
| 479 |
+
In order to visualize what each RIM is doing, we associate each RIM with a different encoder. By performing spatial masking on the input, we can control the possible spatial input to each RIM. We use six non-overlapping horizontal strips and allow only 4 RIMs to be active at a time (shown in Fig. 8). The mask is fixed mask of zeros with a band of ones that is multiplied by the input to each encoder. Therefore, each of the 6 encoders gets 1/6th of the input. The goal was to see how the RIM activation patterns changed/correlated with the locations of the balls. We find that early in training, the RIMs’ activations are strongly correlated with the location of the 4 balls. However, after training has proceeded for some time this correlation deteriorates. This is likely because the predictable dynamics of the system do not necessitate constant attention.
|
| 480 |
+
|
| 481 |
+
# C.10.2 COMPARISON WITH LSTM BASELINES
|
| 482 |
+
|
| 483 |
+
In Figures 9, 10, 11, and 12 we highlight different baselines and how these compare to the proposed RIMs model.
|
| 484 |
+
|
| 485 |
+

|
| 486 |
+
Figure 9: Example of the other LSTM baselines. For the 2 other experiments that we consider, here we show example outputs of our LSTM baselines. In each row, the top panel represents the ground truth and the bottom represents the prediction. All shown examples use an LSTM with 250 hidden units, as shown in Fig. 4. Frames are plotted every 3rd time step. The red line marks 10 rollout frames. This is marked because after this we do not find BCE to be a reliable measure of dissimilarity.
|
| 487 |
+
|
| 488 |
+

|
| 489 |
+
Figure 10: Comparison of RIMs to LSTM baseline. For 4 different experiments in the text, we compare RIMs to two different LSTM baselines. In all cases we find that during rollout, RIMs perform better than the LSTMs at accurately capturing the trajectories of the balls through time. Due to the number of hard collisions, accurate modeling is very difficult. In all cases, the first 15 frames of ground truth are fed in (last 6 shown) and then the system is rolled out for the next 15 time steps, computing the binary cross entropy between the prediction and the true balls at each instant, as in Van Steenkiste et al. (2018). See the Appendix for losses over the entire 35 frame rollout trajectory. In the predictions, the transparent blue shows the ground truth, overlaid to help guide the eye.
|
| 490 |
+
|
| 491 |
+
# C.10.3 OCCLUSION
|
| 492 |
+
|
| 493 |
+
In Fig. 13, we show the performance of RIMs on the curtain dataset. We find RIMs are able to track balls through the occlusion without difficulty. Note that the LSTM baseline, is also able to track the ball through the “invisible” curtain.
|
| 494 |
+
|
| 495 |
+
# C.10.4 STUDY OF TRANSFER
|
| 496 |
+
|
| 497 |
+
It is interesting to ask how models trained on a dataset with 6-8 balls perform on a dataset with 4 balls. In Fig. 14 we show predictions during feed-in and rollout phases.
|
| 498 |
+
|
| 499 |
+

|
| 500 |
+
Figure 11: Comparison between RIMs and LSTM baseline. For the 4 ball task and the 6-8 ball extrapolation task, here we show an example output of from our LSTM baseline and from RIMs. All shown examples use an LSTM with 250 hidden units, as shown in Fig. 4. Frames are plotted every 3rd time step. The red line marks 10 rollout frames. This is marked because after this we do not find BCE to be a reliable measure of dissimilarity.
|
| 501 |
+
|
| 502 |
+

|
| 503 |
+
Figure 12: Comparison of RIMs to LSTM baseline. For 4 different experiments in the text, we compare RIMs to two different LSTM baselines. In all cases we find that during rollout, RIMs perform better than the LSTMs at accurately capturing the trajectories of the balls through time. Due to the number of hard collisions, accurate modeling is very difficult.
|
| 504 |
+
|
| 505 |
+

|
| 506 |
+
Figure 13: RIMs on dataset with an occlusion. We show two trajectories (top and bottom) of three balls. For the left frames, at each step the true frame is used as input. On the right, outlined in black, the previous output is used as input.
|
| 507 |
+
|
| 508 |
+
# C.11 ABLATIONS
|
| 509 |
+
|
| 510 |
+
We present one ablation in addition to the ones in Section 4.4. In this experiment, we study the effect on input attention (i.e top down attention) as well as the use of multi-headed head key-value attention. We compare the proposed model (with input attention as well as multi-headed key value attention) with 2 baselines: (a) In which we remove the input attention (and force all the RIMs to communicate with each other (b) We use 1 head for key value attention as compared to multi-headed key-value attention. Results comparing the proposed model, with these two baselines is shown in Fig. 15.
|
| 511 |
+
|
| 512 |
+

|
| 513 |
+
Figure 14: RIMs transferred on new data. We train the RIMs model on the 6-8 ball dataset (as shown in the top row). Then, we apply the model to the 4 ball dataset, as shown in the bottom.
|
| 514 |
+
|
| 515 |
+

|
| 516 |
+
Figure 15: Ablation loss For the normal, a one-head model, and without input attention, we show the loss during training and the loss for the 4th and 5th frame of rollout. We find that the one-head and without input attention models perform worse than the normal RIMs model during the rollout phase.
|
| 517 |
+
|
| 518 |
+
In Fig. 16, we show the predictions that result from the model with only one active head.
|
| 519 |
+
|
| 520 |
+

|
| 521 |
+
Figure 16: One head and no attention Using one head and no attention models, we show the rollout predictions in blue. On top we show results on the 4 ball dataset and on the bottom we show results on the curtains dataset.
|
| 522 |
+
|
| 523 |
+
<table><tr><td>Environment</td><td>LSTM-PPO</td><td>RIMs-PPO</td></tr><tr><td>Alien</td><td>1612 ± 44</td><td>2152 ±81</td></tr><tr><td>Amidar</td><td>1000 ±58</td><td>1800 ± 43</td></tr><tr><td>Assault</td><td>4000 ± 213</td><td>5400 ± 312</td></tr><tr><td>Asterix</td><td>3090 ±420</td><td>21040 ± 548</td></tr><tr><td>Asteroids</td><td>1611.0 ± 200</td><td>3801 ±89</td></tr><tr><td>Atlantis</td><td>3280000 ± 200000</td><td>3500000 ± 120000</td></tr><tr><td>BankHeist</td><td>1153 ± 23</td><td>1195 ±4</td></tr><tr><td>BattleZone</td><td>21000 ± 232.0</td><td>22000 ±324</td></tr><tr><td>BeamRider</td><td>698 ±100</td><td>5320±300</td></tr><tr><td>Bowling</td><td>30±5</td><td>42 ±13</td></tr><tr><td>Boxing</td><td>80±3</td><td>95±10</td></tr><tr><td>Breakout</td><td>593 ± 90</td><td>590 ±10</td></tr><tr><td>Centipede</td><td>4600 ±312</td><td>5534±283</td></tr><tr><td>ChopperCommand</td><td>11000 ± 790</td><td>12303 ± 412</td></tr><tr><td>CrazyClimber</td><td>138000 ± 2412</td><td>132039±1221</td></tr><tr><td>DemonAttack</td><td>26320 ± 3234</td><td>230324±4032</td></tr><tr><td>DoubleDunk</td><td>-3.0 ± 0.5</td><td>-3.8 ± 0.3</td></tr><tr><td>Enduro</td><td>1600 ± 200</td><td>2800 ± 232</td></tr><tr><td>FishingDerby</td><td>20±4</td><td>38±8</td></tr><tr><td>Freeway</td><td>29±2</td><td>33±2</td></tr><tr><td>Gopher</td><td>7000.0 ± 402</td><td>33000 ± 2210</td></tr><tr><td>Gravitar</td><td>500 ±100</td><td>1090 ± 80</td></tr><tr><td>IceHockey</td><td>-5±0.3</td><td>-4±1</td></tr><tr><td>Jamesbond</td><td>425±25</td><td>800 ±100</td></tr><tr><td>Kangaroo</td><td>13000 ± 500</td><td>1800 ±400</td></tr><tr><td>Krull</td><td>10000 ±500</td><td>7900 ± 200</td></tr><tr><td>KungFuMaster</td><td>28000 ± 2000</td><td>51000 ± 800</td></tr><tr><td>NameThisGame</td><td>4200± 400</td><td>6800 ±300</td></tr><tr><td>Pong</td><td>20±1</td><td>20±1</td></tr><tr><td>PrivateEye</td><td>90±3</td><td>100±0</td></tr><tr><td>Qbert</td><td>22000 ± 300</td><td>22500 ± 400</td></tr><tr><td>Riverraid</td><td>7500 ± 300</td><td>12000 ± 100</td></tr><tr><td>RoadRunner</td><td>53000 ±120</td><td>53430 ±300</td></tr><tr><td>Robotank</td><td>3±1</td><td>11±2</td></tr><tr><td>SpaceInvaders</td><td>1600 ± 40</td><td>2800 ± 80</td></tr><tr><td>StarGunner</td><td>35000 ± 800</td><td>70000 ±1200</td></tr><tr><td>TimePilot</td><td>4000 ±100</td><td>10000 ± 689</td></tr><tr><td>UpNDown</td><td>70000 ± 6000</td><td>390000 ± 20000</td></tr><tr><td>VideoPinball</td><td>90000 ± 5000</td><td>220000 ±9000</td></tr><tr><td>WizardOfWor</td><td>3833 ±400</td><td>10800 ± 700</td></tr><tr><td>Zaxxon</td><td>200 ±100</td><td>15000 ± 600</td></tr></table>
|
| 524 |
+
|
| 525 |
+
Table 7: Scores obtained using PPO with the LSTM architecture and PPO with the RIMs architecture with $k _ { A } = 5$ .
|
| 526 |
+
|
| 527 |
+
We used open-source implementation of PPO from (Kostrikov, 2018) with default parameters. We ran the proposed algorihtm with 6 RIMs, and kept the number of activated RIMs to 4/5. We have not done any hyper-parameter search for Atari experiments.
|
| 528 |
+
|
| 529 |
+

|
| 530 |
+
Figure 17: A comparison showing relative improvement of RIMs with $k _ { A } = 5$ over a $k _ { A } = 4$ baseline. Using $k _ { A } = 5$ performs slightly worse than $k _ { A } = 4$ but still outperforms PPO, and has similar results across the majority of games.
|
| 531 |
+
|
| 532 |
+

|
| 533 |
+
Figure 18: RIMs-PPO relative score improvement over LSTM-PPO baseline (Schulman et al., 2017) across all Atari games averaged over 3 trials per game. In both cases PPO was used with the exact same settings with the only change being the choice of the recurrent architecture (RIMs with $k _ { A } = 5$ ).
|
| 534 |
+
|
| 535 |
+
# C.12.1 TRANSFER ON ATARI
|
| 536 |
+
|
| 537 |
+
As a very preliminary result, we investigate feature transfer between randomly selected Atari games. In order to study this question, we follow the experimental protocol of Rusu et al. (2016).
|
| 538 |
+
|
| 539 |
+
We start by training RIMs on three source games (Pong, River Raid, and Seaquest) and test if the learned features transfer to a different subset of randomly selected target games (Alien, Asterix, Boxing, Centipede, Gopher, Hero, James Bond, Krull, Robotank, Road Runner, Star Gunner, and Wizard of Wor). We observe, that RIMs result in positive transfer in 9 out of 12 target games, with three cases of negative transfer. On the other hand progressive networks (Rusu et al., 2016) result in positive transfer in 8 out of 12 target games, and two cases of negative transfer. We also compare to LSTM baseline, which yields positive transfer in 3 of 12 games.
|
| 540 |
+
|
| 541 |
+
# C.13 BOUNCING MNIST: DROPPING OFF RIMS
|
| 542 |
+
|
| 543 |
+
We use the Stochastic Moving MNIST (SM-MNIST) (Denton & Fergus, 2018) dataset which consists of sequences of frames of size $6 4 \times 6 4$ , containing one or two MNIST digits moving and bouncing off the walls. Training sequences are generated on the fly by sampling two different MNIST digits from the training set (60k total digits) and two distinct trajectories.
|
| 544 |
+
|
| 545 |
+
Here, we show the effect of masking out a particular RIM and study the effect of the masking on the ensemble of RIMs. Ideally, we would want different RIMs not to co-adapt with each other. So, masking out a particular RIM should not really effect the dynamics of the entire model. We show qualitative comparisons in Fig. 19, 20, 21, 22, 23. In each of these figures, the model gets the ground truth image as input for first 5 time steps, and then asked to simulate the dynamics for next 25 time-steps. We find that sparsity is needed otherwise different RIMs co-adapt with each other (for ex. see Fig. 20, 22, 23). We tried similar masking experiments for different models like RMC, Transformers, EntNet (which learns a mixture of experts), LSTMs, but all of them failed to do anything meaningful (after masking). We suspect this is partly due to learning a homogeneous network.
|
| 546 |
+
|
| 547 |
+

|
| 548 |
+
|
| 549 |
+

|
| 550 |
+
|
| 551 |
+

|
| 552 |
+
|
| 553 |
+

|
| 554 |
+
Figure 19: 4 RIMs, (top ${ \mathrm { k } } = 2$ ). Each sub-figure shows the effect of masking a particular RIM and studying the effect of masking on the other RIMs. For example, the top figure shows the effect of masking the first RIM, the second figure shows the effect of masking the second RIM etc.
|
| 555 |
+
|
| 556 |
+

|
| 557 |
+
|
| 558 |
+

|
| 559 |
+
|
| 560 |
+

|
| 561 |
+
|
| 562 |
+

|
| 563 |
+
Figure 20: 4 RIMs, (top ${ \bf k } = 3$ ). Each sub-figure shows the effect of masking a particular RIM and studying the effect of masking on the other RIMs. For example, the top figure shows the effect of masking the first RIM, the second figure shows the effect of masking the second RIM etc.
|
| 564 |
+
|
| 565 |
+

|
| 566 |
+
Figure 21: 400dim, 5 RIMs, (top ${ \bf k } = 2$ ). Each sub-figure shows the effect of masking a particular RIM and studying the effect of masking on the other RIMs. For example, the top figure shows the effect of masking the first RIM, the second figure shows the effect of masking the second RIM etc.
|
| 567 |
+
|
| 568 |
+

|
| 569 |
+
Figure 22: 400dim, 5 blocks, (top ${ \bf k } = 3$ ). Each sub-figure shows the effect of masking a particular RIM and studying the effect of masking on the other RIMs. For examples, the top figure shows the effect of masking the first RIM, the second figure shows the effect of masking the second RIM etc.
|
| 570 |
+
|
| 571 |
+

|
| 572 |
+
Figure 23: 400dim, 5 blocks, (top $\mathrm { k } = 4$ ). Each sub-figure shows the effect of masking a particular RIM and studying the effect of masking on the other RIMs. For example, the top figure shows the effect of masking the first RIM, the second figure shows the effect of masking the second RIM etc.
|
| 573 |
+
|
| 574 |
+

|
| 575 |
+
Figure 24: Comparing RIMs-PPO with LSTM-PPO: Learning curves for $k _ { A } = 4$ , $k _ { A } = 5$ RIMs-PPO models and the LSTM-PPO baseline across all Atari games.
|
| 576 |
+
|
| 577 |
+
# C.13.2 ATARI RESULTS: NO INPUT ATTENTION
|
| 578 |
+
|
| 579 |
+
Here we compare the proposed method to the baseline, where we dont use input attention, and we force different RIMs to communicate with each at all the time steps.
|
| 580 |
+
|
| 581 |
+

|
| 582 |
+
Figure 25: Baseline agent with no input attention mechanism: Here we compare the RIMs to the baseline, where their is no input attention (i.e., top down attention) as well as all the RIMs communicate with each other at all the time steps. Learning curves for RIMs-PPO models, Baseline Agent, the LSTM-PPO baseline across 30 Atari games.
|
md/train/Byx9p2EtDH/Byx9p2EtDH.md
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MULTIPOLAR: MULTI-SOURCE POLICY AGGREGATION FOR TRANSFER REINFORCEMENT LEARNING BETWEEN DIVERSE ENVIRONMENTAL DYNAMICS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Transfer reinforcement learning (RL) aims at improving learning efficiency of an agent by exploiting knowledge from other source agents trained on relevant tasks. However, it remains challenging to transfer knowledge between different environmental dynamics without having access to the source environments. In this work, we explore a new challenge in transfer RL, where only a set of source policies collected under unknown diverse dynamics is available for learning a target task efficiently. To address this problem, the proposed approach, MULTI-source POLicy AggRegation (MULTIPOLAR), comprises two key techniques. We learn to aggregate the actions provided by the source policies adaptively to maximize the target task performance. Meanwhile, we learn an auxiliary network that predicts residuals around the aggregated actions, which ensures the target policy’s expressiveness even when some of the source policies perform poorly. We demonstrated the effectiveness of MULTIPOLAR through an extensive experimental evaluation across six simulated environments ranging from classic control problems to challenging robotics simulations, under both continuous and discrete action spaces.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
We envision a future scenario where a variety of robotic systems, which are each trained or manually engineered to solve a similar task, provide their policies for a new robot to learn a relevant task quickly. For example, imagine various pick-and-place robots working in factories all over the world. Depending on the manufacturer, these robots will differ in their kinematics (e.g., link length, joint orientations) and dynamics (e.g., link mass, joint damping, friction, inertia). They could provide their policies to a new robot (Devin et al., 2017), even though their dynamics factors, on which the policies are implicitly conditioned, are not typically available (Chen et al., 2018). Moreover, we cannot rely on a history of their individual experiences, as they may be unavailable due to a lack of communication between factories or prohibitively large dataset sizes. In such scenarios, we argue that a key technique to develop is the ability to transfer knowledge from a collection of robots to a new robot quickly only by exploiting their policies while being agnostic to their different kinematics and dynamics, rather than collecting a vast amount of samples to train the new robot from scratch.
|
| 12 |
+
|
| 13 |
+
The scenario illustrated above poses a new challenge in the transfer learning for reinforcement learning (RL) domains. Formally, consider multiple instances of a single environment that differ in their state transition dynamics, e.g., independent ant robots with different leg designs in Figure 1, which reach different locations by executing the same walking actions. These source agents interacting with one of the environment instances provide their deterministic policy to a new target agent in another environment instance. Then, our problem is: can
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Ant Example. A policy of a target agent (right) is learned by utilizing the policies of other source agents with different leg designs (left).
|
| 17 |
+
|
| 18 |
+
we efficiently learn the policy of a target agent given only the collection of source policies? Note that information about source environmental dynamics, such as the exact state transition distributions and the history of environmental states, will not be visible to the target agent as mentioned above. Also, the source policies are neither trained nor hand-engineered for the target environment instance, and therefore not guaranteed to work optimally and may even fail (Chen et al., 2018). These conditions prevent us from adopting existing work on transfer RL between different environmental dynamics, as they require access to source environment instances or their dynamics for training a target policy (e.g., Lazaric et al. (2008); Chen et al. (2018); Yu et al. (2019); Tirinzoni et al. (2018)). Similarly, meta-learning approaches (Vanschoren, 2018; Sæmundsson et al., 2018; Clavera et al., 2019) cannot be used here because they typically train an agent on a diverse set of tasks (i.e., environment instances). Also, existing techniques that utilize a collection of source policies, e.g., policy reuse frameworks (Fernandez & Veloso, 2006; Rosman et al., 2016; Zheng et al., ´ 2018) and option frameworks (Sutton et al., 1999; Bacon et al., 2017; Mankowitz et al., 2018), are not a promising solution because, to our knowledge, they assume source policies have the same environmental dynamics but have different goals.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 2: Overview of MULTIPOLAR. We formulate a target policy $\pi _ { \mathrm { t a r g e t } }$ with the sum of 1) the adaptive aggregation $F _ { \mathrm { a g g } }$ of deterministic actions from source policies $\bar { L }$ and 2) the auxiliary network $F _ { \mathrm { a u x } }$ for predicting residuals around $F _ { \mathrm { a g g } }$ .
|
| 22 |
+
|
| 23 |
+
As a solution to the problem, we propose a new transfer RL approach named MULTI-source POLicy AggRegation (MULTIPOLAR). As shown in Figure 2, our key idea is twofold; 1) In a target policy, we adaptively aggregate the deterministic actions produced by a collection of source policies. By learning aggregation parameters to maximize the expected return at a target environment instance, we can better adapt the aggregated actions to unseen environmental dynamics of the target instance without knowing source environmental dynamics nor source policy performances. 2) We also train an auxiliary network that predicts a residual around the aggregated actions, which is crucial for ensuring the expressiveness of the target policy even when some source policies are not useful. As another notable advantage, the proposed MULTIPOLAR can be used for both continuous and discrete action spaces with few modifications while allowing a target policy to be trained in a principled fashion. Similar to Ammar et al. (2014); Song et al. (2016); Chen et al. (2018); Tirinzoni et al. (2018); Yu et al. (2019), our method assumes that the environment structure (state/action space) is identical between the source and target environments, while dynamics/kinematics parameters are different. This assumption holds in many real-world applications such as in sim-to-real tasks (Tan et al., 2018), industrial insertion tasks (Schoettler et al., 2019) (different dynamics comes from the differences in parts), and wearable robots (Zhang et al., 2017) (with users as dynamics).
|
| 24 |
+
|
| 25 |
+
We evaluate MULTIPOLAR in a variety of environments ranging from classic control problems to challenging robotics simulations. Our experimental results demonstrate the significant improvement of sample efficiency with the proposed approach, compared to baselines that trained a target policy from scratch or from a single source policy. We also conducted a detailed analysis of our approach and found it works well even when some of the source policies performed poorly in their original environment instance.
|
| 26 |
+
|
| 27 |
+
Main contributions: (1) a new transfer RL problem that leverages multiple source policies collected under diverse environmental dynamics to train a target policy in another dynamics, and (2) MULTIPOLAR, a simple yet principled and effective solution verified in our extensive experiments.
|
| 28 |
+
|
| 29 |
+
# 2 PRELIMINARIES
|
| 30 |
+
|
| 31 |
+
Reinforcement Learning We formulate our problem under the standard RL framework (Sutton & Barto, 1998), where an agent interacts with its environment modeled by a Markov decision process (MDP). An MDP is represented by the tuple $\mathcal { M } = ( \rho _ { 0 } , \gamma , S , \mathcal { A } , R , T )$ where $\rho _ { 0 }$ is the initial state distribution and $\gamma$ is a discount factor. At each timestep $t$ , given the current state $s _ { t } ~ \in ~ S$ , the agent executes an action $a _ { t } \in \mathcal A$ based on its policy $\pi ( a _ { t } \mid s _ { t } ; \theta )$ that is parameterized by $\theta$ . The environment returns a reward $R ( s _ { t } , a _ { t } ) \in \mathbb { R }$ and transitions to the next state $s _ { t + 1 }$ based on the state transition distribution $T ( s _ { t + 1 } \mid s _ { t } , a _ { t } )$ . In this framework, RL aims to maximize the expected return with respect to the policy parameters $\theta$ .
|
| 32 |
+
|
| 33 |
+
Environment Instances In this work, we consider $K$ instances of the same environment that differ only in their state transition dynamics. We model each environment instance by an indexed MDP: $\mathcal { M } _ { i } = ( \rho _ { 0 } , \gamma , S , A , R , T _ { i } )$ where no two state transition distributions $T _ { i } , T _ { j } ; i \neq j$ are identical. We also assume that each $T _ { i }$ is unknown when training a target policy, i.e., agents cannot access the exact form of $T _ { i }$ nor a collection of states sampled from $T _ { i }$ .
|
| 34 |
+
|
| 35 |
+
Source Policies For each of the $K$ environment instances, we are given a deterministic source policy $\mu _ { i } : { \mathcal { S } } A$ that only maps states to actions. Each source policy $\mu _ { i }$ can be either parameterized (e.g., learned from interacting with the environment modeled by $\mathcal { M } _ { i }$ ) or non-parameterized (e.g., heuristically designed by humans). Either way, we assume no prior knowledge about $\mu _ { i }$ is available for a target agent, such as their representations or original performances, except that they were acquired in $\mathcal { M } _ { i }$ with an unknown $T _ { i }$ .
|
| 36 |
+
|
| 37 |
+
Problem Statement Given the set of source policies $L = \{ \mu _ { 1 } , . . . , \mu _ { K } \}$ , our goal is to train a new target agent’s policy $\pi _ { \mathrm { t a r g e t } } ( a _ { t } \mid s _ { t } ; L , \theta )$ in a sample efficient fashion, where the target agent interacts with another environment instance $\mathcal { M } _ { \mathrm { t a r g e t } } \ \stackrel { - } { = } \ \left( \rho _ { 0 } , S , \mathcal { A } , R , T _ { \mathrm { t a r g e t } } \right)$ and $T _ { \mathrm { t a r g e t } }$ is not necessarily identical to $T _ { i }$ $( i = 1 \dots , K )$ .
|
| 38 |
+
|
| 39 |
+
# 3 MULTI-SOURCE POLICY AGGREGATION
|
| 40 |
+
|
| 41 |
+
As shown in Figure 2, with the Multi-Source Policy Aggregation (MULTIPOLAR), we formulate a target policy $\pi _ { \mathrm { t a r g e t } }$ using a) the adaptive aggregation of deterministic actions from the set of source policies $L$ , and b) the auxiliary network predicting residuals around the aggregated actions. We first present our method for the continuous action space, and then extend it to the discrete space.
|
| 42 |
+
|
| 43 |
+
Adaptive Aggregation of Source Policies Let us denote by $a _ { t } ^ { ( i ) } = \mu _ { i } ( s _ { t } )$ the action predicted deterministically by source policy $\mu _ { i }$ given the current state $s _ { t }$ . For the continuous action space, $a _ { t } ^ { ( i ) } \in \mathbb { R } ^ { D }$ is a $D$ -dimensional real-valued vector representing $D$ actions performed jointly in each timestep. For the collection of source policies $L$ , we derive the matrix of their deterministic actions:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
A _ { t } = \left[ ( \boldsymbol { a } _ { t } ^ { ( 1 ) } ) ^ { \top } , \ldots , ( \boldsymbol { a } _ { t } ^ { ( K ) } ) ^ { \top } \right] \in \mathbb { R } ^ { K \times D } .
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
The key idea of this work is to aggregate $A _ { t }$ adaptively in an RL loop, i.e., to maximize the expected return. This adaptive aggregation gives us a “baseline” action that could introduce a strong inductive bias in the training of a target policy, without knowing source environmental dynamics $T _ { i }$ . More specifically, we define the adaptive aggregation function $F _ { \mathrm { a g g } } : S { \mathcal { A } }$ that produces the baseline action based on the current state $s _ { t }$ as follows:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
F _ { \mathrm { a g g } } ( s _ { t } ; L , \theta _ { \mathrm { a g g } } ) = \frac { 1 } { K } \mathbb { 1 } ^ { K } \left( \theta _ { \mathrm { a g g } } \odot A _ { t } \right) ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
where $\theta _ { \mathrm { a g g } } \in \mathbb { R } ^ { K \times D }$ is a matrix of trainable parameters, $\odot$ is the element-wise multiplication, and $\mathbb { 1 } ^ { K }$ is the all-ones vector of length $K$ . $\theta _ { \mathrm { a g g } }$ is neither normalized nor regularized, and can scale each action of each policy independently. This means that we do not merely adaptively interpolate action spaces, but more flexibly emphasize informative source actions while suppressing irrelevant ones.
|
| 56 |
+
|
| 57 |
+
Predicting Residuals around Aggregated Actions Moreover, we learn auxiliary network $F _ { \mathrm { a u x } }$ : $S A$ jointly with $F _ { \mathrm { a g g } }$ , to predict residuals around the aggregated actions. $F _ { \mathrm { a u x } }$ is used to improve the target policy training in two ways. 1) If the aggregated actions from $F _ { \mathrm { a g g } }$ are already useful in the target environment instance, $F _ { \mathrm { a u x } }$ will correct them for a higher expected return. 2) Otherwise, $F _ { \mathrm { a u x } }$ learns the target task while leveraging $F _ { \mathrm { a g g } }$ as a prior to have a guided exploration process. Any network could be used for $F _ { \mathrm { a u x } }$ as long as it is parameterized and fully differentiable. Finally, the MULTIPOLAR function is formulated as:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
F ( s _ { t } ; L , \theta _ { \mathrm { a g g } } , \theta _ { \mathrm { a u x } } ) = F _ { \mathrm { a g g } } ( s _ { t } ; L , \theta _ { \mathrm { a g g } } ) + F _ { \mathrm { a u x } } ( s _ { t } ; \theta _ { \mathrm { a u x } } ) ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $\theta _ { \mathrm { a u x } }$ denotes a set of trainable parameters for $F _ { \mathrm { a u x } }$ . Note that the idea of predicting residuals for a source policy has also been presented by Silver et al. (2018); Johannink et al. (2019); Rana et al. (2019). The main difference here is that, while these works just add raw action outputs provided from a single hand-engineered source policy, we adaptively aggregate actions from multiple source policies in order to obtain a more flexible and canonical representation.
|
| 64 |
+
|
| 65 |
+
Target Policy Target policy $\pi _ { \mathrm { t a r g e t } }$ can be modeled by reparameterizing the MULTIPOLAR function as a Gaussian distribution, i.e., $\mathcal { N } ( F ( s _ { t } ; L , \theta _ { \mathrm { a g g } } , \theta _ { \mathrm { a u x } } ) , \Sigma )$ , where $\Sigma$ is a covariance matrix estimated based on what the used RL algorithm requires. Since we regard $\mu _ { i } \in L$ as fixed functions mapping states to actions, this Gaussian policy $\pi _ { \mathrm { t a r g e t } }$ is differentiable with respect to $\theta _ { \mathrm { a g g } }$ and $\theta _ { \mathrm { a u x } }$ , and hence could be trained with any RL algorithm that explicitly updates policy parameters. Unlike Silver et al. (2018); Johannink et al. (2019); Rana et al. (2019), we can formulate the target policy in a principled fashion for actions in a discrete space. Specifically, instead of a $D$ -dimensional real-valued vector, here we have a $D$ -dimensional one-hot vector $a _ { t } ^ { ( i ) } \in \{ 0 , 1 \} ^ { D }$ , $\begin{array} { r } { \sum _ { j } ( a _ { t } ^ { ( i ) } ) _ { j } = 1 } \end{array}$ as outputs of $\mu _ { i }$ , where $( a _ { t } ^ { ( i ) } ) _ { j } = 1$ indicates that the $j$ -th action is to be executed. Following Eqs. (2) and (3), the output of $F ( \dot { s } _ { t } ; L , \theta _ { \mathrm { a g g } } , \theta _ { \mathrm { a u x } } )$ can be viewed as $D$ -dimensional un-normalized action scores, from which we can sample a discrete action after normalizing it by the softmax function.
|
| 66 |
+
|
| 67 |
+
# 4 EXPERIMENTAL EVALUATION
|
| 68 |
+
|
| 69 |
+
We aim to empirically demonstrate the sample efficiency of a target policy trained with MULTIPOLAR (denoted by “MULTIPOLAR policy”). To complete the experiments in a reasonable amount of time, we set the number of source policies to be $K = 4$ unless mentioned otherwise. Moreover, we investigate the factors that affect the performance of MULTIPOLAR. To ensure fair comparisons and reproducibility of experiments, we followed the guidelines introduced by Henderson et al. (2018) and Franc¸ois-Lavet et al. (2018) for conducting and evaluating all of our experiments.
|
| 70 |
+
|
| 71 |
+
# 4.1 EXPERIMENTAL SETUP
|
| 72 |
+
|
| 73 |
+
Baseline Methods To show the benefits of leveraging source policies, we compared our MULTIPOLAR policy to the standard multi-layer perceptron (MLP) trained from scratch, which is typically used in RL literature (Schulman et al., 2017; Franc¸ois-Lavet et al., 2018). As another baseline, we also used MULTIPOLAR with $K = 1$ , which is an extension of residual policy learning (Silver et al., 2018; Johannink et al., 2019; Rana et al., 2019) (denoted by “RPL”) with adaptive residuals as well as the ability to deal with both continuous and discrete action spaces. We stress here that the existing transfer RL or meta RL approaches that train a universal policy network agnostic to the environmental dynamics, such as Frans et al. (2018); Chen et al. (2018), cannot be used as a baseline since they require a policy to be trained on a distribution of environment instances, which is not possible in our problem setting. Also, other techniques using multiple source policies, such as policy reuse frameworks, are not applicable because their source policies should be collected under the target environmental dynamics.
|
| 74 |
+
|
| 75 |
+
Environments To show the general effectiveness of the MULTIPOLAR policy, we conducted comparative evaluations of MULTIPOLAR on the following six OpenAI Gym environments: Roboschool Hopper, Roboschool Ant, Roboschool InvertedPendulumSwingUp, Acrobot, CartPole, and LunarLander. We chose these six environments because 1) the parameterization of their dynamics and kinematics is flexible enough, 2) they cover discrete action space (Acrobot and CartPole) as well as continuous action space, and 3) they are samples of three distinct categories of OpenAI Gym environments, namely Box2d, Classic Control, and Roboschool.
|
| 76 |
+
|
| 77 |
+
Experimental Procedure For each of the six environments, we first created 100 environment instances by randomly sampling the dynamics and kinematics parameters from a specific range. For example, these parameters in the Hopper environment were link lengths, damping, friction, armature, and link mass1 Then, for each environment instance, we trained an MLP policy. The trained MLP policies were used in two ways: a) the baseline MLP policy for each environment instance, and b) a pool of 100 source policy candidates from which we sample $K$ of them to train MULTIPOLAR policies and one of them to train RPL policies2. Specifically, for each environment instance, we trained three MULTIPOLAR and three RPL policies with distinct sets of source policies selected randomly from the candidate pool. The learning procedure explained above was done three times with fixed different random seeds to reduce variance in results due to stochasticity. As a result, for each of the six environments, we had 100 environment instances $\times 3$ random seeds $= 3 0 0$ experiments for MLP and 100 environment instances $\times ~ 3$ choices of source policies $\times \ 3$ random seeds $= 9 0 0$ experiments for RPL and MULTIPOLAR. The aim of this large number of experiments is to obtain correct insights into the distribution of performances (Henderson et al., 2018). Due to the large number of experiments for all the environments, our detailed analysis and ablation study of MULTIPOLAR components were conducted with only Hopper, as its sophisticated second-order dynamics plays a crucial role in agent performance (Chen et al., 2018).
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 3: Average Learning Curves of MLP, RPL, and MULTIPOLAR $X = 4 ,$ ) over all the experiments for each environment. The shaded area represents 1 standard error.
|
| 81 |
+
|
| 82 |
+
Implementation Details All the experiments were done using the Stable Baselines (Hill et al., 2018) implementation of learning algorithms as well as its default hyperparameters and MLP network architecture for each environment (see Appendix A.1 for more details). Based on the performance of learning algorithms reported in the Hill et al. (2018), all the policies were trained with Soft Actor-Critic (Haarnoja et al., 2018) in the LunarLander environment and with Proximal Policy Optimization (Schulman et al., 2017) in the rest of the environments. For fair comparisons, in all experiments, auxiliary network $F _ { \mathrm { a u x } }$ had an identical architecture to that of the MLP. Therefore, the only difference between MLP and MULTIPOLAR was the aggregation part $F _ { \mathrm { a g g } }$ , which made it possible to evaluate the contribution of transfer learning based on adaptive aggregation of source policies. Also, we avoided any random seed optimization since it has been shown to alter the policies’ performance (Henderson et al., 2018).
|
| 83 |
+
|
| 84 |
+
Evaluation Metric Following the guidelines of Henderson et al. (2018), to measure sampling efficiency of training policies, i.e., how quick the training progresses, we used the average episodic reward over a various number of training samples. Also, to ensure that higher average episodic reward is representative of better performance and to estimate the variation of it, we used the sample bootstrap method (Efron & Tibshirani, 1993) to estimate statistically relevant $9 5 \%$ confidence bounds of the results of our experiments. Across all the experiments, we used 10K bootstrap iterations and the pivotal method. Further details on evaluation method can be found in Appendix A.3.
|
| 85 |
+
|
| 86 |
+
Table 1: MULTIPOLAR vs. Baselines. Bootstrap mean and $9 5 \%$ confidence bounds of average episodic rewards over various training samples across six environments.
|
| 87 |
+
|
| 88 |
+
<table><tr><td rowspan="2">Methods</td><td colspan="4">CartPole</td></tr><tr><td>25K</td><td>50K</td><td>75K</td><td>100K</td></tr><tr><td>MLP</td><td>171 (164,179)</td><td>229 (220,237)</td><td>266 (258,275)</td><td>291 (282,300)</td></tr><tr><td>RPL</td><td>185 (179,192)</td><td>238 (231,245)</td><td>269 (262,276)</td><td>289 (282,296)</td></tr><tr><td>MULTIPOLAR (K=4)</td><td>202 (195,209)</td><td>252 (245,260)</td><td>283 (276,290)</td><td>299 (292,306)</td></tr><tr><td rowspan="2"></td><td colspan="4">Acrobot</td></tr><tr><td>50K</td><td>100K</td><td>150K</td><td>200K</td></tr><tr><td>MLP</td><td>-305 (-317,-294)</td><td>-164 (-172,-156)</td><td>-127 (-133,-121)</td><td>-111 (-117,-106)</td></tr><tr><td>RPL</td><td>-154 (-159,-150)</td><td>-120 (-124,-116)</td><td>-105 (-109,-102)</td><td>-98 (-101,-95)</td></tr><tr><td>MULTIPOLAR (K=4)</td><td>-151 (-155,-146)</td><td>-117 (-121,-113)</td><td>-103 (-106,-100)</td><td>-96 (-99,-93)</td></tr><tr><td></td><td colspan="4">LunarLander</td></tr><tr><td></td><td>125K</td><td>250K</td><td>375K</td><td>500K</td></tr><tr><td>MLP</td><td>10 (2,18)</td><td>112 (104,121)</td><td>178 (171,185)</td><td>216 (210,221)</td></tr><tr><td>RPL</td><td>92 (87,96)</td><td>178 (174,182)</td><td>223 (220,226)</td><td>246 (243,248)</td></tr><tr><td>MULTIPOLAR (K=4)</td><td>95 (90,99)</td><td>181 (177,185)</td><td>224 (221,228)</td><td>246 (244,249)</td></tr><tr><td></td><td colspan="4">Roboschool Hopper</td></tr><tr><td></td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>MLP</td><td>26 (25,27)</td><td>43 (42,45)</td><td>67 (64,70)</td><td>92 (88,96)</td></tr><tr><td>RPL</td><td>37 (36,39)</td><td>75 (70,79)</td><td>114 (107,121)</td><td>152 (142,160)</td></tr><tr><td>MULTIPOLAR (K=4)</td><td>61 (59,64)</td><td>138 (132,143)</td><td>213 (206,221)</td><td>283 (273,292)</td></tr><tr><td></td><td colspan="4">Roboschool Ant</td></tr><tr><td></td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>MLP</td><td>714 (674,756)</td><td>1088 (1030,1146)</td><td>1332 (1267,1399)</td><td>1500 (1430,1572)</td></tr><tr><td>RPL</td><td>807 (785,830)</td><td>1120 (1088,1152)</td><td>1307 (1269,1344)</td><td>1432 (1391,1473)</td></tr><tr><td>MULTIPOLAR (K=4)</td><td>1025 (995,1056)</td><td>1397 (1361,1432)</td><td>1606 (1568,1644)</td><td>1744 (1705,1783)</td></tr><tr><td></td><td colspan="4">Roboschool InvertedPendulumSwingup</td></tr><tr><td></td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>MLP</td><td>159 (155,164)</td><td>267 (260,273)</td><td>347 (340,355)</td><td>409 (401,417)</td></tr><tr><td>RPL</td><td>111 (109,113)</td><td>195 (192,198)</td><td>265 (261,268)</td><td>322 (317,326)</td></tr><tr><td>MULTIPOLAR (K=4)</td><td>375 (355,395)</td><td>476 (456,495)</td><td>541 (522,559)</td><td>588 (571,605)</td></tr></table>
|
| 89 |
+
|
| 90 |
+
# 4.2 RESULTS
|
| 91 |
+
|
| 92 |
+
Sample Efficiency of MULTIPOLAR Figure 3 and Table 1 clearly show that on average, in all the environments, MULTIPOLAR outperformed baseline policies in terms of sample efficiency and sometimes the final episodic reward3. For example, in Hopper over 2M training samples, MULTIPOLAR with $K = 4$ achieved a mean of average episodic reward about three times higher than MLP (i.e., training from scratch) and about twice higher than RPL (i.e., using only a single source policy). It is also noteworthy that MULTIPOLAR with $K = 4$ had on par or better performance than RPL, which indicates the effectiveness of leveraging multiple source policies4. Figure 7 in Appendix, shows the individual average learning curve for each of the instances of Roboschool environments.
|
| 93 |
+
|
| 94 |
+
Ablation Study To demonstrate the importance of each component of MULTIPOLAR, we evaluated the following degraded versions: (1) $\theta _ { \mathrm { a g g } }$ fixed to $I$ , which just averages the deterministic actions from the source policies without adaptive weights (similar to the residual policy learning methods that used raw action outputs of a source policy), and (2) $F _ { \mathrm { a u x } }$ learned independent of $s _ { t }$ , which replaces the state-dependent MLP with an adaptive “placeholder” parameter vector making actions just a linear combination of source policy outputs. As shown in Table 2, the full version of MULTIPOLAR significantly outperformed both of the degraded versions, suggesting that the adaptive aggregation and predicting residuals are both critical.
|
| 95 |
+
|
| 96 |
+
Table 2: Results for MULTIPOLAR and its degraded versions in Hopper.
|
| 97 |
+
|
| 98 |
+
<table><tr><td>MULTIPOLAR (K=4)</td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>Full version</td><td>61 (59,64)</td><td>138 (132,143)</td><td>213 (206,221)</td><td>283 (273,292)</td></tr><tr><td>0agg fixed to 1</td><td>56 (53,59)</td><td>118 (111,126)</td><td>180 (169,191)</td><td>237 (222,250)</td></tr><tr><td>Faux learned independent of St</td><td>53 (50,56)</td><td>101 (95,108)</td><td>146 (137,156)</td><td>187 (175,200)</td></tr></table>
|
| 99 |
+
|
| 100 |
+
Table 3: Results for MULTIPOLAR with different source policy sampling schemes in Hopper.
|
| 101 |
+
|
| 102 |
+
<table><tr><td>MULTIPOLAR (K=4)</td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>Random</td><td>61 (59,64)</td><td>138 (132,143)</td><td>213 (206,221)</td><td>283 (273,292)</td></tr><tr><td>4 high performance</td><td>98 (95,101)</td><td>214 (208,220)</td><td>323 (314,331)</td><td>420 (409,430)</td></tr><tr><td>2 high & 2 low performance</td><td>45 (43,47)</td><td>98 (94,102)</td><td>154 (148,160)</td><td>208 (200,215)</td></tr><tr><td>4 low performance</td><td>27 (26,27)</td><td>45 (44,47)</td><td>68 (66,71)</td><td>92 (88,95)</td></tr></table>
|
| 103 |
+
|
| 104 |
+
Table 4: Results for MULTIPOLAR with different number of source policies in Hopper.
|
| 105 |
+
|
| 106 |
+
<table><tr><td>MULTIPOLAR</td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>K=4</td><td>61 (59,64)</td><td>138 (132,143)</td><td>213 (206,221)</td><td>283 (273,292)</td></tr><tr><td>K=8</td><td>71 (68,74)</td><td>160 (154,167)</td><td>246 (236,255)</td><td>323 (312,335)</td></tr><tr><td>K=16</td><td>78 (75,80)</td><td>177 (172,182)</td><td>272 (264,279)</td><td>357 (348,367)</td></tr></table>
|
| 107 |
+
|
| 108 |
+
Effect of Source Policy Performances Figure 4 illustrates an example of the histogram of final episodic reward (average rewards of the last 100 training episodes) for the source policy candidates obtained in the Hopper environment. As shown in the figure, the source policies were diverse in terms of the performance on their original environment instances5. In this setup, we investigate the effect of source policies performances on MULTIPOLAR sample efficiency.
|
| 109 |
+
|
| 110 |
+
We created two separate pools of source policies, where one contained only high-performing and the other only lowperforming source policies6. Table 3 summarizes the results of sampling source policies from these pools (4 high, 2 high & 2 low, and 4 low performances) and compares them to the original MULTIPOLAR (shown as ‘Random’) also reported in Table 1. Not surprisingly, MULTIPOLAR performed the best when all the source policies were sampled from the highperformance pool. However, we emphasize that such highquality policies are not always available in practice, due to the variability of how they are learned or hand-crafted under their own environment instance. Figure 6 in Appendix B.1 illustrates that MULTIPOLAR can successfully learn to suppress the useless low-performing source policies.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 4: Histogram of source policy performances in Hopper.
|
| 114 |
+
|
| 115 |
+
Effect of Number of Source Policies Finally, we show how the number of source policies contributes to MULTIPOLAR’s sample efficiency in Table 4. Specifically, we trained MULTIPOLAR policies up to $K = 1 6$ to study how the mean of average episodic rewards changes. The monotonic performance improvement over $K$ (for $K \leq 1 6$ ), is achieved at the cost of increased training and inference time. In practice, we suggest balancing this speed-performance trade-off by using as many source policies as possible before reaching the inference time limit required by the application.
|
| 116 |
+
|
| 117 |
+
# 5 DISCUSSION AND RELATED WORK
|
| 118 |
+
|
| 119 |
+
Our work is broadly categorized as an instance of transfer RL (Taylor & Stone, 2009), in which a policy for a target task is trained using information collected from source tasks. In this section, we highlight how our work is different from the existing approaches and also discuss the current limitations as well as future directions.
|
| 120 |
+
|
| 121 |
+
Transfer between Different Dynamics There has been very limited work on transferring knowledge between agents in different environmental dynamics. As introduced briefly in Section 1, some methods require training samples collected from source tasks. These sampled experiences are then used for measuring the similarity between environment instances (Lazaric et al., 2008; Ammar et al., 2014; Tirinzoni et al., 2018) or for conditioning a target policy to predict actions (Chen et al., 2018). Alternative means to quantify the similarity is to use a full specification of MDPs (Song et al., 2016; Wang et al., 2019) or environmental dynamics Yu et al. (2019). In contrast, the proposed MULTIPOLAR allows the knowledge transfer only through the policies acquired from source environment instances, which is beneficial when source and target environments are not always connected to exchange information about their environmental dynamics and training samples.
|
| 122 |
+
|
| 123 |
+
Leveraging Multiple Policies The idea of utilizing multiple source policies can be found in the literature of policy reuse frameworks (Fernandez & Veloso, 2006; Rosman et al., 2016; Li & Zhang, ´ 2018; Zheng et al., 2018; Li et al., 2019). The basic motivation behind these works is to provide “nearly-optimal solutions” (Rosman et al., 2016) for short-duration tasks by reusing one of the source policies, where each source would perform well on environment instances with different rewards (e.g., different goals in maze tasks). In our problem setting, where environmental dynamics behind each source policy are different, reusing a single policy without an adaptation is not the right approach, as described in (Chen et al., 2018) and also demonstrated in our experiment. Another relevant idea is hierarchical RL (Barto & Mahadevan, 2003; Kulkarni et al., 2016; Osa et al., 2019) that involves a hierarchy of policies (or action-value functions) to enable temporal abstraction. In particular, option frameworks (Sutton et al., 1999; Bacon et al., 2017; Mankowitz et al., 2018) make use of a collection of policies as a part of “options”. However, they assumed all the policies in the hierarchy to be learned in a single environment instance. Another relevant work along this line of research is (Frans et al., 2018), which meta-learns a hierarchy of multiple sub-policies by training a master policy over the distribution of tasks. Nevertheless, hierarchical RL approaches are not useful for leveraging multiple source policies each acquired under diverse environmental dynamics.
|
| 124 |
+
|
| 125 |
+
Learning Residuals in RL Finally, some recent works adopt residual learning to mitigate the limited performance of hand-engineered policies (Silver et al., 2018; Johannink et al., 2019; Rana et al., 2019). We are interested in a more extended scenario where various source policies with unknown performances are provided instead of a single sub-optimal policy. Also, these approaches focus only on RL problems for robotic tasks in the continuous action space, while our approach could work on both of continuous and discrete action spaces in a broad range of environments.
|
| 126 |
+
|
| 127 |
+
Limitations and Future Directions Currently, our work has several limitations. First, MULTIPOLAR may not be scalable to a large number of source policies, as its training and testing times will increase almost linearly with the number of source policies. One possible solution for this issue would be pre-screening source policies before starting to train a target agent, for example, by testing each source on the target task and taking them into account in the training phase only when they are found useful. Moreover, our work assumes source and target environment instances to be different only in their state transition distribution. An interesting direction for future work is to involve other types of environmental differences, such as dissimilar rewards and state/action spaces.
|
| 128 |
+
|
| 129 |
+
# 6 CONCLUSION
|
| 130 |
+
|
| 131 |
+
We presented a new problem setting of transfer RL that aimed to train a policy efficiently using a collection of source policies acquired under diverse environmental dynamics. We demonstrated that the proposed MULTIPOLAR is, despite its simplicity, a principled approach with high training sample efficiency on a variety of environments. Our transfer RL approach is advantageous when one does not have access to a distribution of diverse environmental dynamics. Future work will seek to adapt our approach to more challenging domains such as a real-world robotics task.
|
| 132 |
+
|
| 133 |
+
# REFERENCES
|
| 134 |
+
|
| 135 |
+
Haitham Bou Ammar, Eric Eaton, Matthew Taylor, Decebal Constantin Mocanu, Kurt Driessens, Gerhard Weiss, and Karl Tuyls. An Automated Measure of MDP Similarity for Transfer in Reinforcement Learning. In Workshops at the AAAI Conference on Artificial Intelligence, 2014.
|
| 136 |
+
|
| 137 |
+
Pierre-Luc Bacon, Jean Harb, and Doina Precup. The Option-Critic Architecture. In AAAI Conference on Artificial Intelligence, 2017.
|
| 138 |
+
|
| 139 |
+
Andrew G Barto and Sridhar Mahadevan. Recent Advances in Hierarchical Reinforcement Learning. Discrete Event Dynamic Systems, 13(1-2):41–77, 2003.
|
| 140 |
+
|
| 141 |
+
Tao Chen, Adithyavairavan Murali, and Abhinav Gupta. Hardware Conditioned Policies for MultiRobot Transfer Learning. In Advances in Neural Information Processing Systems, pp. 9355–9366, 2018.
|
| 142 |
+
|
| 143 |
+
Ignasi Clavera, Anusha Nagabandi, Simin Liu, Ronald S. Fearing, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Learning to Adapt in Dynamic, Real-World Environments through MetaReinforcement Learning. In International Conference on Learning Representations, 2019.
|
| 144 |
+
|
| 145 |
+
Coline Devin, Abhishek Gupta, Trevor Darrell, Pieter Abbeel, and Sergey Levine. Learning Modular Neural Network Policies for Multi-Task and Multi-Robot Transfer. In IEEE International Conference on Robotics and Automation, pp. 2169–2176, 2017.
|
| 146 |
+
|
| 147 |
+
Bradley Efron and Robert Tibshirani. An Introduction to the Bootstrap. Springer, 1993.
|
| 148 |
+
|
| 149 |
+
Fernando Fernandez and Manuela Veloso. Probabilistic Policy Reuse in a Reinforcement Learning ´ Agent. In International Joint Conference on Autonomous Agents and Multiagent Systems, pp. 720–727, 2006.
|
| 150 |
+
|
| 151 |
+
Vincent Franc¸ois-Lavet, Peter Henderson, Riashat Islam, Marc G. Bellemare, and Joelle Pineau. An Introduction to Deep Reinforcement Learning. Foundations and Trends in Machine Learning, 11 (3-4):219–354, 2018.
|
| 152 |
+
|
| 153 |
+
Kevin Frans, Jonathan Ho, Xi Chen, Pieter Abbeel, and John Schulman. Meta learning shared hierarchies. In International Conference on Learning Representations, 2018.
|
| 154 |
+
|
| 155 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor. In International Conference on Machine Learning, pp. 1856–1865, 2018.
|
| 156 |
+
|
| 157 |
+
Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep Reinforcement Learning That Matters. In AAAI Conference on Artificial Intelligence, pp. 3207–3214, 2018.
|
| 158 |
+
|
| 159 |
+
Ashley Hill, Antonin Raffin, Maximilian Ernestus, Adam Gleave, Rene Traore, Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plappert, Alec Radford, John Schulman, Szymon Sidor, and Yuhuai Wu. Stable Baselines. https://github.com/hill-a/ stable-baselines, 2018.
|
| 160 |
+
|
| 161 |
+
Tobias Johannink, Shikhar Bahl, Ashvin Nair, Jianlan Luo, Avinash Kumar, Matthias Loskyll, Juan Aparicio Ojea, Eugen Solowjow, and Sergey Levine. Residual Reinforcement Learning for Robot Control. In International Conference on Robotics and Automation, pp. 6023–6029, 2019.
|
| 162 |
+
|
| 163 |
+
Tejas D Kulkarni, Karthik Narasimhan, Ardavan Saeedi, and Josh Tenenbaum. Hierarchical Deep Reinforcement Learning: Integrating Temporal Abstraction and Intrinsic Motivation. In Advances in Neural Information Processing Systems, pp. 3675–3683, 2016.
|
| 164 |
+
|
| 165 |
+
Alessandro Lazaric, Marcello Restelli, and Andrea Bonarini. Transfer of Samples in Batch Reinforcement Learning. In International Conference on Machine Learning, pp. 544–551, 2008.
|
| 166 |
+
|
| 167 |
+
Siyuan Li and Chongjie Zhang. An Optimal Online Method of Selecting Source Policies for Reinforcement Learning. In AAAI Conference on Artificial Intelligence, 2018.
|
| 168 |
+
|
| 169 |
+
Siyuan Li, Fangda Gu, Guangxiang Zhu, and Chongjie Zhang. Context-Aware Policy Reuse. In International Conference on Autonomous Agents and MultiAgent Systems, pp. 989–997, 2019.
|
| 170 |
+
|
| 171 |
+
Daniel J Mankowitz, Timothy A Mann, Pierre-Luc Bacon, Doina Precup, and Shie Mannor. Learning Robust Options. In AAAI Conference on Artificial Intelligence, 2018.
|
| 172 |
+
|
| 173 |
+
Takayuki Osa, Voot Tangkaratt, and Masashi Sugiyama. Hierarchical Reinforcement Learning via Advantage-Weighted Information Maximization. In International Conference on Learning Representations, 2019.
|
| 174 |
+
|
| 175 |
+
Krishan Rana, Ben Talbot, Michael Milford, and Niko Sunderhauf. Residual Reactive Navigation: ¨ Combining Classical and Learned Navigation Strategies For Deployment in Unknown Environments. arXiv preprint arXiv:1909.10972, 2019.
|
| 176 |
+
|
| 177 |
+
Benjamin Rosman, Majd Hawasly, and Subramanian Ramamoorthy. Bayesian Policy Reuse. Machine Learning, 104(1):99–127, 2016.
|
| 178 |
+
|
| 179 |
+
Steindor Sæmundsson, Katja Hofmann, and Marc Peter Deisenroth. Meta Reinforcement Learning ´ with Latent Variable Gaussian Processes. In Conference on Uncertainty in Artificial Intelligence, 2018.
|
| 180 |
+
|
| 181 |
+
Gerrit Schoettler, Ashvin Nair, Jianlan Luo, Shikhar Bahl, Juan Aparicio Ojea, Eugen Solowjow, and Sergey Levine. Deep reinforcement learning for industrial insertion tasks with visual inputs and natural reward signals. 2019.
|
| 182 |
+
|
| 183 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal Policy Optimization Algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 184 |
+
|
| 185 |
+
Tom Silver, Kelsey Allen, Josh Tenenbaum, and Leslie Kaelbling. Residual Policy Learning. arXiv preprint arXiv:1812.06298, 2018.
|
| 186 |
+
|
| 187 |
+
Jinhua Song, Yang Gao, Hao Wang, and Bo An. Measuring the Distance Between Finite Markov Decision Processes. In International Conference on Autonomous Agents and Multiagent Systems, pp. 468–476, 2016.
|
| 188 |
+
|
| 189 |
+
Richard S. Sutton and Andrew G. Barto. Introduction to Reinforcement Learning. MIT Press, 1st edition, 1998.
|
| 190 |
+
|
| 191 |
+
Richard S Sutton, Doina Precup, and Satinder Singh. Between MDPs and Semi-MDPs: A Framework for Temporal Abstraction in Reinforcement Learning. Artificial intelligence, 112(1-2):181– 211, 1999.
|
| 192 |
+
|
| 193 |
+
Jie Tan, Tingnan Zhang, Erwin Coumans, Atil Iscen, Yunfei Bai, Danijar Hafner, Steven Bohez, and Vincent Vanhoucke. Sim-to-real: Learning agile locomotion for quadruped robots. In Robotics: Science and Systems, 2018.
|
| 194 |
+
|
| 195 |
+
Ole Tange. GNU Parallel 2018. Ole Tange, 2018. URL https://doi.org/10.5281/ zenodo.1146014.
|
| 196 |
+
|
| 197 |
+
Matthew E. Taylor and Peter Stone. Transfer Learning for Reinforcement Learning Domains: A Survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009.
|
| 198 |
+
|
| 199 |
+
Andrea Tirinzoni, Andrea Sessa, Matteo Pirotta, and Marcello Restelli. Importance Weighted Transfer of Samples in Reinforcement Learning. In International Conference on Machine Learning, pp. 4936–4945, 2018.
|
| 200 |
+
|
| 201 |
+
Joaquin Vanschoren. Meta-Learning: A Survey. arXiv preprint arXiv:1810.03548, 2018.
|
| 202 |
+
|
| 203 |
+
Hao Wang, Shaokang Dong, and Ling Shao. Measuring Structural Similarities in Finite MDPs. In International Joint Conference on Artificial Intelligence, pp. 3684–3690, 2019.
|
| 204 |
+
|
| 205 |
+
Wenhao Yu, C. Karen Liu, and Greg Turk. Policy Transfer with Strategy Optimization. In International Conference on Learning Representations, 2019.
|
| 206 |
+
|
| 207 |
+
Juanjuan Zhang, Pieter Fiers, Kirby A Witte, Rachel W Jackson, Katherine L Poggensee, Christopher G Atkeson, and Steven H Collins. Human-in-the-loop optimization of exoskeleton assistance during walking. Science, 356(6344):1280–1284, 2017.
|
| 208 |
+
|
| 209 |
+
Yan Zheng, Zhaopeng Meng, Jianye Hao, Zongzhang Zhang, Tianpei Yang, and Changjie Fan. A Deep Bayesian Policy Reuse Approach against Non-Stationary Agents. In Advances in Neural Information Processing Systems, pp. 954–964, 2018.
|
| 210 |
+
|
| 211 |
+
# A APPENDIX: FURTHER EXPERIMENTAL DETAILS
|
| 212 |
+
|
| 213 |
+
In this section, we present all the experimental details for the six environments we used. Note that we did not do any hyperparameter-tuning but followed the default parameters of Hill et al. (2018). We used the Roboschool implementation of Hopper, Ant, and InvertedPendulumSwingup since they are based on an open-source engine, which makes it possible for every researcher to reproduce our experiments. To run our experiments in parallel, we used GNU Parallel tool (Tange, 2018).
|
| 214 |
+
|
| 215 |
+
# A.1 HYPERPARAMETERS
|
| 216 |
+
|
| 217 |
+
Tables 5 and 6 summarize all the hyperparameters used for experiments on each environment. As done by Hill et al. (2018), to have a successful training, rewards and input observations are normalized using their running average and standard deviation for all the environments except CartPole and LunarLander. Also, in all of the experiments, $\theta _ { \mathrm { a g g } }$ is initialized to be the all-ones matrix.
|
| 218 |
+
|
| 219 |
+
Table 5: Hyperparameters for Acrobot, CartPole, Hopper, Ant and InvertedPendulumSwingup.
|
| 220 |
+
|
| 221 |
+
<table><tr><td>PPO Parameters</td><td>Acrobot</td><td>CartPole</td><td>Hopper</td><td>Ant</td><td>InvertedPendulumSwingup</td></tr><tr><td>#Training samples</td><td>200K</td><td>100K</td><td>2M</td><td>2M</td><td>2M</td></tr><tr><td>#Updates per rollout</td><td>4</td><td>20</td><td>10</td><td>10</td><td>10</td></tr><tr><td>Learning rate</td><td>2.5e-4</td><td>1e-3</td><td>2.5e-4</td><td>2.5e-4</td><td>2.5e-4</td></tr><tr><td>Mini batch size</td><td>8</td><td>1</td><td>128</td><td>32</td><td>32</td></tr><tr><td>Discount factor</td><td>0.99</td><td>0.98</td><td>0.99</td><td>0.99</td><td>0.99</td></tr><tr><td>GAE 入</td><td>0.94</td><td>0.8</td><td>0.95</td><td>0.95</td><td>0.95</td></tr><tr><td>Clip ratio</td><td>0.2</td><td>0.2</td><td>0.2</td><td>0.2</td><td>0.2</td></tr><tr><td>Value function coefficient</td><td>0.5</td><td>0.5</td><td>0.5</td><td>0.5</td><td>0.5</td></tr><tr><td>Entropy coefficient</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>Gradient clipping value</td><td>0.5</td><td>0.5</td><td>0.5</td><td>0.5</td><td>0.5</td></tr><tr><td>Optimizer</td><td>Adam</td><td>Adam</td><td>Adam</td><td>Adam</td><td>Adam</td></tr><tr><td colspan="6">MLP& Faux Parameters</td></tr><tr><td>Hidden layers</td><td>64-64</td><td>64-64</td><td>64-64</td><td>16</td><td>64-64</td></tr><tr><td>Activation functions</td><td>tanh</td><td>tanh</td><td>tanh</td><td>tanh</td><td>tanh</td></tr></table>
|
| 222 |
+
|
| 223 |
+
Table 6: Hyperparameters for LunarLander.
|
| 224 |
+
|
| 225 |
+
<table><tr><td>SAC Parameters</td><td>LunarLander</td></tr><tr><td>#Training samples</td><td>500K</td></tr><tr><td>#Steps before learning starts</td><td>1K</td></tr><tr><td>Buffer size</td><td>50K</td></tr><tr><td>Learning rate</td><td>3e-4</td></tr><tr><td>Mini batch size</td><td>256</td></tr><tr><td>Discount factor</td><td>0.99</td></tr><tr><td>Soft update coefficient T</td><td>5e-3</td></tr><tr><td>Entropy coefficient</td><td>learned automatically</td></tr><tr><td>Model training frequency</td><td>1</td></tr><tr><td>Target network training frequency</td><td>1</td></tr><tr><td>#Gradient updates after each step</td><td>1</td></tr><tr><td>Probability of taking a random action</td><td>0</td></tr><tr><td>Action noise</td><td>none</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td colspan="2">MLP& Faux Parameters</td></tr><tr><td>Hidden layers</td><td>64-64</td></tr><tr><td>Activation functions</td><td>relu</td></tr></table>
|
| 226 |
+
|
| 227 |
+
# A.2 SAMPLING RANGE OF THE ENVIRONMENTAL PARAMETERS
|
| 228 |
+
|
| 229 |
+
Sampling ranges for dynamics and kinematics of each environment are provided in Tables 7, 8, 9, 10, 11 and 12. We defined these sampling ranges such that the resulting environments are stable enough for successfully training an MLP policy. To do so, we trained MLP policies across wide ranges of environmental parameters and chose the ranges in which the policy converged.
|
| 230 |
+
|
| 231 |
+
Table 7: Sampling range for Ant kinematic and dynamic parameters.
|
| 232 |
+
|
| 233 |
+
<table><tr><td></td><td>Kinematics</td></tr><tr><td>Links</td><td>Length Range</td></tr><tr><td>Legs</td><td>[0.4,1.4] × default length</td></tr><tr><td></td><td>Dynamics</td></tr><tr><td>Damping</td><td>[0.1, 5]</td></tr><tr><td>Friction</td><td>[0.4, 2.5]</td></tr><tr><td>Armature</td><td>[0.25,3]</td></tr><tr><td>Links mass</td><td>[0.7,1.1] × default mass</td></tr></table>
|
| 234 |
+
|
| 235 |
+
Table 9: Sampling range for Hopper kinematic and dynamic parameters.
|
| 236 |
+
|
| 237 |
+
<table><tr><td colspan="2">Kinematics</td></tr><tr><td>Links</td><td>Length Range (m)</td></tr><tr><td>Leg</td><td>[0.35, 0.65]</td></tr><tr><td>Foot</td><td>[0.29, 0.49]</td></tr><tr><td>Thigh</td><td>[0.35,0.55]</td></tr><tr><td>Torso</td><td>[0.3,0.5]</td></tr><tr><td></td><td>Dynamics</td></tr><tr><td>Damping Friction</td><td>[0.5,4]</td></tr><tr><td></td><td>[0.5,2]</td></tr><tr><td>Armature</td><td>[0.5,2]</td></tr><tr><td>Links mass</td><td>[0.7,1.1] × default mass</td></tr></table>
|
| 238 |
+
|
| 239 |
+
Table 11: Sampling range for Acrobot kinematic and dynamic parameters.
|
| 240 |
+
|
| 241 |
+
<table><tr><td>Kinematics</td></tr><tr><td>Links Length Range (m)</td></tr><tr><td>Link 1&2 [0.3, 1.3]</td></tr><tr><td>Dynamics</td></tr><tr><td>Links mass [0.5, 1.5]</td></tr><tr><td>Links center mass [0.05, 0.95] × link length</td></tr><tr><td>Links inertia moments [0.25, 1.5]</td></tr></table>
|
| 242 |
+
|
| 243 |
+
Table 8: Sampling range for CartPole kinematic and dynamic parameters.
|
| 244 |
+
|
| 245 |
+
<table><tr><td></td><td>Kinematics</td></tr><tr><td>Links</td><td>Length Range (m)</td></tr><tr><td>Pole</td><td>[0.1, 3]</td></tr><tr><td></td><td>Dynamics</td></tr><tr><td>Force</td><td>[6,13]</td></tr><tr><td>Gravity</td><td>[-14, -6]</td></tr><tr><td>Poll mass</td><td>[0.1, 3]</td></tr><tr><td>Cart mass</td><td>[0.3,4]</td></tr></table>
|
| 246 |
+
|
| 247 |
+
Table 10: Sampling range for InvertedPendulumSwingup kinematic and dynamic parameters.
|
| 248 |
+
|
| 249 |
+
<table><tr><td></td><td>Kinematics</td></tr><tr><td>Links</td><td>Length Range (m)</td></tr><tr><td>Pole</td><td>[0.2, 2]</td></tr><tr><td></td><td>Dynamics</td></tr><tr><td>Damping Friction</td><td>[0.1, 5]</td></tr><tr><td>Armature</td><td>[0.5,2] [0.5, 3]</td></tr><tr><td>Gravity</td><td>[-11, -7]</td></tr><tr><td>Links mass</td><td>[0.4,3] × default mass</td></tr></table>
|
| 250 |
+
|
| 251 |
+
Table 12: Sampling range for LunarLander kinematic and dynamic parameters.
|
| 252 |
+
|
| 253 |
+
<table><tr><td></td><td>Kinematics</td></tr><tr><td>Side engine height</td><td>[10,20]</td></tr><tr><td></td><td>Dynamics</td></tr><tr><td>Scale</td><td>[25,50]</td></tr><tr><td>Initial Random</td><td>[500,1500]</td></tr><tr><td>Main engine power</td><td>[10,40]</td></tr><tr><td>Side engine power</td><td>[0.5,2]</td></tr><tr><td>Side engine away</td><td>[8,18]</td></tr></table>
|
| 254 |
+
|
| 255 |
+
# A.3 EVALUATION METHOD
|
| 256 |
+
|
| 257 |
+
In this section, we explain how we calculated the mean of average episodic rewards in Tables 1, 2, 3, and 4, over a specific number of training samples (the numbers at the header of the tables e.g., 25K, 50K, 75K, and 100K for the CartPole) which we denote by $T$ in what follows. For each experiment in an environment instance, we computed the average episodic reward by taking the average of the rewards over all the episodes the agent played from the beginning of the training until collecting $T$ number of training samples. Then we collected the computed average episodic rewards of all the experiments, i.e., all the combinations of three random seeds, three random sets of source policies (for RPL and MULTIPOLAR), and 100 target environment instances. Finally, we used the sample bootstrap method (Efron & Tibshirani, 1993) to estimate the mean and the $9 5 \%$ confidence bounds of the collected average episodic rewards. We used the Facebook Boostrapped implementation: https://github.com/facebookincubator/bootstrapped.
|
| 258 |
+
|
| 259 |
+
# A.4 SOURCE POLICIES HISTOGRAMS
|
| 260 |
+
|
| 261 |
+
To generate environment instances, we uniformly sampled the dynamics and kinematics parameters from the ranges defined in Section A.2. Figure 5 illustrates the histograms of the final episodic rewards of source policies on the original environment instances in which they were acquired.
|
| 262 |
+
|
| 263 |
+

|
| 264 |
+
Figure 5: Histogram of final episodic rewards obtained by source policies per environment.
|
| 265 |
+
|
| 266 |
+
# B APPENDIX: ADDITIONAL RESULTS
|
| 267 |
+
|
| 268 |
+
# B.1 LEARNED AGGREGATION PARAMETERS VISUALIZATION
|
| 269 |
+
|
| 270 |
+
Figure 6 visualizes an example of how the aggregation parameters $\theta _ { \mathrm { a g g } }$ for the four policies and their three actions were learned during the 2M timestep training of MULTIPOLAR $K = 4$ ) policy in the Hopper environment. In this example, the source policies in the first and second rows were sampled from low-performance pools whereas those in the third and fourth rows were sampled from high-performance pools (see Section 4.2 for more details). It illustrates that MULTIPOLAR can successfully suppress the two useless low-performing policies as the training progresses.
|
| 271 |
+
|
| 272 |
+

|
| 273 |
+
Figure 6: Aggregation parameters $\theta _ { \mathrm { a g g } }$ during the training of MULTIPOLAR $K = 4$ ) in the Hopper that has 3-dimensional actions. Here, the first two source policies are low-performing and the last two are high-performing in their original environment instance.
|
| 274 |
+
|
| 275 |
+
# B.2 MULTIPOLAR WITH RANDOMLY INITIALIZED POLICIES
|
| 276 |
+
|
| 277 |
+
To further study how having low-performing source policies affects MULTIPOLAR sample efficiency, we evaluated MULTIPOLAR $\scriptstyle ( \mathrm { K } = 4 )$ in the Hopper environment, where the sources are randomly initialized policies, i.e., policies that predict actions randomly. Following our experimental procedure explained in Section 4.1, Table 13 reports the bootstrap mean and $9 5 \%$ confidence bounds of average episodic rewards over various training samples for this experiment and compares it with MULTIPOLAR with four low-performing sources. This result suggests that the sample efficiency of MULTIPOLAR $K = 4$ ) with low-performing source policies (i.e., source policies which had low final episodic rewards in their own environments) is almost the same as with randomly initialized source policies.
|
| 278 |
+
|
| 279 |
+
Table 13: Results for MULTIPOLAR with low-performing source policies vs. with randomly initialized source policies in Hopper.
|
| 280 |
+
|
| 281 |
+
<table><tr><td>MULTIPOLAR (K=4)</td><td>0.5M</td><td>1M</td><td>1.5M</td><td>2M</td></tr><tr><td>4 randomly initialized</td><td>27 (26,28)</td><td>47 (45,49)</td><td>73 (70,76)</td><td>101 (96,106)</td></tr><tr><td>4 low performance [Table 3]</td><td>27 (26,27)</td><td>45 (44,47)</td><td>68 (66,71)</td><td>92 (88,95)</td></tr></table>
|
| 282 |
+
|
| 283 |
+
# B.3 INDIVIDUAL AVERAGE LEARNING CURVES
|
| 284 |
+
|
| 285 |
+
As an example, we visualized the individual average learning curve of policies for each of the environment instances of the Roboschool environments. Figures 7, 8 and 9 compare the individual average learning curves of MULTIPOLAR to the baseline policies in the 100 target environment instances.
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
|
| 289 |
+

|
| 290 |
+
Figure 7: Average learning curves of MULTIPOLAR with $K = 4$ in red, RPL in green and MLP in blue over 3 random seeds and 3 random source policy sets for all the 100 target environment instances of Hopper.
|
| 291 |
+
|
| 292 |
+

|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
Figure 8: Average learning curves of MULTIPOLAR with $K = 4$ in red, RPL in green and MLP in blue over 3 random seeds and 3 random source policy sets for all the 100 target environment instances of Ant.
|
| 296 |
+
|
| 297 |
+

|
| 298 |
+
|
| 299 |
+

|
| 300 |
+
Figure 9: Average learning curves of MULTIPOLAR with $K = 4$ in red, RPL in green and MLP in blue over 3 random seeds and 3 random source policy sets for all the 100 target environment instances of InvertedPendulumSwingup.
|
md/train/Eql5b1_hTE4/Eql5b1_hTE4.md
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ROBUST EARLY-LEARNING: HINDERING THE MEMORIZATION OF NOISY LABELS
|
| 2 |
+
|
| 3 |
+
Xiaobo Xia1 Tongliang $\mathbf { L i u ^ { 1 } } ^ { \cdot }$ † Bo Han2
|
| 4 |
+
Chen Gong3 Nannan Wang4 Zongyuan $\mathbf { G e ^ { 5 , 6 } }$ Yi Chang7
|
| 5 |
+
1Trustworthy Machine Learning Lab, School of Computer Science, The University of Sydney
|
| 6 |
+
2Department of Computer Science, Hong Kong Baptist University
|
| 7 |
+
3School of Computer Science and Engineering, Nanjing University of Science and Technology
|
| 8 |
+
4ISN State Key Laboratory, School of Telecommunications Engineering, Xidian University
|
| 9 |
+
5Medical AI Group, Faculty of Engineering, Monash University
|
| 10 |
+
6Airdoc Research, Monash University
|
| 11 |
+
7School of Artificial Intelligence, Jilin University
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
The memorization effects of deep networks show that they will first memorize training data with clean labels and then those with noisy labels. The early stopping method therefore can be exploited for learning with noisy labels. However, the side effect brought by noisy labels will influence the memorization of clean labels before early stopping. In this paper, motivated by the lottery ticket hypothesis which shows that only partial parameters are important for generalization, we find that only partial parameters are important for fitting clean labels and generalize well, which we term as critical parameters; while the other parameters tend to fit noisy labels and cannot generalize well, which we term as non-critical parameters. Based on this, we propose robust early-learning to reduce the side effect of noisy labels before early stopping and thus enhance the memorization of clean labels. Specifically, in each iteration, we divide all parameters into the critical and non-critical ones, and then perform different update rules for different types of parameters. Extensive experiments on benchmark-simulated and real-world label-noise datasets demonstrate the superiority of the proposed method over the state-of-the-art label-noise learning methods.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Deep neural networks have achieved a remarkable success in various tasks, such as image classification (He et al., 2015), object detection (Ren et al., 2015), speech recognition (Graves et al., 2013), and machine translation (Wu et al., 2016). However, the success is largely attributed to large amounts of data with high-quality annotations, which is expensive or even infeasible in practice (Han et al., 2018a; Li et al., 2020a; Wu et al., 2020). On the other hand, many large-scale datasets are collected from image search engines or web crawlers, which inevitably involves noisy labels (Xiao et al., 2015; Li et al., 2017a; Zhu et al., 2021). As deep networks have large learning capacities and strong memorization power, they will ultimately overfit noisy labels, leading to poor generalization performance (Jiang et al., 2018; Nguyen et al., 2020). General regularization techniques such as dropout and weight decay cannot address this issue well (Zhang et al., 2017).
|
| 20 |
+
|
| 21 |
+
Fortunately, even though deep networks will fit all the labels eventually, they first fit data with clean labels, which helps generalization (Arpit et al., 2017; Han et al., 2018b; Yu et al., 2019; Liu et al., 2020). Thus, the early stopping method can be used to reduce overfitting to the noisy labels (Rolnick et al., 2017; Li et al., 2020b; Hu et al., 2020). However, the existence of noisy labels will still adversely affect the memorization of clean labels even in the early training stage. This will hurt generalization (Han et al., 2020). Intuitively, if we can reduce the side effect of noisy labels before early stopping, the generalization and robustness of the networks can be improved.
|
| 22 |
+
|
| 23 |
+
Note that over-parameterization of deep networks is one of the main reasons for overfitting to noisy labels (Zhang et al., 2017; Yao et al., 2020a). The lottery ticket hypothesis (Frankle & Carbin, 2018) shows that only partial parameters are important for generalization. The deep networks with these important parameters can generalize well, or even better by avoid overfitting. Motivated by this, for learning with noisy labels, it remains a question if we can divide the parameters into two parts to reduce the side effect brought by noisy labels, which enhances the memorization of clean labels and further improves the generalization performance of the deep networks.
|
| 24 |
+
|
| 25 |
+
In this paper, we present a novel and effective method to find which parameters are important for fitting data with clean labels, and which parameters tend to fit data with noisy labels. We term the former as critical parameters, and the latter as non-critical parameters. Then on this basis, we proposed robust early-learning to reduce the side effect of noisy labels before early stopping. Specifically, in each iteration during training, we first categorize all parameters into two parts, i.e., the critical parameters and the non-critical parameters. Then we designed different update rules for different types of parameters. For the critical ones, we perform robust positive update. This part of the parameters are updated using the gradients derived from the objective function and weight decay. For the non-critical ones, we perform negative update. Their values are penalized with the weight decay, and without the gradients derived from the objective function. Note that the gradients for updating are based on the loss between the prediction of deep networks and given labels. For the critical ones, they tend to fit data with clean (correct) labels to help generalization. Their gradients can therefore be exploited to update parameters. However, for the non-critical ones, they tend to fit data with noisy (incorrect) labels, which hurts generalization. Their gradients will misguide the deep networks to overfit data with noisy labels. Thus, we only use a regularization item, i.e., the weight decay, to update them. The weight decay will penalize their values to be zero, which means that they are penalized to be deactivated, and not to contribute to the generalization of deep networks. In this way, we can reduce the side effect of noisy labels and enhance the memorization of clean labels. In summary, the main contributions of this work are as follows:
|
| 26 |
+
|
| 27 |
+
• We propose a novel and effective method which can categorize the parameters into two parts according to whether they are important to fit data with clean labels.
|
| 28 |
+
• Different update rules have been designed for different types of the parameters to reduce the side effect of noisy labels before early stopping.
|
| 29 |
+
• We experimentally validate the proposed method on both synthetic noisy datasets and real-world noisy datasets, on which it achieves superior robustness compared with the state-of-the-art methods for learning with noisy labels.
|
| 30 |
+
|
| 31 |
+
Related Work. Early stopping is quite simple but effective in practice. It was used in supervised learning early (Prechelt, 1998; Caruana et al., 2001; Zhang et al., 2005; Yao et al., 2007). With the help of a validation set, training is then stopped before convergence to avoid the overfitting. While learning with noisy labels, the networks fit the data with clean labels before starting to overfit the data with noisy labels (Arpit et al., 2017). Early stopping is then formally proved to be valid for relieving overfitting to noisy labels (Rolnick et al., 2017; Li et al., 2020b). It has also been widely used in existing methods to improve robustness and generalization (Yu et al., 2018b; Xu et al., 2019; Yao et al., 2020b; Cheng et al., 2021).
|
| 32 |
+
|
| 33 |
+
The lottery ticket hypothesis (Frankle & Carbin, 2018) shows that deep networks are likely to be over-parameterized, and only partial parameters are important for generalization. With this part of the parameters, the small and sparsified networks can be trained to generalize well. While this work is motivated by the lottery ticket hypotheis, this work is fundamentally different from it. The lottery ticket hypothesis focuses on network compression. It aims to find a sparsified sub-network which has competitive generalization performance compared with the original network. This paper focuses on learning with noisy labels. We want to find the critical/non-critical parameters to reduce the side effect of noisy labels, which greatly improves the generalization performance.
|
| 34 |
+
|
| 35 |
+
Lots of work proposed various methods for training with noisy labels, such as exploiting a noise transition matrix (Liu & Tao, 2016; Hendrycks et al., 2018; Xia et al., 2020a; Li et al., 2021), using graph models (Xiao et al., 2015; Li et al., 2017b), using surrogate loss functions (Zhang & Sabuncu, 2018; Wang et al., 2019; Ma et al., 2020), meta-learning (Ren et al., 2018; Shu et al., 2020), and employing the small loss trick (Jiang et al., 2018; Han et al., 2018b; Yu et al., 2019). Some methods among them employ early stopping explicitly or implicitly (Patrini et al., 2017; Xia et al., 2019). We also use early stopping in this paper. We are the first to hinder the memorization of noisy labels with analyzing the criticality of parameters.
|
| 36 |
+
|
| 37 |
+
Organization. The rest of the paper is organized as follows. In Section 2, we setup the problem and introduce the neural network optimization method. In Section 3, we discuss how to find the critical parameters and perform different update rules. In Section 4, we provide empirical evaluations of the proposed learning algorithm. Finally, Section 5 concludes the paper.
|
| 38 |
+
|
| 39 |
+
# 2 PRELIMINARIES
|
| 40 |
+
|
| 41 |
+
Notation. Vectors and matrices are denoted by bold-faced letters. The standard inner product between two vectors is denoted by $\langle \cdot , \cdot \rangle$ . We use $\| \cdot \| _ { p }$ as the $\ell _ { p }$ norm of vectors or matrices. For a function $f$ , we use $\nabla f$ to denote its gradient. Let $[ \boldsymbol { \mathrm { n } } ] = \mathbf { \bar { \{ } } 1 , 2 , \dots , n \}$ .
|
| 42 |
+
|
| 43 |
+
Problem Setup. Consider a classification task, there are $c$ classes. Let $\mathcal { X }$ and $\mathcal { V }$ be the feature and label spaces respectively, where $\boldsymbol { \mathcal { X } } \in \mathbb { R } ^ { d }$ with $d$ being the dimensionality, and $\mathcal { V } = [ c ]$ . The joint probability distribution over $\mathcal { X } \times \mathcal { V }$ is denoted by $D$ . Let ${ \cal S } = \{ ( { \bf x } _ { i } , { \bf y } _ { i } ) \} _ { i = 1 } ^ { n }$ be an i.i.d. sample drawn from $D$ , where $n$ denotes the sample size. In traditional supervised learning, by employing $S$ , the aim is to learn a classifier that can assign labels precisely for given instances. While learning with noisy labels, we are given a sample with noisy labels $\widetilde { S } = \{ ( \mathbf { x } _ { i } , \widetilde { \mathbf { y } } _ { i } ) \} _ { i = 1 } ^ { n }$ , which is drawn from a corrupted joint probability distribution $\widetilde { D }$ rather than $D$ . Here, $\widetilde { \mathrm { y } }$ is the possibly corrupted label of the eunderlying clean label y. The aim is changed to learn a robust classifier that could assign clean labels to test data by only exploiting a training sample with noisy labels.
|
| 44 |
+
|
| 45 |
+
# 2.1 NEURAL NETWORK OPTIMIZATION METHOD
|
| 46 |
+
|
| 47 |
+
The optimization method is essential for training neural networks. Stochastic gradient descent (SGD) is the most popular one nowadays among the optimization methods (Allen-Zhu et al., 2019; Cao & Gu, 2019; Zou et al., 2020). Our proposed method is directly related to SGD. We analyze the optimization problem of typical supervised learning with clean labels as knowledge background. Consider a classifier to be trained, let $\mathcal { W } \in \mathbb { R } ^ { m }$ be all the parameters, where $m$ is the total number of the parameters. Let $L : \mathbb { R } ^ { c } \times \mathcal { Y } \mathbb { R } _ { + }$ be the surrogate loss function, e.g., cross entropy loss. With a regularization item, e.g., $\ell _ { 1 }$ regularizer, optimization method would involve minimizing an objective function as:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\operatorname* { m i n } L ( \mathcal { W } ; S ) = \operatorname* { m i n } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } L ( \mathcal { W } ; ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) ) + \lambda \| \mathcal { W } \| _ { 1 } ,
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $\lambda \in \mathbb { R } _ { + }$ is a regularization parameter. The update rules of the parameters $\mathcal { W }$ can be represented by the following formula:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\mathcal { W } ( k + 1 ) \mathcal { W } ( k ) - \eta ( \frac { \partial L ( \mathcal { W } ( k ) ; S ^ { \star } ) } { \partial \mathcal { W } ( k ) } + \lambda \mathrm { s g n } ( \mathcal { W } ( k ) ) ) ,
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $\eta > 0$ is the learning rate, $\mathcal { W } ( k )$ is the set of the parameters at the $k$ -th iteration, $\operatorname { s g n } ( { \mathord { \cdot } } )$ is the standard sgn function in mathematics, and $S ^ { \star }$ is a subset randomly sampled from $S$ . With SGD, the regularization parameter $\lambda$ is equivalent to the weight decay coefficient in the training process (Loshchilov & Hutter, 2019).
|
| 60 |
+
|
| 61 |
+
# 3 METHODOLOGY
|
| 62 |
+
|
| 63 |
+
In this section, we first introduce an alternative interpretation for the optimality criterion (Section 3.1). Then, we present how to determine the critical/non-critical parameters by exploiting this interpretation during training and the memorization effect of deep neural networks (Section 3.2). Finally, different update rules are proposed for different types of parameters to cope with noisy labels (Section 3.3).
|
| 64 |
+
|
| 65 |
+
# 3.1 OPTIMALITY CRITERION
|
| 66 |
+
|
| 67 |
+
For the optimization of the objective function $L ( \mathcal { W } ; S )$ , the optimality will be achieved at $\mathcal { W }$ when $\nabla L ( \mathcal { W } ; S ) = \mathbf { 0 }$ (Boyd et al., 2004; Bubeck, 2014). However, modern neural networks are complex and over-parameterized, which makes $\nabla L ( \boldsymbol { \mathcal { W } } ; S )$ extremely high-dimensional. It is unintuitive for us to analyze high-dimensional vectors. The optimality is hard to be effectively judged. To address this issue, we will use a more intuitive interpretation for optimality criterion in this paper, which can associate the optimization with a scalar. Specifically, if we let $G ( t ) ~ = ~ L ( t { \bar { \mathcal { W } } } ; { \overline { { S } } } )$ ,
|
| 68 |
+
|
| 69 |
+
$G ^ { \prime } ( t ) = \nabla L ( t \mathcal { W } ; S ) ^ { \top } \mathcal { W }$ . Let $t = 1$ , then $G ^ { \prime } ( 1 ) = \nabla L ( \mathcal { W } ; S ) ^ { \top } \mathcal { W } = \langle \nabla L ( \mathcal { W } ; S ) , \mathcal { W } \rangle$ . We know that the optimality can be reached when $\nabla L ( \mathcal { W } ; S ) = \mathbf { 0 }$ , then $G ^ { \prime } ( 1 ) = 0$ . In this way, the optimality can be checked by exploiting the scalar $G ^ { \prime } ( 1 )$ . Note that the new optimality criterion is sufficient, but is not necessary. In this paper, we focus on learning with noisy labels, and the necessity of the new optimality criterion does not affect the effectiveness of the proposed method. We will discuss this carefully in the next subsection.
|
| 70 |
+
|
| 71 |
+
# 3.2 JUDGING THE IMPORTANCE OF NETWORK PARAMETERS
|
| 72 |
+
|
| 73 |
+
We have shown that the optimization of the objective function can be related to a scalar $G ^ { \prime } ( 1 )$ . Its value is equal to the inner product between the value of the parameters and the gradient w.r.t. the parameters. To achieve the optimality, we need to push the value of $G ^ { \prime } ( 1 )$ to be zero. Thus, we can judge the importance of each parameter through its influence on the value of $G ^ { \prime } ( 1 )$ . Note that the memorization effects of deep networks show they first memorize the data with clean labels. The parameters that contribute to the optmiality at the early stage are therefore important for clean labels. Consider a parameter, denoted by $\mathrm { w } _ { i } \in \mathcal { W }$ , its gradient is $\nabla L ( \mathrm { w } _ { i } ; S )$ . The judgement criteria is denoted by $g _ { i }$ , i.e.,
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
g _ { i } = \lvert \nabla L ( \mathrm { w } _ { i } ; S ) \times \mathrm { w } _ { i } \rvert , i \in [ m ] .
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
If the value of $g _ { i }$ is large, $\mathrm { w } _ { i }$ is viewed as a critical parameter, as $g _ { i }$ has a great influence on the value of $G ^ { \prime } ( 1 )$ . On the contrary, if the value of $g _ { i }$ is small, e.g., zero or very close to zero, $\mathrm { w } _ { i }$ is regarded to be a non-critical parameter. It is not important for fitting clean labels. If we update it, it will tend to fit noisy labels.
|
| 80 |
+
|
| 81 |
+
The underlying issue of directly using the gradient of $L ( \mathbb { w } _ { i } ; S )$ as a criterion for the criticality can be identified. When we only exploit gradient information, we ignore the value of the parameter $\mathrm { w } _ { i }$ However, if the value is zero or close to zero, the parameter is inactivated. It is also non-critical for optimality (Han et al., 2015; Frankle & Carbin, 2018; Lee et al., 2019). Note that we use early stopping in this paper. The deep networks mainly fit clean labels in the early training. Thus, even with the existence of noisy labels, we can use the criterion to analyze the criticality of the parameters.
|
| 82 |
+
|
| 83 |
+
It should be noted when $g _ { i } = 0$ , there will be three possible scenarios: (1) only $\nabla L ( \mathbf { w } _ { i } ; S ) = 0$ ; (2) only $\mathrm { w } _ { \mathrm { i } } = 0$ ; (3) both $\nabla L ( \mathbf { w } _ { i } ; S ) = 0$ and $\mathrm { w } _ { i } = 0$ . In all three cases, we can judge the importance of parameter $\mathrm { w } _ { i }$ using $g _ { i }$ as analyzed. In other words, when $g _ { i } = 0$ , we allow that the value of $\nabla L ( \mathrm { w } _ { i } ; S )$ is not zero, i.e., the new optimality criterion is not necessary, which does not influence the effectiveness of the proposed method.
|
| 84 |
+
|
| 85 |
+
# 3.3 COMBATING NOISY LABELS WITH DIFFERENT UPDATE RULES
|
| 86 |
+
|
| 87 |
+
We have presented how to judge the importance of the parameters, and then divide them into the critical ones and non-critical ones. We exploit the label noise rate to help divide the parameters into the critical/non-critical ones. Intuitively, if the noise rate is high, the number of clean labels is small. The number of required critical parameters for memorizing clean labels is then small. The number of the critical parameters has a negative correlation with noise rate. We therefore use the noise rate to help identify the critical parameters. We use $\tau$ to denote the noise rate. If $\tau$ is not known in advanced, it can be easily inferred (Liu & Tao, 2016; Yu et al., 2018a). We show that the proposed method is insensitive to the estimation result of the noise rate in Section 4.4. Then, the number of the critical parameters can be defined as:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
m _ { c } = { \left( 1 - \tau \right) } m .
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
In each iteration, for each parameter $\mathrm { w } _ { i }$ , $i \in [ m ]$ . The critical and non-critical parameters are determined according to the result of numerical sorting of $g _ { i }$ , which has been explained before. The critical and non-critical parameters are denoted by $\mathcal { W } _ { c }$ and $\mathcal { W } _ { n }$ respectively. Two different update strategies are performed for two types of the parameters.
|
| 94 |
+
|
| 95 |
+
Robust positive update. For the critical ones ${ \mathcal { W } } _ { c }$ , we use the gradients derived from the objective function and weight decay. We clip the gradients to perform gradient decay in this paper. The update rule is:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathcal { W } _ { c } ( k + 1 ) \gets \mathcal { W } _ { c } ( k ) - \eta \left( ( 1 - \tau ) \frac { \partial L ( \mathcal { W } _ { c } ( k ) ; \widetilde { S } ^ { \star } ) } { \partial \mathcal { W } _ { c } ( k ) } + \lambda \mathrm { s g n } ( \mathcal { W } _ { c } ( k ) ) \right) ,
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $\smash { \widetilde { S } ^ { \star } }$ is a subset randomly sampled from $\widetilde { S }$ . Note that we directly use $\smash { \widetilde { S } ^ { \star } }$ here, rather than $S ^ { \star }$ in Eq. (2). It is because the proposed method exploits the memorization effects of deep networks.
|
| 102 |
+
|
| 103 |
+
# Algorithm 1 CDR algorithm.
|
| 104 |
+
|
| 105 |
+
1: Input: initialization parameters $\mathcal { W }$ , noisy training set $\mathcal { D } _ { t }$ , noisy validation set $\mathcal { D } _ { v }$ , learning rate $\eta$ , weight decay coefficient $\lambda$ , fixed $\tau$ , epoch $T$ and $T _ { \mathrm { m a x } }$ , iteration $N _ { \mathrm { m a x } }$ ; for $T = 1 , 2 , \dots , T _ { \mathrm { m a x } }$ do
|
| 106 |
+
2: Shuffle training set $\mathcal { D } _ { t }$ ; for $N = 1 , \dots , N _ { \mathrm { m a x } }$ do
|
| 107 |
+
3: Fetch mini-batch $\bar { \mathcal { D } } _ { t }$ from $\mathcal { D } _ { t }$ ;
|
| 108 |
+
4: Divide $\mathcal { W }$ into $\mathcal { W } _ { c }$ and $\mathcal { W } _ { n }$ with Eq. (3) and Eq. (4); //define the types of the parameters;
|
| 109 |
+
5: Update $\mathcal { W } _ { c }$ with Eq. (5); //update ${ \mathcal { W } } _ { c }$ using the robust positive update;
|
| 110 |
+
6: Update $\mathcal { W } _ { n }$ with Eq. (6); //update $\mathcal { W } _ { n }$ using the negative update; end end //Early stopping criterion: if the minimum classification error is achieved with $\mathcal { W }$ on $\mathcal { D } _ { v }$
|
| 111 |
+
8: Output: parameters $\mathcal { W }$ after update.
|
| 112 |
+
|
| 113 |
+
Though we have only noisy training data, deep networks will first memorize training data with clean labels. As can be seen in Eq. (5), the gradient decay coefficient is set to $1 - \tau$ , which can prevent over-confident descent steps in the training process.
|
| 114 |
+
|
| 115 |
+
Negative update. For the non-critical parameters $\mathcal { W } _ { n }$ , we only use the weight decay to update them. The update rule is:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
{ \mathcal W } _ { n } ( k + 1 ) \gets { \mathcal W } _ { n } ( k ) - \eta \lambda \mathrm { s g n } ( { \mathcal W } _ { n } ( k ) ) .
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
The gradients of the objective function exploit loss between the prediction of deep networks and given labels. Robust positive update uses the gradients to update the critical ones, which helps deep networks memorize clean labels. For the non-critical ones, they tend to overfit noisy labels, their gradients are misleading for generalization. Thus, we only use the weight decay, to update them. The weight decay will penalize their values to be zero and help generalization (Arora et al., 2018). As they are deactivated, they will not contribute to the memorization or generalization. The use of two update rules makes us achieve the goal, i.e., reducing the side effect of noisy labels and thus enhance the memorization of clean labels. The overall procedure of combating noisy labels with different update rules (CDR) is summarized in Algorithm 1.
|
| 122 |
+
|
| 123 |
+
# 4 EXPERIMENTS
|
| 124 |
+
|
| 125 |
+
In this section, we first introduce the datasets used, and implementation details in the experiments (Section 4.1). We next introduce the methods used for comparison in this paper (Section 4.2). The ablation study is conducted to show that the proposed method is not sensitive to the estimation result of the noise rate (Section 4.3). Finally, we present the experimental results on synthetic and real-world noisy datasets to show the effectiveness of the proposed method (Section 4.4).
|
| 126 |
+
|
| 127 |
+
# 4.1 DATASETS AND IMPLEMENTATION DETAILS
|
| 128 |
+
|
| 129 |
+
To verify the effectiveness of the proposed method, we run experiments on the manually corrupted version of four datasets, i.e., MNIST (LeCun et al., 1998), $F$ -MNIST (Xiao et al., 2017), CIFAR-10 and CIFAR-100 (Krizhevsky & Hinton, 2009), and two real-world noisy datasets, i.e., Food-101 (Bossard et al., 2014) and WebVision (Li et al., 2017a). MNIST and $F$ -MNIST both have $2 8 \times 2 8$ gayscale images of 10 classes including 60,000 training images and 10,000 test images. CIFAR-10 and CIFAR-100 both have $3 2 \times 3 2 \times 3$ color images including 50,000 training images and 10,000 test images. CIFAR-10 has 10 classes while CIFAR-100 has 100 classes. Food-101 consists of 101 food categories, with 101,000 images. For each class, 250 manually reviewed clean test images are provided as well as 750 training images with real-world label noise. WebVision contains 2.4 million images crawled from the websites using the 1,000 concepts in ImageNet ILSVRC12 (Deng et al., 2009). Following the “Mini” setting in (Jiang et al., 2018; Chen et al., 2019; Ma et al., 2020), we take the first 50 classes of the Google resized image subset, and evaluate the trained networks on the same 50 classes of the ILSVRC12 validation set, which is exploited as a test set. For all datasets, following prior works (Patrini et al., 2017; Wang et al., 2021b), we leave out $10 \%$ training data as a validation set, which is for early stopping.
|
| 130 |
+
|
| 131 |
+
We consider four types of synthetic label noise in this paper, i.e., symmetric noise, asymmetric noise, pairflip noise and instance-dependent noise (abbreviated as instance noise). These settings are widely used in existing works (Ma et al., 2018; Thulasidasan et al., 2019; Pleiss et al., 2020; Wang et al., 2021a). The noise rates $\tau$ are set to $20 \%$ and $40 \%$ . The details of the noise setting are described as follows:
|
| 132 |
+
|
| 133 |
+
• Symmetric noise: this kind of label noise is generated by flipping labels in each class uniformly to incorrect labels of other classes.
|
| 134 |
+
• Asymmetric noise: this kind of label noise is generated by flipping labels within a set of similar classes. In this paper, for MNIST, flipping $2 \to 7$ , $3 8$ , $5 6$ . For $F$ -MNIST, flipping TSHIRT SHIRT, PULLOVER $ \mathrm { C O A T }$ , SANDALS SNEAKER. For CIFAR-10, TRUCK AUTOMOBILE, BIRD AIRPLANE, DEER HORSE, $\mathrm { C A T } \mathrm { D O G }$ . For CIFAR-100, the 100 classes are grouped into 20 super-classes, and each has 5 sub-classes. Each class is then flipped into the next within the same super-class.
|
| 135 |
+
• Pairflip noise: the noise flips each class to its adjacent class. More explanation about this noise setting can be found in (Yu et al., 2019; Zheng et al., 2020; Lyu & Tsang, 2020).
|
| 136 |
+
• Instance noise: the noise is quite realistic, where the probability that an instance is mislabeled depends on its features. Following (Xia et al., 2020b), we generate this type of label noise to validate the effectiveness of the proposed method.
|
| 137 |
+
|
| 138 |
+
For MNIST, we train a LeNet (LeCun et al., 1998) with batch size 32. For $F$ -MNIST, we train a ResNet-50 (He et al., 2015) with batch size 32. For CIFAR-10 and CIFAR-100, we train a ResNet-50 with batch size 64, and typical data augmentations including random crop and horizontal flip are applied. For all the training, we use SGD optimizer with momentum 0.9 and weight decay is set to $\mathrm { \dot { 1 } 0 ^ { - 3 } }$ . The initial learning rate is set to $\mathrm { 1 0 ^ { - 2 } }$ . For Food-101, we use a ResNet-50 pre-trained on ImageNet with batch size 32. The initial learning rate is changed to $1 0 ^ { - 3 }$ . For WebVision, we use an Inception-ResNet v2 (Szegedy et al., 2016) with batch size 128. The initial learning rate is set to $1 0 ^ { - 1 }$ . We set 100 epochs in total for all the experiments. For fair comparison, all the codes are implemented in PyTorch 1.2.0 with CUDA 10.0, and run on NVIDIA Tesla V100 GPUs. Our implementation is available at https://github.com/xiaoboxia/CDR.
|
| 139 |
+
|
| 140 |
+
# 4.2 COMPARISON METHODS
|
| 141 |
+
|
| 142 |
+
We compare the proposed method with the following methods: (1) CE, which trains the deep neural networks with the cross entropy loss on noisy datasets. (2) GCE (Zhang & Sabuncu, 2018), which unites the mean absolute error loss and the cross entropy loss to handle noisy labels. The hyperparameter $q$ in this work is set to 0.7. (3) DMI (Xu et al., 2019), which copes with noisy labels from the perspective of information theory. (4) APL (Ma et al., 2020), which combines two mutually reinforcing robust loss functions. For this baseline, we employ its combination of NCE and RCE for a comparison. (5) MentorNet (Jiang et al., 2018), which learns a curriculum to filter out noisy data. (6) Co-teaching (Han et al., 2018b), which maintains two networks and cross-trains on the instances with small loss. (7) Co-teaching $^ +$ (Yu et al., 2019), which maintains two networks and finds small loss instances among the prediction disagreement data for training. (8) S2E (Yao et al., 2020a), which exploits automated machine learning to handle noisy labels. (9) Forward (Patrini et al., 2017), which estimates the noise transition matrix to correct the training loss. (10) T-Revision (Xia et al., 2019), which employs importance reweighting technique and introduces a slack variable to revise the noise transition matrix. (11) Joint (Tanaka et al., 2018), which jointly optimizes the network parameters and the sample labels. The hyperparameters $\alpha$ and $\beta$ are set to 1.2 and 0.8 respectively. Note that we do not compare with some state-of-the-art methods like SELF (Nguyen et al., 2020) and DivideMix (Li et al., 2020a) as baselines because of the following reasons. (1) Their proposed methods are aggregations of multiple techniques while this paper only focuses on one, therefore the comparison is not fair. (2) We are focusing on proving the concept, i.e., how to reduce the side effect of noisy labels before early stopping, but not on boosting the classification performance.
|
| 143 |
+
|
| 144 |
+
# 4.3 ABLATION STUDY
|
| 145 |
+
|
| 146 |
+
We need the noise rate to determine the number of different types of the parameters and the gradient decay coefficient as mentioned above. Compared with symmetric noise, asymmetric noise and pairflip noise, the noise rate of instance noise is hard to be estimated (Cheng et al., 2020; Xia et al., 2020b). We present that our proposed method is insensitive to the estimation result of noise rate. The experiments are conducted on CIFAR-10 and CIFAR-100 datasets with instance noise. The noise rates are set to $20 \%$ and $40 \%$ , respectively. In Figure 1, we show that how the classificaition performance of the proposed method varies with the change of the estimated noise rate. We can clearly see that the proposed method is robust to the estimation result of the noise rate.
|
| 147 |
+
|
| 148 |
+
Table 1: Mean and standard deviations of classification accuracy (percentage) on synthetic noisy datasets with different noise levels. The experimental results are reported over five trials. The best mean results are bolded.
|
| 149 |
+
|
| 150 |
+
<table><tr><td rowspan=1 colspan=12>Symmetric Asymmetric Pairflip InstanceDataset Method20% 40% 20% 40% 20% 40% 20% 40%</td></tr><tr><td rowspan=1 colspan=12>CE 98.60±0.07 98.18±0.16 99.00±0.08 98.31±0.28 98.74±0.17 94.08±0.9398.14±0.02 92.76±0.21</td></tr><tr><td rowspan=1 colspan=12>GCE 98.84±0.12 98.12±0.33 98.92±0.09 98.31±0.27 98.94±0.05 97.39±0.62 98.17±0.08 94.97±0.32DMI 98.94±0.02 98.62±0.1799.07±0.10 98.61±0.26 98.96±0.12 97.27±0.39 98.34±0.17 95.34±0.28</td></tr><tr><td rowspan=5 colspan=12>APL 98.74±0.0997.04±0.3598.90±0.0797.23±0.7398.24±0.3995.24±1.4997.03±0.2990.04±3.93MentorNet 97.21±0.1393.96±0.7698.51±0.0993.47±0.8097.25±0.3293.27±0.7395.17±0.2690.05±1.43MNIST Co-teaching 97.22±0.1894.64±0.3398.63±0.1293.62±1.2797.44±0.2694.81±0.4597.32±0.1592.45±0.59Co-teaching+ 98.11±0.0795.87±0.2798.83±0.0896.65±1.7398.81±0.1295.42±0.3398.07±0.1294.37±0.48S2E 98.93±0.3993.23±2.3799.23±0.0798.31±0.1399.10±0.0480.15±3.7898.42±0.4783.38±0.94Forward 98.10±0.1296.83±0.2898.79±0.28 97.94±0.4798.62±0.16 95.37±0.7097.87±0.2192.30±0.18</td></tr><tr><td rowspan=2 colspan=6>MentorNet 97.21±0.1393.96±0.76MNIST Co-teaching 97.22±0.1894.64±0.33Co-teaching+ 98.11±0.0795.87±0.27</td></tr><tr><td rowspan=1 colspan=1>94.64±0.33</td></tr><tr><td rowspan=1 colspan=5>S2E 98.93±0.3993.23±2.37</td></tr><tr><td rowspan=1 colspan=5>Forward 98.10±0.1296.83±0.28</td><td rowspan=1 colspan=2>98.79±0.28</td><td rowspan=1 colspan=1>97.94±0.47</td></tr><tr><td rowspan=1 colspan=5>T-Revision 98.93±0.0798.40±0.53</td><td rowspan=1 colspan=2>99.05±0.16</td><td rowspan=1 colspan=1>98.23±0.54</td><td rowspan=1 colspan=1>498.82±0.07</td><td rowspan=1 colspan=3>97.43±0.1998.33±0.1595.64±0.34</td></tr><tr><td rowspan=2 colspan=5>Joint 98.54±0.1398.30±0.28CDR 99.00±0.0498.80±0.1299.30±0.0498.80±0.17</td><td rowspan=1 colspan=2>98.96±0.05</td><td rowspan=1 colspan=1>98.40±0.11</td><td rowspan=1 colspan=1>98.70±0.08</td><td rowspan=1 colspan=1>96.33±0.82</td><td rowspan=1 colspan=2>98.11±0.1393.15±0.43</td></tr><tr><td rowspan=1 colspan=2>99.30±0.04</td><td rowspan=1 colspan=1>98.80±0.17</td><td rowspan=1 colspan=1>99.17±0.08</td><td rowspan=1 colspan=1>98.12±0.23</td><td rowspan=1 colspan=2>98.49±0.0994.45±1.04</td></tr><tr><td rowspan=1 colspan=5>CE 90.36±0.2187.61±0.72</td><td rowspan=1 colspan=2>91.31±0.13</td><td rowspan=1 colspan=1>86.43±2.01</td><td rowspan=1 colspan=1>91.65±0.12</td><td rowspan=1 colspan=1>76.42±4.13</td><td rowspan=1 colspan=2>88.81±0.6778.62±2.92</td></tr><tr><td rowspan=1 colspan=5>GCE 91.77±0.1390.02±0.37</td><td rowspan=1 colspan=2>91.45±0.29</td><td rowspan=1 colspan=1>73.62±2.92</td><td rowspan=1 colspan=1>91.99±0.36</td><td rowspan=1 colspan=1>84.21±2.05</td><td rowspan=1 colspan=1>91.06±0.55</td><td rowspan=1 colspan=1>574.82±0.94</td></tr><tr><td rowspan=1 colspan=5>DMI 91.87±0.2688.65±0.37</td><td rowspan=1 colspan=2>92.33±0.11</td><td rowspan=1 colspan=1>89.62±0.48</td><td rowspan=1 colspan=1>91.33±0.37</td><td rowspan=1 colspan=1>83.93±0.92</td><td rowspan=1 colspan=1>90.87±0.15</td><td rowspan=1 colspan=1>80.51±0.66</td></tr><tr><td rowspan=1 colspan=5>APL 87.23±0.1973.62±0.88</td><td rowspan=1 colspan=2>86.21±0.24</td><td rowspan=1 colspan=1>81.03±3.09</td><td rowspan=1 colspan=1>84.52±0.73</td><td rowspan=1 colspan=1>76.39±2.85</td><td rowspan=1 colspan=1>84.38±0.70</td><td rowspan=1 colspan=1>)60.38±8.37</td></tr><tr><td rowspan=2 colspan=5>MentorNet 88.12±0.1286.05±0.27F-MNIST Co-teaching 89.03±0.3287.04±0.69</td><td rowspan=1 colspan=2>89.76±0.18</td><td rowspan=1 colspan=1>68.93±3.20</td><td rowspan=1 colspan=1>87.39±0.57</td><td rowspan=1 colspan=1>76.90±5.72</td><td rowspan=1 colspan=1>86.50±0.26</td><td rowspan=1 colspan=1>78.37±0.95</td></tr><tr><td rowspan=1 colspan=3>92.03±0.1672.23±4.38</td><td rowspan=1 colspan=1>89.63±0.78</td><td rowspan=1 colspan=1>84.10±0.92</td><td rowspan=1 colspan=2>89.27±0.86583.49±1.27</td></tr><tr><td rowspan=1 colspan=5>Co-teaching+ 91.34±0.1790.23±0.21</td><td rowspan=1 colspan=2>83.98±1.05</td><td rowspan=1 colspan=1>66.27±3.01</td><td rowspan=1 colspan=1>91.08±0.25</td><td rowspan=1 colspan=1>72.65±0.49</td><td rowspan=1 colspan=2>83.78±0.73 38.79±9.93</td></tr><tr><td rowspan=1 colspan=4>S2E 90.89±0.27</td><td rowspan=1 colspan=1>75.68±3.73</td><td rowspan=1 colspan=2>91.20±0.31</td><td rowspan=1 colspan=1>87.06±0.50</td><td rowspan=1 colspan=1>91.52±0.19</td><td rowspan=1 colspan=1>72.09±2.15</td><td rowspan=1 colspan=1>89.17±0.32</td><td rowspan=1 colspan=1>72.62±2.73</td></tr><tr><td rowspan=1 colspan=4>Forward 90.72±0.19</td><td rowspan=1 colspan=1>88.05±0.73</td><td rowspan=1 colspan=2>92.05±0.21</td><td rowspan=1 colspan=1>85.42±0.74</td><td rowspan=1 colspan=1>90.02±0.87</td><td rowspan=1 colspan=1>83.06±0.79</td><td rowspan=1 colspan=1>87.95±0.75</td><td rowspan=1 colspan=1>75.34±1.89</td></tr><tr><td rowspan=1 colspan=4>T-Revision 91.95±0.20</td><td rowspan=1 colspan=1>90.35±0.28</td><td rowspan=1 colspan=2>92.07±0.11</td><td rowspan=1 colspan=1>88.53±0.32</td><td rowspan=1 colspan=1>91.06±0.19</td><td rowspan=1 colspan=1>85.67±0.88</td><td rowspan=1 colspan=1>91.05±0.28</td><td rowspan=1 colspan=1>84.34±1.37</td></tr><tr><td rowspan=2 colspan=4>Joint 82.01±0.77CDR 92.24±0.11</td><td rowspan=1 colspan=1>72.36±2.84</td><td rowspan=1 colspan=2>85.92±0.83</td><td rowspan=1 colspan=1>73.09±0.91</td><td rowspan=1 colspan=1>86.04±0.99</td><td rowspan=1 colspan=1>70.87±3.95</td><td rowspan=1 colspan=1>82.07±0.94 50.62±4.77</td><td rowspan=1 colspan=1>82.07±0.94 50.62±4.77</td></tr><tr><td rowspan=1 colspan=1>90.91±0.27</td><td rowspan=1 colspan=2>93.01±0.14</td><td rowspan=1 colspan=1>90.37±0.32</td><td rowspan=1 colspan=1>93.06±0.19</td><td rowspan=1 colspan=1>87.55±1.07</td><td rowspan=1 colspan=1>91.52±0.17</td><td rowspan=1 colspan=1>85.04±1.02</td></tr><tr><td rowspan=1 colspan=4>CE 89.14±0.41</td><td rowspan=1 colspan=1>86.25±1.32</td><td rowspan=1 colspan=2>88.21±0.19</td><td rowspan=1 colspan=1>86.37±1.03</td><td rowspan=1 colspan=1>89.68±0.72</td><td rowspan=1 colspan=1>86.53±0.37</td><td rowspan=1 colspan=1>86.73±0.36 75.33±2.72</td><td rowspan=1 colspan=1>86.73±0.36 75.33±2.72</td></tr><tr><td rowspan=1 colspan=4>GCE</td><td rowspan=1 colspan=1>86.07±0.41</td><td rowspan=1 colspan=2>89.03±0.21</td><td rowspan=1 colspan=1>84.12±1.24</td><td rowspan=1 colspan=1>88.58±0.34</td><td rowspan=1 colspan=1>83.23±3.98</td><td rowspan=1 colspan=1>88.02±0.34</td><td rowspan=1 colspan=1>76.89±0.96</td></tr><tr><td rowspan=1 colspan=4>DMI</td><td rowspan=1 colspan=1>86.89±1.07</td><td rowspan=1 colspan=2>89.37±0.82</td><td rowspan=1 colspan=1>86.32±1.17</td><td rowspan=1 colspan=1>88.41±1.01</td><td rowspan=1 colspan=1>84.02±1.73</td><td rowspan=1 colspan=1>88.93±0.29</td><td rowspan=1 colspan=1>79.35±2.17</td></tr><tr><td rowspan=1 colspan=4>APL 88.21±0.32</td><td rowspan=1 colspan=1>81.07±1.36</td><td rowspan=1 colspan=2>89.03±0.75</td><td rowspan=1 colspan=1>85.10±2.42</td><td rowspan=1 colspan=1>87.34±1.44</td><td rowspan=1 colspan=1>80.12±3.65</td><td rowspan=1 colspan=1>76.31±2.24</td><td rowspan=1 colspan=1>450.73±4.89</td></tr><tr><td rowspan=2 colspan=5>MentorNet 83.26±0.7278.37±1.73CIFAR-10 Co-teaching 88.20±0.2784.45±0.68</td><td rowspan=1 colspan=2>78.37±1.73</td><td rowspan=1 colspan=1>84.07±0.59</td><td rowspan=1 colspan=1>60.22±3.47</td><td rowspan=1 colspan=1>78.73±0.89</td><td rowspan=1 colspan=1>69.37±3.28</td><td rowspan=1 colspan=1>83.06±0.92</td></tr><tr><td rowspan=1 colspan=2>87.42±0.38</td><td rowspan=1 colspan=1>64.03±0.73</td><td rowspan=1 colspan=1>82.66±0.32</td><td rowspan=1 colspan=1>73.68±0.62</td><td rowspan=1 colspan=1>86.71±0.79</td><td rowspan=1 colspan=1>81.14±1.32</td></tr><tr><td rowspan=1 colspan=3>Co-teaching+</td><td rowspan=1 colspan=1>86.47±0.92</td><td rowspan=1 colspan=1>78.93±0.74</td><td rowspan=1 colspan=2>85.37±0.47</td><td rowspan=1 colspan=1>63.17±3.48</td><td rowspan=1 colspan=1>84.01±1.01</td><td rowspan=1 colspan=1>70.17±1.37</td><td rowspan=1 colspan=1>85.92±0.26</td><td rowspan=1 colspan=1>557.95±3.17</td></tr><tr><td rowspan=1 colspan=3>S2E</td><td rowspan=1 colspan=1>90.26±0.24</td><td rowspan=1 colspan=1>75.20±2.05</td><td rowspan=1 colspan=2>90.73±0.32</td><td rowspan=1 colspan=1>87.83±0.97</td><td rowspan=1 colspan=1>89.92±0.37</td><td rowspan=1 colspan=1>76.18±1.93</td><td rowspan=1 colspan=1>90.32±0.21</td><td rowspan=1 colspan=1>68.93±1.86</td></tr><tr><td rowspan=1 colspan=3>Forward</td><td rowspan=1 colspan=1>88.36±0.34</td><td rowspan=1 colspan=1>86.47±0.98</td><td rowspan=1 colspan=2>3 89.30±0.71</td><td rowspan=1 colspan=1>85.33±1.48</td><td rowspan=1 colspan=1>387.62±0.24</td><td rowspan=1 colspan=1>83.23±1.30</td><td rowspan=1 colspan=1>85.39±0.23</td><td rowspan=1 colspan=1>376.88±1.26</td></tr><tr><td rowspan=1 colspan=3>T-Revision</td><td rowspan=1 colspan=1>89.43±0.62</td><td rowspan=1 colspan=1>86.98±0.87</td><td rowspan=1 colspan=2>89.94±0.74</td><td rowspan=1 colspan=1>88.11±1.22</td><td rowspan=1 colspan=1>91.01±0.29</td><td rowspan=1 colspan=1>87.10±1.38</td><td rowspan=1 colspan=1>90.43±0.38 85.46±1.04</td><td rowspan=1 colspan=1>85.46±1.04</td></tr><tr><td rowspan=1 colspan=4>Joint 89.94±0.25 87.17±0.35</td><td rowspan=1 colspan=1>89.94±0.25 87.17±0.35</td><td rowspan=1 colspan=2>90.83±0.18</td><td rowspan=1 colspan=1>88.24±0.79</td><td rowspan=1 colspan=1>91.31±0.73</td><td rowspan=1 colspan=1>85.62±1.75</td><td rowspan=1 colspan=1>90.13±0.34 85.23±0.74</td><td rowspan=1 colspan=1>85.23±0.74</td></tr><tr><td rowspan=1 colspan=4>CDR 90.26±0.318</td><td rowspan=1 colspan=1>87.19±0.43</td><td rowspan=1 colspan=2>92.00±0.27</td><td rowspan=1 colspan=1>88.68±0.67</td><td rowspan=1 colspan=1>92.11±0.23</td><td rowspan=1 colspan=1>88.58±0.39</td><td rowspan=1 colspan=1>91.14±0.23</td><td rowspan=1 colspan=1>86.25±0.57</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>CE</td><td rowspan=1 colspan=1>56.82±0.82</td><td rowspan=1 colspan=2>64.12±0.54</td><td rowspan=1 colspan=1>52.86±0.92</td><td rowspan=1 colspan=1>64.10±0.46</td><td rowspan=1 colspan=1>52.77±0.79</td><td rowspan=1 colspan=1>63.33±0.29</td><td rowspan=1 colspan=1>50.84±0.89</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>GCE</td><td rowspan=1 colspan=1>57.97±1.21</td><td rowspan=1 colspan=2>65.34±0.64</td><td rowspan=1 colspan=1>54.35±1.28</td><td rowspan=1 colspan=1>62.32±1.04</td><td rowspan=1 colspan=1>55.03±1.25</td><td rowspan=1 colspan=1>66.67±0.40</td><td rowspan=1 colspan=1>55.14±1.77</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>DMI</td><td rowspan=1 colspan=1>57.42±0.53</td><td rowspan=1 colspan=2>64.30±0.84</td><td rowspan=1 colspan=1>51.31±2.73</td><td rowspan=1 colspan=1>58.77±0.64</td><td rowspan=1 colspan=1>42.89±0.77</td><td rowspan=1 colspan=1>59.04±0.35 46.99±0.62</td><td rowspan=1 colspan=1>59.04±0.35 46.99±0.62</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>APL</td><td rowspan=1 colspan=1>51.03±1.04</td><td rowspan=1 colspan=2>54.31±0.84</td><td rowspan=1 colspan=1>48.22±1.35</td><td rowspan=1 colspan=1>59.77±0.74</td><td rowspan=1 colspan=1>53.25±0.92</td><td rowspan=1 colspan=1>49.17±2.72</td><td rowspan=1 colspan=1>38.18±4.04</td></tr><tr><td rowspan=2 colspan=5>MentorNet 57.27±1.3249.01±2.09CIFAR-100Co-teaching 61.47±0.4153.44±0.40</td><td rowspan=1 colspan=2>54.10±0.92</td><td rowspan=1 colspan=1>33.21±1.82</td><td rowspan=1 colspan=1>54.73±1.26</td><td rowspan=1 colspan=1>45.31±2.93</td><td rowspan=1 colspan=1>50.02±0.73</td><td rowspan=1 colspan=1>36.27±1.64</td></tr><tr><td rowspan=1 colspan=3>61.47±0.4153.44±0.40</td><td rowspan=1 colspan=2>57.35±0.82</td><td rowspan=1 colspan=1>37.62±1.77</td><td rowspan=1 colspan=1>58.11±0.47</td><td rowspan=1 colspan=1>48.46±0.64</td><td rowspan=1 colspan=1>57.73±0.37</td><td rowspan=1 colspan=1>43.28±0.55</td></tr><tr><td rowspan=1 colspan=5>Co-teaching+ 64.13±0.3255.92±0.81</td><td rowspan=1 colspan=2>58.97±1.19 40.16±2.74</td><td rowspan=1 colspan=1>58.97±1.19 40.16±2.74</td><td rowspan=1 colspan=1>456.31±0.41</td><td rowspan=1 colspan=1>38.03±0.55</td><td rowspan=1 colspan=1>55.45±0.57</td><td rowspan=1 colspan=1>41.11±1.32</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>S2E 64.21±0.72</td><td rowspan=1 colspan=1>43.12±2.77</td><td rowspan=1 colspan=2>63.92±0.46</td><td rowspan=1 colspan=1>42.45±1.73</td><td rowspan=1 colspan=1>58.21±0.43</td><td rowspan=1 colspan=1>41.74±2.09</td><td rowspan=1 colspan=1>61.08±0.59</td><td rowspan=1 colspan=1>)47.06±1.93</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>Forward 54.88±0.92</td><td rowspan=1 colspan=1>45.64±1.77</td><td rowspan=1 colspan=2>64.07±1.02</td><td rowspan=1 colspan=1>53.84±2.71</td><td rowspan=1 colspan=1>58.37±0.56</td><td rowspan=1 colspan=1>39.82±0.73</td><td rowspan=1 colspan=1>58.55±0.31</td><td rowspan=1 colspan=1>46.42±0.95</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>T-Revision</td><td rowspan=1 colspan=1>57.15±1.02</td><td rowspan=1 colspan=2>68.02±0.53</td><td rowspan=1 colspan=1>54.93±1.09</td><td rowspan=1 colspan=1>62.69±0.73</td><td rowspan=1 colspan=1>52.31±1.46</td><td rowspan=1 colspan=1>60.22±0.68</td><td rowspan=1 colspan=1>50.23±1.79</td></tr><tr><td rowspan=2 colspan=9>Joint 66.12±0.42 59.45±0.68 68.29±0.25 55.53±0.47 67.35±0.31 52.22±1.85 65.91±0.43 55.09±0.93CDR 68.68±0.3362.72±0.38 70.64±0.51 55.58±0.78 71.93±0.57 56.94±1.30 69.82±0.4261.03±0.77</td><td rowspan=1 colspan=3>Joint</td></tr><tr><td rowspan=1 colspan=1>56.94±1.30</td><td rowspan=1 colspan=2>69.82±0.4261.03±0.77</td></tr></table>
|
| 151 |
+
|
| 152 |
+
In this paper, we set the proportion of non-critical parameters to the noise rate. Also, it is interesting to investigate that how the proposed method works if we set the proportion of non-critical parameters as a constant number. Note that if we set the constant number too randomly, the performance of the proposed method may be hurt. Therefore, we use a noisy validation set to locate it and compare the difference between the located constant and the noise rate. The search of the constant is within the range $\{ 0 . 1 0 , 0 . 2 0 , \ldots , 0 . 9 0 \}$ . The experiments are conducted on MNIST, $F$ -MNIST, and CIFAR-10. The experimental results are provided in Table 2. As we can see, in many cases, the located constant and the label noise rate are numerically equal. However, it is complicated to locate a suitable constant with a noisy validation set, as there is a huge search range. On the contrary, the noise rate always can be estimated effectively (Liu & Tao, 2016; Yu et al., 2018a). Therefore, it is reasonable and feasible to assume that the proportion of non-critical parameters is the same as the noise rate.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 1: Illustration of robustness to the estimation result of noise rate. For each estimated noise rate, we report experimental results over five trials. The blue dots represent the result of each experiment. The orange dots represent the mean of five experimental results in each case.
|
| 156 |
+
|
| 157 |
+
Table 2: The located constant on synthetic noisy datasets with different noise levels. The result with an underline means that the located constant and the noise rate are numerically equal.
|
| 158 |
+
|
| 159 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="2">Symmetric</td><td colspan="2">Asymmetric</td><td colspan="2">Pairflip</td><td colspan="2">Instance</td></tr><tr><td>20%</td><td>40%</td><td>20%</td><td>40%</td><td>20%</td><td>40%</td><td>20%</td><td>40%</td></tr><tr><td>MNIST</td><td>0.20</td><td>0.50</td><td>0.20</td><td>0.40</td><td>0.20</td><td>0.50</td><td>0.30</td><td>0.60</td></tr><tr><td>F-MNIST</td><td>0.20</td><td>0.40</td><td>0.20</td><td>0.50</td><td>0.30</td><td>0.50</td><td>0.20</td><td>0.60</td></tr><tr><td>CIFAR-10</td><td>0.30</td><td>0.50</td><td>0.30</td><td>0.30</td><td>0.30</td><td>0.50</td><td>0.20</td><td>0.40</td></tr></table>
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 2: Illustration of the experimental results on noisy CIFAR-100. We can clearly see that the proposed method (CDR) can reduce the side effect of noisy labels at the early training stage, which improves generalization (red line vs. green line).
|
| 163 |
+
|
| 164 |
+
# 4.4 CLASSIFICATION PERFORMANCE ON NOISY DATASETS
|
| 165 |
+
|
| 166 |
+
Results on synthetic noisy datasets. Table 1 shows the experimental results on four synthetic noisy datasets with various types of noisy labels. For MNIST, as can be seen, our proposed method produce the best results in the vast majority of cases. When the noise is instance-dependent, the proposed method achieves competitive results. Note that T-Revision achieves the best classification performance in this case. Compared with the other synthetic noisy datasets, MNIST is less challenging. In this case, T-Revision thus can exploit the noise transition matrix and the slack variable to well model label noise, which leads to the best performance. However, for the instance-dependent label noise on the other datasets, i.e., $F$ -MNIST, CIFAR-10, and CIFAR-100, estimating the transition matrices does not work well and the proposed robust eary-learning method achieves the best performance.
|
| 167 |
+
|
| 168 |
+
Table 3: Classification accuracy (percentage) on Food-101 dataset. The best result is in bold.
|
| 169 |
+
|
| 170 |
+
<table><tr><td>CE</td><td>GCE</td><td>DMI</td><td>APL</td><td>MentorNet</td><td>Co-teaching</td></tr><tr><td>84.03</td><td>84.96</td><td>85.52</td><td>82.17</td><td>81.25</td><td>83.73</td></tr><tr><td>Co-teaching+</td><td>S2E</td><td>Forward</td><td>T-Revision</td><td>Joint</td><td>CDR</td></tr><tr><td>76.89</td><td>84.97</td><td>85.52</td><td>85.97</td><td>83.10</td><td>86.36</td></tr></table>
|
| 171 |
+
|
| 172 |
+
Table 4: Top-1 validation accuracies (percentage) on clean ILSVRC12 validation set of InceptionResNet v2 models trained on WebVision dataset, under the “Mini” setting in (Jiang et al., 2018; Chen et al., 2019; Ma et al., 2020). The best result is in bold.
|
| 173 |
+
|
| 174 |
+
<table><tr><td>CE</td><td>GCE</td><td>DMI</td><td>APL</td><td>MentorNet</td><td>Co-teaching</td></tr><tr><td>57.34</td><td>55.62</td><td>56.93</td><td>61.27</td><td>57.66</td><td>61.22</td></tr><tr><td>Co-teaching+</td><td>S2E</td><td>Forward</td><td>T-Revision</td><td>Joint</td><td>CDR</td></tr><tr><td>33.26</td><td>54.33</td><td>56.39</td><td>60.58</td><td>47.60</td><td>61.85</td></tr></table>
|
| 175 |
+
|
| 176 |
+
For $F$ -MNIST and CIFAR-10, our proposed method is consistently superior to other state-of-the-art methods across all the settings. Note that S2E achieves impressive performance in the case of Symmetric- $20 \%$ on CIFAR-10. However, it fails to generalize well compared with the proposed method, especially in the cases of $40 \%$ label noise rate. In contrast, CDR achieves a clear lead over S2E in these cases, which verifies the effectiveness of the proposed method. Lastly, for the more challenging dataset, i.e., CIFAR-100, the proposed method once again outperforms all the baseline methods. In particular, in the very challenging case of Instance- $40 \%$ , the proposed method takes a nearly $6 \%$ lead compared to the second best method GCE.
|
| 177 |
+
|
| 178 |
+
Results on real-world noisy datasets. The experimental results on Food-101 and WebVision datasets are reported in Table 3 and 4. Again, on classification accuracy, our method surpasses all other baselines. This verifies the effectiveness of our proposed method against real-world label noise.
|
| 179 |
+
|
| 180 |
+
Note that the CE method exploits early stopping in all experiments. Compared the classification performance of CE with the classification performance of CDR, i.e., early stopping vs. robust early stopping, we can clearly see that the proposed method can achieve better performance. We also present the illustration of the experimental results on CIFAR-100 with $40 \%$ noise. As shown in Figure 2, CDR can effectively reduce the side effect of noisy labels at the early training stage. The illustrations of the experimental results on the other settings can be found in Appendix A.
|
| 181 |
+
|
| 182 |
+
# 5 CONCLUSION
|
| 183 |
+
|
| 184 |
+
In this paper, motivated by the lottery ticket hypothesis, we provide a novel method to distinguish the critical parameters and non-critical parameters for fitting clean labels. Then we propose different update rules for different types of parameters to reduce the side effect before early stopping. The proposed method is very effective for learning with noisy labels, which is supported by experiments on synthetic datasets with various types of label noise as well as on real-world datasets. Our method is simple and orthogonal to other methods. We believe that this opens up new possibilities in the topics of learning with noisy labels. It would be interesting to explore the potential characteristics of the updated parameters such as the distance to initial parameters (Li et al., 2020b; Hu et al., 2020) and the mutual information with the vector of all training labels given inputs (Harutyunyan et al., 2020).
|
| 185 |
+
|
| 186 |
+
# ACKNOWLEDGMENTS
|
| 187 |
+
|
| 188 |
+
TLL was supported by Australian Research Council Project DE-190101473 and DP-180103424. BH was supported by the RGC Early Career Scheme No. 22200720, NSFC Young Scientists Fund No. 62006202, HKBU Tier-1 Start-up Grant, and HKBU CSD Departmental Incentive Scheme. CG was supported by NSF of China (No. 61973162) and CCF-Tencent Open Fund (No: RAGR20200101). NNW was supported by National Key Research and Development Program of China under Grant 2018AAA0103202. ZYG was supported by the Airdoc-Monash research centre fellowship. YC was supported by the NSF of China (No.61976102, No.U19A2065). We thank anonymous reviewers for giving constructive comments.
|
| 189 |
+
|
| 190 |
+
# REFERENCES
|
| 191 |
+
|
| 192 |
+
Zeyuan Allen-Zhu, Yuanzhi Li, and Yingyu Liang. Learning and generalization in overparameterized neural networks, going beyond two layers. In NeurIPS, pp. 6158–6169, 2019.
|
| 193 |
+
|
| 194 |
+
Sanjeev Arora, Rong Ge, Behnam Neyshabur, and Yi Zhang. Stronger generalization bounds for deep nets via a compression approach. In ICML, pp. 254–263, 2018.
|
| 195 |
+
|
| 196 |
+
Devansh Arpit, Stanisław Jastrz˛ebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at memorization in deep networks. arXiv preprint arXiv:1706.05394, 2017.
|
| 197 |
+
|
| 198 |
+
Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101 – mining discriminative components with random forests. In ECCV, 2014.
|
| 199 |
+
|
| 200 |
+
Stephen Boyd, Stephen P Boyd, and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004.
|
| 201 |
+
|
| 202 |
+
Sébastien Bubeck. Convex optimization: Algorithms and complexity. arXiv preprint arXiv:1405.4980, 2014.
|
| 203 |
+
|
| 204 |
+
Yuan Cao and Quanquan Gu. Generalization bounds of stochastic gradient descent for wide and deep neural networks. In NeurIPS, pp. 10836–10846, 2019.
|
| 205 |
+
|
| 206 |
+
Rich Caruana, Steve Lawrence, and C Lee Giles. Overfitting in neural nets: Backpropagation, conjugate gradient, and early stopping. In NeurIPS, pp. 402–408, 2001.
|
| 207 |
+
|
| 208 |
+
Pengfei Chen, Benben Liao, Guangyong Chen, and Shengyu Zhang. Understanding and utilizing deep neural networks trained with noisy labels. arXiv preprint arXiv:1905.05040, 2019.
|
| 209 |
+
|
| 210 |
+
Hao Cheng, Zhaowei Zhu, Xingyu Li, Yifei Gong, Xing Sun, and Yang Liu. Learning with instancedependent label noise: A sample sieve approach. In ICLR, 2021.
|
| 211 |
+
|
| 212 |
+
Jiacheng Cheng, Tongliang Liu, Kotagiri Ramamohanarao, and Dacheng Tao. Learning with bounded instance-and label-dependent label noise. In ICML, 2020.
|
| 213 |
+
|
| 214 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pp. 248–255. Ieee, 2009.
|
| 215 |
+
|
| 216 |
+
Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. arXiv preprint arXiv:1803.03635, 2018.
|
| 217 |
+
|
| 218 |
+
Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In IEEE international conference on acoustics, speech and signal processing, pp. 6645–6649. IEEE, 2013.
|
| 219 |
+
|
| 220 |
+
Bo Han, Jiangchao Yao, Gang Niu, Mingyuan Zhou, Ivor Tsang, Ya Zhang, and Masashi Sugiyama. Masking: A new perspective of noisy supervision. In NeurIPS, pp. 5836–5846, 2018a.
|
| 221 |
+
|
| 222 |
+
Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, pp. 8527–8537, 2018b.
|
| 223 |
+
|
| 224 |
+
Bo Han, Gang Niu, Xingrui Yu, Quanming Yao, Miao Xu, Ivor W Tsang, and Masashi Sugiyama. Sigua: Forgetting may make learning with noisy labels more robust. In ICML, 2020.
|
| 225 |
+
|
| 226 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In NeurIPS, pp. 1135–1143, 2015.
|
| 227 |
+
|
| 228 |
+
Hrayr Harutyunyan, Kyle Reing, Greg Ver Steeg, and Aram Galstyan. Improving generalization by controlling label-noise information in neural network weights. In ICML, 2020.
|
| 229 |
+
|
| 230 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
|
| 231 |
+
|
| 232 |
+
Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. Using trusted data to train deep networks on labels corrupted by severe noise. In NeurIPS, pp. 10456–10465. 2018.
|
| 233 |
+
|
| 234 |
+
Wei Hu, Zhiyuan Li, and Dingli Yu. Simple and effective regularization methods for training on noisily labeled data with generalization guarantee. In ICLR, 2020.
|
| 235 |
+
|
| 236 |
+
Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. MentorNet: Learning datadriven curriculum for very deep neural networks on corrupted labels. In ICML, pp. 2309–2318, 2018.
|
| 237 |
+
|
| 238 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, 2009.
|
| 239 |
+
|
| 240 |
+
Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The MNIST database of handwritten digits. http://yann.lecun.com/exdb/mnist/, 1998.
|
| 241 |
+
|
| 242 |
+
Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection sensitivity. In ICLR, 2019.
|
| 243 |
+
|
| 244 |
+
Junnan Li, Richard Socher, and Steven C.H. Hoi. Dividemix: Learning with noisy labels as semisupervised learning. In ICLR, 2020a.
|
| 245 |
+
|
| 246 |
+
Mingchen Li, Mahdi Soltanolkotabi, and Samet Oymak. Gradient descent with early stopping is provably robust to label noise for overparameterized neural networks. In AISTATS, 2020b.
|
| 247 |
+
|
| 248 |
+
Wen Li, Limin Wang, Li Wei, Eirikur Agustsson, and Luc Van Gool. Webvision database: Visual learning and understanding from web data. arXiv preprint arXiv:1708.02862, 2017a.
|
| 249 |
+
|
| 250 |
+
Xuefeng Li, Tongliang Liu, Bo Han, Gang Niu, and Masashi Sugiyama. Provably end-to-end label-noise learning without anchor points. arXiv preprint arXiv:2102.02400, 2021.
|
| 251 |
+
|
| 252 |
+
Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In ICCV, pp. 1910–1918, 2017b.
|
| 253 |
+
|
| 254 |
+
Sheng Liu, Jonathan Niles-Weed, Narges Razavian, and Carlos Fernandez-Granda. Early-learning regularization prevents memorization of noisy labels. arXiv preprint arXiv:2007.00151, 2020.
|
| 255 |
+
|
| 256 |
+
Tongliang Liu and Dacheng Tao. Classification with noisy labels by importance reweighting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(3):447–461, 2016.
|
| 257 |
+
|
| 258 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019.
|
| 259 |
+
|
| 260 |
+
Yueming Lyu and Ivor W. Tsang. Curriculum loss: Robust learning and generalization against label corruption. In ICLR, 2020.
|
| 261 |
+
|
| 262 |
+
Xingjun Ma, Yisen Wang, Michael E Houle, Shuo Zhou, Sarah M Erfani, Shu-Tao Xia, Sudanthi Wijewickrema, and James Bailey. Dimensionality-driven learning with noisy labels. In ICML, pp. 3361–3370, 2018.
|
| 263 |
+
|
| 264 |
+
Xingjun Ma, Hanxun Huang, Yisen Wang, Simone Romano, Sarah Erfani, and James Bailey. Normalized loss functions for deep learning with noisy labels. In ICML, 2020.
|
| 265 |
+
|
| 266 |
+
Duc Tam Nguyen, Chaithanya Kumar Mummadi, Thi Phuong Nhung Ngo, Thi Hoai Phuong Nguyen, Laura Beggel, and Thomas Brox. Self: Learning to filter noisy labels with self-ensembling. In ICLR, 2020.
|
| 267 |
+
|
| 268 |
+
Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, pp. 1944–1952, 2017.
|
| 269 |
+
|
| 270 |
+
Geoff Pleiss, Tianyi Zhang, Ethan R Elenberg, and Kilian Q Weinberger. Identifying mislabeled data using the area under the margin ranking. arXiv preprint arXiv:2001.10528, 2020.
|
| 271 |
+
|
| 272 |
+
Lutz Prechelt. Early stopping-but when? In Neural Networks: Tricks of the trade, pp. 55–69. Springer, 1998.
|
| 273 |
+
|
| 274 |
+
Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In ICML, pp. 4331–4340, 2018.
|
| 275 |
+
|
| 276 |
+
Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, pp. 91–99, 2015.
|
| 277 |
+
|
| 278 |
+
David Rolnick, Andreas Veit, Serge Belongie, and Nir Shavit. Deep learning is robust to massive label noise. arXiv preprint arXiv:1705.10694, 2017.
|
| 279 |
+
|
| 280 |
+
Jun Shu, Qian Zhao, Zengben Xu, and Deyu Meng. Meta transition adaptation for robust deep learning with noisy labels. arXiv preprint arXiv:2006.05697, 2020.
|
| 281 |
+
|
| 282 |
+
Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016.
|
| 283 |
+
|
| 284 |
+
Daiki Tanaka, Daiki Ikami, Toshihiko Yamasaki, and Kiyoharu Aizawa. Joint optimization framework for learning with noisy labels. In CVPR, 2018.
|
| 285 |
+
|
| 286 |
+
Sunil Thulasidasan, Tanmoy Bhattacharya, Jeff Bilmes, Gopinath Chennupati, and Jamal Mohd-Yusof. Combating label noise in deep learning using abstention. In ICML, pp. 6234–6243, 2019.
|
| 287 |
+
|
| 288 |
+
Qizhou Wang, Bo Han, Tongliang Liu, Gang Niu, Jian Yang, and Chen Gong. Tackling instancedependent label noise via a universal probabilistic model. In AAAI, 2021a.
|
| 289 |
+
|
| 290 |
+
Qizhou Wang, Jiangchao Yao, Chen Gong, Tongliang Liu, Mingming Gong, Hongxia Yang, and Bo Han. Learning with group noise. In AAAI, 2021b.
|
| 291 |
+
|
| 292 |
+
Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In ICCV, 2019.
|
| 293 |
+
|
| 294 |
+
Songhua Wu, Xiaobo Xia, Tongliang Liu, Bo Han, Mingming Gong, Nannan Wang, Haifeng Liu, and Gang Niu. Class2simi: A new perspective on learning with label noise. arXiv preprint arXiv:2006.07831, 2020.
|
| 295 |
+
|
| 296 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
|
| 297 |
+
|
| 298 |
+
Xiaobo Xia, Tongliang Liu, Nannan Wang, Bo Han, Chen Gong, Gang Niu, and Masashi Sugiyama. Are anchor points really indispensable in label-noise learning? In NeurIPS, pp. 6838–6849, 2019.
|
| 299 |
+
|
| 300 |
+
Xiaobo Xia, Tongliang Liu, Bo Han, Nannan Wang, Jiankang Deng, Jiatong Li, and Yinian Mao. Extended T: Learning with mixed closed-set and open-set noisy labels. arXiv preprint arXiv:2012.00932, 2020a.
|
| 301 |
+
|
| 302 |
+
Xiaobo Xia, Tongliang Liu, Bo Han, Nannan Wang, Mingming Gong, Haifeng Liu, Gang Niu, Dacheng Tao, and Masashi Sugiyama. Part-dependent label noise: Towards instance-dependent label noise. In NeurIPS, 2020b.
|
| 303 |
+
|
| 304 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
|
| 305 |
+
|
| 306 |
+
Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In CVPR, pp. 2691–2699, 2015.
|
| 307 |
+
|
| 308 |
+
Yilun Xu, Peng Cao, Yuqing Kong, and Yizhou Wang. L_dmi: A novel information-theoretic loss function for training deep nets robust to label noise. In NeurIPS, pp. 6222–6233, 2019.
|
| 309 |
+
|
| 310 |
+
Quanming Yao, Hansi Yang, Bo Han, Gang Niu, and James T Kwok. Searching to exploit memorization effect in learning with noisy labels. In ICML, 2020a.
|
| 311 |
+
|
| 312 |
+
Yu Yao, Tongliang Liu, Bo Han, Mingming Gong, Jiankang Deng, Gang Niu, and Masashi Sugiyama. Dual T: Reducing estimation error for transition matrix in label-noise learning. In NeurIPS, 2020b.
|
| 313 |
+
|
| 314 |
+
Yuan Yao, Lorenzo Rosasco, and Andrea Caponnetto. On early stopping in gradient descent learning. Constructive Approximation, 26(2):289–315, 2007.
|
| 315 |
+
Xingrui Yu, Bo Han, Jiangchao Yao, Gang Niu, Ivor W Tsang, and Masashi Sugiyama. How does disagreement benefit co-teaching? In ICML, 2019.
|
| 316 |
+
Xiyu Yu, Tongliang Liu, Mingming Gong, Kayhan Batmanghelich, and Dacheng Tao. An efficient and provable approach for mixture proportion estimation using linear independence assumption. In CVPR, pp. 4480–4489, 2018a.
|
| 317 |
+
Xiyu Yu, Tongliang Liu, Mingming Gong, and Dacheng Tao. Learning with biased complementary labels. In ECCV, pp. 68–83, 2018b.
|
| 318 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In ICLR, 2017.
|
| 319 |
+
Tong Zhang, Bin Yu, et al. Boosting with early stopping: Convergence and consistency. The Annals of Statistics, 33(4):1538–1579, 2005.
|
| 320 |
+
Zhilu Zhang and Mert Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, pp. 8778–8788, 2018.
|
| 321 |
+
Songzhu Zheng, Pengxiang Wu, Aman Goswami, Mayank Goswami, Dimitris Metaxas, and Chao Chen. Error-bounded correction of noisy labels. In ICML, 2020.
|
| 322 |
+
Zhaowei Zhu, Tongliang Liu, and Yang Liu. A second-order approach to learning with instancedependent label noise. In CVPR, 2021.
|
| 323 |
+
Difan Zou, Yuan Cao, Dongruo Zhou, and Quanquan Gu. Gradient descent optimizes overparameterized deep relu networks. Machine Learning, 109(3):467–492, 2020.
|
| 324 |
+
|
| 325 |
+
# A DETAILED EXPERIMENTAL RESULTS
|
| 326 |
+
|
| 327 |
+
In section 4.4, we provide the illustrations of the experimental results. However, because of limited space, we only show the illustrations of the experimental results on noisy CIFAR-100. The noise rate is set to $40 \%$ . In this supplementary material, we provide the illustrations of the experimental results on the other employed datasets and settings as follows.
|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Figure 3: Illustration of the experimental results on noisy MNIST. The noise rate is set to $20 \%$ .
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
Figure 4: Illustration of the experimental results on noisy MNIST. The noise rate is set to $40 \%$ .
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
Figure 5: Illustration of the experimental results on noisy $F$ -MNIST. The noise rate is set to $20 \%$
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
Figure 6: Illustration of the experimental results on noisy $F$ -MNIST. The noise rate is set to $40 \%$ .
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
Figure 7: Illustration of the experimental results on noisy CIFAR-10. The noise rate is set to $20 \%$ .
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure 8: Illustration of the experimental results on noisy CIFAR-10. The noise rate is set to $40 \%$ .
|
| 346 |
+
|
| 347 |
+

|
| 348 |
+
Figure 9: Illustration of the experimental results on noisy CIFAR-100. The noise rate is set to $20 \%$ .
|
md/train/H18uzzWAZ/H18uzzWAZ.md
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CORRECTING NUISANCE VARIATION USING WASSERSTEIN DISTANCE
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Profiling cellular phenotypes from microscopic imaging can provide meaningful biological information resulting from various factors affecting the cells. One motivating application is drug development: morphological cell features can be captured from images, from which similarities between different drugs applied at different dosages can be quantified. The general approach is to find a function mapping the images to an embedding space of manageable dimensionality whose geometry captures relevant features of the input images. An important known issue for such methods is separating relevant biological signal from nuisance variation. For example, the embedding vectors tend to be more correlated for cells that were cultured and imaged during the same week than for cells from a different week, despite having identical drug compounds applied in both cases. In this case, the particular batch a set of experiments were conducted in constitutes the domain of the data; an ideal set of image embeddings should contain only the relevant biological information (e.g. drug effects). We develop a general framework for adjusting the image embeddings in order to ‘forget’ domain-specific information while preserving relevant biological information. To do this, we minimize a loss function based on distances between marginal distributions (such as the Wasserstein distance) of embeddings across domains for each replicated treatment. For the dataset presented, the replicated treatment is the negative control. We find that for our transformed embeddings (1) the underlying geometric structure is not only preserved but the embeddings also carry improved biological signal (2) less domain-specific information is present.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
In the framework where our approach is applicable, there are some inputs (e.g. images) and a map $\mathcal { F }$ sending the inputs to vectors in a low-dimensional space which summarizes information about the inputs. $\mathcal { F }$ could either be engineered using specific image features, or learned (e.g. using deep neural networks). We will call these vectors ‘embeddings’ and the space to which they belong the ‘embedding space’. Each input may also have corresponding semantic labels and domains, and for inputs with each label and domain pair, $\mathcal { F }$ produces some distribution of embeddings. Semantically meaningful similarities between pairs of inputs can then be assessed by the distance between their corresponding embeddings, using some chosen distance metric. Ideally, the embedding distribution of a group of inputs depends only on their label, but often the domain can influence the embedding distribution as well. We wish to find an additional map to adjust the embeddings produced by $\mathcal { F }$ so that the distribution of adjusted embeddings for a given label is independent of the domain, while still preserving semantically meaningful distances between distributions of inputs with different labels.
|
| 12 |
+
|
| 13 |
+
The map $\mathcal { F }$ can be used for phenotypic profiling of cells. In this application, images of biological cells perturbed by one of several possible biological stimuli (e.g. various drug compounds at different doses, some of which may have unknown effects) are mapped to embeddings, which are used to reveal similarities among the applied perturbations.
|
| 14 |
+
|
| 15 |
+
There are a number of ways to extract embeddings from images of cells. One class of methods such as that used by Ljosa et al. (2013) relies on extracting specifically engineered features. In the recent work by Ando et al. (2017), a Deep Metric Network pre-trained on consumer photographic images (not microscope images of cells) described in Wang et al. (2014) was used to generate embedding vectors from cellular images, and it was shown that these clustered drug compounds by their mechanisms of action (MOA) more effectively. See Figure 1 for example images of the different MOAs.
|
| 16 |
+
|
| 17 |
+
Currently one of the most important issues with using image embeddings to discriminate the effects of each treatment (i.e. a particular dose of a drug, the ‘label’ in the general problem described above) on morphological cell features is nuisance factors related to slight uncontrollable variations in each biological experiment. Many cell imaging experiments are organized into a number of batches of experiments occurring over time, each of which contains a number of sample plates (typically 3-6), each of which contains individual wells in which thousands of cells are grown and treatments are applied (typically around 96 wells per plate). For this application, the ‘domain’ is an instance of one of these hierarchical levels, and embeddings for cells with a given treatment tend to be closer to each other within the same domain than from a different one. For example, the experimentalist may apply slightly different concentrations or amounts of a drug compound in two wells in which the same treatment was anticipated. Another example is the location of a particular well within a plate or the order of the plate within a batch, which may influence the rate of evaporation, and hence, the appearance of the cells. Finally, ‘batch’ effects may result from differences in experiment conditions (temperature, humidity) from week to week; they are various instances of this hierarchical level that we will consider as ‘domains’ in this work.
|
| 18 |
+
|
| 19 |
+
Our approach addresses the issue of nuisance variation in embeddings by transforming the embedding space in a possibly domain-specific way in order to minimize the variation across domains for a given treatment. We remark that our main goal is to introduce a general flexible framework to address this problem. In this framework, we use a metric function measuring the distances among pairs of probability distributions to construct an optimization problem whose solution yields appropriate transformations on each domain. In our present implementation, the Wasserstein distance is used as a demonstration of a specific choice of the metric that can yield substantial improvements. The Wasserstein distance makes few assumptions about the probability distributions of the embedding vectors.
|
| 20 |
+
|
| 21 |
+
Our approach is fundamentally different than those which explicitly identify a fixed ‘target’ and ‘source’ distributions. Instead, we incorporate information from all domains on an equal footing, transforming all the embeddings. This potentially allows our method to incorporate several replicates of a treatment across different domains to learn the transformations, and not only the controls. We highlight that other distances may be used in our framework, such as the Cramer distance. This may be preferable since the Cramer distance has unbiased sample gradients (Bellemare et al., 2017). This could reduce the number of steps required to adjust the Wasserstein distance approximation for each step of training the embedding transformation. Additionally we propose several other extensions and variations in Section 4.1.
|
| 22 |
+
|
| 23 |
+
# 2 METHOD
|
| 24 |
+
|
| 25 |
+
# 2.1 PROBLEM DESCRIPTION
|
| 26 |
+
|
| 27 |
+
Denote the embedding vectors $x _ { t , d , p }$ for $t \in T$ , $d \in D$ , and $p \in I _ { t , d }$ , where $T$ and $D$ are the treatment and domain labels respectively, and $I _ { t , d }$ is the set of indices for embeddings belonging to treatment $t$ and domain $d$ . Suppose that $x _ { t , d , p }$ were sampled from a probability distribution $\nu _ { t , d }$ . our goal is to ‘forget’ the nuisance variation in the embeddings, which we formalize in the following way. We wish to find maps $A _ { d }$ transforming the embedding vectors such that the transformed marginals $\tilde { \nu } _ { t , d }$ have the property that for each $t \in T$ and $d _ { i } , d _ { j } \in D$ , $\tilde { \nu } _ { t , d _ { i } } \approx \tilde { \nu } _ { t , d _ { j } }$ (for some suitable metric between distributions). Intuitively, the transformations $A _ { d }$ can be thought of as correcting a domainspecific perturbation. We do not have ‘source’ and ‘target’ distributions, and instead perturb all the embedding distributions simultaneously. The transformations $A _ { d }$ should be small to avoid distorting the underlying geometry of the embedding space, since we do not expect nuisance variation to be very large.
|
| 28 |
+
|
| 29 |
+
The 1-Wasserstein distance (hereafter will be simply referred to as the Wasserstein distance) between two probability distributions $\nu _ { r }$ and $\nu _ { g }$ on a compact metric space $\chi$ with metric $\delta$ is given by
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
W ( \nu _ { r } , \nu _ { g } ) = \operatorname* { i n f } _ { \gamma \in \Pi ( \nu _ { r } , \nu _ { g } ) } E _ { ( x , y ) \sim \gamma } \delta ( x , y ) .
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
Here $\Pi ( \nu _ { r } , \nu _ { g } )$ is the set of all joint distributions $\gamma ( x , y )$ whose marginals are $\nu _ { r }$ and $\nu _ { g }$ . This can be intuitively interpreted as the minimal cost of a transportation plan between the probability masses of $\nu _ { r }$ and $\nu _ { g }$ . In our application, the metric space was $\mathbb { R } ^ { n }$ and $\delta$ was the Euclidean metric. If the Wasserstein distance between two distributions is zero, then it becomes impossible to discern the origin of a sample from one of these two distributions. In addition, the Wasserstein distance (as well as other related metrics for probability distributions) are more appropriate to use than classifiers. This is because classifiers are more sensitive to the distinguishability between probability distributions than other potentially meaningful features. For instance, two otherwise identical Gaussian distributions displaced from one another would have Wasserstein distance equal to the displacement between them. On the contrary, a classifier would yield a function that has vanishing gradients for sufficiently large displacement.
|
| 36 |
+
|
| 37 |
+
Given two or more probability distributions, their mean can be defined under the Wasserstein distance, known as the ‘Wasserstein barycenter’. Explicitly, the Wasserstein barycenter of $N$ distributions $\nu _ { 1 } , . . . , \nu _ { N }$ is defined as the distribution $\mu$ that minimizes
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\frac { 1 } { N } \sum _ { i = 1 } ^ { N } W ( \mu , \nu _ { i } ) .
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
The Wasserstein barycenter and its computation have been studied in many contexts, such as optimal transport theory (Cuturi $\&$ Doucet, 2014; Anderes et al., 2016). In Tabak & Trigila (2018), the Wasserstein barycenter has been suggested as a method to remove nuisance variation in highthroughput biological experiments. Two key ingredients of the Wasserstein barycenter are that (i) the nuisance variation is removed in the sense that a number of distinct distributions are transformed into a common distribution, and hence become indistinguishable; and (ii) the distributions are minimally perturbed by the transformtions.
|
| 44 |
+
|
| 45 |
+
Our method is based on these two requirements, where a separate map is associated with each domain. For each treatment, the average Wasserstein distance among all pairs of transformed distributions across domains is included in the loss function. Specifically, the average Wasserstein distance is formulated as
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\frac { 2 } { N ( N - 1 ) } \sum _ { i , j = 1 , i < j } ^ { N } W ( A _ { d _ { i } } ( \nu _ { i } ) , A _ { d _ { j } } ( \nu _ { j } ) ) ,
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where the coefficient is the normalizing constant. When multiple treatments are considered, the same number of average Wasserstein distances corresponding to the treatments are included in the loss function. Thus, (i) is achieved by minimizing a loss function containing pairwise Wasserstein distances. Compared with the ResNet used in Shaham et al. (2017), we achieve (ii) by early stopping or adding a regularization term to the loss function. In Section 4.1, we will present another possible formulation that aligns more closely with the idea of the Wasserstein barycenter.
|
| 52 |
+
|
| 53 |
+
One distinct advantage of the Wasserstein distance is that this metric avoids problematic vanishing gradients during training, which are known to occur for metrics based on the KL-divergence, such as the cross entropy (Arjovsky et al., 2017). This is important from a practical point of view because vanishing gradients may halt the solving of the resulting minimax problem in our method.
|
| 54 |
+
|
| 55 |
+
The Wasserstein distance does not have a closed form except for a few special cases, and must be approximated in some way. The Wasserstein distance is closely related to the maximum mean discrepancy (MMD) approximated in Shaham et al. (2017) using an empirical estimator based on the kernel method. This method requires selecting a kernel and relevant parameters. In our application, we do not have a fixed ‘target’ distribution, so the kernel parameters would have to be updated during training. We choose instead to use a method based on the ideas in Arjovsky et al. (2017) and Gulrajani et al. (2017) to train a neural network to estimate the Wasserstein distance. A similar approach has been proposed in Shen et al. (2017) for domain adaptation. To do this, first apply the Kantorovich-Rubinstein duality:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
W ( \nu _ { r } , \nu _ { g } ) = \operatorname* { s u p } _ { \| f \| _ { L } \leq 1 } E _ { x \sim \nu _ { r } } \left[ f ( x ) \right] - E _ { x \sim \nu _ { g } } \left[ f ( x ) \right] .
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
Here, $\nu _ { r }$ and $\nu _ { g }$ are two probability distributions. The function $f$ is in the space of Lipschitz functions with Lipschitz constant at most 1. To estimate the Wasserstein distance, a function $f$ can be optimized while keeping the norm of its gradient to be less than one. We will call $f$ the ‘Wasserstein function’ throughout this manuscript.
|
| 62 |
+
|
| 63 |
+
# 2.3 NETWORK ARCHITECTURE
|
| 64 |
+
|
| 65 |
+
# 2.3.1 DOMAIN-SPECIFIC TRANSFORMATION
|
| 66 |
+
|
| 67 |
+
As a preprocessing step, we transform the embeddings for the dataset of interest such that the embeddings for the negative controls have mean zero and an identity covariance matrix (see Section 3.1 for details). We observe that the embeddings for wells corresponding to different dosages of each compound are all shifted away from the origin in roughly the same direction by an amount that generally increases with dosage. The variances of embeddings along the largest principal axes also increase in a manner consistent with the drugs inducing an affine transformation of the embeddings.
|
| 68 |
+
|
| 69 |
+
Given these observations, we choose to model the impact of nuisance variation by affine transformations, the intuition being that we can treat nuisance variations as small, random, drug-like perturbations resulting from unobserved covariates. It is worth mentioning that we do not expect this assumption to hold generally.
|
| 70 |
+
|
| 71 |
+
In the current implementation, the domain-specific transformations $A _ { d }$ map input embeddings to transformed embeddings of the same dimension. Each $A _ { d }$ is formulated as an affine transformation $A _ { d } ( x ) = M _ { d } x + b _ { d }$ .
|
| 72 |
+
|
| 73 |
+
# 2.3.2 LOSS FUNCTION
|
| 74 |
+
|
| 75 |
+
Collectively denote the parameters for the transformations $A _ { d }$ by $\theta _ { \mathrm { T } }$ . If a particular treatment $t$ is replicated across two or more domains $d _ { 1 } , d _ { 2 } , . . . , d _ { k }$ , the Wasserstein distances among the transformed distributions are estimated for all same-treatment domain pairs. Notice the parameters for estimating the Wasserstein distance for each $t$ and pair $d _ { i } , d _ { j }$ are different. Collectively denote all Wasserstein estimation parameters by $\theta _ { \mathrm { { W } } }$ . We consider the loss function
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
L ( \theta _ { \mathrm { T } } , \theta _ { \mathrm { W } } ) = \frac { 1 } { | T | } \sum _ { t \in T } \frac { 2 } { M _ { t } ( M _ { t } - 1 ) } \sum _ { \substack { d _ { i } , d _ { j } \in D , i \neq j } } \left[ W _ { t , d _ { i } , d _ { j } } ( \theta _ { \mathrm { T } } , \theta _ { \mathrm { W } } ) - g _ { t , d _ { i } , d _ { j } } ( \theta _ { \mathrm { T } } , \theta _ { \mathrm { W } } ) \right] + R ( \theta _ { \mathrm { T } } ) .
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
In (eq. 5), $W _ { t , d _ { i } , d _ { j } } ( \theta _ { \mathrm { { T } } } , \theta _ { \mathrm { { W } } } ) - g _ { t , d _ { i } , d _ { j } } ( \theta _ { \mathrm { { T } } } , \theta _ { \mathrm { { W } } } )$ is a penalized approximation to the Wasserstein distance between domains $d _ { i }$ and $d _ { j }$ , the function $R ( \theta _ { \mathrm { T } } )$ is a regularization term for the learned transformation whose purpose is to preserve the geometry of the original embeddings, $M _ { t }$ denotes the number of domains in which treatment $t$ appears, and $| \cdot |$ represents the cardinality of a set.
|
| 82 |
+
|
| 83 |
+
In this paper, we explore either (i) neglecting $R$ entirely and relying on early stopping instead, and (ii) specifying $R$ as described below and in (eq. 6). Using one of these methods is necessary since otherwise optimizing $L$ may result in embeddings which contain no treatment information (for example, if all embeddings are transformed to a single point).
|
| 84 |
+
|
| 85 |
+
There may be many possible forms for $R$ , and these could involve multiple parameter choices for different components of the transformation that $\theta _ { \textup T }$ determines. In our case, $\theta _ { \textup T }$ parameterizes an affine transformation, and hence we choose
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
R ( \theta _ { \mathrm { T } } ) = \frac { 1 } { | D | } \sum _ { d } \left( \frac { 1 } { q } \lambda _ { M } \| M _ { d } \| _ { F } ^ { 2 } + \lambda _ { b } \| b _ { d } \| _ { 2 } ^ { 2 } \right) ,
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
where $\| \cdot \| _ { F }$ denotes the Frobenius norm, $\| \cdot \| _ { 2 }$ denotes the $\ell ^ { 2 }$ norm, and $q$ denotes the embedding dimensionality. Moreover, there are two regularization weights $\lambda _ { M }$ and $\lambda _ { b }$ .
|
| 92 |
+
|
| 93 |
+
In (eq. 5), $W _ { t , d _ { i } , d _ { j } }$ is used to approximate the Wasserstein distance between the transformed embeddings of domains $d _ { i }$ and $d _ { j }$ for treatment $t$ upon optimization over $\theta _ { \mathrm { W } }$ . The Wasserstein distance is given by
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\begin{array} { r } { W _ { t , d _ { i } , d _ { j } } ( \theta _ { \mathrm { T } } , \theta _ { \mathrm { W } } ) = \frac { 1 } { N } \displaystyle \sum _ { p \in I _ { t , d _ { i } } } f _ { t , d _ { i } , d _ { j } } ( A _ { d _ { i } } ( x _ { t , d _ { i } , p } ; \theta _ { \mathrm { T } } ) ; \theta _ { \mathrm { W } } ) } \\ { - \frac { 1 } { N } \displaystyle \sum _ { q \in I _ { t , d _ { j } } } f _ { t , d _ { i } , d _ { j } } ( A _ { d _ { j } } ( x _ { t , d _ { j } , q } ; \theta _ { \mathrm { T } } ) ; \theta _ { \mathrm { W } } ) . } \end{array}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
Each Wasserstein function $f _ { t , d _ { i } , d _ { j } }$ in (eq. 7) depends on the parameters $\theta _ { \mathrm { { W } } }$ , while each transformation $A _ { d }$ depends on the parameters $\theta _ { \mathrm { T } }$ . For simplicity, we assume that $N = | I _ { t , d _ { i } } | = | I _ { t , d _ { j } } |$ , where $| \cdot |$ represents the cardinality of a set. This is a reasonable assumption because in practice, the sets $I _ { t , d }$ are chosen as minibatches in stochastic gradient descent. Each of the terms $g _ { t , d _ { i } , d _ { j } }$ is a gradient penalty defined in (eq. 8-10).
|
| 100 |
+
|
| 101 |
+
Each Wasserstein function should be Lipschitz with Lipschitz constant 1. For differentiable functions, this is equivalent to the norm being bounded by 1 everywhere. We use an approach based on Gulrajani et al. (2017) to impose a soft constraint on the norm of the gradient. In this approach, the hard constraint is replaced by a penalty, which is a function of the gradient of the Wasserstein function evaluated at some set of points. The penalty term is weighted by an additional parameter $\gamma$ . We find that the value of $\gamma = 1 0$ used in Gulrajani et al. (2017) works well in our application, and fix it throughout. We remark this is an appropriate choice since it is large enough so that the approximation error in the Wasserstein function is small, while not causing numerical difficulties in the optimization routine. Since it is impossible to check the gradient everywhere, we use the same strategy as Gulrajani et al. (2017): choose the intermediate points $\epsilon A _ { d _ { i } } ( x _ { t , d _ { i } , p _ { k } } ; \theta _ { \mathrm { T } } ) + ( 1 - \epsilon ) A _ { d _ { j } } ( x _ { t , d _ { j } , q _ { k } } ; \theta _ { \mathrm { T } } )$ randomly, where $\epsilon \in U [ 0 , 1 ]$ and $p _ { k }$ and $q _ { k }$ denote the $k _ { t h }$ element of $I _ { t , d _ { i } }$ and $I _ { t , d _ { j } }$ , respectively. Denote the set of intermediate points by $J _ { t , d _ { i } , d _ { j } }$ . Intuitively, the reason for sampling along these paths is that the Wasserstein function $f$ whose gradient must be constrained has the interpretation of characterizing the optimal transport between the two probability distributions, and therefore it is most important for the gradient constraint to hold in the intermediate region between the distributions. This is motivated more formally by Proposition 1 in Gulrajani et al. (2017), which shows that an optimal transport plan occurs along straight lines with gradient norm 1 connecting coupled points between the probability distributions. Unlike Gulrajani et al. (2017), we impose the gradient penalty only if the gradient norm is greater than 1. Doing so works better in practice for our application.
|
| 102 |
+
|
| 103 |
+
Explicitly, we define each gradient penalty $g _ { t , d _ { i } , d _ { j } }$ as
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
g _ { t , d _ { i } , d _ { j } } ( \theta _ { \mathrm { T } } , \theta _ { \mathrm { W } } ) = \frac { 1 } { N } \sum _ { z \in J _ { t , d _ { i } , d _ { j } } } H _ { t , d _ { i } , d _ { j } } ( z ; \theta _ { \mathrm { W } } ) ,
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
where
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\begin{array} { r l } & { H _ { t , d _ { i } , d _ { j } } ( z ; \theta _ { \mathsf { W } } ) = \left\{ \begin{array} { l l } { \displaystyle { \big ( G _ { t , d _ { i } , d _ { j } } ( z ; \theta _ { \mathsf { W } } ) - 1 \big ) ^ { 2 } } } & { \mathrm { ~ i f ~ } G _ { t , d _ { i } , d _ { j } } ( z ; \theta _ { \mathsf { W } } ) > 1 , } \\ { \displaystyle { 0 } } & { \mathrm { o t h e r w i s e } . } \end{array} \right. } \\ & { G _ { t , d _ { i } , d _ { j } } ( z ; \theta _ { \mathsf { W } } ) = \| \nabla _ { \theta _ { \mathsf { W } } } f _ { t , d _ { i } , d _ { j } } ( z ; \theta _ { \mathsf { W } } ) \| _ { 2 } . } \end{array}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
To approximate the Wasserstein distance we must maximize over $\theta _ { \mathrm { W } }$ . Thus, our objective is to find
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\begin{array} { r } { \hat { \theta } _ { \mathrm { T } } , \hat { \theta } _ { \mathrm { W } } = \mathrm { a r g m i n } _ { \theta _ { \mathrm { T } } } \mathrm { a r g m a x } _ { \theta _ { \mathrm { W } } } L ( \theta _ { \mathrm { T } } , \theta _ { \mathrm { W } } ) . } \end{array}
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
We use the approach of Ganin $\&$ Lempitsky (2015) to transform our minimax problem to a minimization problem by adding a ‘gradient reversal’ between the transformed embeddings and the approximated Wasserstein distances. The gradient reversal is the identity in the forward direction, but negates the gradients used for backpropagation.
|
| 122 |
+
|
| 123 |
+
# 3 EMPIRICAL RESULTS
|
| 124 |
+
|
| 125 |
+
The embeddings under consideration are generated using the method described in Ando et al. (2017), and summarized in Section 3.1.
|
| 126 |
+
|
| 127 |
+
# 3.1 DATASET AND PREPROCESSING
|
| 128 |
+
|
| 129 |
+
We use the image set BBBC021v1 (Caie et al., 2010) available from the Broad Bioimage Benchmark Collection (Ljosa et al., 2012). This dataset corresponds to cells prepared on 55 plates across 10 separate batches, and imaged in three color channels (i.e. stains); for a population of control cells, a compound (DMSO) with no anticipated drug effect was applied, while various other drug compounds were applied to the remaining cells. We compute the corresponding embeddings for each cell image using the method in Ando et al. (2017), summarized as follows. For a 128 by 128 pixel crop around each cell for each of the three color channels, a Deep Metric Network generates a 64-dimensional embedding vector. The three vectors corresponding to the three color channels are concatenated, forming a 192-dimensional embedding for each cell image. Using the embedding vectors for all cells, a Typical Variation Normalization (TVN) is applied in which the negative controls (i.e., DMSO) are whitened. Specifically, in the principal component analysis (PCA) basis of only negative control cells, an affine transformation is found so that the negative controls have mean zero and identity covariance matrix. The same transformation is then applied to the embeddings of all cells. Note that Ando et al. (2017) uses a different terminology, where TVN includes an additional transformation named CORAL, which will be presented and compared with in Section 3.4.
|
| 130 |
+
|
| 131 |
+
We use the same subset of treatments (concentration of a particular compound) evaluated in Ljosa et al. (2013) and Ando et al. (2017). This subset has 103 treatments from 38 compounds, each belonging to one of 12 known mechanism of action (MOA) groups. Sample cell images from the 12 MOA groups are shown in Figure 1. In Figure 6, we show a heatmap of the cosine similarity matrix between pairs of the selected treatments for the TVN embeddings. This figure shows how embeddings of the same compound, and embeddings of the compounds with the same MOA have a tendency to cluster closer to each other in terms of the cosine distance.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 1: A flowchart describing the procedure we use to generate and remove nuisance variation from image embeddings. The embedding generation is described in Section 3.1 is characterized by $\mathcal { F }$ , which maps each 128 by 128 color image into a 192-dimensional embedding vector. The nuisance variation removal by our method is denoted by WDN (Wasserstein Distance Network). The 12 images on the right side show representative images of cells treated with drug compounds with one of the 12 known mechanisms of action (MOA), from the BBBC021 dataset (Ljosa et al., 2012).
|
| 135 |
+
|
| 136 |
+
# 3.2 EVALUATION METRICS
|
| 137 |
+
|
| 138 |
+
Our method is evaluated by three metrics, the first two of which measure how much biological signal is preserved in the transformed embeddings, and the last one of which measures how much nuisance variation has been removed.
|
| 139 |
+
|
| 140 |
+
# 3.2.1 K-NEAREST NEIGHBOR MECHANISM OF ACTION ASSIGNMENT
|
| 141 |
+
|
| 142 |
+
Each compound in the BBBC021 dataset has a known MOA. A desirable property of embedding vectors is that compounds with the same MOA should group closely in the embedding space. This property can be assessed in the following way using the ground truth MOA labels for each treatment.
|
| 143 |
+
|
| 144 |
+
First, compute the mean $m _ { X }$ of the embeddings for each treatment $X$ in each domain. Find the nearest $k$ neighbors $n _ { X , 1 } , n _ { X , 2 } , . . . , n _ { X , k }$ of $m _ { X }$ either (i) not belonging to the same compound or (ii) not belonging to the same compound or batch (domain), and compute the portion of them having the same MOA as $m _ { X }$ . Our metric is defined as the average of this quantity across all treatment instances $X$ in all domains. If nuisance variation is corrected by transforming the embeddings, we may expect this metric to increase. The reason for excluding same-domain nearest neighbors is to avoid the in-domain correlations from interfering with the metric.
|
| 145 |
+
|
| 146 |
+
The nearest $k$ neighbors are found based on the cosine distance, which is more natural for the embedding space than the Euclidean distance, and can be directly compared with methods in existing literature. Moreover, our k-NN metrics are generalizations of the 1-NN metrics used in Ljosa et al. (2013) and Ando et al. (2017).
|
| 147 |
+
|
| 148 |
+
# 3.2.2 SILHOUETTE INDEX
|
| 149 |
+
|
| 150 |
+
Cluster validation measures provide another way of characterizing how well compounds from the same MOA group together in embedding space. In our application, each ‘cluster’ is a chosen MOA containing a group of treatments, and each point in a cluster is the mean of embeddings for a particular treatment (i.e. compound and concentration) and domain.
|
| 151 |
+
|
| 152 |
+
The Silhouette index is one such measure that compares each point’s distance from points in its own cluster to its distance from points in other clusters. It is defined as
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
s ( i ) = \frac { b ( i ) - a ( i ) } { \operatorname* { m a x } \{ a ( i ) , b ( i ) \} } ,
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
where $a ( i )$ is the average distance from point $i$ to all other points in its cluster, and $b ( i )$ is the minimum of all average distances from $i$ to all other clusters (i.e. the distance to the closest neighboring cluster) (Rousseeuw, 1987). The Silhouette index ranges between $^ { - 1 }$ and 1, with higher values indicating better clustering results.
|
| 159 |
+
|
| 160 |
+
# 3.2.3 DOMAIN CLASSIFICATION ACCURACY PER TREATMENT
|
| 161 |
+
|
| 162 |
+
Another metric measures how well domain-specific nuisance information has been ‘forgotten’. To do this, for each treatment we train a classifier to predict for each embedding the batch (domain) from the set of possible batches (domains) for that treatment. We evaluate both a linear classifier (i.e. logistic regression) and a random forest with 3-fold cross validation. If nuisance variation is being corrected, the batch (domain) classification accuracy should decrease significantly. Because only the negative control (i.e., DMSO) has replicates across experiment batches in our dataset, we train and evaluate these two batch classifiers on this compound only.
|
| 163 |
+
|
| 164 |
+
# 3.3 PROCEDURE
|
| 165 |
+
|
| 166 |
+
# 3.3.1 LEAVE-ONE-COMPOUND-OUT CROSS-VALIDATION
|
| 167 |
+
|
| 168 |
+
For the model with either early stopping or a regularization term, the hyperparameters (i.e., the stopping time step or the regularization weights) can be selected by a cross-validation procedure to avoid overfitting (see Godinez et al. (2017) for an example). In particular, we apply this procedure to the case of early stopping. Each time, an individual compound is held out, and the stopping time step is determined by maximizing the average k-NN MOA assignment metric for $k = 1 , . . . , 4$ on the remaining compounds. Figure 2 illustrates the k-NN MOA assignment metrics as a function of time steps in the case when early stopping is used with compound mitoxantrone held out.
|
| 169 |
+
|
| 170 |
+
For the embeddings transformed at the optimal time step, we evaluate the k-NN MOA assignment metrics for the held-out compound. The procedure is repeated for all the compounds, and the $\mathbf { k }$ -NN MOA assignment metrics are aggregated across all the compounds. Intuitively, for each fold of this leave-one-compound-out cross-validation procedure, the held-out compound can be treated as a new compound with unknown MOA, and the hyperparameters are optimized over the compounds with known MOAs. In our case, we find that the optimal time step remains the same, i.e., 28000, regardless of the held-out compound.
|
| 171 |
+
|
| 172 |
+
# 3.3.2 STANDARD ERRORS OF THE METRICS
|
| 173 |
+
|
| 174 |
+
To assess whether the improvements in the $\mathbf { k }$ -NN MOA assignment metric and the Silhouette index are statistically significant, we estimate the standard errors of the metrics using a nonparametric bootstrap method. Each time, the bootstrap samples are generated by sampling with replacement the embeddings preprocessed by TVN in each well, and the metrics are evaluated using the bootstrap samples. We repeat the procedure for 200 times, and obtain the standard errors of the 200 bootstrap estimates of the metrics, which are summarized in Tables 1 and 3.
|
| 175 |
+
|
| 176 |
+
# 3.3.3 TRAINING PROCEDURE
|
| 177 |
+
|
| 178 |
+
The embedding transformations $A _ { d } ( x ) = M _ { d } x + b _ { d }$ are initialized to $M _ { d } = I$ , $b _ { d } = 0$ , since we wish for the learned transformations to be not too far from the identity transformation.
|
| 179 |
+
|
| 180 |
+
To approximate each of the Wasserstein functions $f _ { t , d _ { i } , d _ { j } }$ in (eq. 7), we use a network consisting of softplus layer followed by a scalar-valued affine transformation. The softplus loss is chosen because the Wasserstein distance estimates it produces are less noisy than other kinds of losses and it avoids the issue of all neurons becoming deactivated (which can occur for example when using RELU activations).
|
| 181 |
+
|
| 182 |
+
The dimension of the softplus layer used to approximate each Wasserstein function is 2. Optimization is done using stochastic gradient instead of the sums in (eq. 7). For simplicity, the minibatch size for each treatment per iteration step is fixed throughout. In the results presented, the minibatch size is 50. Optimization for both classes of parameters $\theta _ { \mathrm { T } }$ and $\theta _ { \mathrm { { W } } }$ is done using separate RMSProp optimizers. Prior to training $\theta _ { \textup T }$ , we use a ‘pre-training’ period of 20000 time steps to obtain a good approximation for the Wasserstein distances. After this, we alternate between adjusting $\theta _ { \mathrm { T } }$ for 40 time steps and optimizing over $\theta _ { \mathrm { { W } } }$ for a single time step.
|
| 183 |
+
|
| 184 |
+
# 3.4 RESULTS
|
| 185 |
+
|
| 186 |
+
We compare our results to either using no transformation other than normalization (TVN) and CORAL. CORAL applies a domain-specific affine transformation to the embeddings represented as the rows of a matrix $X _ { d }$ from domain $d$ in the following way. On the negative controls only, the covariance matrix across the entire experiment $C$ as well as the covariance $C _ { d }$ in each domain $d$ are computed. Notice that since TVN had already been applied (see Section 3.1), $C = I$ . Then, all embedding coordinates in domain $d$ are aligned by matching the covariance structures. Alignment is done by computing the new embeddings $X _ { d } ^ { \mathrm { a l i g n e d } } = X _ { d } \bar { R } _ { d } ^ { - 1 / 2 } R ^ { 1 / 2 }$ . Here $R _ { d } = C _ { d } + \eta I$ and $R = C + \eta I$ are regularized covariance matrices, with the regularizer $\eta = 1$ , which is the same as that in Ando et al. (2017).
|
| 187 |
+
|
| 188 |
+
Other variations of the training procedure are discussed in Sections 3.4.3 and 3.5.
|
| 189 |
+
|
| 190 |
+
# 3.4.1 VISUALIZATION OF RESULTS
|
| 191 |
+
|
| 192 |
+
Figure 3 shows the first two principal components of the embeddings transformed by WDN, compared with the embeddings preprocessed by TVN (see Section 3.1) and the embeddings generated by the CORAL method proposed in Sun et al. (2017) and applied by Ando et al. (2017).
|
| 193 |
+
|
| 194 |
+
Figure 5 shows the dosage response for each compound based on each set of transformed embeddings. WDN is seen to better preserve the geometry of the embeddings than CORAL.
|
| 195 |
+
|
| 196 |
+
# 3.4.2 METRICS
|
| 197 |
+
|
| 198 |
+
Table 1 shows the k-NN MOA assignment metrics of our transformed embeddings (early stopping and some particular choices of the regularization weights) compared to the original embeddings as well as the estimated standard errors. We also include the values of this metric for CORAL. We find that our WDN method performs better than CORAL in terms of the k-NN MOA assignment metrics.
|
| 199 |
+
|
| 200 |
+
Finally, Table 2 compares the average batch classification accuracy for a linear classifier (i.e., logistic regression) and a random forest classifier for the original TVN embeddings, WDN embeddings (early stopping and some particular choices of the regularization weights), CORAL embeddings, and for reference, a trivial transformation for which all embeddings are set to zero. For each run, given a classifier and a transformed set of embeddings, we compute the mean accuracy for that classifier using 3-fold cross validation. We see that the batch classification accuracy for the embeddings using our method is substantially smaller than that using TVN or CORAL, indicating our method is removing nuisance variation.
|
| 201 |
+
|
| 202 |
+
# 3.4.3 EARLY STOPPING VERSUS REGULARIZATION TERM
|
| 203 |
+
|
| 204 |
+
We have tried regularizing the network either with a regularization term or early stopping. When using a regularization term, the loss function and the evaluation metrics converge for a chosen set of regularization weights. We present the resulting $\mathrm { k }$ -NN MOA assignment metrics in Table 1 for several values of $\lambda = \lambda _ { M } = \lambda _ { b }$ , as well as for the early stopping at the optimal time step 28000. We see that the smaller regularization $\lambda = 4 0$ ) results in a greater removal of nuisance variation. However, removing more nuisance variation may be counterbalanced by also removing relevant biological signal, as suggested by the k-NN MOA assignment metrics in Table 1. In addition, using a non-optimal choice of the regularization weight may result in a lower Silhouette index, as shown in Table 3.
|
| 205 |
+
|
| 206 |
+
Each approach has advantages and disadvantages. Using early stopping is simpler and does not require a computationally intensive grid search over all parameters to obtain optimal results, but on the other hand this may be a limiting factor in performance because of the smaller selection of parameters. If the transformed embedding vectors do not follow an approximately direct path throughout the optimization, early stopping may miss the optimal solution. This development is likely not a problem in our applications, since the transformation is small. This explains why early stopping does not seem to produce negative side effects. We find that early stopping produces a better result in terms of the k-NN MOA assignment metrics than the values of $\lambda$ we have tried, but we anticipate using a more thorough search over the regularization weights would yield similar results between the two methods.
|
| 207 |
+
|
| 208 |
+
The learning curves for both the early stopping case and some regularization weights are shown in Figure 4.
|
| 209 |
+
|
| 210 |
+
# 3.5 ADDITIONAL EXPERIMENTS
|
| 211 |
+
|
| 212 |
+
To assess how the hyperparameters of the model affect its performance, we conduct additional experiments by varying the hyperparameters. For example, the minibatch size is increased from 50 to 100. The results are similar except that the learning curve in the case of 100 appears less noisy. Moreover, the architecture of the network that estimates the pairwise Wasserstein distances is made more complicated by increasing the number of hidden layers from two to three and four, and the number of nodes per layer from two to four and eight, respectively. Again, there is no significant difference in the results except that the curves of the $\mathbf { k }$ -NN MOA assignment metrics over the number of time steps appeared more stable.
|
| 213 |
+
|
| 214 |
+
# 4 CONCLUSION
|
| 215 |
+
|
| 216 |
+
We have shown how a neural network can be used to transform embedding vectors to ‘forget’ specifically chosen domain information as indicated by our proposed domain classification metric. The transformed embeddings still preserve the underlying geometry of the space and improve the $\mathbf { k } .$ - NN MOA metrics. Our approach uses the Wasserstein distance and can in principle handle fairly general distributions of embeddings (as long as the neural network used to approximate the Wasserstein function is general enough). Importantly, we do not have to assume that the distributions are Gaussian.
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
Figure 2: k-NN MOA assignment metrics for one fold of the cross-validation with compound mitoxantrone held out. The average k-NN metric is used to select the stopping time step, which is at 28000 as indicated by the vertical line. Early stopping is supposed to preserve relevant biological signal while remove batch-level nuisance variation. The top panel shows the ‘not same compound’ metric, and the bottom panel shows the ‘not same compound or batch’ metric (see Section 3.2.1 for details).
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 3: Comparison of the first two principal components for the embeddings of the negative control (i.e., DMSO) after preprocessing (i.e., TVN) (left), embeddings transformed by the $\mathrm { T V N } +$ CORAL method proposed in Ando et al. (2017) (middle), and embeddings transformed by $\mathrm { T V N } +$ WDN (right), which illustrates the reduction of batch-level nuisance variation. Each color corresponds to a batch, and there are ten batches in total. Our method is designed to match embeddings of compounds across batches while not distorting the geometry of the embedding space.
|
| 223 |
+
|
| 224 |
+
The framework itself is quite general and extendible (see Section 4.1). Unlike methods that use only the controls for adjusting the embeddings, our method can also utilize information from replicates of a treatment across different domains. However, the dataset used did not have treatment replicates across batches, so we only relied on aligning based on the controls. Thus we implicitly assume that the transformation for the controls matches that of the various compounds. We expect our method to be more useful in the context of experiments where many replicates are present, so that they can all be aligned simultaneously. We expect transformations learned for such experiments to have better generalizability since it would be using available knowledge from a greater portion of the embedding space.
|
| 225 |
+
|
| 226 |
+
Our approach requires a choice of free parameters, either for regularization or early stopping, which we address by cross validation across compounds. We discuss potential future directions below, as well as other limiting issues.
|
| 227 |
+
|
| 228 |
+
Table 1: k-NN MOA assignment metrics for TVN only, $\mathrm { T V N } + \mathrm { W D N }$ , and $\mathrm { T V N + C O R A L }$ , where WDN is regularized by either early stopping or a regularization term with weights. The last column shows the standard errors estimated by the bootstrap method described in Section 3.3.2. These metrics suggest that WDN with early stopping yields embeddings containing stronger biological signal than TVN or $\mathrm { T V N + C O R A L }$ . Here the $\lambda = 4 0 , 8 0 , 1 6 0$ are the WDN transformation after converging, when a regularization term $\lambda = \lambda _ { M } = \lambda _ { b }$ is added.
|
| 229 |
+
|
| 230 |
+
(a) Not same compound
|
| 231 |
+
|
| 232 |
+
<table><tr><td rowspan=1 colspan=1>k-NN</td><td rowspan=1 colspan=1>TVN only</td><td rowspan=1 colspan=1>WDN</td><td rowspan=1 colspan=1>CORAL</td><td rowspan=1 colspan=1>入=40</td><td rowspan=1 colspan=1>入=80</td><td rowspan=1 colspan=1>入=160</td><td rowspan=1 colspan=1>土</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>96.1%</td><td rowspan=1 colspan=1>97.1%</td><td rowspan=1 colspan=1>97.1%</td><td rowspan=1 colspan=1>97.1%</td><td rowspan=1 colspan=1>97.1%</td><td rowspan=1 colspan=1>96.1%</td><td rowspan=1 colspan=1>1.1%</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>92.2%</td><td rowspan=1 colspan=1>95.1%</td><td rowspan=1 colspan=1>94.7%</td><td rowspan=1 colspan=1>93.7%</td><td rowspan=1 colspan=1>95.1%</td><td rowspan=1 colspan=1>93.7%</td><td rowspan=1 colspan=1>0.7%</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>89.3%</td><td rowspan=1 colspan=1>91.9%</td><td rowspan=1 colspan=1>90.9%</td><td rowspan=1 colspan=1>90.6%</td><td rowspan=1 colspan=1>91.9%</td><td rowspan=1 colspan=1>91.6%</td><td rowspan=1 colspan=1>0.6%</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>87.4%</td><td rowspan=1 colspan=1>89.9%</td><td rowspan=1 colspan=1>88.4%</td><td rowspan=1 colspan=1>88.9%</td><td rowspan=1 colspan=1>89.2%</td><td rowspan=1 colspan=1>89.7%</td><td rowspan=1 colspan=1>0.5%</td></tr></table>
|
| 233 |
+
|
| 234 |
+
<table><tr><td rowspan=1 colspan=1>k-NN</td><td rowspan=1 colspan=1>TVN only</td><td rowspan=1 colspan=1>WDN</td><td rowspan=1 colspan=1>CORAL</td><td rowspan=1 colspan=1>入=40</td><td rowspan=1 colspan=1>入=80</td><td rowspan=1 colspan=1>入= 160</td><td rowspan=1 colspan=1>土</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>90.2%</td><td rowspan=1 colspan=1>93.5%</td><td rowspan=1 colspan=1>91.3%</td><td rowspan=1 colspan=1>92.4%</td><td rowspan=1 colspan=1>91.3%</td><td rowspan=1 colspan=1>91.3%</td><td rowspan=1 colspan=1>1.0%</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>88.9%</td><td rowspan=1 colspan=1>91.1%</td><td rowspan=1 colspan=1>89.4%</td><td rowspan=1 colspan=1>90.6%</td><td rowspan=1 colspan=1>90.6%</td><td rowspan=1 colspan=1>89.4%</td><td rowspan=1 colspan=1>0.9%</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>84.7%</td><td rowspan=1 colspan=1>86.2%</td><td rowspan=1 colspan=1>85.1%</td><td rowspan=1 colspan=1>84.0%</td><td rowspan=1 colspan=1>85.1%</td><td rowspan=1 colspan=1>85.4%</td><td rowspan=1 colspan=1>0.7%</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>83.9%</td><td rowspan=1 colspan=1>84.8%</td><td rowspan=1 colspan=1>84.5%</td><td rowspan=1 colspan=1>83.6%</td><td rowspan=1 colspan=1>84.5%</td><td rowspan=1 colspan=1>84.5%</td><td rowspan=1 colspan=1>0.6%</td></tr></table>
|
| 235 |
+
|
| 236 |
+
(b) Not same compound or batch
|
| 237 |
+
|
| 238 |
+
Table 2: Batch (domain) classification accuracy after transformations for controls using either logistic regression (LR) or a random forest (RF) with 3 folds. We only use controls here because other treatments have no replicates across batches in our dataset. We compare TVN only, $\mathrm { T V N } + \mathrm { W D N }$ (with early stopping), and $\mathrm { T V N + C O R A L }$ . We also show the results for WDN with $\lambda = 4 0$ , 80, 160 for $\lambda = \lambda _ { M } = \lambda _ { b }$ . The ‘trivial transformation’ (send all embeddings to a point) is provided for reference. If all nuisance information is removed, the batch accuracy would drop that of the trivial transformation. The table below shows that WDN removes some of the nuisance variation, at least from the controls.
|
| 239 |
+
|
| 240 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>TVN only</td><td rowspan=1 colspan=1>WDN</td><td rowspan=1 colspan=1>CORAL</td><td rowspan=1 colspan=1>入= 40</td><td rowspan=1 colspan=1>入=80</td><td rowspan=1 colspan=1>入= 160</td><td rowspan=1 colspan=1>Trivial trans.</td></tr><tr><td rowspan=1 colspan=1>LR</td><td rowspan=1 colspan=1>63.6 ± 1%</td><td rowspan=1 colspan=1>39.8 ± 0.6%</td><td rowspan=1 colspan=1>66.4 ± 0.7%</td><td rowspan=1 colspan=1>28.0 ± 0.8%</td><td rowspan=1 colspan=1>46.8 ± 0.9%</td><td rowspan=1 colspan=1>56.2 ± 0.9%</td><td rowspan=1 colspan=1>16.6%</td></tr><tr><td rowspan=1 colspan=1>RF</td><td rowspan=1 colspan=1>45.9 ± 0.2%</td><td rowspan=1 colspan=1>34.4± 0.7%</td><td rowspan=1 colspan=1>46.8 ±0.6%</td><td rowspan=1 colspan=1>26.7 ± 0.7%</td><td rowspan=1 colspan=1>33.3 ± 0.7%</td><td rowspan=1 colspan=1>39.5 ± 0.1%</td><td rowspan=1 colspan=1>16.6%</td></tr></table>
|
| 241 |
+
|
| 242 |
+
Table 3: We show the silhouette index for TVN only, $\mathrm { T V N } + \mathrm { W D N }$ , and $\mathrm { T V N + C O R A L }$ , as discussed in Section 3.2.2. Here WDN refers to the the result using early stopping, and $\lambda = 4 0$ , 80, 160 refers to the result when using a regularization with $\lambda = \lambda _ { M } = \lambda _ { b }$ . Both WDN and CORAL appear to increase the cohesion, as measured by this index. The estimated error denoted by $\pm$ was determined by the bootstrapping procedure described in Section 3.3.2
|
| 243 |
+
|
| 244 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>TVN only</td><td rowspan=1 colspan=1>WDN</td><td rowspan=1 colspan=1>CORAL</td><td rowspan=1 colspan=1>入=40</td><td rowspan=1 colspan=1>入=80</td><td rowspan=1 colspan=1>入=160</td><td rowspan=1 colspan=1>土</td></tr><tr><td rowspan=1 colspan=1>Silhouette index</td><td rowspan=1 colspan=1>0.5042</td><td rowspan=1 colspan=1>0.5126</td><td rowspan=1 colspan=1>0.5099</td><td rowspan=1 colspan=1>0.5088</td><td rowspan=1 colspan=1>0.5115</td><td rowspan=1 colspan=1>0.5093</td><td rowspan=1 colspan=1>0.0019</td></tr></table>
|
| 245 |
+
|
| 246 |
+
# 4.1 FUTURE WORK
|
| 247 |
+
|
| 248 |
+
One possible modification we considered would be to replace the form of the cost function by the following, which would more closely resemble finding the Wasserstein barycenter:
|
| 249 |
+
|
| 250 |
+
$$
|
| 251 |
+
\sum _ { i , j = 1 } ^ { N } W ( \nu _ { i } , A _ { d _ { j } } ( \nu _ { j } ) ) .
|
| 252 |
+
$$
|
| 253 |
+
|
| 254 |
+
The difference is that instead of comparing the pairwise transformed distributions, we instead compare the transformed distributions to the original distributions. One advantage for this approach is that it avoids the ‘shrinking to a point’ problem, and therefore does not require a regularization term or early stopping to converge to a meaningful solution. However, we did not find better performance for the new form of the cost function (eq. 13) for our specific dataset.
|
| 255 |
+
|
| 256 |
+
An alternative regularization term to the one we used penalizing how much the transformation differs from the identity may be used. One interesting choice might be to penalize the change of pairwise distances between treatments within a specific domain. Intuitively, in-domain variations carry biological signal that we would like to preserve, and using such a regularization term does so explicitly.
|
| 257 |
+
|
| 258 |
+
The Wasserstein functions were approximated with very simple nonlinear functions, and it is possible better results would be obtained using more sophisticated functions capturing the Wasserstein distance and its gradients more accurately. Similarly, The transformations $A _ { d }$ could be generalized from affine to a more general class of functions. As in Shaham et al. (2017), we expect residual networks would make natural candidates for these transformations.
|
| 259 |
+
|
| 260 |
+
One possibility is to fine-tune the Deep Metric Network used to generate the embeddings instead of training a separate network on its outputs (or perhaps several such networks for the separate image stains used).
|
| 261 |
+
|
| 262 |
+
Another issue is how to weigh the various Wasserstein distances against each other. This might improve the results if there are many more points from some distributions than others (which happens in the real data). Further, it is unclear how a regularization term should be weighed against the Wasserstein loss terms.
|
| 263 |
+
|
| 264 |
+
Another extension may involve applying our method hierarchically on the various domains of the experiment. However, this would require replicates on multiple hierarchical levels.
|
| 265 |
+
|
| 266 |
+
Since the $\mathbf { k }$ -NN MOA assignment metric is based on the cosine distance, it is possible better results could be obtained by modifying the metric used to compute the Wasserstein distance accordingly, e.g. finding an optimal transportation plan only in non-radial directions.
|
| 267 |
+
|
| 268 |
+
# ACKNOWLEDGMENTS
|
| 269 |
+
|
| 270 |
+
We would like to thank Mike Ando, Marc Coram, Marc Berndl, Subhashini Venugopalan, Arunachalam Narayanaswamy, Yaroslav Ganin, Luke Metz, Eric Christiansen, Philip Nelson, and Patrick Riley for useful discussions and suggestions.
|
| 271 |
+
|
| 272 |
+

|
| 273 |
+
(a) No regularization term (i.e. $\lambda = 0$ ). This is the training routine that was used together with early stopping.
|
| 274 |
+
|
| 275 |
+

|
| 276 |
+
(b) Learning curve for $\lambda = 4 0$ .
|
| 277 |
+
|
| 278 |
+

|
| 279 |
+
(c) Learning curve for $\lambda = 8 0$
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
(d) Learning curve for $\lambda = 1 6 0$ .
|
| 283 |
+
Figure 4: Sample learning curves for WDN with regularization term for $\lambda ~ = ~ \lambda _ { M } ~ = ~ \lambda _ { b } ~ =$ 0, 40, 80, 160. The Wasserstein loss and the gradient penalty term as a function of the number of time steps trained on BBBC021 image dataset, after the Wasserstein parameters have been pretrained for 20000 steps. The larger the regularization weight, the further the point of convergence is from zero.
|
| 284 |
+
|
| 285 |
+
# B DOSAGE RESPONSE PLOTS
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
(d) Dosage response plots for $\mathrm { T V N } + \mathrm { W D N }$ with regularization term for $\lambda = \lambda _ { M } = \lambda _ { b } = 8 0$
|
| 289 |
+
Figure 5: Dosage response curves for each compound, as evaluated by the natural logarithm of the Euclidean distance of the embeddings from the origin (i.e. the center of the negative control). These plots show that WDN better preserves the geometry of the embedding space than CORAL, where the latter can magnify the scale of the response. WDN regularized by early stopping and a regularization term both slightly alter the embeddings.
|
| 290 |
+
|
| 291 |
+
# C COMPOUND SIMILARITY MATRIX
|
| 292 |
+
|
| 293 |
+

|
| 294 |
+
Figure 6: A heatmap showing the cosine similarity matrix between pairs of treatments for the TVN embeddings. Same-MOA compounds are grouped together, and the blue lines show distinctions between different MOAs. The block diagonal terms correspond to the similarity matrices for sameMOA compounds. This plot shows how same-MOA compounds tend to be more closely clustered together in the embedding space.
|
| 295 |
+
|
| 296 |
+
# REFERENCES
|
| 297 |
+
|
| 298 |
+
Ethan Anderes, Steffen Borgwardt, and Jacob Miller. Discrete wasserstein barycenters: optimal transport for discrete data. Mathematical Methods of Operations Research, 84(2):389–409, 2016.
|
| 299 |
+
|
| 300 |
+
D Michael Ando, Cory McLean, and Marc Berndl. Improving phenotypic measurements in highcontent imaging screens. bioRxiv, pp. 161422, 2017.
|
| 301 |
+
|
| 302 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 303 |
+
|
| 304 |
+
Marc G Bellemare, Ivo Danihelka, Will Dabney, Shakir Mohamed, Balaji Lakshminarayanan, Stephan Hoyer, and Remi Munos. The cramer distance as a solution to biased wasserstein gradi-´ ents. arXiv preprint arXiv:1705.10743, 2017.
|
| 305 |
+
|
| 306 |
+
Peter D Caie, Rebecca E Walls, Alexandra Ingleston-Orme, Sandeep Daya, Tom Houslay, Rob Eagle, Mark E Roberts, and Neil O Carragher. High-content phenotypic profiling of drug response signatures across distinct cancer cells. Molecular cancer therapeutics, 9(6):1913–1926, 2010.
|
| 307 |
+
|
| 308 |
+
Marco Cuturi and Arnaud Doucet. Fast computation of wasserstein barycenters. In International Conference on Machine Learning, pp. 685–693, 2014.
|
| 309 |
+
|
| 310 |
+
Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine Learning, pp. 1180–1189, 2015.
|
| 311 |
+
|
| 312 |
+
William J Godinez, Imtiaz Hossain, Stanley E Lazic, John W Davies, and Xian Zhang. A multi-scale convolutional neural network for phenotyping high-content cellular images. Bioinformatics, pp. btx069, 2017.
|
| 313 |
+
|
| 314 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017.
|
| 315 |
+
|
| 316 |
+
Vebjorn Ljosa, Katherine L Sokolnicki, and Anne E Carpenter. Annotated high-throughput microscopy image sets for validation. Nature methods, 9(7):637–637, 2012.
|
| 317 |
+
|
| 318 |
+
Vebjorn Ljosa, Peter D Caie, Rob Ter Horst, Katherine L Sokolnicki, Emma L Jenkins, Sandeep Daya, Mark E Roberts, Thouis R Jones, Shantanu Singh, Auguste Genovesio, et al. Comparison of methods for image-based profiling of cellular morphological responses to small-molecule treatment. Journal of biomolecular screening, 18(10):1321–1329, 2013.
|
| 319 |
+
|
| 320 |
+
Peter J Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20:53–65, 1987.
|
| 321 |
+
|
| 322 |
+
Uri Shaham, Kelly P Stanton, Jun Zhao, Huamin Li, Khadir Raddassi, Ruth Montgomery, and Yuval Kluger. Removal of batch effects using distribution-matching residual networks. Bioinformatics, pp. btx196, 2017.
|
| 323 |
+
|
| 324 |
+
Jian Shen, Yanru Qu, Weinan Zhang, and Yong Yu. Adversarial representation learning for domain adaptation. arXiv preprint arXiv:1707.01217, 2017.
|
| 325 |
+
|
| 326 |
+
Baochen Sun, Jiashi Feng, and Kate Saenko. Correlation alignment for unsupervised domain adaptation. In Domain Adaptation in Computer Vision Applications, pp. 153–171. Springer, 2017.
|
| 327 |
+
|
| 328 |
+
Esteban G Tabak and Giulio Trigila. Explanation of variability and removal of confounding factors from data through optimal transport. Communications on Pure and Applied Mathematics, 71(1): 163–199, 2018.
|
| 329 |
+
|
| 330 |
+
Jiang Wang, Yang Song, Thomas Leung, Chuck Rosenberg, Jingbin Wang, James Philbin, Bo Chen, and Ying Wu. Learning fine-grained image similarity with deep ranking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1386–1393, 2014.
|
md/train/H196sainb/H196sainb.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WORD TRANSLATION WITHOUT PARALLEL DATA
|
| 2 |
+
|
| 3 |
+
Guillaume Lample∗ † ‡ , Alexis Conneau∗ † § , Marc’Aurelio Ranzato† , Ludovic Denoyer‡ , Herve J ´ egou ´ † {glample,aconneau,ranzato,rvj}@fb.com ludovic.denoyer@upmc.fr
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
State-of-the-art methods for learning cross-lingual word embeddings have relied on bilingual dictionaries or parallel corpora. Recent studies showed that the need for parallel data supervision can be alleviated with character-level information. While these methods showed encouraging results, they are not on par with their supervised counterparts and are limited to pairs of languages sharing a common alphabet. In this work, we show that we can build a bilingual dictionary between two languages without using any parallel corpora, by aligning monolingual word embedding spaces in an unsupervised way. Without using any character information, our model even outperforms existing supervised methods on cross-lingual tasks for some language pairs. Our experiments demonstrate that our method works very well also for distant language pairs, like English-Russian or EnglishChinese. We finally describe experiments on the English-Esperanto low-resource language pair, on which there only exists a limited amount of parallel data, to show the potential impact of our method in fully unsupervised machine translation. Our code, embeddings and dictionaries are publicly available1.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Most successful methods for learning distributed representations of words (e.g. Mikolov et al. (2013c;a); Pennington et al. (2014); Bojanowski et al. (2017)) rely on the distributional hypothesis of Harris (1954), which states that words occurring in similar contexts tend to have similar meanings. Levy & Goldberg (2014) show that the skip-gram with negative sampling method of Mikolov et al. (2013c) amounts to factorizing a word-context co-occurrence matrix, whose entries are the pointwise mutual information of the respective word and context pairs. Exploiting word cooccurrence statistics leads to word vectors that reflect the semantic similarities and dissimilarities: similar words are close in the embedding space and conversely.
|
| 12 |
+
|
| 13 |
+
Mikolov et al. (2013b) first noticed that continuous word embedding spaces exhibit similar structures across languages, even when considering distant language pairs like English and Vietnamese. They proposed to exploit this similarity by learning a linear mapping from a source to a target embedding space. They employed a parallel vocabulary of five thousand words as anchor points to learn this mapping and evaluated their approach on a word translation task. Since then, several studies aimed at improving these cross-lingual word embeddings (Faruqui & Dyer (2014); Xing et al. (2015); Lazaridou et al. (2015); Ammar et al. (2016); Artetxe et al. (2016); Smith et al. (2017)), but they all rely on bilingual word lexicons.
|
| 14 |
+
|
| 15 |
+
Recent attempts at reducing the need for bilingual supervision (Smith et al., 2017) employ identical character strings to form a parallel vocabulary. The iterative method of Artetxe et al. (2017) gradually aligns embedding spaces, starting from a parallel vocabulary of aligned digits. These methods are however limited to similar languages sharing a common alphabet, such as European languages. Some recent methods explored distribution-based approach (Cao et al., 2016) or adversarial training Zhang et al. (2017b) to obtain cross-lingual word embeddings without any parallel data. While these approaches sound appealing, their performance is significantly below supervised methods. To sum up, current methods have either not reached competitive performance, or they still require parallel data, such as aligned corpora (Gouws et al., 2015; Vulic & Moens, 2015) or a seed parallel lexicon (Duong et al., 2016).
|
| 16 |
+
|
| 17 |
+
In this paper, we introduce a model that either is on par, or outperforms supervised state-of-the-art methods, without employing any cross-lingual annotated data. We only use two large monolingual corpora, one in the source and one in the target language. Our method leverages adversarial training to learn a linear mapping from a source to a target space and operates in two steps. First, in a twoplayer game, a discriminator is trained to distinguish between the mapped source embeddings and the target embeddings, while the mapping (which can be seen as a generator) is jointly trained to fool the discriminator. Second, we extract a synthetic dictionary from the resulting shared embedding space and fine-tune the mapping with the closed-form Procrustes solution from Schonemann (1966). ¨ Since the method is unsupervised, cross-lingual data can not be used to select the best model. To overcome this issue, we introduce an unsupervised selection metric that is highly correlated with the mapping quality and that we use both as a stopping criterion and to select the best hyper-parameters.
|
| 18 |
+
|
| 19 |
+
In summary, this paper makes the following main contributions:
|
| 20 |
+
|
| 21 |
+
• We present an unsupervised approach that reaches or outperforms state-of-the-art supervised approaches on several language pairs and on three different evaluation tasks, namely word translation, sentence translation retrieval, and cross-lingual word similarity. On a standard word translation retrieval benchmark, using 200k vocabularies, our method reaches $6 6 . 2 \%$ accuracy on English-Italian while the best supervised approach is at $6 3 . 7 \%$ .
|
| 22 |
+
• We introduce a cross-domain similarity adaptation to mitigate the so-called hubness problem (points tending to be nearest neighbors of many points in high-dimensional spaces). It is inspired by the self-tuning method from Zelnik-manor & Perona (2005), but adapted to our two-domain scenario in which we must consider a bi-partite graph for neighbors. This approach significantly improves the absolute performance, and outperforms the state of the art both in supervised and unsupervised setups on word-translation benchmarks.
|
| 23 |
+
We propose an unsupervised criterion that is highly correlated with the quality of the mapping, that can be used both as a stopping criterion and to select the best hyper-parameters. We release high-quality dictionaries for 12 oriented languages pairs, as well as the corresponding supervised and unsupervised word embeddings. We demonstrate the effectiveness of our method using an example of a low-resource language pair where parallel corpora are not available (English-Esperanto) for which our method is particularly suited.
|
| 24 |
+
|
| 25 |
+
The paper is organized as follows. Section 2 describes our unsupervised approach with adversarial training and our refinement procedure. We then present our training procedure with unsupervised model selection in Section 3. We report in Section 4 our results on several cross-lingual tasks for several language pairs and compare our approach to supervised methods. Finally, we explain how our approach differs from recent related work on learning cross-lingual word embeddings.
|
| 26 |
+
|
| 27 |
+
# 2 MODEL
|
| 28 |
+
|
| 29 |
+
In this paper, we always assume that we have two sets of embeddings trained independently on monolingual data. Our work focuses on learning a mapping between the two sets such that translations are close in the shared space. Mikolov et al. (2013b) show that they can exploit the similarities of monolingual embedding spaces to learn such a mapping. For this purpose, they use a known dictionary of $n = 5 0 0 0$ pairs of words $\{ x _ { i } , y _ { i } \} _ { i \in \{ 1 , n \} }$ , and learn a linear mapping $W$ between the source and the target space such that
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
W ^ { \star } = \operatorname * { a r g m i n } _ { W \in M _ { d } ( \mathbb { R } ) } \| W X - Y \| _ { \mathrm { F } }
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
where $d$ is the dimension of the embeddings, $M _ { d } ( \mathbb { R } )$ is the space of $d \times d$ matrices of real numbers, and $X$ and $Y$ are two aligned matrices of size $d \times n$ containing the embeddings of the words in the parallel vocabulary. The translation $t$ of any source word $s$ is defined as $t = \operatorname { a r g m a x } _ { t } \cos ( W x _ { s } , y _ { t } )$
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1: Toy illustration of the method. (A) There are two distributions of word embeddings, English words in red denoted by $X$ and Italian words in blue denoted by $Y$ , which we want to align/translate. Each dot represents a word in that space. The size of the dot is proportional to the frequency of the words in the training corpus of that language. (B) Using adversarial learning, we learn a rotation matrix $W$ which roughly aligns the two distributions. The green stars are randomly selected words that are fed to the discriminator to determine whether the two word embeddings come from the same distribution. (C) The mapping $W$ is further refined via Procrustes. This method uses frequent words aligned by the previous step as anchor points, and minimizes an energy function that corresponds to a spring system between anchor points. The refined mapping is then used to map all words in the dictionary. $\mathbf { \tau } ( \mathbf { D } )$ Finally, we translate by using the mapping $W$ and a distance metric, dubbed CSLS, that expands the space where there is high density of points (like the area around the word “cat”), so that “hubs” (like the word “cat”) become less close to other word vectors than they would otherwise (compare to the same region in panel (A)).
|
| 39 |
+
|
| 40 |
+
In practice, Mikolov et al. (2013b) obtained better results on the word translation task using a simple linear mapping, and did not observe any improvement when using more advanced strategies like multilayer neural networks. Xing et al. (2015) showed that these results are improved by enforcing an orthogonality constraint on $W$ . In that case, the equation (1) boils down to the Procrustes problem, which advantageously offers a closed form solution obtained from the singular value decomposition (SVD) of ${ \check { Y } } { \check { X } } ^ { T }$ :
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\boldsymbol { W } ^ { \star } = \operatorname * { a r g m i n } _ { \boldsymbol { W } \in O _ { d } ( \mathbb { R } ) } \| \boldsymbol { W } \boldsymbol { X } - \boldsymbol { Y } \| _ { \mathrm { F } } = \boldsymbol { U } \boldsymbol { V } ^ { T } , \operatorname { w i t h } \boldsymbol { U } \boldsymbol { \Sigma } \boldsymbol { V } ^ { T } = \mathrm { S } \mathbf { V } \mathbf { D } ( \boldsymbol { Y } \boldsymbol { X } ^ { T } ) .
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
In this paper, we show how to learn this mapping $W$ without cross-lingual supervision; an illustration of the approach is given in Fig. 1. First, we learn an initial proxy of $W$ by using an adversarial criterion. Then, we use the words that match the best as anchor points for Procrustes. Finally, we improve performance over less frequent words by changing the metric of the space, which leads to spread more of those points in dense regions. Next, we describe the details of each of these steps.
|
| 47 |
+
|
| 48 |
+
# 2.1 DOMAIN-ADVERSARIAL SETTING
|
| 49 |
+
|
| 50 |
+
In this section, we present our domain-adversarial approach for learning $W$ without cross-lingual supervision. Let $\bar { \mathcal { X } } \bar { = } \{ x _ { 1 } , . . . , x _ { n } \}$ and ${ \mathcal { V } } = \{ y _ { 1 } , . . . , { \bar { y _ { m } } } \}$ be two sets of $n$ and $m$ word embeddings coming from a source and a target language respectively. A model is trained to discriminate between elements randomly sampled from $W \mathcal { X } = \{ W x _ { 1 } , . . . , W x _ { n } \}$ and $\mathcal { V }$ . We call this model the discriminator. $W$ is trained to prevent the discriminator from making accurate predictions. As a result, this is a two-player game, where the discriminator aims at maximizing its ability to identify the origin of an embedding, and $W$ aims at preventing the discriminator from doing so by making $W \mathcal { X }$ and $\mathcal { V }$ as similar as possible. This approach is in line with the work of Ganin et al. (2016), who proposed to learn latent representations invariant to the input domain, where in our case, a domain is represented by a language (source or target).
|
| 51 |
+
|
| 52 |
+
Discriminator objective We refer to the discriminator parameters as $\theta _ { D }$ . We consider the probability $P _ { \theta _ { D } } ( \mathrm { s o u r c e } = 1 | z )$ that a vector $z$ is the mapping of a source embedding (as opposed to a target embedding) according to the discriminator. The discriminator loss can be written as:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\mathcal { L } _ { D } ( \theta _ { D } | W ) = - \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log P _ { \theta _ { D } } \big ( \mathrm { s o u r c e } = 1 \big | W x _ { i } \big ) - \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \log P _ { \theta _ { D } } \big ( \mathrm { s o u r c e } = 0 \big | y _ { i } \big ) .
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
Mapping objective In the unsupervised setting, $W$ is now trained so that the discriminator is unable to accurately predict the embedding origins:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\mathcal { L } _ { W } ( W | \theta _ { D } ) = - \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log P _ { \theta _ { D } } \left( \mathrm { s o u r c e } = 0 \middle | W x _ { i } \right) - \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \log P _ { \theta _ { D } } \left( \mathrm { s o u r c e } = 1 \middle | y _ { i } \right) .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
Learning algorithm To train our model, we follow the standard training procedure of deep adversarial networks of Goodfellow et al. (2014). For every input sample, the discriminator and the mapping matrix $W$ are trained successively with stochastic gradient updates to respectively minimize $\mathcal { L } _ { D }$ and ${ \mathcal { L } } _ { W }$ . The details of training are given in the next section.
|
| 65 |
+
|
| 66 |
+
# 2.2 REFINEMENT PROCEDURE
|
| 67 |
+
|
| 68 |
+
The matrix $W$ obtained with adversarial training gives good performance (see Table 1), but the results are still not on par with the supervised approach. In fact, the adversarial approach tries to align all words irrespective of their frequencies. However, rare words have embeddings that are less updated and are more likely to appear in different contexts in each corpus, which makes them harder to align. Under the assumption that the mapping is linear, it is then better to infer the global mapping using only the most frequent words as anchors. Besides, the accuracy on the most frequent word pairs is high after adversarial training.
|
| 69 |
+
|
| 70 |
+
To refine our mapping, we build a synthetic parallel vocabulary using the $W$ just learned with adversarial training. Specifically, we consider the most frequent words and retain only mutual nearest neighbors to ensure a high-quality dictionary. Subsequently, we apply the Procrustes solution in (2) on this generated dictionary. Considering the improved solution generated with the Procrustes algorithm, it is possible to generate a more accurate dictionary and apply this method iteratively, similarly to Artetxe et al. (2017). However, given that the synthetic dictionary obtained using adversarial training is already strong, we only observe small improvements when doing more than one iteration, i.e., the improvements on the word translation task are usually below $1 \%$ .
|
| 71 |
+
|
| 72 |
+
# 2.3 CROSS-DOMAIN SIMILARITY LOCAL SCALING (CSLS)
|
| 73 |
+
|
| 74 |
+
In this subsection, our motivation is to produce reliable matching pairs between two languages: we want to improve the comparison metric such that the nearest neighbor of a source word, in the target language, is more likely to have as a nearest neighbor this particular source word.
|
| 75 |
+
|
| 76 |
+
Nearest neighbors are by nature asymmetric: $y$ being a $K$ -NN of $x$ does not imply that $x$ is a $K$ -NN of $y$ . In high-dimensional spaces (Radovanovic et al., 2010), this leads to a phenomenon that is ´ detrimental to matching pairs based on a nearest neighbor rule: some vectors, dubbed hubs, are with high probability nearest neighbors of many other points, while others (anti-hubs) are not nearest neighbors of any point. This problem has been observed in different areas, from matching image features in vision (Jegou et al., 2010) to translating words in text understanding applications (Dinu et al., 2015). Various solutions have been proposed to mitigate this issue, some being reminiscent of pre-processing already existing in spectral clustering algorithms (Zelnik-manor & Perona, 2005).
|
| 77 |
+
|
| 78 |
+
However, most studies aiming at mitigating hubness consider a single feature distribution. In our case, we have two domains, one for each language. This particular case is taken into account by Dinu et al. (2015), who propose a pairing rule based on reverse ranks, and the inverted soft-max (ISF) by Smith et al. (2017), which we evaluate in our experimental section. These methods are not fully satisfactory because the similarity updates are different for the words of the source and target languages. Additionally, ISF requires to cross-validate a parameter, whose estimation is noisy in an unsupervised setting where we do not have a direct cross-validation criterion.
|
| 79 |
+
|
| 80 |
+
In contrast, we consider a bi-partite neighborhood graph, in which each word of a given dictionary is connected to its $K$ nearest neighbors in the other language. We denote by $\mathcal { N } _ { \mathrm { T } } ( W x _ { s } )$ the neighborhood, on this bi-partite graph, associated with a mapped source word embedding $W x _ { s }$ . All $K$ elements of $\mathcal { N } _ { \mathrm { T } } ( W \bar { x } _ { s } )$ are words from the target language. Similarly we denote by $ { \mathcal { N } } _ { \mathrm { S } } ( y _ { t } )$ the neighborhood associated with a word $t$ of the target language. We consider the mean similarity of a source embedding $x _ { s }$ to its target neighborhood as
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
r _ { \mathrm { T } } ( W x _ { s } ) = \frac { 1 } { K } \sum _ { y _ { t } \in \mathcal { N } _ { \mathrm { T } } ( W x _ { s } ) } \cos ( W x _ { s } , y _ { t } ) ,
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where $\cos ( . , . )$ is the cosine similarity. Likewise we denote by $r _ { \mathrm { S } } ( y _ { t } )$ the mean similarity of a target word $y _ { t }$ to its neighborhood. These quantities are computed for all source and target word vectors with the efficient nearest neighbors implementation by Johnson et al. (2017). We use them to define a similarity measure $\mathrm { C S L S } ( . , . )$ between mapped source words and target words, as
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\mathrm { C S L S } ( W x _ { s } , y _ { t } ) = 2 \cos ( W x _ { s } , y _ { t } ) - r _ { \mathrm { T } } ( W x _ { s } ) - r _ { \mathrm { S } } ( y _ { t } ) .
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
Intuitively, this update increases the similarity associated with isolated word vectors. Conversely it decreases the ones of vectors lying in dense areas. Our experiments show that the CSLS significantly increases the accuracy for word translation retrieval, while not requiring any parameter tuning.
|
| 93 |
+
|
| 94 |
+
# 3 TRAINING AND ARCHITECTURAL CHOICES
|
| 95 |
+
|
| 96 |
+
# 3.1 ARCHITECTURE
|
| 97 |
+
|
| 98 |
+
We use unsupervised word vectors that were trained using fastText2. These correspond to monolingual embeddings of dimension 300 trained on Wikipedia corpora; therefore, the mapping $W$ has size $3 0 0 \times 3 0 0$ . Words are lower-cased, and those that appear less than 5 times are discarded for training. As a post-processing step, we only select the first $2 0 0 \mathrm { k }$ most frequent words in our experiments.
|
| 99 |
+
|
| 100 |
+
For our discriminator, we use a multilayer perceptron with two hidden layers of size 2048, and Leaky-ReLU activation functions. The input to the discriminator is corrupted with dropout noise with a rate of 0.1. As suggested by Goodfellow (2016), we include a smoothing coefficient $s = 0 . 2$ in the discriminator predictions. We use stochastic gradient descent with a batch size of 32, a learning rate of 0.1 and a decay of 0.95 both for the discriminator and $W$ . We divide the learning rate by 2 every time our unsupervised validation criterion decreases.
|
| 101 |
+
|
| 102 |
+
# 3.2 DISCRIMINATOR INPUTS
|
| 103 |
+
|
| 104 |
+
The embedding quality of rare words is generally not as good as the one of frequent words (Luong et al., 2013), and we observed that feeding the discriminator with rare words had a small, but not negligible negative impact. As a result, we only feed the discriminator with the 50,000 most frequent words. At each training step, the word embeddings given to the discriminator are sampled uniformly. Sampling them according to the word frequency did not have any noticeable impact on the results.
|
| 105 |
+
|
| 106 |
+
# 3.3 ORTHOGONALITY
|
| 107 |
+
|
| 108 |
+
Smith et al. (2017) showed that imposing an orthogonal constraint to the linear operator led to better performance. Using an orthogonal matrix has several advantages. First, it ensures that the monolingual quality of the embeddings is preserved. Indeed, an orthogonal matrix preserves the dot product of vectors, as well as their $\ell _ { 2 }$ distances, and is therefore an isometry of the Euclidean space (such as a rotation). Moreover, it made the training procedure more stable in our experiments. In this work, we propose to use a simple update step to ensure that the matrix $W$ stays close to an orthogonal matrix during training (Cisse et al. (2017)). Specifically, we alternate the update of our model with the following update rule on the matrix $W$ :
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\boldsymbol { W } ( 1 + \beta ) \boldsymbol { W } - \beta ( \boldsymbol { W } \boldsymbol { W } ^ { T } ) \boldsymbol { W }
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $\beta = 0 . 0 1$ is usually found to perform well. This method ensures that the matrix stays close to the manifold of orthogonal matrices after each update. In practice, we observe that the eigenvalues of our matrices all have a modulus close to 1, as expected.
|
| 115 |
+
|
| 116 |
+
# 3.4 DICTIONARY GENERATION
|
| 117 |
+
|
| 118 |
+
The refinement step requires to generate a new dictionary at each iteration. In order for the Procrustes solution to work well, it is best to apply it on correct word pairs. As a result, we use the CSLS method described in Section 2.3 to select more accurate translation pairs in the dictionary. To increase even more the quality of the dictionary, and ensure that $W$ is learned from correct translation pairs, we only consider mutual nearest neighbors, i.e. pairs of words that are mutually nearest neighbors of each other according to CSLS. This significantly decreases the size of the generated dictionary, but improves its accuracy, as well as the overall performance.
|
| 119 |
+
|
| 120 |
+
# 3.5 VALIDATION CRITERION FOR UNSUPERVISED MODEL SELECTION
|
| 121 |
+
|
| 122 |
+
Selecting the best model is a challenging, yet important task in the unsupervised setting, as it is not possible to use a validation set (using a validation set would mean that we possess parallel data). To address this issue, we perform model selection using an unsupervised criterion that quantifies the closeness of the source and target embedding spaces. Specifically, we consider the $1 0 \mathrm { k }$ most frequent source words, and use CSLS to generate a translation for each of them. We then compute the average cosine similarity between these deemed translations, and use this average as a validation metric. We found that this simple criterion is better correlated with the performance on the evaluation tasks than optimal transport distances such as the Wasserstein distance (Rubner et al. (2000)). Figure 2 shows the correlation between the evaluation score and this unsupervised criterion (without stabilization by learning rate shrinkage). We use it as a stopping criterion during training, and also for hyperparameter selection in all our experiments.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 2: Unsupervised model selection. Correlation between our unsupervised validation criterion (black line) and actual word translation accuracy (blue line). In this particular experiment, the selected model is at epoch 10. Observe how our criterion is well correlated with translation accuracy.
|
| 126 |
+
|
| 127 |
+
# 4 EXPERIMENTS
|
| 128 |
+
|
| 129 |
+
In this section, we empirically demonstrate the effectiveness of our unsupervised approach on several benchmarks, and compare it with state-of-the-art supervised methods. We first present the cross-lingual evaluation tasks that we consider to evaluate the quality of our cross-lingual word embeddings. Then, we present our baseline model. Last, we compare our unsupervised approach to our baseline and to previous methods. In the appendix, we offer a complementary analysis on the alignment of several sets of English embeddings trained with different methods and corpora.
|
| 130 |
+
|
| 131 |
+
# 4.1 EVALUATION TASKS
|
| 132 |
+
|
| 133 |
+
Word translation The task considers the problem of retrieving the translation of given source words. The problem with most available bilingual dictionaries is that they are generated using online tools like Google Translate, and do not take into account the polysemy of words. Failing to capture word polysemy in the vocabulary leads to a wrong evaluation of the quality of the word embedding space. Other dictionaries are generated using phrase tables of machine translation systems, but they are very noisy or trained on relatively small parallel corpora. For this task, we create high-quality dictionaries of up to $1 0 0 \mathrm { k }$ pairs of words using an internal translation tool to alleviate this issue. We make these dictionaries publicly available as part of the MUSE library3.
|
| 134 |
+
|
| 135 |
+
<table><tr><td></td><td>en-es es-en</td><td>en-fr fr-en</td><td></td><td>en-de de-en</td><td></td><td>en-ru ru-en</td><td>en-zh zh-en</td><td></td><td></td><td>en-eo eo-en</td></tr><tr><td colspan="9">Methodswith cross-lingual supervision and fastText embeddings</td></tr><tr><td>Procrustes - NN</td><td>77.4 77.3</td><td>74.9</td><td>76.1</td><td>68.4 67.7</td><td>47.0</td><td>58.2</td><td></td><td>40.630.2</td><td></td><td>22.120.4</td></tr><tr><td>Procrustes - ISF</td><td>81.1 82.6</td><td>81.1</td><td>81.3</td><td>71.1</td><td>71.5</td><td>49.563.8</td><td></td><td>35.7 37.5</td><td></td><td>29.0 27.9</td></tr><tr><td>Procrustes - CSLS</td><td>81.4 82.9</td><td>81.1</td><td>82.4</td><td>73.572.4</td><td>51.7</td><td>63.7</td><td></td><td>42.7 36.7</td><td></td><td>29.3 25.3</td></tr><tr><td colspan="9"> Methods without cross-lingual supervision and fastText embeddings</td></tr><tr><td>Adv - NN</td><td>69.8 71.3</td><td>70.4</td><td>61.9</td><td>63.1 59.6</td><td>29.1</td><td>41.5</td><td>18.5</td><td>22.3</td><td>13.5</td><td>12.1</td></tr><tr><td>Adv - CSLS</td><td>75.7</td><td>79.7 77.8</td><td>71.2</td><td>70.1</td><td>66.4</td><td>37.2 48.1</td><td>23.4</td><td>28.3</td><td>18.6</td><td>16.6</td></tr><tr><td>Adv - Refine - NN</td><td>79.1 78.1</td><td>78.1</td><td>78.2</td><td>71.3</td><td>69.6</td><td>37.3 54.3</td><td>30.9</td><td>21.9</td><td>20.7</td><td>20.6</td></tr><tr><td>Adv - Refine - CSLS</td><td>81.7 83.3</td><td>82.3</td><td>82.1</td><td>74.0</td><td>72.2</td><td>44.0 59.1</td><td>32.5</td><td>31.4</td><td>28.2</td><td>25.6</td></tr></table>
|
| 136 |
+
|
| 137 |
+
Table 1: Word translation retrieval P@1 for our released vocabularies in various language pairs. We consider 1,500 source test queries, and 200k target words for each language pair. We use fastText embeddings trained on Wikipedia. NN: nearest neighbors. ISF: inverted softmax. (’en’ is English, ’fr’ is French, ’de’ is German, ’ru’ is Russian, ’zh’ is classical Chinese and ’eo’ is Esperanto)
|
| 138 |
+
|
| 139 |
+
Table 2: English-Italian word translation average precisions $( \ @ 1$ , $@ 5 .$ , $@ 1 0 )$ from $1 . 5 \mathrm { k }$ source word queries using $2 0 0 \mathrm { k }$ target words. Results marked with the symbol † are from Smith et al. (2017). Wiki means the embeddings were trained on Wikipedia using fastText. Note that the method used by Artetxe et al. (2017) does not use the same supervision as other supervised methods, as they only use numbers in their initial parallel dictionary.
|
| 140 |
+
|
| 141 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=2 colspan=2>English to Italian Italian to EnglishP@1 P@5 P@10P@1 P@5 P@10Methodswith cross-lingual supervision (WaCky)</td></tr><tr><td rowspan=1 colspan=1>Methodswith cross-lingual supervision (WaCky)</td></tr><tr><td rowspan=2 colspan=1>Mikolov et al. (2013b)Dinu et al. (2015)tCCA+Artetxe et al. (2017)Smith et al. (2017)tProcrustes - CSLS</td><td rowspan=2 colspan=1>33.848.3 53.938.556.4 63.936.152.7 58.139.754.7 60.543.160.7 66.444.961.866.6</td><td rowspan=1 colspan=1>24.941.0 47.4</td></tr><tr><td rowspan=1 colspan=1>24.645.4 54.131.049.9 57.033.852.4 59.138.058.5 63.638.557.2 63.0</td></tr><tr><td rowspan=1 colspan=1>Methodswithoutcross-li</td><td rowspan=1 colspan=2>Methodswithout cross-lingual supervision (WaCky)</td></tr><tr><td rowspan=1 colspan=1>Adv - Refine- CSLS</td><td rowspan=1 colspan=1>45.160.7 65.1</td><td rowspan=1 colspan=1>38.357.8 62.8</td></tr><tr><td rowspan=1 colspan=3>Methodswith cross-lingual supervision(Wiki)</td></tr><tr><td rowspan=1 colspan=3>Procrustes- CSLS 63.778.6 81.1 56.376.2 80.6</td></tr><tr><td rowspan=1 colspan=3>Methods without cross-lingual supervision (Wiki)</td></tr><tr><td rowspan=1 colspan=1>Adv - Refine - CSLS</td><td rowspan=1 colspan=1>66.280.483.4</td><td rowspan=1 colspan=1>58.776.5 80.9</td></tr></table>
|
| 142 |
+
|
| 143 |
+
We report results on these bilingual dictionaries, as well on those released by Dinu et al. (2015) to allow for a direct comparison with previous approaches. For each language pair, we consider 1,500 query source and $2 0 0 \mathrm { k }$ target words. Following standard practice, we measure how many times one of the correct translations of a source word is retrieved, and report precision $@ k$ for $k = 1 , 5 , 1 0$ .
|
| 144 |
+
|
| 145 |
+
Cross-lingual semantic word similarity We also evaluate the quality of our cross-lingual word embeddings space using word similarity tasks. This task aims at evaluating how well the cosine similarity between two words of different languages correlates with a human-labeled score. We use the SemEval 2017 competition data (Camacho-Collados et al. (2017)) which provides large, highquality and well-balanced datasets composed of nominal pairs that are manually scored according to a well-defined similarity scale. We report Pearson correlation.
|
| 146 |
+
|
| 147 |
+
Sentence translation retrieval Going from the word to the sentence level, we consider bag-ofwords aggregation methods to perform sentence retrieval on the Europarl corpus. We consider 2,000 source sentence queries and $2 0 0 \mathrm { k }$ target sentences for each language pair and report the precision $@ k$ for $k = 1 , 5 , 1 0$ , which accounts for the fraction of pairs for which the correct translation of the source words is in the $k$ -th nearest neighbors. We use the idf-weighted average to merge word into sentence embeddings. The idf weights are obtained using other $3 0 0 \mathrm { k }$ sentences from Europarl.
|
| 148 |
+
|
| 149 |
+
# 4.2 RESULTS AND DISCUSSION
|
| 150 |
+
|
| 151 |
+
In what follows, we present the results on word translation retrieval using our bilingual dictionaries in Table 1 and our comparison to previous work in Table 2 where we significantly outperform previous approaches. We also present results on the sentence translation retrieval task in Table 3 and the cross-lingual word similarity task in Table 4. Finally, we present results on word-by-word translation for English-Esperanto in Table 5.
|
| 152 |
+
|
| 153 |
+
Baselines In our experiments, we consider a supervised baseline that uses the solution of the Procrustes formula given in (2), and trained on a dictionary of 5,000 source words. This baseline can be combined with different similarity measures: NN for nearest neighbor similarity, ISF for Inverted SoftMax and the CSLS approach described in Section 2.2.
|
| 154 |
+
|
| 155 |
+
Cross-domain similarity local scaling This approach has a single parameter $K$ defining the size of the neighborhood. The performance is very stable and therefore $K$ does not need cross-validation: the results are essentially the same for $K = 5$ , 10 and 50, therefore we set $K = 1 0$ in all experiments. In Table 1, we observe the impact of the similarity metric with the Procrustes supervised approach. Looking at the difference between Procrustes-NN and Procrustes-CSLS, one can see that CSLS provides a strong and robust gain in performance across all language pairs, with up to $7 . 2 \%$ in eneo. We observe that Procrustes-CSLS is almost systematically better than Procrustes-ISF, while being computationally faster and not requiring hyper-parameter tuning. In Table 2, we compare our Procrustes-CSLS approach to previous models presented in Mikolov et al. (2013b); Dinu et al. (2015); Smith et al. (2017); Artetxe et al. (2017) on the English-Italian word translation task, on which state-of-the-art models have been already compared. We show that our Procrustes-CSLS approach obtains an accuracy of $4 4 . 9 \%$ , outperforming all previous approaches. In Table 3, we also obtain a strong gain in accuracy in the Italian-English sentence retrieval task using CSLS, from $5 3 . 5 \%$ to $6 9 . 5 \%$ , outperforming previous approaches by an absolute gain of more than $20 \%$ .
|
| 156 |
+
|
| 157 |
+
Table 3: English-Italian sentence translation retrieval. We report the average $\mathbf { P } @ \mathbf { k }$ from 2,000 source queries using 200,000 target sentences. We use the same embeddings as in Smith et al. (2017). Their results are marked with the symbol †.
|
| 158 |
+
|
| 159 |
+
<table><tr><td></td><td>English to Italian P@1 P@5 P@10</td><td>Italian to English P@1 P@5 P@10</td></tr><tr><td colspan="3">Methods with cross-lingual supervision</td></tr><tr><td>Mikolov et al. (2013b) Dinu et al. (2015) † Smith et al. (2017) t Procrustes - NN</td><td>10.5 18.7 22.8 45.3 72.4 80.7 54.6 72.7 78.2 42.6 54.7 59.0</td><td>12.0 22.1 48.9 71.3 42.9 62.2 53.5 65.5</td><td>26.7 78.3 69.2 69.5</td></tr><tr><td colspan="3">Procrustes - CSLS 66.1 77.1 80.7 69.5 79.6 83.5</td></tr><tr><td>Methods without cross-lingual supervision Adv- CSLS 42.5</td><td>57.6 63.6</td><td>47.0</td><td>62.1 67.8</td></tr></table>
|
| 160 |
+
|
| 161 |
+
Impact of the monolingual embeddings For the word translation task, we obtained a significant boost in performance when considering fastText embeddings trained on Wikipedia, as opposed to previously used CBOW embeddings trained on the WaCky datasets (Baroni et al. (2009)), as can been seen in Table 2. Among the two factors of variation, we noticed that this boost in performance was mostly due to the change in corpora. The fastText embeddings, which incorporates more syntactic information about the words, obtained only two percent more accuracy compared to CBOW embeddings trained on the same corpus, out of the $1 8 . 8 \%$ gain. We hypothesize that this gain is due to the similar co-occurrence statistics of Wikipedia corpora. Figure 3 in the appendix shows results on the alignment of different monolingual embeddings and concurs with this hypothesis. We also obtained better results for monolingual evaluation tasks such as word similarities and word analogies when training our embeddings on the Wikipedia corpora.
|
| 162 |
+
|
| 163 |
+
Adversarial approach Table 1 shows that the adversarial approach provides a strong system for learning cross-lingual embeddings without parallel data. On the es-en and en-fr language pairs, Adv-CSLS obtains a $\mathrm { P @ 1 }$ of $7 9 . 7 \%$ and $7 7 . 8 \%$ , which is only $3 . 2 \%$ and $3 . 3 \%$ below the supervised approach. Additionally, we observe that most systems still obtain decent results on distant languages that do not share a common alphabet (en-ru and en-zh), for which method exploiting identical character strings are just not applicable (Artetxe et al. (2017)). This method allows us to build a strong synthetic vocabulary using similarities obtained with CSLS. The gain in absolute accuracy observed with CSLS on the Procrustes method is even more important here, with differences between $A d \nu – N N$ and Adv-CSLS of up to $8 . 4 \%$ on es-en. As a simple baseline, we tried to match the first two moments of the projected source and target embeddings, which amounts to solving $W ^ { \star } \in \mathrm { \ a r g m i n } _ { W }$ $\| ( W X ) ^ { T } ( \dot { W } \dot { X } ) - Y ^ { T } Y \| _ { \mathrm { F } }$ and solving the sign ambiguity (Umeyama, 1988). This attempt was not successful, which we explain by the fact that this method tries to align only the first two moments, while adversarial training matches all the moments and can learn to focus on specific areas of the distributions instead of considering global statistics.
|
| 164 |
+
|
| 165 |
+
Refinement: closing the gap with supervised approaches The refinement step on the synthetic bilingual vocabulary constructed after adversarial training brings an additional and significant gain in performance, closing the gap between our approach and the supervised baseline. In Table 1, we observe that our unsupervised method even outperforms our strong supervised baseline on en-it and en-es, and is able to retrieve the correct translation of a source word with up to $83 \%$ accuracy. The better performance of the unsupervised approach can be explained by the strong similarity of cooccurrence statistics between the languages, and by the limitation in the supervised approach that uses a pre-defined fixed-size vocabulary (of 5,000 unique source words): in our case the refinement step can potentially use more anchor points. In Table 3, we also observe a strong gain in accuracy (up to $1 5 \%$ ) on sentence retrieval using bag-of-words embeddings, which is consistent with the gain observed on the word retrieval task.
|
| 166 |
+
|
| 167 |
+
<table><tr><td>SemEval 2017</td><td>en-es</td><td>en-de</td><td>en-it</td></tr><tr><td colspan="4">Methodswith cross-lingual supervision</td></tr><tr><td>NASARI our baseline</td><td>0.64 0.72</td><td>0.60 0.72</td><td>0.65 0.71</td></tr><tr><td colspan="4">Methods without cross-lingual supervision</td></tr><tr><td>Adv</td><td>0.69</td><td>0.70</td><td>0.67</td></tr><tr><td>Adv -Refine</td><td>0.71</td><td>0.71</td><td>0.71</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Table 4: Cross-lingual wordsim task. NASARI (Camacho-Collados et al. (2016)) refers to the official SemEval2017 baseline. We report Pearson correlation.
|
| 170 |
+
|
| 171 |
+
Table 5: BLEU score on English-Esperanto. Although being a naive approach, word-byword translation is enough to get a rough idea of the input sentence. The quality of the generated dictionary has a significant impact on the BLEU score.
|
| 172 |
+
|
| 173 |
+
<table><tr><td></td><td>en-eo</td><td>eo-en</td></tr><tr><td>Dictionary - NN</td><td>6.1</td><td>11.9</td></tr><tr><td>Dictionary - CSLS</td><td>11.1</td><td>14.3</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Application to a low-resource language pair and to machine translation Our method is particularly suited for low-resource languages for which there only exists a very limited amount of parallel data. We apply it to the English-Esperanto language pair. We use the fastText embeddings trained on Wikipedia, and create a dictionary based on an online lexicon. The performance of our unsupervised approach on English-Esperanto is of $2 8 . 2 \%$ , compared to $2 9 . 3 \%$ with the supervised method. On Esperanto-English, our unsupervised approach obtains $2 5 . 6 \%$ , which is $1 . 3 \%$ better than the supervised method. The dictionary we use for that language pair does not take into account the polysemy of words, which explains why the results are lower than on other language pairs. People commonly report the $\mathrm { P @ 5 }$ to alleviate this issue. In particular, the $\mathrm { P @ 5 }$ for English-Esperanto and Esperanto-English is of $4 6 . 5 \%$ and $4 3 . 9 \%$ respectively.
|
| 176 |
+
|
| 177 |
+
To show the impact of such a dictionary on machine translation, we apply it to the English-Esperanto Tatoeba corpora (Tiedemann, 2012). We remove all pairs containing sentences with unknown words, resulting in about $6 0 \mathrm { k }$ pairs. Then, we translate sentences in both directions by doing word-byword translation. In Table 5, we report the BLEU score with this method, when using a dictionary generated using nearest neighbors, and CSLS. With CSLS, this naive approach obtains 11.1 and 14.3 BLEU on English-Esperanto and Esperanto-English respectively. Table 6 in the appendix shows some examples of sentences in Esperanto translated into English using word-by-word translation. As one can see, the meaning is mostly conveyed in the translated sentences, but the translations contain some simple errors. For instance, the “mi” is translated into “sorry” instead of “i”, etc. The translations could easily be improved using a language model.
|
| 178 |
+
|
| 179 |
+
# 5 RELATED WORK
|
| 180 |
+
|
| 181 |
+
Work on bilingual lexicon induction without parallel corpora has a long tradition, starting with the seminal works by Rapp (1995) and Fung (1995). Similar to our approach, they exploit the Harris (1954) distributional structure, but using discrete word representations such as TF-IDF vectors. Following studies by Fung & Yee (1998); Rapp (1999); Schafer & Yarowsky (2002); Koehn & Knight (2002); Haghighi et al. (2008); Irvine & Callison-Burch (2013) leverage statistical similarities between two languages to learn small dictionaries of a few hundred words. These methods need to be initialized with a seed bilingual lexicon, using for instance the edit distance between source and target words. This can be seen as prior knowledge, only available for closely related languages. There is also a large amount of studies in statistical decipherment, where the machine translation problem is reduced to a deciphering problem, and the source language is considered as a ciphertext (Ravi & Knight, 2011; Pourdamghani & Knight, 2017). Although initially not based on distributional semantics, recent studies show that the use of word embeddings can bring significant improvement in statistical decipherment (Dou et al., 2015).
|
| 182 |
+
|
| 183 |
+
The rise of distributed word embeddings has revived some of these approaches, now with the goal of aligning embedding spaces instead of just aligning vocabularies. Cross-lingual word embeddings can be used to extract bilingual lexicons by computing the nearest neighbor of a source word, but also allow other applications such as sentence retrieval or cross-lingual document classification (Klementiev et al., 2012). In general, they are used as building blocks for various cross-lingual language processing systems. More recently, several approaches have been proposed to learn bilingual dictionaries mapping from the source to the target space (Mikolov et al., 2013b; Zou et al., 2013; Faruqui & Dyer, 2014; Ammar et al., 2016). In particular, Xing et al. (2015) showed that adding an orthogonality constraint to the mapping can significantly improve performance, and has a closed-form solution. This approach was further referred to as the Procrustes approach in Smith et al. (2017).
|
| 184 |
+
|
| 185 |
+
The hubness problem for cross-lingual word embedding spaces was investigated by Dinu et al. (2015). The authors added a correction to the word retrieval algorithm by incorporating a nearest neighbors reciprocity term. More similar to our cross-domain similarity local scaling approach, Smith et al. (2017) introduced the inverted-softmax to down-weight similarities involving oftenretrieved hub words. Intuitively, given a query source word and a candidate target word, they estimate the probability that the candidate translates back to the query, rather than the probability that the query translates to the candidate.
|
| 186 |
+
|
| 187 |
+
Recent work by Smith et al. (2017) leveraged identical character strings in both source and target languages to create a dictionary with low supervision, on which they applied the Procrustes algorithm. Similar to this approach, recent work by Artetxe et al. (2017) used identical digits and numbers to form an initial seed dictionary, and performed an update similar to our refinement step, but iteratively until convergence. While they showed they could obtain good results using as little as twenty parallel words, their method still needs cross-lingual information and is not suitable for languages that do not share a common alphabet. For instance, the method of Artetxe et al. (2017) on our dataset does not work on the word translation task for any of the language pairs, because the digits were filtered out from the datasets used to train the fastText embeddings. This iterative EMbased algorithm initialized with a seed lexicon has also been explored in other studies (Haghighi et al., 2008; Kondrak et al., 2017).
|
| 188 |
+
|
| 189 |
+
There has been a few attempts to align monolingual word vector spaces with no supervision. Similar to our work, Zhang et al. (2017b) employed adversarial training, but their approach is different than ours in multiple ways. First, they rely on sharp drops of the discriminator accuracy for model selection. In our experiments, their model selection criterion does not correlate with the overall model performance, as shown in Figure 2. Furthermore, it does not allow for hyper-parameters tuning, since it selects the best model over a single experiment. We argue it is a serious limitation, since the best hyper-parameters vary significantly across language pairs. Despite considering small vocabularies of a few thousand words, their method obtained weak results compared to supervised approaches. More recently, Zhang et al. (2017a) proposed to minimize the earth-mover distance after adversarial training. They compare their results only to their supervised baseline trained with a small seed lexicon, which is one to two orders of magnitude smaller than what we report here.
|
| 190 |
+
|
| 191 |
+
# 6 CONCLUSION
|
| 192 |
+
|
| 193 |
+
In this work, we show for the first time that one can align word embedding spaces without any cross-lingual supervision, i.e., solely based on unaligned datasets of each language, while reaching or outperforming the quality of previous supervised approaches in several cases. Using adversarial training, we are able to initialize a linear mapping between a source and a target space, which we also use to produce a synthetic parallel dictionary. It is then possible to apply the same techniques proposed for supervised techniques, namely a Procrustean optimization. Two key ingredients contribute to the success of our approach: First we propose a simple criterion that is used as an effective unsupervised validation metric. Second we propose the similarity measure CSLS, which mitigates the hubness problem and drastically increases the word translation accuracy. As a result, our approach produces high-quality dictionaries between different pairs of languages, with up to $8 3 . 3 \%$ on the Spanish-English word translation task. This performance is on par with supervised approaches. Our method is also effective on the English-Esperanto pair, thereby showing that it works for lowresource language pairs, and can be used as a first step towards unsupervised machine translation.
|
| 194 |
+
|
| 195 |
+
# ACKNOWLEDGMENTS
|
| 196 |
+
|
| 197 |
+
We thank Juan Miguel Pino, Moustapha Cisse, Nicolas Usunier, Yann Ollivier, David Lopez-Paz, ´ Alexandre Sablayrolles, and the FAIR team for useful comments and discussions.
|
| 198 |
+
|
| 199 |
+
# REFERENCES
|
| 200 |
+
|
| 201 |
+
Waleed Ammar, George Mulcaire, Yulia Tsvetkov, Guillaume Lample, Chris Dyer, and Noah A Smith. Massively multilingual word embeddings. arXiv preprint arXiv:1602.01925, 2016.
|
| 202 |
+
|
| 203 |
+
Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Learning principled bilingual mappings of word embeddings while preserving monolingual invariance. Proceedings of EMNLP, 2016.
|
| 204 |
+
|
| 205 |
+
Mikel Artetxe, Gorka Labaka, and Eneko Agirre. Learning bilingual word embeddings with (almost) no bilingual data. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 451–462. Association for Computational Linguistics, 2017.
|
| 206 |
+
|
| 207 |
+
Marco Baroni, Silvia Bernardini, Adriano Ferraresi, and Eros Zanchetta. The wacky wide web: a collection of very large linguistically processed web-crawled corpora. Language resources and evaluation, 43(3):209–226, 2009.
|
| 208 |
+
|
| 209 |
+
Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5: 135–146, 2017.
|
| 210 |
+
|
| 211 |
+
Jose Camacho-Collados, Mohammad Taher Pilehvar, and Roberto Navigli. Nasari: Integrating ex-´ plicit knowledge and corpus statistics for a multilingual representation of concepts and entities. Artificial Intelligence, 240:36–64, 2016.
|
| 212 |
+
|
| 213 |
+
Jose Camacho-Collados, Mohammad Taher Pilehvar, Nigel Collier, and Roberto Navigli. Semeval2017 task 2: Multilingual and cross-lingual semantic word similarity. Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval 2017), 2017.
|
| 214 |
+
|
| 215 |
+
Hailong Cao, Tiejun Zhao, Shu Zhang, and Yao Meng. A distribution-based model to learn bilingual word embeddings. Proceedings of COLING, 2016.
|
| 216 |
+
|
| 217 |
+
Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. International Conference on Machine Learning, pp. 854–863, 2017.
|
| 218 |
+
|
| 219 |
+
Georgiana Dinu, Angeliki Lazaridou, and Marco Baroni. Improving zero-shot learning by mitigating the hubness problem. International Conference on Learning Representations, Workshop Track, 2015.
|
| 220 |
+
|
| 221 |
+
Qing Dou, Ashish Vaswani, Kevin Knight, and Chris Dyer. Unifying bayesian inference and vector space models for improved decipherment. 2015.
|
| 222 |
+
|
| 223 |
+
Long Duong, Hiroshi Kanayama, Tengfei Ma, Steven Bird, and Trevor Cohn. Learning crosslingual word embeddings without bilingual corpora. Proceedings of EMNLP, 2016.
|
| 224 |
+
|
| 225 |
+
Manaal Faruqui and Chris Dyer. Improving vector space word representations using multilingual correlation. Proceedings of EACL, 2014.
|
| 226 |
+
|
| 227 |
+
Pascale Fung. Compiling bilingual lexicon entries from a non-parallel english-chinese corpus. In Proceedings of the Third Workshop on Very Large Corpora, pp. 173–183, 1995.
|
| 228 |
+
|
| 229 |
+
Pascale Fung and Lo Yuen Yee. An ir approach for translating new words from nonparallel, comparable texts. In Proceedings of the 17th International Conference on Computational Linguistics - Volume 1, COLING ’98, pp. 414–420. Association for Computational Linguistics, 1998.
|
| 230 |
+
|
| 231 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016.
|
| 232 |
+
|
| 233 |
+
Ian Goodfellow. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016.
|
| 234 |
+
|
| 235 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 236 |
+
|
| 237 |
+
Stephan Gouws, Yoshua Bengio, and Greg Corrado. Bilbowa: Fast bilingual distributed representations without word alignments. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 748–756, 2015.
|
| 238 |
+
|
| 239 |
+
Aria Haghighi, Percy Liang, Taylor Berg-Kirkpatrick, and Dan Klein. Learning bilingual lexicons from monolingual corpora. In Proceedings of the 46th Annual Meeting of the Association for Computational Linguistics, 2008.
|
| 240 |
+
|
| 241 |
+
Zellig S Harris. Distributional structure. Word, 10(2-3):146–162, 1954.
|
| 242 |
+
|
| 243 |
+
Ann Irvine and Chris Callison-Burch. Supervised bilingual lexicon induction with multiple monolingual signals. In HLT-NAACL, 2013.
|
| 244 |
+
|
| 245 |
+
Herve Jegou, Cordelia Schmid, Hedi Harzallah, and Jakob Verbeek. Accurate image search using the contextual dissimilarity measure. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(1):2–11, 2010.
|
| 246 |
+
|
| 247 |
+
Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017.
|
| 248 |
+
|
| 249 |
+
Alexandre Klementiev, Ivan Titov, and Binod Bhattarai. Inducing crosslingual distributed representations of words. Proceedings of COLING, pp. 1459–1474, 2012.
|
| 250 |
+
|
| 251 |
+
Philipp Koehn and Kevin Knight. Learning a translation lexicon from monolingual corpora. In Proceedings of the ACL-02 workshop on Unsupervised lexical acquisition-Volume 9, pp. 9–16. Association for Computational Linguistics, 2002.
|
| 252 |
+
|
| 253 |
+
Grzegorz Kondrak, Bradley Hauer, and Garrett Nicolai. Bootstrapping unsupervised bilingual lexicon induction. In EACL, 2017.
|
| 254 |
+
|
| 255 |
+
Angeliki Lazaridou, Georgiana Dinu, and Marco Baroni. Hubness and pollution: Delving into crossspace mapping for zero-shot learning. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics, 2015.
|
| 256 |
+
|
| 257 |
+
Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. Advances in neural information processing systems, pp. 2177–2185, 2014.
|
| 258 |
+
|
| 259 |
+
Thang Luong, Richard Socher, and Christopher D Manning. Better word representations with recursive neural networks for morphology. CoNLL, pp. 104–113, 2013.
|
| 260 |
+
|
| 261 |
+
Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. Proceedings of Workshop at ICLR, 2013a.
|
| 262 |
+
|
| 263 |
+
Tomas Mikolov, Quoc V Le, and Ilya Sutskever. Exploiting similarities among languages for machine translation. arXiv preprint arXiv:1309.4168, 2013b.
|
| 264 |
+
|
| 265 |
+
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, pp. 3111–3119, 2013c.
|
| 266 |
+
|
| 267 |
+
Robert Parker, David Graff, Junbo Kong, Ke Chen, and Kazuaki Maeda. English gigaword. Linguistic Data Consortium, 2011.
|
| 268 |
+
|
| 269 |
+
Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. Proceedings of EMNLP, 14:1532–1543, 2014.
|
| 270 |
+
|
| 271 |
+
N. Pourdamghani and K. Knight. Deciphering related languages. In EMNLP, 2017.
|
| 272 |
+
|
| 273 |
+
Milos Radovanovi ˇ c, Alexandros Nanopoulos, and Mirjana Ivanovi ´ c. Hubs in space: Popular nearest ´ neighbors in high-dimensional data. Journal of Machine Learning Research, 11(Sep):2487–2531, 2010.
|
| 274 |
+
|
| 275 |
+
Reinhard Rapp. Identifying word translations in non-parallel texts. In Proceedings of the 33rd Annual Meeting on Association for Computational Linguistics, ACL ’95, pp. 320–322. Association for Computational Linguistics, 1995.
|
| 276 |
+
|
| 277 |
+
Reinhard Rapp. Automatic identification of word translations from unrelated english and german corpora. In Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics, ACL $\overline { { 9 9 } }$ . Association for Computational Linguistics, 1999.
|
| 278 |
+
|
| 279 |
+
S. Ravi and K. Knight. Deciphering foreign language. In ACL, 2011.
|
| 280 |
+
|
| 281 |
+
Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. International journal of computer vision, 40(2):99–121, 2000.
|
| 282 |
+
|
| 283 |
+
Charles Schafer and David Yarowsky. Inducing translation lexicons via diverse similarity measures and bridge languages. In Proceedings of the 6th Conference on Natural Language Learning - Volume 20, COLING-02. Association for Computational Linguistics, 2002.
|
| 284 |
+
|
| 285 |
+
Peter H Schonemann. A generalized solution of the orthogonal procrustes problem. ¨ Psychometrika, 31(1):1–10, 1966.
|
| 286 |
+
|
| 287 |
+
Samuel L Smith, David HP Turban, Steven Hamblin, and Nils Y Hammerla. Offline bilingual word vectors, orthogonal transformations and the inverted softmax. International Conference on Learning Representations, 2017.
|
| 288 |
+
|
| 289 |
+
Jrg Tiedemann. Parallel data, tools and interfaces in opus. In Nicoletta Calzolari (Conference Chair), Khalid Choukri, Thierry Declerck, Mehmet Uur Doan, Bente Maegaard, Joseph Mariani, Asuncion Moreno, Jan Odijk, and Stelios Piperidis (eds.), Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC’12), Istanbul, Turkey, may 2012. European Language Resources Association (ELRA). ISBN 978-2-9517408-7-7.
|
| 290 |
+
|
| 291 |
+
Shinji Umeyama. An eigendecomposition approach to weighted graph matching problems. IEEE transactions on pattern analysis and machine intelligence, 10(5):695–703, 1988.
|
| 292 |
+
|
| 293 |
+
Ivan Vulic and Marie-Francine Moens. Bilingual word embeddings from non-parallel documentaligned data applied to bilingual lexicon induction. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics (ACL 2015), pp. 719–725, 2015.
|
| 294 |
+
|
| 295 |
+
Chao Xing, Dong Wang, Chao Liu, and Yiye Lin. Normalized word embedding and orthogonal transform for bilingual word translation. Proceedings of NAACL, 2015.
|
| 296 |
+
|
| 297 |
+
Lihi Zelnik-manor and Pietro Perona. Self-tuning spectral clustering. In L. K. Saul, Y. Weiss, and L. Bottou (eds.), Advances in Neural Information Processing Systems 17, pp. 1601–1608. MIT Press, 2005.
|
| 298 |
+
|
| 299 |
+
Meng Zhang, Yang Liu, Huanbo Luan, and Maosong Sun. Earth mover’s distance minimization for unsupervised bilingual lexicon induction. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1924–1935. Association for Computational Linguistics, 2017a.
|
| 300 |
+
|
| 301 |
+
Meng Zhang, Yang Liu, Huanbo Luan, and Maosong Sun. Adversarial training for unsupervised bilingual lexicon induction. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics, 2017b.
|
| 302 |
+
|
| 303 |
+
Will Y Zou, Richard Socher, Daniel M Cer, and Christopher D Manning. Bilingual word embeddings for phrase-based machine translation. Proceedings of EMNLP, 2013.
|
| 304 |
+
|
| 305 |
+
# 7 APPENDIX
|
| 306 |
+
|
| 307 |
+
In order to gain a better understanding of the impact of using similar corpora or similar word embedding methods, we investigated merging two English monolingual embedding spaces using either Wikipedia or the Gigaword corpus (Parker et al. (2011)), and either Skip-Gram, CBOW or fastText methods (see Figure 3).
|
| 308 |
+
|
| 309 |
+

|
| 310 |
+
Figure 3: English to English word alignment accuracy. Evolution of word translation retrieval accuracy with regard to word frequency, using either Wikipedia (Wiki) or the Gigaword corpus (Giga), and either skip-gram, continuous bag-of-words (CBOW) or fastText embeddings. The model can learn to perfectly align embeddings trained on the same corpus but with different seeds (a), as well as embeddings learned using different models (overall, when employing CSLS which is more accurate on rare words) (b). However, the model has more trouble aligning embeddings trained on different corpora (Wikipedia and Gigaword) (c). This can be explained by the difference in co-occurrence statistics of the two corpora, particularly on the rarer words. Performance can be further deteriorated by using both different models and different types of corpus (d).
|
| 311 |
+
|
| 312 |
+
Table 6: Esperanto-English. Examples of fully unsupervised word-by-word translations. The translations reflect the meaning of the source sentences, and could potentially be improved using a simple language model.
|
| 313 |
+
|
| 314 |
+
<table><tr><td>Source Hypothesis Reference</td><td>mi kelkfoje parolas kun mia najbaro tra la barilo . sorry sometimes speaks with my neighbor across the barrier . i sometimes talk to my neighbor across the fence .</td></tr><tr><td>Source Hypothesis Reference</td><td>laviro malanta ili ludas la pianon. the man behind theyplays the piano . the man behind them is playing the piano .</td></tr><tr><td>Source Hypothesis Reference</td><td>bonvole protektu min kontra tiuj malbonaj viroj. gratefully protects hi against those worst men . please defend me from such bad men .</td></tr></table>
|
md/train/HJeVnCEKwH/HJeVnCEKwH.md
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A CLOSER LOOK AT THE OPTIMIZATION LANDSCAPES OF GENERATIVE ADVERSARIAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Hugo Berard∗ Mila, Universite de Montr´ eal´ Facebook AI Research
|
| 4 |
+
|
| 5 |
+
Gauthier Gidel∗
|
| 6 |
+
Mila, Universite de Montr ´ eal ´
|
| 7 |
+
Element AI
|
| 8 |
+
|
| 9 |
+
Amjad Almahairi Element AI
|
| 10 |
+
|
| 11 |
+
Pascal Vincent† Mila, Universite de Montr´ eal´ Facebook AI Research
|
| 12 |
+
|
| 13 |
+
Simon Lacoste-Julien† Mila, Universite de Montr ´ eal ´ Element AI
|
| 14 |
+
|
| 15 |
+
# ABSTRACT
|
| 16 |
+
|
| 17 |
+
Generative adversarial networks have been very successful in generative modeling, however they remain relatively challenging to train compared to standard deep neural networks. In this paper, we propose new visualization techniques for the optimization landscapes of GANs that enable us to study the game vector field resulting from the concatenation of the gradient of both players. Using these visualization techniques we try to bridge the gap between theory and practice by showing empirically that the training of GANs exhibits significant rotations around Local Stable Stationary Points (LSSP), similar to the one predicted by theory on toy examples. Moreover, we provide empirical evidence that GAN training converge to a stable stationary point which is a saddle point for the generator loss, not a minimum, while still achieving excellent performance.1
|
| 18 |
+
|
| 19 |
+
# 1 INTRODUCTION
|
| 20 |
+
|
| 21 |
+
Deep neural networks have exhibited remarkable success in many applications (Krizhevsky et al., 2012). This success has motivated many studies of their non-convex loss landscape (Choromanska et al., 2015; Kawaguchi, 2016; Li et al., 2018b), which, in turn, has led to many improvements, such as better initialization and optimization methods (Glorot and Bengio, 2010; Kingma and Ba, 2015).
|
| 22 |
+
|
| 23 |
+
While most of the work on studying non-convex loss landscapes has focused on single objective minimization, some recent class of models require the joint minimization of several objectives, making their optimization landscape intrinsically different. Among these models is the generative adversarial network (GAN) (Goodfellow et al., 2014) which is based on a two-player game formulation and has achieved state-of-the-art performance on some generative modeling tasks such as image generation (Brock et al., 2019).
|
| 24 |
+
|
| 25 |
+
On the theoretical side, many papers studying multi-player games have argued that one main optimization issue that arises in this case is the rotation due to the adversarial component of the game (Mescheder et al., 2018; Balduzzi et al., 2018; Gidel et al., 2019b). This has been extensively studied on toy examples, in particular on the so-called bilinear example (Goodfellow, 2016) (a.k.a Dirac GAN (Mescheder et al., 2018)). However, those toy examples are very far from the standard realistic setting of image generation involving deep networks and challenging datasets. To our knowledge it remains an open question if this rotation phenomenon actually occurs when training GANs in more practical settings.
|
| 26 |
+
|
| 27 |
+
In this paper, we aim at closing this gap between theory and practice. Following Mescheder et al. (2017) and Balduzzi et al. (2018), we argue that instead of studying the loss surface, we should study the game vector field (i.e., the concatenation of each player’s gradient), which can provide better insights to the problem. To this end, we propose a new visualization technique that we call Path-angle which helps us observe the nature of the game vector field close to a stationary point for high dimensional models, and carry on an empirical investigation of the properties of the optimization landscape of GANs. The core questions we want to address may be summarized as the following:
|
| 28 |
+
|
| 29 |
+
Is rotation a phenomenon that occurs when training GANs on real world datasets, and do existing training methods find local Nash equilibria?
|
| 30 |
+
|
| 31 |
+
To answer this question we conducted extensive experiments by training different GAN formulations (NSGAN and WGAN-GP) with different optimizers (Adam and ExtraAdam) on three datasets (MoG, MNIST and CIFAR10). Based on our experiments and using our visualization techniques we observe that the landscape of GANs is fundamentally different from the standard loss surfaces of deep networks. Furthermore, we provide evidence that existing GAN training methods do not converge to a local Nash equilibrium.
|
| 32 |
+
|
| 33 |
+
Contributions More precisely, our contributions are the following: (i) We propose studying empirically the game vector field (as opposed to studying the loss surfaces of each player) to understand training dynamics in GANs using a novel visualization tool, which we call Path-angle and that captures the rotational and attractive behaviors near local stationary points (ref. $\ S 4 . 2 )$ . (ii) We observe experimentally on both a mixture of Gaussians, MNIST and CIFAR10 datasets that a variety of GAN formulations have a significant rotational behavior around their locally stable stationary points (ref. §5.1). (iii) We provide empirical evidence that existing training procedures find stable stationary points that are saddle points, not minima, for the loss function of the generator (ref. $\ S 5 . 2 )$ .
|
| 34 |
+
|
| 35 |
+
# 2 RELATED WORK
|
| 36 |
+
|
| 37 |
+
Improving the training of GANs has been an active research area in the past few years. Most efforts in stabilizing GAN training have focused on formulating new objectives (Arjovsky et al., 2017), or adding regularization terms (Gulrajani et al., 2017; Mescheder et al., 2017; 2018). In this work, we try to characterize the difference in the landscapes induced by different GAN formulations and how it relates to improving the training of GANs.
|
| 38 |
+
|
| 39 |
+
Recently, Nagarajan and Kolter (2017); Mescheder et al. (2018) show that a local analysis of the eigenvalues of the Jacobian of the game can provide guarantees on local stability properties. However, their theoretical analysis is based on some unrealistic assumptions such as the generator’s ability to fully capture the real distribution. In this work, we assess experimentally to what extent these theoretical stability results apply in practice.
|
| 40 |
+
|
| 41 |
+
Rotations in differentiable games has been mentioned and interpreted by (Mescheder et al., 2018; Balduzzi et al., 2018) and Gidel et al. (2019b). While these papers address rotations in games from a theoretical perspective, it was never shown that GANs, which are games with highly non-convex losses, suffered from these rotations in practice. To our knowledge, trying to quantify that GANs actually suffer from this rotational component in practice for real world dataset is novel.
|
| 42 |
+
|
| 43 |
+
The stable points of the gradient dynamics in general games have been studied independently by Mazumdar and Ratliff (2018) and Adolphs et al. (2018). They notice that the locally stable stationary point of some games are not local Nash equilibria. In order to reach a local Nash equilibrium, Adolphs et al. (2018); Mazumdar et al. (2019) develop techniques based on second order information. In this work, we argue that reaching local Nash equilibria may not be as important as one may expect and that we do achieve good performance at a locally stable stationary point.
|
| 44 |
+
|
| 45 |
+
Several works have studied the loss landscape of deep neural networks. Goodfellow et al. (2015) proposed to look at the linear path between two points in parameter space and show that neural networks behave similarly to a convex loss function along this path. Draxler et al. (2018) proposed an extension where they look at nonlinear paths between two points and show that local minima are connected in deep neural networks. Another extension was proposed by (Li et al., 2018a) where they use contour plots to look at the 2D loss surface defined by two directions chosen appropriately. In this paper, we use a similar approach of following the linear path between two points to gain insight about GAN optimization landscapes. However, in this context, looking at the loss of both players along that path may be uninformative. We propose instead to look, along a linear path from initialization to best solution, at the game vector field, particularly at its angle w.r.t. the linear path, the Path-angle.
|
| 46 |
+
|
| 47 |
+
Another way to gain insight into the landscape of deep neural networks is by looking at the Hessian of the loss; this was done in the context of single objective minimization by (Dauphin et al., 2014; Sagun et al., 2016; 2017; Alain et al., 2019). Compared to linear path visualizations which can give global information (but only along one direction), the Hessian provides information about the loss landscape in several directions but only locally. The full Hessian is expensive to compute and one often has to resort to approximations such has computing only the top- $\mathbf { \nabla } \cdot \mathbf { k }$ eigenvalues. While, the Hessian is symmetric and thus has real eigenvalues, the Jacobian of a game vector field is significantly different since it is in general not symmetric, which means that the eigenvalues belong to the complex plane. In the context of GANs, Mescheder et al. (2017) introduced a gradient penalty and use the eigenvalues of the Jacobian of the game vector field to show its benefits in terms of stability. In our work, we compute these eigenvalues to assess that, on different GAN formulations and datasets, existing training procedures find a locally stable stationary point that is a saddle point for the loss function of the generator.
|
| 48 |
+
|
| 49 |
+
# 3 FORMULATIONS FOR GAN OPTIMIZATION AND THEIR PRACTICAL IMPLICATIONS
|
| 50 |
+
|
| 51 |
+
# 3.1 THE STANDARD GAME THEORY FORMULATION
|
| 52 |
+
|
| 53 |
+
From a game theory point of view, GAN training may be seen as a game between two players: the discriminator $D _ { \varphi }$ and the generator $G _ { \theta }$ , each of which is trying to minimize its loss $\mathcal { L } _ { D }$ and $\mathcal { L } _ { G }$ , respectively. Using the same formulation as Mescheder et al. (2017), the GAN objective takes the following form (for simplicity of presentation, we focus on the unconstrained formulation):
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\theta ^ { * } \in \operatorname * { a r g m i n } _ { \theta \in \mathbb { R } ^ { p } } \mathcal { L } _ { G } ( \theta , \varphi ^ { * } ) \qquad \mathrm { a n d } \qquad \varphi ^ { * } \in \operatorname * { a r g m i n } _ { \varphi \in \mathbb { R } ^ { d } } \mathcal { L } _ { D } ( \theta ^ { * } , \varphi ) .
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
The solution $( \theta ^ { * } , \varphi ^ { * } )$ is called a Nash equilibrium (NE). In practice, the considered objectives are non-convex and we typically cannot expect better than a local Nash equilibrium (LNE), i.e. a point at which (1) is only locally true (see e.g. (Adolphs et al., 2018) for a formal definition). Ratliff et al. (2016) derived some derivative-based necessary and sufficient conditions for being a LNE. They show that, for being a local NE it is sufficient to be a differential Nash equilibrium:
|
| 60 |
+
|
| 61 |
+
Definition 1 (Differential NE). A point $( \theta ^ { * } , \varphi ^ { * } )$ is $a$ differential Nash equilibrium (DNE) iff
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\| \nabla _ { \theta } \mathcal { L } _ { G } ( \theta ^ { * } , \varphi ^ { * } ) \| = \| \nabla _ { \varphi } \mathcal { L } _ { D } ( \theta ^ { * } , \varphi ^ { * } ) \| = 0 , \nabla _ { \theta } ^ { 2 } \mathcal { L } _ { G } ( \theta ^ { * } , \varphi ^ { * } ) \succ 0 a
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where $S \succ 0$ if and only if $_ { s }$ is positive definite.
|
| 68 |
+
|
| 69 |
+
Being a DNE is not necessary for being a LNE because a local Nash equilibrium may have Hessians that are only semi-definite. NE are commonly used in GANs to describe the goal of the learning procedure (Goodfellow et al., 2014): in this definition, $\pmb { \theta } ^ { * }$ (resp. $\varphi ^ { * }$ ) is seen as a local minimizer of $\bar { \mathcal { L } } _ { G } ( \cdot , \varphi ^ { * } )$ (resp. $\mathcal { L } _ { D } ( \pmb { \theta } ^ { * } , \cdot ) )$ .
|
| 70 |
+
|
| 71 |
+
Under this view, however, the interaction between the two networks is not taken into account. This is an important aspect of the game stability that is missed in the definition of DNE (and Nash equilibrum in general). We illustrate this point in the following section, where we develop an example of a game for which gradient methods converge to a point which is a saddle point for the generator’s loss and thus not a DNE for the game.
|
| 72 |
+
|
| 73 |
+
# 3.2 AN ALTERNATIVE FORMULATION BASED ON THE GAME VECTOR FIELD
|
| 74 |
+
|
| 75 |
+
In practice, GANs are trained using first order methods that compute the gradients of the losses of each player. Following Gidel et al. (2019a), an alternative point of view on optimizing GANs is to jointly consider the players’ parameters $\pmb \theta$ and $\varphi$ as a joint state $\omega : = ( \theta , \varphi )$ , and to study the vector field associated with these gradients,2 which we call the game vector field
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\pmb { v } ( \omega ) : = \left[ \nabla _ { \pmb { \theta } } \mathcal { L } _ { G } ( \omega ) ^ { \top } \quad \nabla _ { \varphi } \mathcal { L } _ { D } ( \omega ) ^ { \top } \right] ^ { \top } \quad \mathrm { w h e r e } \quad \omega : = ( \pmb { \theta } , \varphi ) .
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
Table 1: Summary of the implications between Differentiable Nash Equilibrium (DNE) and a locally stable stationnary point (LSSP): in general, being a DNE is neither necessary or sufficient for being a LSSP.
|
| 82 |
+
|
| 83 |
+
<table><tr><td>Zero-sum game</td><td>Non-zero-sum game</td></tr><tr><td>NE →LSSE (Mescheder et al., 2018)</td><td>NE LSSE (Example 2, $A.2)</td></tr><tr><td>NE ←LSSE (Adolphs et al., 2018)</td><td>NE ↑ LSSE (Example 1)</td></tr></table>
|
| 84 |
+
|
| 85 |
+
With this perspective, the notion of DNE is replaced by the notion of locally stable stationary point (LSSP). Verhulst (1989, Theorem 7.1) defines a LSSP $\omega ^ { * }$ using the eigenvalues of the Jacobian of the game vector field $\nabla \boldsymbol { v } ( \omega ^ { * } )$ at that point.
|
| 86 |
+
|
| 87 |
+
Definition 2 (LSSP). A point $\omega ^ { \ast }$ is $a$ locally stable stationary point $( L S S P ,$ ) iff
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\pmb { v } ( \pmb { \omega } ^ { * } ) = 0 \qquad \mathrm { ~ } a n d \qquad \Re ( \lambda ) > 0 , \quad \forall \lambda \in \mathrm { S p } ( \nabla \pmb { v } ( \pmb { \omega } ^ { * } ) ) .
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $\Re$ denote the real part of the eigenvalue $\lambda$ belonging to the spectrum of $\nabla \boldsymbol { v } ( \omega ^ { * } )$ .
|
| 94 |
+
|
| 95 |
+
This definition is not easy to interpret but one can intuitively understand a LSSP as a stationary point (a point $\omega ^ { * }$ where $\begin{array} { r } { \pmb { v } ( \omega ^ { * } ) = 0 , } \end{array}$ ) to which all neighbouring points are attracted. We will formalize this intuition of attraction in Proposition 1. In our two-player game setting, the Jacobian of the game vector field around the LSSP has the following block-matrices form:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\nabla v ( \omega ^ { * } ) = \left[ \nabla _ { \theta } ^ { 2 } \mathcal { L } _ { G } ( \omega ^ { * } ) \quad \nabla _ { \varphi } \nabla _ { \theta } \mathcal { L } _ { G } ( \omega ^ { * } ) \right] = \left[ S _ { 1 } \quad B \right] .
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
When $B = - A ^ { \top }$ , being a DNE is a sufficient condition for being of LSSP (Mazumdar and Ratliff, 2018). However, some LSSP may not be DNE (Adolphs et al., 2018), meaning that the optimal generator $\pmb { \theta } ^ { * }$ could be a saddle point of $\mathcal { L } _ { G } ( \cdot , \varphi ^ { * } )$ , while the optimal joint state $( \theta ^ { * } , \varphi ^ { * } )$ may be a LSSP of the game. We summarize these properties in Table 1. In order to illustrate the intuition behind this counter-intuitive fact, we study a simple example where the generator is 2D and the discriminator is 1D.
|
| 102 |
+
|
| 103 |
+
Example 1. Let us consider $\mathcal { L } _ { G }$ as a hyperbolic paraboloid (a.k.a., saddle point function) centered in $( 1 , 1 )$ where $( 1 , \varphi )$ is the principal descent direction and $( - \varphi , 1 )$ is the principal ascent direction, while $\mathcal { L } _ { D }$ is a simple bilinear objective.
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\begin{array} { r } { \mathcal { L } _ { G } ( \theta _ { 1 } , \theta _ { 2 } , \varphi ) = ( \theta _ { 2 } - \varphi \theta _ { 1 } - 1 ) ^ { 2 } - \frac { 1 } { 2 } ( \theta _ { 1 } + \varphi \theta _ { 2 } - 1 ) ^ { 2 } , \mathcal { L } _ { D } ( \theta _ { 1 } , \theta _ { 2 } , \varphi ) = \varphi ( 5 \theta _ { 1 } + 4 \theta _ { 2 } - 9 ) } \end{array}
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
We plot $\mathcal { L } _ { G }$ in Fig. 1b. Note that the discriminator $\varphi$ controls the principal descent direction of $\mathcal { L } _ { G }$
|
| 110 |
+
|
| 111 |
+
We show (see $\ S \operatorname { A } . 2 )$ that $( \theta _ { 1 } ^ { * } , \theta _ { 2 } ^ { * } , \varphi ^ { * } ) = ( 1 , 1 , 0 )$ is a locally stable stationary point but is not a DNE: the generator loss at the optimum $( \dot { \theta } _ { 1 } , \dot { \theta _ { 2 } } ) \mapsto \dot { \mathcal { L } } _ { G } ( \theta _ { 1 } , \theta _ { 2 } , \dot { \varphi } ^ { * } ) = \theta _ { 2 } ^ { 2 } - { \textstyle \frac { 1 } { 2 } } \theta _ { 1 } ^ { 2 }$ is not at a DNE because it has a clear descent direction, $( 1 , 0 )$ . However, if the generator follows this descent direction, the dynamics will remain stable because the discriminator will update its parameter, rotating the saddle and making $( 1 , 0 )$ an ascent direction. We call this phenomenon dynamic stability: the loss $\boldsymbol { \mathcal { L } } _ { G } ( \cdot , \varphi ^ { * } )$ is unstable for a fixed $\varphi ^ { * }$ but becomes stable when $\varphi$ dynamically interacts with the generator around $\varphi ^ { * }$ .
|
| 112 |
+
|
| 113 |
+
A mechanical analogy for this dynamic stability phenomenon is a ball in a rotating saddle—even though the gravity pushes the ball to escape the saddle, a quick enough rotation of the saddle would trap the ball at the center (see (Thompson et al., 2002) for more details). This analogy has been used to explain Paul’s trap (Paul, 1990): a counter-intuitive way to trap ions using a dynamic electric field. In Example 1, the parameter $\varphi$ explicitly controls the rotation of the saddle.
|
| 114 |
+
|
| 115 |
+
This example illustrates the fact that the DNE corresponds to a notion of static stability: it is the stability of one player’s loss given the other player is fixed. Conversely, LSSP captures a notion of dynamic stability that considers both players jointly.
|
| 116 |
+
|
| 117 |
+
By looking at the game vector field we capture these interactions. Fig. 1b only captures a snapshot of the generator’s loss surface for a fixed $\varphi$ and indicates static instability (the generator is at a saddle point of its loss). In Fig. 1a, however, one can see that, starting from any point, we will rotate around the stationary point $( \bar { \varphi ^ { \ast } } , \theta _ { 1 } ^ { \ast } ) = ( 0 , 1 )$ and eventually converge to it.
|
| 118 |
+
|
| 119 |
+
The visualization of the game vector field reveals an interesting behavior that does not occur in single objective minimization: close to a LSSP, the parameters rotate around it. Understanding this phenomenon is key to grasp the optimization difficulties arising in games. In the next section, we formally characterize the notion of rotation around a LSSP and in 4 we develop tools to visualize it in high dimensions. Note that gradient methods may converge to saddle points in single objective minimization, but these are not stable stationary points, unlike in our game example.
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 1: Visualizations of Example 1. Left: projection of the game vector field on the plane $\theta _ { 2 } = 1$ . Right: Generator loss. The descent direction is $( 1 , \varphi )$ (in grey). As the generator follows this descent direction, the discriminator changes the value of $\varphi$ , making the saddle rotate, as indicated by the circular black arrow.
|
| 123 |
+
|
| 124 |
+
# 3.3 ROTATION AND ATTRACTION AROUND LOCALLY STABLE STATIONARY POINTS IN GAMES
|
| 125 |
+
|
| 126 |
+
In this section, we formalize the notions of rotation and attraction around LSSP in games, which we believe may explain some difficulties in GAN training. The local stability of a LSSP is characterized by the eigenvalues of the Jacobian $\nabla \boldsymbol { v } ( \omega ^ { * } )$ because we can linearize $\pmb { v } ( \omega )$ around $\omega ^ { \ast }$ :
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\pmb { v } ( \pmb { \omega } ) \approx \nabla \pmb { v } ( \pmb { \omega } ^ { * } ) ( \pmb { \omega } - \pmb { \omega } ^ { * } ) .
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
If we assume that (6) is an equality, we have the following theorem.
|
| 133 |
+
|
| 134 |
+
Proposition 1. Let us assume that (6) is an equality and that $\nabla \boldsymbol { v } ( \omega ^ { * } )$ is diagonalizable, then there exists a basis $_ { r }$ such that the coordinates $\tilde { \omega } _ { j } ( t ) : = [ P ( \omega ( t ) - \omega ^ { * } ) ] _ { j }$ where $\omega ( t )$ is a solution of (6) have the following behavior: for $\lambda _ { j } \in \mathrm { S p } \bar { \nabla } \boldsymbol { v } ( \omega ^ { * } )$ we have,
|
| 135 |
+
|
| 136 |
+
1. If $\lambda _ { j } \in \mathbb { R }$ , we observe pure attraction: $\tilde { \omega } _ { j } ( t ) = e ^ { - \lambda _ { j } t } \tilde { \omega } _ { j } ( 0 ) .$
|
| 137 |
+
|
| 138 |
+
2. If $\Re ( \lambda _ { j } ) = 0$ , we observe pure rotation: $\begin{array} { r } { \left[ \begin{array} { l } { \tilde { \omega } _ { j } ( t ) } \\ { \tilde { \omega } _ { j + 1 } ( t ) } \end{array} \right] = \left[ \begin{array} { l l } { \cos | \lambda _ { j } t | } & { \sin | \lambda _ { j } t | } \\ { - \sin | \lambda _ { j } t | } & { \cos | \lambda _ { j } t | } \end{array} \right] \left[ \begin{array} { l } { \tilde { \omega } _ { j } ( 0 ) } \\ { \tilde { \omega } _ { j + 1 } ( 0 ) } \end{array} \right] . } \end{array}$
|
| 139 |
+
|
| 140 |
+
3. Otherwise, we observe both: $\left[ \begin{array} { l } { \tilde { \omega } _ { j } ( t ) } \\ \tilde { \omega } _ { j + 1 } ( t ) \right] = e ^ { - \operatorname { R e } ( \lambda _ { j } ) t } \left[ \begin{array} { l l } { \cos \operatorname { I m } ( \lambda _ { j } t ) } & { \sin \operatorname { I m } ( \lambda _ { j } t ) } \\ { - \sin \operatorname { I m } ( \lambda _ { j } t ) } & { \cos \operatorname { I m } ( \lambda _ { j } t ) } \end{array} \right] \left[ \begin{array} { l } { \tilde { \omega } _ { j } ( 0 ) } \\ { \tilde { \omega } _ { j + 1 } ( 0 ) } \end{array} \right] . \end{array}$
|
| 141 |
+
|
| 142 |
+
Note that we re-ordered the eigenvalues such that the complex conjugate eigenvalues form pairs: if $\lambda _ { j } \notin \mathbb { R }$ then $\lambda _ { j + 1 } = \bar { \lambda } _ { j }$ .
|
| 143 |
+
|
| 144 |
+
Matrices in 2. and 3. are rotations matrices. They induce a rotational behavior illustrated in Fig 1a.
|
| 145 |
+
|
| 146 |
+
This proposition shows that the dynamics of $\omega ( t )$ can be decomposed in a particular basis into attractions and rotations over components that do not interact between each other. Rotation does not appear in single objective minimization around a local minimum, because the eigenvalues of the Hessian of the objective are always real. Mescheder et al. (2017) discussed that difficulties in training GANs may be a result of the imaginary part of the eigenvalues of the Jacobian of the game vector field and Gidel et al. (2019b) mentioned that games have a natural oscillatory behavior. This cyclic behavior has been explained in (Balduzzi et al., 2018) by a non-zero Hamiltonian component in the Helmholtz decomposition of the Jacobian of the game vector field. All these explanations are related to the spectral properties of this Jacobian. The goal of Proposition 1 is to provide a formal definition to the notions of rotation and attraction we are dealing with in this paper.
|
| 147 |
+
|
| 148 |
+
In the following section, we introduce a new tool in order to assess the magnitude of the rotation around a LSSP compared to the attraction to this point.
|
| 149 |
+
|
| 150 |
+
# 4 VISUALIZATION FOR THE VECTOR FIELD LANDSCAPE
|
| 151 |
+
|
| 152 |
+
Neural networks are parametrized by a large number of variables and visualizations are only possible using low dimensional plots (1D or 2D). We first present a standard visualization tool for deep neural network loss surfaces that we will exploit in $\ S 4 . 2$ .
|
| 153 |
+
|
| 154 |
+
# 4.1 STANDARD VISUALIZATIONS FOR THE LOSS SURFACE
|
| 155 |
+
|
| 156 |
+
One way to visualize a neural network’s loss landscape is to follow a parametrized path $\omega ( \alpha )$ that connects two parameters $\omega , \omega ^ { \prime }$ (often one is chosen early in learning and another one is chosen late in learning, close to a solution). A path is a continuous function $\omega ( \cdot )$ such that $\omega ( 0 ) = \omega$ and $\omega ( 1 ) = \omega ^ { \prime }$ . Goodfellow et al. (2015) considered a linear path ${ \pmb { \omega } } ( \alpha ) = \alpha { \pmb { \omega } } + ( 1 - \alpha ) { \pmb { \omega } } ^ { \prime }$ . More complex paths can be considered to assess whether different minima are connected (Draxler et al., 2018).
|
| 157 |
+
|
| 158 |
+
# 4.2 PROPOSED VISUALIZATION: PATH-ANGLE
|
| 159 |
+
|
| 160 |
+
We propose to study the linear path between parameters early in learning and parameters late in learning. We illustrate the extreme cases for the game vector field along this path in simple examples in Figure 2(a-c): pure attraction occurs when the vector field perfectly points to the optimum (Fig. 2a) and pure rotation when the vector field is orthogonal to the direction to the optimum (Fig. 2b). In practice, we expect the vector field to be in between these two extreme cases (Fig. 2c). In order to determine in which case we are, around a LSSP, in practice, we propose the following tools.
|
| 161 |
+
|
| 162 |
+
Path-norm. We first ensure that we are in a neighborhood of a stationary point by computing the norm of the vector field. Note that considering independently the norm of each player may be misleading: even though the gradient of one player may be close to zero, it does not mean that we are at a stationary point since the other player might still be updating its parameters.
|
| 163 |
+
|
| 164 |
+
Path-angle. Once we are close to a final point $\omega ^ { \prime }$ , i.e., in a neighborhood of a LSSP, we propose to look at the angle between the vector field (3) and the linear path from $\omega$ to $\omega ^ { \prime }$ . Specifically, we monitor the cosine of this angle, a quantity we call Path-angle:
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
\begin{array} { r } { c ( \alpha ) : = \frac { \langle \omega ^ { \prime } - \omega , v _ { \alpha } \rangle } { \| \omega ^ { \prime } - \omega \| \| v _ { \alpha } \| } \quad \mathrm { w h e r e } \quad v _ { \alpha } : = v ( \alpha \omega ^ { \prime } + ( 1 - \alpha ) \omega ) , \alpha \in \left[ a , b \right] . } \end{array}
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
Usually $[ a , b ] = [ 0 , 1 ]$ , but since we are interested in the landscape around a LSSP, it might be more informative to also consider further extrapolated points around $\omega ^ { \prime }$ with $b > 1$ .
|
| 171 |
+
|
| 172 |
+
Eigenvalues of the Jacobian. Another important tool to gain insights on the behavior close to a LSSP, as discussed in $\ S 3 . 2$ , is to look at the eigenvalues of $\nabla \boldsymbol { v } ( \omega ^ { * } )$ . We propose to compute the top- $\mathbf { \nabla } \cdot \mathbf { k }$ eigenvalues of this Jacobian. When all the eigenvalues have positive real parts, we conclude that we have reached a LSSP, and if some eigenvalues have large imaginary parts, then the game has a strong rotational behavior (Thm. 1). Similarly, we can also compute the top- $\mathbf { \nabla } \cdot \mathbf { k }$ eigenvalues of the diagonal blocks of the Jacobian, which correspond to the Hessian of each player. These eigenvalues can inform us on whether we have converged to a LSSP that is not a LNE.
|
| 173 |
+
|
| 174 |
+
An important advantage of the Path-angle relative to the computation of the eigenvalues of $\nabla \boldsymbol { v } ( \omega ^ { * } )$ is that it only requires computing gradients (and not second order derivatives, which may be prohibitively computationally expensive for deep networks). Also, it provides information along a whole path between two points and thus, more global information than the Jacobian computed at a single point. In the following section, we use the Path-angle to study the archetypal behaviors presented in $\mathrm { T h m } 1$
|
| 175 |
+
|
| 176 |
+
# 4.3 ARCHETYPAL BEHAVIORS OF THE PATH-ANGLE AROUND A LSSP
|
| 177 |
+
|
| 178 |
+
Around a LSSP, we have seen in (6) that the behavior of the vector field is mainly dictated by the Jacobian matrix $\nabla \boldsymbol { v } ( \omega ^ { * } )$ . This motivates the study of the behavior of the Path-angle $c ( \alpha )$ where the Jacobian is a constant matrix:
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
v ( \omega ) = \left[ \begin{array} { l l } { S _ { 1 } } & { B } \\ { A } & { S _ { 2 } } \end{array} \right] ( \omega - \omega ^ { * } ) \quad \mathrm { a n d ~ t h u s } \quad \nabla v ( \omega ) = \left[ \begin{array} { l l } { S _ { 1 } } & { B } \\ { A } & { S _ { 2 } } \end{array} \right] \quad \forall \omega .
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+

|
| 185 |
+
Figure 2: Above: game vector field (in grey) for different archetypal behaviors. The equilibrium of the game is at $( 0 , 0 )$ . Black arrows correspond to the directions of the vector field at different linear interpolations between two points: $\bullet$ and $\star$ . Below: path-angle $c ( \alpha )$ for different archetypal behaviors (right y-axis, in blue). The left y-axis in orange correspond to the norm of the gradients. Notice the ”bump” in path-angle (close to $\alpha = 1$ ), characteristic of rotational dynamics.
|
| 186 |
+
|
| 187 |
+
Depending on the choice of $S _ { 1 } , S _ { 2 } , A$ and $\textbf { { B } }$ , we cover the following cases:
|
| 188 |
+
|
| 189 |
+
• $S _ { 1 } , S _ { 2 } \succ 0 , A = B = 0$ : eigenvalues are real. Thm. 1 ensures that we only have attraction. Far from $\omega ^ { * }$ , the gradient points to $\omega ^ { \ast }$ (See Fig. 2a) and thus $c ( \alpha ) = \mathrm { 1 }$ for $\alpha \ll 1$ and $c ( \alpha ) = - 1$ for $\alpha \gg 1$ . Since $\omega ^ { \prime }$ is not exactly $\omega ^ { \ast }$ , we observe a quick sign switch of the Path-angle around $\alpha = 1$ . We plotted the average Path-angle over different approximate optima in Fig. 2a (see appendix for details). $S _ { 1 } , S _ { 2 } = 0 , A = - B ^ { \top }$ : eigenvalues are pure imaginary. Thm. 1 ensures that we only have rotations. Far from the optimum the gradient is orthogonal to the direction that points to $\omega$ (See Fig. 2b). Thus, $c ( \alpha )$ vanishes for $\alpha \ll 1$ and $\alpha \gg 1$ . Because $\omega ^ { \prime }$ is not exactly $\omega ^ { \ast }$ , around $\alpha = 1$ , the gradient is tangent to the circles induced by the rotational dynamics and thus $c ( \alpha ) = \pm 1$ . That is why in Fig. 2b we observe a bump in $c ( \alpha )$ when $\alpha$ is close to 1. General high dimensional LSSP (4). The dynamics display both attraction and rotation. We observe a combination of the sign switch due to the attraction and the bump due to the rotation. The higher the bump, the closer we are to pure rotations. Since we are performing a low dimensional visualization, we actually project the gradient onto our direction of interest. That is why the Path-angle is significantly smaller than 1 in Fig. 2c.
|
| 190 |
+
|
| 191 |
+
# 5 NUMERICAL RESULTS ON GANS
|
| 192 |
+
|
| 193 |
+
Losses. We focus on two common GAN loss formulations: we consider both the original nonsaturating GAN (NSGAN) formulation proposed in Goodfellow et al. (2014) and the WGAN-GP objective described in Gulrajani et al. (2017).
|
| 194 |
+
|
| 195 |
+
Datasets. We first propose to train a GAN on a toy task composed of a 1D mixture of 2 Gaussians (MoG) with 10,000 samples. For this task both the generator and discriminator are neural networks with 1 hidden layer and ReLU activations. We also train a GAN on MNIST, where we use the DCGAN architecture (Radford et al., 2016) with spectral normalization(see $\mathrm { \displaystyle \ S C } . 2$ for details). Finally we also look at the optimization landscape of a state of the art ResNet on CIFAR10 (Krizhevsky and Hinton, 2009).
|
| 196 |
+
|
| 197 |
+
Optimization methods. For the mixture of Gaussian (MoG) dataset, we used the full-batch extragradient method (Korpelevich, 1976; Gidel et al., 2019a). We also tried to use standard batch gradient descent, but this led to unstable results indicating that gradient descent might indeed be unable to converge to stable stationary points due to the rotations (see $\ S { \bf C } . 4 \AA ,$ . On MNIST and CIFAR10, we tested both Adam (Kingma and Ba, 2015) and ExtraAdam (Gidel et al., 2019a). The observations made on models trained with both methods are very similar. ExtraAdam gives slightly better performance in terms of inception score (Salimans et al., 2016), and Adam sometimes converge to unstable points, thus we decided to only include the observations on ExtraAdam, for more details on the observations on Adam (see $\ S { \bf C } . 5 )$ ). As recommended by Heusel et al. (2017), we chose different learning rates for the discriminator and the generator. All the hyper-parameters and precise details about the experiments can be found in $\mathrm { \ S C . 1 }$ .
|
| 198 |
+
|
| 199 |
+

|
| 200 |
+
Figure 3: Path-angle for NSGAN (top row) and WGAN-GP (bottom row) trained on the different datasets, see Appendix C.3 for details on how the path-angle is computed. For MoG the ending point is a generator which has learned the distribution. For MNIST and CIFAR10 we indicate the Inception score (IS) at the ending point of the interpolation. Notice the “bump” in path-angle (close to $\alpha = 1 . 0$ ), characteristic of games rotational dynamics, and absent in the minimization problem (d). Details on error bars in $\ S { \bf C } . 3$ .
|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
Figure 4: Eigenvalues of the Jacobian of the game for NSGAN (top row) and WGAN-GP (bottom row) trained on the different datasets. Large imaginary eigenvalues are characteristic of rotational behavior. Notice that NSGAN and WGAN-GP objectives lead to very different landscapes (see how the eigenvalues of WGAN-GP are shifted to the right of the imaginary axis). This could explain the difference in performance between NSGAN and WGAN-GP.
|
| 204 |
+
|
| 205 |
+
# 1 EVIDENCE OF ROTATION AROUND LOCALLY STABLE STATIONARY POINTS IN GAN
|
| 206 |
+
|
| 207 |
+
We first look, for all the different models and datasets, at the path-angles between a random initialization (initial point) and the set of parameters during training achieving the best performance (end point) (Fig. 3), and at the eigenvalues of the Jacobian of the game vector field for the same end point (Fig. 4). We’re mostly interested in looking at the optimization landscape around LSSPs, so we first check if we are actually close to one. To do so we look at the gradient norm around the end point, this is shown by the orange curves in Fig.3, we can see that the norm of the gradient is quite small for all the models meaning that we are close to a stationary point. We also need to check that the point is stable, to do so we look at the eigenvalues of the Game in Fig. 4, if all the eigenvalues have positive real parts then the point is also stable. We observe that most of the time, the model has reached a LSSP. However we can see that this is not always the case, for example in Fig. 4d some of the eigenvalues have a negative real part. We still include those results since although the point is unstable it gives similar performance to a LSSP.
|
| 208 |
+
|
| 209 |
+
Our first observation is that all the GAN objectives on both datasets have a non zero rotational component. This can be seen by looking at the Path-angle in Fig. 3, where we always observe a bump, and this is also confirmed by the large imaginary part in the eigenvalues of the Jacobian in Fig. 4. The rotational component is clearly visible in Fig. 3d, where we see no sign switch and a clear bump similar to Fig. 2b. On MNIST and CIFAR10, with NSGAN and WGAN-GP (see Fig. 3), we observe a combination of a bump and a sign switch similar to Fig. 2c. Also Fig. 4 clearly shows the existence of imaginary eigenvalues with large magnitude. Fig. 4c and 4e. We can see that while almost all models exhibit rotations, the distribution of the eigenvalues are very different. In particular the complex eigenvalues for NSGAN seems to be much more concentrated on the imaginary axis while WGAN-GP tends to spread the eigenvalues towards the right of the imaginary axis Fig. 4e. This shows that different GAN objectives can lead to very different landscapes, and has implications in terms of optimization, in particular that might explain why WGAN-GP performs slightly better than NSGAN.
|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
Figure 5: NSGAN. Top $k$ -Eigenvalues of the Hessian of each player (in terms of magnitude) in descending order. Top Eigenvalues indicate that the Generator does not reach a local minimum but a saddle point (for CIFAR10 actually both the generator and discriminator are at saddle points). Thus the training algorithms converge to LSSPs which are not Nash equilibria.
|
| 213 |
+
|
| 214 |
+
# 5.2 THE LOCALLY STABLE STATIONARY POINTS OF GANS ARE NOT LOCAL NASH EQUILIBRIA
|
| 215 |
+
|
| 216 |
+
As mentioned at the beginning of $\ S 5 . 1$ , the points we are considering are most of the times LSSP. To check if these points are also local Nash equilibria (LNE) we compute the eigenvalues of the Hessian of each player independently. If all the eigenvalues of each player are positive, it means that we have reached a DNE. Since the computation of the full spectrum of the Hessians is expensive, we restrict ourselves to the top- $\mathbf { \nabla } \cdot \mathbf { k }$ eigenvalues with largest magnitude: exhibiting one significant negative eigenvalue is enough to indicate that the point considered is not in the neighborhood of a
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
Figure 6: WGAN-GP. Top $k$ -Eigenvalues of the Hessian of each player (in terms of magnitude) in descending order. Top Eigenvalues indicate that the Generator does not reach a local minimum but a saddle point. Thus the training algorithms converge to LSSPs which are not Nash equilibria.
|
| 220 |
+
|
| 221 |
+
LNE. Results are shown in Fig. 5 and Fig. 6, from which we make several observations. First, we see that the generator never reaches a local minimum but instead finds a saddle point. This means that the algorithm converges to a LSSP which is not a LNE, while achieving good results with respect to our evaluation metrics. This raises the question whether convergence to a LNE is actually needed or if converging to a LSSP is sufficient to reach a good solution. We also observe a large difference in the eigenvalues of the discriminator when using the WGAN-GP v.s. the NSGAN objective. In particular, we find that the discriminator in NSGAN converges to a solution with very large positive eigenvalues compared to WGAN-GP. This shows that the discriminator in NSGAN converges to a much sharper minimum. This is consistent with the fact that the gradient penalty acts as a regularizer on the discriminator and prevents it from becoming too sharp.
|
| 222 |
+
|
| 223 |
+
# 6 DISCUSSION
|
| 224 |
+
|
| 225 |
+
Across different GAN formulations, standard optimization methods and datasets, we consistently observed that GANs do not converge to local Nash equilibria. Instead the generator often ends up being at a saddle point of the generator loss function. However, in practice, these LSSP achieve really good generator performance metrics, which leads us to question whether we need a Nash equilibrium to get a generator with good performance in GANs and whether such DNE with good performance does actually exist. Moreover, we have provided evidence that the optimization landscapes of GANs typically have rotational components specific to games. We argue that these rotational components are part of the reason why GANs are challenging to train, in particular that the instabilities observed during training may come from such rotations close to LSSP. It shows that simple low dimensional examples, such as for instance Dirac GAN, does capture some of the arising challenges for training large scale GANs, thus, motivating the practical use of method able to handle strong rotational components, such as extragradient (Gidel et al., 2019a), averaging (Yazıcı et al., 2019), optimism (Daskalakis et al., 2018) or gradient penalty based methods (Mescheder et al., 2017; Gulrajani et al., 2017).
|
| 226 |
+
|
| 227 |
+
# ACKNOWLEDGMENTS.
|
| 228 |
+
|
| 229 |
+
The contribution to this research by Mila, Universite de Montr ´ eal authors was partially supported by ´ the Canada CIFAR AI Chair Program (held at Mila), the Canada Excellence Research Chair in “Data Science for Realtime Decision-making”, by the NSERC Discovery Grant RGPIN-2017-06936 (held at Universite de Montr ´ eal), by a Borealis AI fellowship and by a Google Focused Research award. ´ The authors would like to thank Tatjana Chavdarova for fruitful discussions.
|
| 230 |
+
|
| 231 |
+
# REFERENCES
|
| 232 |
+
|
| 233 |
+
curvature exploitation approach. arXiv, 2018.
|
| 234 |
+
G. Alain, N. Le Roux, and P.-A. Manzagol. Negative eigenvalues of the hessian in deep neural networks. arXiv, 2019.
|
| 235 |
+
M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein generative adversarial networks. In ICML, 2017.
|
| 236 |
+
D. Balduzzi, S. Racaniere, J. Martens, J. Foerster, K. Tuyls, and T. Graepel. The mechanics of n-player differentiable games. In ICML, 2018.
|
| 237 |
+
A. Brock, J. Donahue, and K. Simonyan. Large scale GAN training for high fidelity natural image synthesis. In ICLR, 2019.
|
| 238 |
+
A. Choromanska, M. Henaff, M. Mathieu, G. B. Arous, and Y. LeCun. The loss surfaces of multilayer networks. In Artificial Intelligence and Statistics, 2015.
|
| 239 |
+
C. Daskalakis, A. Ilyas, V. Syrgkanis, and H. Zeng. Training GANs with optimism. In ICLR, 2018.
|
| 240 |
+
Y. N. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli, and Y. Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In NeurIPS, 2014.
|
| 241 |
+
F. Draxler, K. Veschgini, M. Salmhofer, and F. Hamprecht. Essentially no barriers in neural network energy landscape. In ICML, 2018.
|
| 242 |
+
G. Gidel, H. Berard, P. Vincent, and S. Lacoste-Julien. A variational inequality perspective on generative adversarial nets. ICLR, 2019a.
|
| 243 |
+
G. Gidel, R. A. Hemmat, M. Pezeshki, G. Huang, R. Lepriol, S. Lacoste-Julien, and I. Mitliagkas. Negative momentum for improved game dynamics. In AISTATS, 2019b.
|
| 244 |
+
X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010.
|
| 245 |
+
I. Goodfellow. Neurips 2016 tutorial: Generative adversarial networks. arXiv:1701.00160, 2016.
|
| 246 |
+
I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NeurIPS, 2014.
|
| 247 |
+
I. J. Goodfellow, O. Vinyals, and A. M. Saxe. Qualitatively characterizing neural network optimization problems. In ICLR, 2015.
|
| 248 |
+
I. Gulrajani, F. Ahmed, M. Arjovsky, V. Dumoulin, and A. C. Courville. Improved training of wasserstein GANs. In NeurIPS, 2017.
|
| 249 |
+
M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, and S. Hochreiter. GANs trained by a two time-scale update rule converge to a local nash equilibrium. In NeurIPS, 2017.
|
| 250 |
+
K. Kawaguchi. Deep learning without poor local minima. In NeurIPS, 2016.
|
| 251 |
+
D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 252 |
+
G. Korpelevich. The extragradient method for finding saddle points and other problems. Matecon, 1976.
|
| 253 |
+
A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 254 |
+
A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012.
|
| 255 |
+
Y. LeCun, C. Cortes, and C. Burges. MNIST handwritten digit database. AT&T Labs [Online]. Available: http://yann. lecun. com/exdb/mnist, 2010.
|
| 256 |
+
H. Li, Z. Xu, G. Taylor, C. Studer, and T. Goldstein. Visualizing the loss landscape of neural nets. In NeurIPS, 2018a.
|
| 257 |
+
J. Li, A. Madry, J. Peebles, and L. Schmidt. On the limitations of first order approximation in gan dynamics. In ICML, 2018b.
|
| 258 |
+
E. Mazumdar and L. J. Ratliff. On the convergence of gradient-based learning in continuous games. ArXiv, 2018.
|
| 259 |
+
E. V. Mazumdar, M. I. Jordan, and S. S. Sastry. On finding local nash equilibria (and only local nash equilibria) in zero-sum games. arXiv, 2019.
|
| 260 |
+
L. Mescheder, S. Nowozin, and A. Geiger. The numerics of GANs. In NeurIPS, 2017.
|
| 261 |
+
L. Mescheder, A. Geiger, and S. Nowozin. Which Training Methods for GANs do actually Converge? In ICML, 2018.
|
| 262 |
+
T. Miyato, T. Kataoka, M. Koyama, and Y. Yoshida. Spectral normalization for generative adversarial networks. In ICLR, 2018.
|
| 263 |
+
V. Nagarajan and J. Z. Kolter. Gradient descent GAN optimization is locally stable. In NeurIPS, 2017.
|
| 264 |
+
W. Paul. Electromagnetic traps for charged and neutral particles. Reviews of modern physics, 1990.
|
| 265 |
+
B. A. Pearlmutter. Fast exact multiplication by the hessian. Neural computation, 1994.
|
| 266 |
+
A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016.
|
| 267 |
+
L. J. Ratliff, S. A. Burden, and S. S. Sastry. On the characterization of local nash equilibria in continuous games. In IEEE Transactions on Automatic Control, 2016.
|
| 268 |
+
L. Sagun, L. Bottou, and Y. LeCun. Eigenvalues of the hessian in deep learning: Singularity and beyond. arXiv, 2016.
|
| 269 |
+
L. Sagun, U. Evci, V. U. Guney, Y. Dauphin, and L. Bottou. Empirical analysis of the hessian of over-parametrized neural networks. arXiv, 2017.
|
| 270 |
+
T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training GANs. In NeurIPS, 2016.
|
| 271 |
+
R. Thompson, T. Harmon, and M. Ball. The rotating-saddle trap: A mechanical analogy to rf-electricquadrupole ion trapping? Canadian journal of physics, 2002.
|
| 272 |
+
F. Verhulst. Nonlinear differential equations and dynamical systems. Springer Science & Business Media, 1989.
|
| 273 |
+
Y. Yazıcı, C.-S. Foo, S. Winkler, K.-H. Yap, G. Piliouras, and V. Chandrasekhar. The unusual effectiveness of averaging in GAN training. In ICLR, 2019.
|
| 274 |
+
|
| 275 |
+
# A PROOF OF THEOREMS AND PROPOSITIONS
|
| 276 |
+
|
| 277 |
+
A.1 PROOF OF THEOREM 1
|
| 278 |
+
|
| 279 |
+
Let us recall the theorem of interest:
|
| 280 |
+
|
| 281 |
+
Proposition’ 1. Let us assume that (6) is an equality and that $\nabla \boldsymbol { v } ( \omega ^ { * } )$ is diagonalizable, then there exists a basis $_ { r }$ such that the coordinates $\tilde { \omega } ( t ) : = P ( \omega ( t ) - \omega ^ { * } )$ have the following behavior,
|
| 282 |
+
|
| 283 |
+
1. For $\lambda _ { j } \in \mathrm { S p } \nabla v ( \omega ^ { * } )$ , $\lambda _ { j } \in \mathbb { R } ,$ , we observe pure attraction: $\tilde { \omega } _ { j } ( t ) = e ^ { - \lambda _ { j } t } [ \tilde { \omega } _ { j } ( 0 )$ .
|
| 284 |
+
|
| 285 |
+
2. For $\lambda _ { j } \in \mathrm { S p } \nabla v ( \omega ^ { * } ) , \Re ( \lambda _ { j } ) = 0$ , we observe pure rotation: $\begin{array} { r } { \left[ \tilde { \omega } _ { j } ( t ) \right] = R _ { | \lambda _ { j } | t } \left[ \tilde { \omega } _ { j } ( 0 ) \right] . } \end{array}$
|
| 286 |
+
|
| 287 |
+
3. Otherwise, we observe both: $\begin{array} { r } { \left[ \begin{array} { c } { \tilde { \omega } _ { j } ( t ) } \\ { \tilde { \omega } _ { j + 1 } ( t ) } \end{array} \right] = e ^ { - \mathrm { R e } ( \lambda _ { j } ) t } R _ { \mathrm { I m } ( \lambda _ { j } ) t } \left[ \begin{array} { c } { \tilde { \omega } _ { j } ( 0 ) } \\ { \tilde { \omega } _ { j + 1 } ( 0 ) } \end{array} \right] . } \end{array}$
|
| 288 |
+
|
| 289 |
+
The matrix $R _ { \varphi }$ corresponds to a rotation of angle $\varphi$ . Note that, we re-ordered the eigenvalues such that the complex conjugate eigenvalues form pairs: if $\lambda _ { j } \notin \mathbb { R }$ then $\lambda _ { j + 1 } = \bar { \lambda } _ { j }$ .
|
| 290 |
+
|
| 291 |
+
Proof. The ODE we consider is,
|
| 292 |
+
|
| 293 |
+
$$
|
| 294 |
+
\frac { d \pmb { \omega } ( t ) } { d t } = \nabla \pmb { v } ( \pmb { \omega } ^ { * } ) ( \pmb { \omega } ( t ) - \pmb { \omega } ^ { * } )
|
| 295 |
+
$$
|
| 296 |
+
|
| 297 |
+
The solution of this ODE is
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\pmb { \omega } ( t ) = e ^ { - ( t - t _ { 0 } ) \nabla \pmb { v } ( \pmb { \omega } ^ { * } ) } ( \pmb { \omega } ( t _ { 0 } ) - \pmb { \omega } ^ { * } ) + \pmb { \omega } ^ { * }
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
Let us now consider $\lambda$ an eigenvalue of $\mathrm { S p } ( \nabla v ( \omega ^ { * } ) )$ such that $\mathrm { R e } ( \lambda ) > 0$ and $\underline { { \mathrm { I m } } } ( \lambda ) \neq 0$ . Since $\nabla \boldsymbol { v } ( \omega ^ { * } )$ is a real matrix and $\mathrm { I m } ( \lambda ) \neq 0$ we know that the complex conjugate $\bar { \lambda }$ of $\lambda$ belongs to $\mathrm { S p } ( \nabla v ( \omega ^ { * } ) )$ . Let $\mathbf { \delta } \mathbf { u } _ { 0 }$ be a complex eigenvector of $\lambda$ , then we have that,
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
\begin{array} { r } { \nabla \pmb { v } ( \omega ^ { * } ) \pmb { u } _ { 0 } = \lambda \pmb { u } _ { 0 } \quad \Rightarrow \quad \nabla \pmb { v } ( \omega ^ { * } ) \pmb { \bar { u } } _ { 0 } = \bar { \lambda } \pmb { \bar { u } } _ { 0 } } \end{array}
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
and thus $\bar { \mathbf { u } } _ { 0 }$ is a eigenvector of $\bar { \lambda }$ . Now if we set $\pmb { u } _ { 1 } : = \pmb { u } _ { 0 } + \bar { \pmb { u } } _ { 0 }$ and $i \pmb { u } _ { 2 } : = \pmb { u } _ { 0 } - \bar { \pmb { u } } _ { 0 }$ , we have that
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\begin{array} { r l } & { e ^ { - t \nabla v ( \omega ^ { * } ) } u _ { 1 } = e ^ { - t \lambda } { \mathbf { 1 } } _ { 0 } + e ^ { - t \bar { \lambda } } \bar { \mathbf { u } } _ { 0 } = \mathrm { R e } ( e ^ { - t \lambda } ) { \mathbf { 1 } } _ { 1 } + \mathrm { I m } ( e ^ { - t \lambda } ) { \mathbf { 1 } } _ { 2 } } \\ & { e ^ { - t \nabla v ( \omega ^ { * } ) } i { \mathbf { 1 } } _ { 2 } = e ^ { - t \lambda } { \mathbf { 1 } } _ { 0 } - e ^ { - t \bar { \lambda } } \bar { \mathbf { u } } _ { 0 } = i ( \mathrm { R e } ( e ^ { - t \lambda } ) { \mathbf { 1 } } _ { 2 } - \mathrm { I m } ( e ^ { - t \lambda } ) { \mathbf { u } } _ { 1 } ) } \end{array}
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
Thus if we consider the basis that diagonalizes $\nabla \boldsymbol { v } ( \omega ^ { * } )$ and modify the complex conjugate eigenvalues in the way we described right after 11 we get the expected diagonal form in a real basis. Thus there exists $_ { P }$ such that
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\nabla \pmb { v } ( \omega ^ { * } ) = \pmb { P } \pmb { D } \pmb { P } ^ { - 1 }
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
where $_ { D }$ is the block diagonal matrix with the block described in Theorem 1.
|
| 322 |
+
|
| 323 |
+
A.2 BEING A DNE IS NEITHER NECESSARY OR SUFFICIENT FOR BEING A LSSP
|
| 324 |
+
|
| 325 |
+
Let us first recall Example 1.
|
| 326 |
+
|
| 327 |
+
Example’ 1. Let us consider $\mathcal { L } _ { G }$ as a hyperbolic paraboloid (a.k.a., saddle point function) centered in $( 1 , 1 )$ where $( 1 , \varphi )$ is the principal descent direction and $( - \varphi , 1 )$ is the principal ascent direction, while $\mathcal { L } _ { D }$ is a simple bilinear objective.
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
\begin{array} { r } { \mathcal { L } _ { G } ( \theta _ { 1 } , \theta _ { 2 } , \varphi ) = ( \theta _ { 2 } - \varphi \theta _ { 1 } - 1 ) ^ { 2 } - \frac { 1 } { 2 } ( \theta _ { 1 } + \varphi \theta _ { 2 } - 1 ) ^ { 2 } , \mathcal { L } _ { D } ( \theta _ { 1 } , \theta _ { 2 } , \varphi ) = \varphi ( 5 \theta _ { 1 } + 4 \theta _ { 2 } - 9 ) } \end{array}
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
We want to show that $( 1 , 1 , 0 )$ is a locally stable stationary point.
|
| 334 |
+
|
| 335 |
+
Proof. The game vector field has the following form,
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\pmb { v } ( \theta _ { 1 } , \theta _ { 2 } , \varphi ) = \left( \begin{array} { c } { ( 2 \varphi ^ { 2 } - 1 ) \theta _ { 1 } - 3 \varphi \theta _ { 2 } + 2 \varphi + 1 } \\ { ( 2 - \varphi ^ { 2 } ) \theta _ { 2 } - 3 \varphi \theta _ { 1 } - 2 + \varphi } \\ { 5 \theta _ { 1 } + 4 \theta _ { 2 } - 9 } \end{array} \right)
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
Thus, $( \theta _ { 1 } ^ { * } , \theta _ { 2 } ^ { * } , \varphi ^ { * } ) : = ( 1 , 1 , 0 )$ is a stationary point (i.e., ${ \pmb v } ( \theta _ { 1 } ^ { * } , \theta _ { 2 } ^ { * } , \varphi ^ { * } ) = 0 ,$ . The Jacobian of the game vector field is
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\nabla \pmb { v } ( \theta _ { 1 } , \theta _ { 2 } , \varphi ) = \left( \begin{array} { c c c } { 2 \varphi ^ { 2 } - 1 } & { - 3 \varphi } & { 2 - 3 \theta _ { 2 } } \\ { - 3 \varphi } & { 2 - \varphi ^ { 2 } } & { 1 - 3 \theta _ { 1 } } \\ { 5 } & { 4 } & { 0 } \end{array} \right) ,
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
and thus,
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
\nabla \pmb { v } ( \theta _ { 1 } ^ { * } , \theta _ { 2 } ^ { * } , \varphi ^ { * } ) = \left( \begin{array} { c c c } { - 1 } & { 0 } & { - 1 } \\ { 0 } & { 2 } & { - 2 } \\ { 5 } & { 4 } & { 0 } \end{array} \right) .
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
We can verify that the eigenvalues of this matrix have a positive real part with any solver (the eigenvalues of a $3 \times 3$ always have a closed form) . For completeness we provide a proof without using the closed form of the eigenvalues. The eigenvalues $\nabla \boldsymbol { v } ( \theta _ { 1 } ^ { * } , \theta _ { 2 } ^ { * } , \varphi ^ { * } )$ are given by the roots of its characteristic polynomial,
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\chi ( X ) : = \left| \begin{array} { c c c } { { X + 1 } } & { { 0 } } & { { 1 } } \\ { { 0 } } & { { X - 2 } } & { { 2 } } \\ { { - 5 } } & { { - 4 } } & { { 0 } } \end{array} \right| = X ^ { 3 } - X ^ { 2 } + 1 1 X - 2 .
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
This polynomial has a real root in $( 0 , 1 )$ because $\chi ( 0 ) = - 2 < 0 < 9 = \chi ( 1 )$ . Thus we know that, there exists $\alpha \in ( 0 , 1 )$ such that,
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
X ^ { 3 } - X ^ { 2 } + 1 1 X - 2 = ( X - \alpha ) ( X - \lambda _ { 1 } ) ( X - \lambda _ { 2 } ) .
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
Then we have the equalities,
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
\begin{array} { l } { { \alpha \lambda _ { 1 } \lambda _ { 2 } = 2 } } \\ { { \alpha + \lambda _ { 1 } + \lambda _ { 2 } = 1 . } } \end{array}
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
Thus, since $0 < \alpha < 1$ , we have that,
|
| 372 |
+
|
| 373 |
+
• If $\lambda _ { 1 }$ and $\lambda _ { 2 }$ are real, they have the same sign $\lambda _ { 1 } \lambda _ { 2 } = 2 / \alpha > 0$ ) and thus are positive $( \lambda _ { 1 } + \lambda _ { 2 } = 1 - \alpha > 0 )$ .
|
| 374 |
+
|
| 375 |
+
• If $\lambda _ { 1 }$ is complex then $\lambda _ { 2 } = \bar { \lambda } _ { 1 }$ and thus, $2 \Re ( \lambda _ { 1 } ) = \lambda _ { 1 } + \lambda _ { 2 } = 1 - \alpha > 0 ,$ .
|
| 376 |
+
|
| 377 |
+
Example 1 showed that LSSP did not imply DNE. Let us construct an example where a game have a DNE which is not locally stable.
|
| 378 |
+
|
| 379 |
+
Example 2. Consider the non-zero-sum game with the following respective losses for each player,
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\begin{array} { r } { \mathcal { L } _ { 1 } ( \theta , \phi ) = 4 \theta ^ { 2 } + ( \frac { 1 } { 2 } \phi ^ { 2 } - 1 ) \cdot \theta \quad a n d \quad \mathcal { L } _ { 2 } ( \theta , \phi ) = ( 4 \theta - 1 ) \phi + \frac { 1 } { 6 } \theta ^ { 3 } } \end{array}
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
This game has two stationary points for $\theta = 0$ and $\phi = \pm 1$ . The Jacobian of the dynamics at these two points are
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\nabla \pmb { v } ( 0 , 1 ) = \left( { 1 \atop 2 } \quad { 1 / 2 } \right) \quad \mathrm { a n d } \quad \nabla \pmb { v } ( 0 , - 1 ) = \left( { 1 \atop 2 } \quad { - 1 / 2 } \right)
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
Thus,
|
| 392 |
+
|
| 393 |
+
• The stationary point $( 0 , 1 )$ is a DNE but $\begin{array} { r } { \mathrm { S p } ( \nabla v ( 0 , 1 ) ) = \{ \frac { 3 \pm \sqrt { 1 7 } } { 4 } \} } \end{array}$ contains an eigenvalue with negative real part and so is not a LSSP.
|
| 394 |
+
|
| 395 |
+
• The statioanry point $( 0 , - 1 )$ is not a DNE but $\begin{array} { r } { \mathrm { S p } ( \nabla v ( 0 , 1 ) ) = \lbrace \frac { 1 \pm i \sqrt { 7 } } { 4 } \rbrace } \end{array}$ contains only eigenvalue with positive real part and so is a LSSP.
|
| 396 |
+
|
| 397 |
+
# B COMPUTATION OF THE TOP-K EIGENVALUES OF THE JACOBIAN
|
| 398 |
+
|
| 399 |
+
Neural networks usually have a large number of parameters, this usually makes the storing of the full Jacobian matrix impossible. However the Jacobian vector product can be efficiently computed by using the trick from (Pearlmutter, 1994). Indeed it’s easy to show that $\nabla \pmb { v } ( \pmb { \omega } ) \pmb { u } = \dot { \nabla } ( \pmb { v } ( \pmb { \omega } ) ^ { T } \pmb { u } )$ .
|
| 400 |
+
|
| 401 |
+
To compute the eigenvalues of the Jacobian of the Game, we first compute the gradient $\pmb { v } ( \omega )$ over a subset of the dataset. We then define a function that computes the Jacobian vector product using automatic differentiation. We can then use this function to compute the top- $\mathbf { \nabla } \cdot \mathbf { k }$ eigenvalues of the Jacobian using the sparse.linalg.eigs functions of the Scipy library.
|
| 402 |
+
|
| 403 |
+
# C EXPERIMENTAL DETAILS
|
| 404 |
+
|
| 405 |
+
# C.1 MIXTURE OF GAUSSIAN EXPERIMENT
|
| 406 |
+
|
| 407 |
+
Dataset. The Mixture of Gaussian dataset is composed of 10,000 points sampled independently from the following distribution $\begin{array} { r } { p _ { \mathcal { D } } ( x ) = \frac { 1 } { 2 } \mathcal { N } ( 2 , 0 . 5 ) \stackrel { \cdot } { + } \frac { 1 } { 2 } \mathcal { N } ( - 2 , 1 ) } \end{array}$ where $\textstyle { \mathcal { N } } ( { \bar { \mu } } , \sigma ^ { 2 } )$ is the probability density function of a 1D-Gaussian distribution with mean $\mu$ and variance $\sigma ^ { 2 }$ . The latent variables $z \in \mathbb { R } ^ { \bar { d } }$ are sampled from a standard Normal distribution $\mathcal { N } ( 0 , I _ { d } )$ . Because we want to use full-batch methods, we sample 10,000 points that we re-use for each iteration during training.
|
| 408 |
+
|
| 409 |
+
Neural Networks Architecture. Both the generator and discriminator are one hidden layer neural networks with 100 hidden units and ReLU activations.
|
| 410 |
+
|
| 411 |
+
WGAN Clipping. Because of the clipping of the discriminator parameters some components of the gradient of the discriminator’s gradient should no be taken into account. In order to compute the relevant path angle we apply the following filter to the gradient:
|
| 412 |
+
|
| 413 |
+
$$
|
| 414 |
+
{ \bf 1 } \left\{ ( | \varphi | = { \bf c } ) \mathrm { a n d } ( \mathrm { s i g n } \nabla _ { \varphi } { \mathcal L } _ { \bf D } ( \omega ) = - \mathrm { s i g n } \varphi ) \right\}
|
| 415 |
+
$$
|
| 416 |
+
|
| 417 |
+
where $\varphi$ is clipped between $- c$ and $c$ . If this condition holds for a coordinate of the gradient then it mean that after a gradient step followed by a clipping the value of the coordinate will not change.
|
| 418 |
+
|
| 419 |
+
<table><tr><td colspan="2">Hyperparameters for WGAN-GP on MoG</td></tr><tr><td>Batch size</td><td>= 10, 000 (Full-Batch)</td></tr><tr><td>Numberof iterations</td><td>= 30,000</td></tr><tr><td>Learning rate for generator</td><td>=1×10-2</td></tr><tr><td>Learning rate for discriminator</td><td>=1 × 10-1</td></tr><tr><td>Gradient Penalty coeficient</td><td>=1 ×10-3</td></tr></table>
|
| 420 |
+
|
| 421 |
+
<table><tr><td>Hyperparameters for NSGAN on MoG</td><td></td></tr><tr><td>Batch size</td><td>= 10, 000 (Full-Batch)</td></tr><tr><td>Number of iterations</td><td>= 30,000</td></tr><tr><td>Learning rate for generator</td><td>=1×10-1</td></tr><tr><td>Learning rate for discriminator</td><td>= 1 ×10-1</td></tr></table>
|
| 422 |
+
|
| 423 |
+
# C.2 MNIST EXPERIMENT
|
| 424 |
+
|
| 425 |
+
Dataset We use the training part of MNIST dataset LeCun et al. (2010) (50K examples) for training our models, and scale each image to the range $[ - 1 , 1 ]$ .
|
| 426 |
+
|
| 427 |
+
Architecture We use the DCGAN architecture Radford et al. (2016) for our generator and discriminator, with both the NSGAN and WGAN-GP objectives. The only change we make is that we replace the Batch-norm layer in the discriminator with a Spectral-norm layer Miyato et al. (2018), which we find to stabilize training.
|
| 428 |
+
|
| 429 |
+
# Training Details
|
| 430 |
+
|
| 431 |
+
<table><tr><td colspan="2">Hyperparameters for NSGAN with Adam</td></tr><tr><td>Batch size</td><td>= 100</td></tr><tr><td>Number of iterations</td><td>= 100,000</td></tr><tr><td>Learning rate for generator</td><td>=2×10-4</td></tr><tr><td>Learning rate for discriminator</td><td>=5×10-5</td></tr><tr><td>β1</td><td>= 0.5</td></tr></table>
|
| 432 |
+
|
| 433 |
+
<table><tr><td colspan="2">Hyperparameters for NSGAN with ExtraAdam</td></tr><tr><td>Batch size</td><td>= 100</td></tr><tr><td>Number of iterations</td><td>= 100,000</td></tr><tr><td>Learning rate for generator</td><td>=2×10-4</td></tr><tr><td>Learning rate for discriminator</td><td>=5×10-5</td></tr><tr><td>β</td><td>= 0.9</td></tr></table>
|
| 434 |
+
|
| 435 |
+
<table><tr><td colspan="2">Hyperparameters for WGAN-GP with Adam</td></tr><tr><td>Batch size</td><td>= 100</td></tr><tr><td>Number of iterations</td><td>= 200,000</td></tr><tr><td>Learning rate for generator</td><td>= 8.6 × 10-5</td></tr><tr><td>Learning rate for discriminator</td><td>= 8.6 ×10-5</td></tr><tr><td>β1</td><td>= 0.5</td></tr><tr><td>Gradient penalty 入</td><td>=10</td></tr><tr><td>Critic per Gen. iterations 入</td><td>=5</td></tr></table>
|
| 436 |
+
|
| 437 |
+
<table><tr><td colspan="2">Hyperparameters for WGAN-GP with ExtraAdam</td></tr><tr><td>Batch size</td><td>= 100</td></tr><tr><td>Numberof iterations</td><td>= 200,000</td></tr><tr><td>Learning rate for generator</td><td>= 8.6 × 10-5</td></tr><tr><td>Learning rate for discriminator</td><td>=8.6 × 10-5</td></tr><tr><td>β</td><td>= 0.9</td></tr><tr><td>Gradient penalty 入</td><td>=10</td></tr><tr><td>Critic per Gen. iterations 入</td><td>=5</td></tr></table>
|
| 438 |
+
|
| 439 |
+
Computing Inception Score on MNIST We compute the inception score (IS) for our models using a LeNet classifier pretrained on MNIST. The average IS score of real MNIST data is 9.9.
|
| 440 |
+
|
| 441 |
+
# C.3 PATH-ANGLE PLOT
|
| 442 |
+
|
| 443 |
+
We use the path-angle plot to illustrate the dynamics close to a LSSP. To compute this plot, we need to choose an initial point $\omega$ and an end point $\omega ^ { \prime }$ . We choose the $\omega$ to be the parameters at initialization, but $\omega ^ { \prime }$ can more subtle to choose. In practice, when we use stochastic gradient methods we typically reach a neighborhood of a LSSP where the norm of the gradient is small. However, due to the stochastic noise, we keep moving around the LSSP. In order to be robust to the choice of the end point $\omega ^ { \prime }$ , we take multiple close-by points during training that have good performance (e.g., high IS in MNIST). In all of figures, we compute the path-angle (and path-norm) for all these end points (with the same start point), and we plot the median path-angle (middle line) and interquartile range (shaded area).
|
| 444 |
+
|
| 445 |
+
# C.4 INSTABILITY OF GRADIENT DESCENT
|
| 446 |
+
|
| 447 |
+
For the MoG dataset we tried both the extragradient method (Korpelevich, 1976; Gidel et al., 2019a) and the standard gradient descent. We observed that gradient descent leads to unstable results. In
|
| 448 |
+
|
| 449 |
+
particular the norm of the gradient has very large variance compared to extragradient this is shown in Fig. 7.
|
| 450 |
+
|
| 451 |
+

|
| 452 |
+
Figure 7: The norm of gradient during training for the standard GAN objective. We observe that while extra-gradient reaches low norm which indicates that it has converged, the gradient descent on the contrary doesn’t seem to converge.
|
| 453 |
+
|
| 454 |
+
# C.5 ADDITIONAL RESULTS WITH ADAM
|
| 455 |
+
|
| 456 |
+

|
| 457 |
+
Figure 8: Path-angle and Eigenvalues computed on MNIST with Adam.
|
| 458 |
+
|
| 459 |
+

|
| 460 |
+
Figure 9: Path-angle and Eigenvalues for NSGAN on CIFAR10 computed on CIFAR10 with Adam. We can see that the model has eigenvalues with negative real part, this means that we’ve actually reached an unstable point.
|
md/train/HJeqhA4YDS/HJeqhA4YDS.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/HJsjkMb0Z/HJsjkMb0Z.md
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# $i$ -REVNET: DEEP INVERTIBLE NETWORKS
|
| 2 |
+
|
| 3 |
+
Jorn-Henrik Jacobsen ¨ †‡, Arnold Smeulders †, Edouard Oyallon §
|
| 4 |
+
†University of Amsterdam
|
| 5 |
+
joern.jacobsen@bethgelab.org
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
It is widely believed that the success of deep convolutional networks is based on progressively discarding uninformative variability about the input with respect to the problem at hand. This is supported empirically by the difficulty of recovering images from their hidden representations, in most commonly used network architectures. In this paper we show via a one-to-one mapping that this loss of information is not a necessary condition to learn representations that generalize well on complicated problems, such as ImageNet. Via a cascade of homeomorphic layers, we build the $i$ -RevNet, a network that can be fully inverted up to the final projection onto the classes, i.e. no information is discarded. Building an invertible architecture is difficult, for one, because the local inversion is ill-conditioned, we overcome this by providing an explicit inverse. An analysis of i-RevNets learned representations suggests an alternative explanation for the success of deep networks by a progressive contraction and linear separation with depth. To shed light on the nature of the model learned by the $i$ -RevNet we reconstruct linear interpolations between natural image representations.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
A CNN may be very effective in classifying images of all sorts (He et al., 2016; Krizhevsky et al., 2012), but the cascade of linear and nonlinear operators reveals little about the contribution of the internal representation to the classification. The learning process is characterized by a steady reduction of large amounts of uninformative variability in the images while simultaneously revealing the essence of the visual class. It is widely believed that this process is based on progressively discarding uninformative variability about the input with respect to the problem at hand (Dosovitskiy & Brox, 2016; Mahendran & Vedaldi, 2016; Shwartz-Ziv & Tishby, 2017; Achille & Soatto, 2017). However, the extent to which information is discarded is lost somewhere in the intermediate nonlinear processing steps. In this paper, we aim to provide insight into the variability reduction process by proposing an invertible convolutional network, that does not discard any information about the input.
|
| 14 |
+
|
| 15 |
+
The difficulty to recover images from their hidden representations is found in many commonly used network architectures (Dosovitskiy & Brox, 2016; Mahendran & Vedaldi, 2016). This poses the question if a substantial loss of information is necessary for successful classification. We show information does not have to be discarded. By using homeomorphic layers, the invariance can be built only at the very last layer via a projection.
|
| 16 |
+
|
| 17 |
+
In Shwartz-Ziv & Tishby (2017), minimal sufficient statistics are proposed as a candidate to explain the reduction of variability. Tishby & Zaslavsky (2015) introduces the information bottleneck principle which states that an optimal representation must reduce the mutual information between an input and its representation to reduce as much uninformative variability as possible. At the same time, the network should maximize the mutual information between the desired output and its representation to effectively preserve each class from collapsing onto other classes. The effect of the information bottleneck was demonstrated on small datasets in Shwartz-Ziv & Tishby (2017); Achille & Soatto (2017).
|
| 18 |
+
|
| 19 |
+
However, in this work, we show it is not a necessary condition and we build a cascade of homeomorphic layers, which preserves the mutual information between input and hidden representation and shows that the loss of information can only occur at the final layer. This way we demonstrate that a loss of information can be avoided while maintaining discriminability, even for large-scale problems like ImageNet. One way to reduce variability is progressive contraction with respect to a meaningful $\ell ^ { 2 }$ metric in the intermediate representations.
|
| 20 |
+
|
| 21 |
+
Several works (Oyallon, 2017; Zeiler & Fergus, 2014) observed a phenomenon of progressive separation and contraction in non-invertible networks on limited datasets. Those progressive improvements can be interpreted as the creation of progressively stronger invariants for classification. Ideally, the contraction should not be too brutal to avoid removing important information from the intermediate signal. This shows that a good trade-off between discriminability and invariance has to be progressively built. In this paper, we extend some findings of Zeiler & Fergus (2014); Oyallon (2017) to ImageNet (Russakovsky et al., 2015) and, most importantly, show that a loss of information is not necessary for observing a progressive contraction.
|
| 22 |
+
|
| 23 |
+
The duality between invariance and separation of the classes is discussed in Mallat (2016). Here, intra-class variabilities are modeled as Lie groups that are processed by performing a parallel transport along those symmetries. Filters are adapted through learning to the specific bias of the dataset and avoid to contract along discriminative directions. However, using groups beyond the Euclidean case for image classification is hard. Mainly because groups associated with abstract variabilities are difficult to estimate due to their high-dimensional nature, as well as the appropriate degree of invariance required. An illustration of this framework on the Euclidean group is given by the scattering transform (Mallat, 2012), which builds invariance to small translations while being recoverable to a certain extent. In this work, we introduce a network that cannot discard any information except at the final classification stage, while we demonstrate numerically progressive contraction and separation of the signal classes.
|
| 24 |
+
|
| 25 |
+
We introduce the $i$ -RevNet, an invertible deep network.1 $i$ -RevNets retain all information about the input signal in any of their intermediate representations up until the last layer. Our architecture builds upon the recently introduced RevNet (Gomez et al., 2017), where we replace the non-invertible components of the original RevNets by invertible ones. $i$ -RevNets achieve the same performance on Imagenet compared to similar non-invertible RevNet and ResNet architectures (Gomez et al., 2017; He et al., 2016).
|
| 26 |
+
|
| 27 |
+
To shed light on the mechanism underlying the generalization-ability of the learned representation, we show that $i$ -RevNets progressively separate and contract signals with depth. Our results are evidence for an effective reduction of variability through a contraction with a recoverable input obtained from a series of one-to-one mappings.
|
| 28 |
+
|
| 29 |
+
# 2 RELATED WORK
|
| 30 |
+
|
| 31 |
+
Several recent works show that significant information about the input images is lost with depth in successful Imagenet classification CNNs (Dosovitskiy & Brox, 2016; Mahendran & Vedaldi, 2016). To understand the loss of information, the references propose to invert the representations by means of learned or hand-engineered priors. The approximate inversions indicate increased geometric and photometric invariance with depth. Multiple other works report progressive properties of deep networks that may be linked to discarded information in the representations as well, such as linearization (Radford et al., 2015), linear separability (Zeiler & Fergus, 2014), contraction (Oyallon, 2017) and low-dimensional embeddings (Aubry & Russell, 2015). However, it is not clear from above observations if the loss of information is a necessity for the observed progressive phenomena. In this work, we show that progressive separation and contraction can be obtained while at the same time allowing an exact reconstruction of the signal.
|
| 32 |
+
|
| 33 |
+
Multiple frameworks have been introduced that permit to learn invertible representations under certain conditions. Parseval networks (Cisse et al., 2017) have been introduced to increase the robustness of learned representations with respect to adversarial attacks. In this framework, the spectrum of convolutional operators is constrained to norm 1 during learning. The linear operator is thus injective.
|
| 34 |
+
|
| 35 |
+
As a consequence, the input of Parseval networks can be recovered if but only if the built-in nonlinearities are invertible as well, which is typically not the case. Bruna et al. (2013) derive conditions under which pooling representations are, but our method directly overcomes this issue. The Scattering transform (Mallat, 2012) is an example of predefined deep representation, approximately invariant to translations, that can be reconstructed when the degree of invariance specified is small. Yet, it requires a gradient descent optimization and no guarantee of convergences are known. In summary, the references make clear that invertibility requires special care in designing the architecture or special care in designing the optimization procedure. In this paper, we introduce a network, that overcomes these issues and has an exact inverse by construction.
|
| 36 |
+
|
| 37 |
+
Our main inspiration for this work is the recent reversible residual network (RevNet), introduced in Gomez et al. (2017). RevNets are in turn closely related to NICE and Real-NVP architectures (Dinh et al., 2016; 2014), which make use of constrained Jacobian determinants for generative modeling. All these architectures are similar to the lifting scheme (Sweldens, 1998) and Feistel cipher diagrams (Menezes et al., 1996), as we will show. RevNets illustrate how to build invertible ResNet-type blocks that avoid storing intermediate activations necessary for the backward pass. However, RevNets still employ multiple non-invertible operators like max-pooling and downsampling operators as part of the network. As such, RevNets are not invertible by construction. In this paper, we show how to build an invertible type of RevNet architecture that performs competitively with RevNets on Imagenet, which we call $i$ -RevNet for invertible RevNet.
|
| 38 |
+
|
| 39 |
+
# 3 THE $i$ -REVNET
|
| 40 |
+
|
| 41 |
+
This section introduces the general framework of the $i$ -RevNet architecture and explains how to explicitly build an inverse or a left-inverse to an $i$ -RevNet. Its practical implementation is discussed, and we demonstrate competitive numerical results.
|
| 42 |
+
|
| 43 |
+
# 3.1 AN INVERTIBLE ARCHITECTURE
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 1: The main component of the $i$ -RevNet and its inverse. RevNet blocks are interleaved with convolutional bottlenecks ${ \mathcal { F } } _ { j }$ and reshuffling operations $S _ { j }$ to ensure invertibility of the architecture and computational efficiency. The input is processed through a splitting operator $\tilde { \cal S }$ , and output is merged through $\tilde { \mathcal { M } }$ . Observe that the inverse network is obtained with minimal adaptations.
|
| 47 |
+
|
| 48 |
+
We describe $i$ -RevNets in their general setting. Their foundations are largely grounded in the recent RevNet architecture (Gomez et al., 2017). In an $i$ -RevNet, an initial input is split into two sublayers $( x _ { 0 } , \tilde { x } _ { 0 } )$ of equal size, thanks to a splitting operator $\tilde { S } x \triangleq ( x _ { 0 } , \tilde { x } _ { 0 } )$ , in this paper we choose to split the channel dimension as is done in RevNets. The operator $\tilde { \cal S }$ is linear, injective, reduces the spatial resolution of the coefficients and can potentially increase the layer size, as wider layers usually improve the classification performance (Zagoruyko $\&$ Komodakis, 2016). We can thus build a pseudo inverse ${ \tilde { S } } ^ { + }$ that will be used for the inversion. Recall that if $\tilde { \cal S }$ is invertible, then $\tilde { S } ^ { + } = \tilde { S } ^ { - 1 }$ .
|
| 49 |
+
|
| 50 |
+
The number of coefficients of the next block is maintained, and at each depth $j$ , the representation $\Phi _ { j } x$ is again decoupled into two variables $\Phi _ { j } x \triangleq ( x _ { j } , \tilde { x } _ { j } )$ that play interlaced roles.
|
| 51 |
+
|
| 52 |
+
The strategy implemented by an $i$ -RevNet consists in an alternation between additions, and nonlinear operators ${ \mathcal { F } } _ { j }$ , while progressively down-sampling the signal thanks to the operators $S _ { j }$ . Here, ${ \mathcal { F } } _ { j }$ consists of convolutions and non-linearity on $\tilde { x } _ { j }$ . The pair of the final layer is concatenated through a merging operator $\tilde { \mathcal { M } }$ . We will omit $\tilde { \mathcal { M } } , \tilde { \mathcal { M } } ^ { - 1 } , \tilde { \mathcal { S } } ^ { + }$ and $\tilde { \cal S }$ for the sake of simplicity, when not necessary. Figure 1 describes the blocks of an $i$ -RevNet. The design is similar to the Feistel cipher diagrams (Menezes et al., 1996) or a lifting scheme (Sweldens, 1998), which are invertible and efficient implementations of complex transforms like second generation wavelets.
|
| 53 |
+
|
| 54 |
+
In this way, we avoid the non-invertible modules of a RevNet (e.g. max-pooling or strides) which are necessary to train them in a reasonable time and are designed to build invariance w.r.t. translation variability. Our method shows we can replace them by linear and invertible modules $S _ { j }$ , that can reduce the spatial resolution (we refer to it as a spatial down-sampling for the sake of simplicity) while maintaining the layer’s size by increasing the number of channels.
|
| 55 |
+
|
| 56 |
+
We keep the computational cost manageable by tightly coupling downsampling and increase in width of the network. Reducing the spatial resolution can be undesirable, so $S _ { j }$ can potentially be the identity. We refer to such networks as $i$ -RevNets. This leads to the following equations:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\left\{ \begin{array} { l l } { x _ { j + 1 } = S _ { j + 1 } \tilde { x } _ { j } } \\ { \tilde { x } _ { j + 1 } = x _ { j } + \mathcal { F } _ { j + 1 } \tilde { x } _ { j } } \end{array} \right. \iff \quad \left\{ \begin{array} { l l } { \tilde { x } _ { j } = S _ { j + 1 } ^ { - 1 } x _ { j + 1 } } \\ { x _ { j } = \tilde { x } _ { j + 1 } - \mathcal { F } _ { j + 1 } \tilde { x } _ { j } } \end{array} \right.
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
Our downsampling layer can be written for $u$ the spatial variable and $\lambda$ the channel index:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
S _ { j } x ( u , \lambda ) = x ( \Psi ( u , \lambda ) )
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 2: Illustration of the invertible down-sampling
|
| 70 |
+
|
| 71 |
+
where $\Psi$ is some invertible mapping. In principle, any invertible downsampling operation like e.g. dilated convolutions (Yu & Koltun, 2015) can be considered here. We use the inverse of the operation described in Shi et al. (2016) as illustrated in Figure 2, since it preserves roughly the spatial ordering, and thus permits to avoid mixing different neighborhoods via the next convolution. $\tilde { \cal S }$ is similar, but also linearly increases the channel dimensionality, for example by concatenating 0.
|
| 72 |
+
|
| 73 |
+
The final layer $\Phi x \triangleq \Phi _ { J } x = \left( x _ { J } , { \tilde { x } } _ { J } \right)$ is then averaged along the spatial dimension, followed by a ReLU non-linearity and finally a linear projection on the class probes, which are fed to a supervised training algorithm. From a given $i$ -RevNet, it is possible to define a left-inverse $\Phi ^ { + }$ , i.e. $\Phi ^ { + } \Phi x = x$ or even an inverse $\Phi ^ { - 1 }$ , i.e. $\Phi ^ { - 1 } \Phi x = \Phi ^ { - 1 } \Phi x = x$ if $\tilde { \cal S }$ is invertible. In these cases, the convolutional sections are as well some $i$ -RevNets. An $i$ -RevNet is the dual of its inverse, in the sense that it requires to replace $( S _ { j } , \mathcal { F } _ { j } )$ by $( S _ { j } ^ { - 1 } , - \mathcal { F } _ { j } )$ at each depth $j$ , and to apply ${ \tilde { S } } ^ { + }$ on the output. In consequence, its implementation is simple and specified by Equation (1). In Subsection 4.2, we discuss that the inverse of $\Phi$ does not suffer from significant round-off errors, while however being very sensitive to small variations of an input on a large subspace, as shown in Subsection 4.1.
|
| 74 |
+
|
| 75 |
+
# 3.2 ARCHITECTURE, TRAINING AND PERFORMANCES
|
| 76 |
+
|
| 77 |
+
In this subsection, we describe two models that we trained: an injective $i$ -RevNet (a) and a bijective $i$ -RevNet (b), with fewer parameters. The hyper-parameters were selected to be either close to the ResNet and RevNet baselines in terms of the number of layers (a) or parameters (b) while keeping performance competitive. For the same reasons as in Gomez et al. (2017), our scheme also allows avoiding storing any intermediate activations at training time, making memory consumption for very deep $i$ -RevNets not an issue in practice. We compare our implementation with a RevNet with 56 layers corresponding to $2 8 M$ parameters, as provided in the open source release of Gomez et al. (2017), and with a standard ResNet of 50 layers, with $2 6 M$ parameters (He et al., 2016).
|
| 78 |
+
|
| 79 |
+
Each block ${ \mathcal { F } } _ { j }$ is a bottleneck block, which consists of a succession of 3 convolutional operators, each preceded by Batchnormalization (Ioffe & Szegedy, 2015) and ReLU non-linearity. The second layer has four times fewer channels than the other two, while their corresponding kernel sizes are respectively $1 \times 1 , 3 \times 3 , 1 \times 1$ .
|
| 80 |
+
|
| 81 |
+
Table 1: Comparison of different architectures trained on ILSVRC-2012, in terms of classification accuracy and number of parameters
|
| 82 |
+
|
| 83 |
+
<table><tr><td>Architecture</td><td>Injective</td><td>Bijective</td><td>Top-1error</td><td>Parameters</td></tr><tr><td>ResNet</td><td></td><td></td><td>24.7</td><td>26M</td></tr><tr><td>RevNet</td><td>=</td><td></td><td>25.2</td><td>28M</td></tr><tr><td>i-RevNet (a)</td><td>yes</td><td>=</td><td>24.7</td><td>181M</td></tr><tr><td>i-RevNet (b)</td><td>yes</td><td>yes</td><td>26.7</td><td>29M</td></tr></table>
|
| 84 |
+
|
| 85 |
+
The final representation is spatially averaged and projected onto the 1000 classes after a ReLU nonlinearity. We now discuss how we progressively decrease the spatial resolution, while increasing the number of channels per layer by use of the operators $S _ { j }$ .
|
| 86 |
+
|
| 87 |
+
We first describe the model (a), that consists of 56 layers which have been optimized to match the performances of a RevNet or a ResNet with approximatively the same number of layers. In particular, we explain how we progressively decrease the spatial resolution, while increasing the number of channels per block by use of the operators $S _ { j }$ .
|
| 88 |
+
|
| 89 |
+
The splitting operator $\tilde { \cal S }$ consists in a linear and injective embedding that downsamples by a factor $4 ^ { 2 }$ the spatial resolution by increasing the number of output channels from 48 to 96 by simply adding 0. The latter permits to increase the initial layer size, and consequently, the size of the next layers as performed in Gomez et al. (2017); it is thus not a bijective yet an injective $i$ -RevNet. At depth $j , { \mathcal { S } } _ { j }$ allows us to reduce the number of computations while maintaining good classification performance. It will correspond to a downsampling operator respectively at the depth $3 j = 1 5 , 2 7 , 4 $ 5 (3j as one block corresponds to three layers), similar to a normal RevNet. The spatial resolution of these layers is reduced by a factor $2 ^ { 2 }$ while increasing the number of channels by a factor of 4 respectively to 48, 192, 768 and 3072. Furthermore, it means that the corresponding spatial resolutions for an input of size $2 2 4 ^ { 2 }$ are respectively $1 1 2 ^ { 2 } , 5 6 ^ { 2 } , 2 8 ^ { 2 } , 1 4 ^ { 2 } , 7 ^ { 2 }$ . The total number of coefficients at each layer is then about $0 . 3 M$ . All the remaining blocks $S _ { j }$ are kept fix to the identity as explained in the section above.
|
| 90 |
+
|
| 91 |
+
Architecture (b) is bijective, it consists of 300 layers (100 blocks), whose total numbers of parameters have been optimized to match those of a RevNet with 56 layers. Initially, the input is split via $\tilde { \cal S }$ , which corresponds to an invertible spatial downsampling of $2 ^ { \frac { 5 } { 2 } }$ that increases the number of channels from 3 to 12. It thus keeps the dimension constant and permits building a bijective $i$ -RevNet. Then, at depth $3 j = 3 , 2 1$ , 69, 285, the spatial resolution is reduced by $2 ^ { 2 }$ via $S _ { j }$ . Contrary to the architecture (a), the dimensionality of each layer is constantly equal to $3 \times 2 2 4 ^ { 2 }$ , until the final layer, with channel sizes of 24, 96, 384, 1536.
|
| 92 |
+
|
| 93 |
+
For both networks, the training on Imagenet follows the same setup as Gomez et al. (2017). We train with SGD and momentum of 0.9. We regularized the model with a $\ell ^ { 2 }$ weight decay of $1 0 ^ { - 4 }$ and batch normalization. The dataset is processed for $6 0 0 \mathrm { k }$ iterations on a batch size of 256, distributed on 4GPUs. The initial learning rate is 0.1, dropped by a factor of ten every $1 6 0 \mathrm { k }$ iterations. The dataset was augmented according to Gomez et al. (2017). The images values are mapped to [0, 1] while following geometric transformations were applied: random scaling, random horizontal flipping, random cropping of size $2 2 4 ^ { 2 }$ , and finally color distortions. No other regularizations were incorporated into the classification pipeline. At test time, we rescale the image size to $2 5 6 ^ { 2 }$ and perform a center crop of size $2 2 4 ^ { 2 }$ .
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 3: Training loss of the $i$ -RevNet (b), compared to the ResNet, on ImageNet.
|
| 97 |
+
|
| 98 |
+
We report the training loss (i.e. Cross entropy) curves in Figure 3 of our $i$ -RevNet (b) and the ResNet baseline, displayed is a moving average over 100 iterations. Observe that the decrease of both training-losses are very similar which indicates that the constraint of invertibility does not interfere negatively with the learning process. However, we observed one third longer wall-clock times for $i$ -RevNets compared to plain RevNets because the channel size becomes larger. The Table 1 reports the performances of our $i$ -RevNets, with comparable RevNet and ResNet. First, we compare the $i$ -RevNet (a) with the RevNet and ResNet. Indeed, those CNNs have the same number of layers, and the $i$ -RevNet (a) increases the channel width of the initial layer as done in Gomez et al. (2017). The drawback of this technique is that the kernel sizes will be larger for all subsequent layers.
|
| 99 |
+
|
| 100 |
+
The $i$ -RevNet (a) has about 6 times more parameters than a RevNet and a ResNet but leads to a similar accuracy on the validation set of ImageNet. On the contrary, the $i$ -RevNet (b) is designed to have roughly the same number of parameters as the RevNet and ResNet, while being bijective. Its accuracy decreases by $1 . 5 \%$ absolute percent on ImageNet compared to the RevNet baseline, which is not surprising because the number of channels was not drastically increased in the earlier layers as done in the baselines (Gomez et al., 2017; Krizhevsky et al., 2012; He et al., 2016); we did not explore wide ranges of hyper-parameters, thus the gap between (a) and (b) can likely be reduced with additional engineering.
|
| 101 |
+
|
| 102 |
+
# 4 ANALYSIS OF THE INVERSE
|
| 103 |
+
|
| 104 |
+
We now analyze the representation $\Phi$ built by our bijective neural network $i$ -RevNet (b) and its inverse $\Phi ^ { - 1 }$ , as trained on ILSVRC-2012. We first explain why obtaining $\Phi ^ { - 1 }$ is challenging, even locally. We then discuss the reconstruction, while displaying in the image space linear interpolations between representations.
|
| 105 |
+
|
| 106 |
+
# 4.1 AN ILL-CONDITIONED INVERSION
|
| 107 |
+
|
| 108 |
+
In the previous section, we have described the $i$ -RevNet architecture, that permits defining a deep network with an explicit inverse. We explain now why this is normally difficult, by studying its local inversion. We study the local stability of a network $\Phi$ and its inverse $\Phi ^ { - 1 }$ w.r.t. to its input, which means that we will quantify locally the variations of the network and its inverse w.r.t. to small variations of an input. As $\Phi$ is differentiable (and its inverse as well), an equivalent way to perform this study is to analyze the singular values of the differential $\partial \Phi$ at some point, as for $( a , b )$ close the following holds:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\Phi \boldsymbol { a } \approx \Phi \boldsymbol { b } + \partial \Phi _ { b } ( \boldsymbol { a } - \boldsymbol { b } ) .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 4: Normalized sorted singular values of $\partial \Phi _ { x }$ .
|
| 116 |
+
|
| 117 |
+
Ideally, a well-conditioned operator has all its singular values constant equal to 1, for instance as achieved by the isometric operators of Cisse et al. (2017).
|
| 118 |
+
|
| 119 |
+
In our numerical application to an image $x$ , $\partial \Phi _ { x }$ corresponds to a very large matrix (square of the number of coefficients of the image at least) whose computations are expensive. Figure 4 corresponds to the singular values of the differential (i.e. the square roots of the eigen values of $\partial \Phi ^ { * } \partial \Phi$ ), in decreasing order, for a given natural image from ImageNet. The example we plot is typical of the behavior of $\partial \Phi$ . Observe there is a fast decay: numerically, the first $\mathrm { 1 0 ^ { 3 } }$ and $1 0 ^ { \bar { 4 } }$ singular values are responsible respectively for $8 0 \%$ and $9 7 \%$ of the cumulated energy (i.e. sum of squared singular values). This indicates $\Phi$ linearizes the space locally in a considerably smaller space in comparison to the original input dimension. However, the dimensionality is still quite large (i.e. $> 1 0$ ) and thus we can not infer that $\Phi$ lays locally in a low-dimensional manifold. It also proves that inversing $\Phi$ is difficult and is an ill-conditioned problem. Thus obtaining implicitly this inverse would be a challenging task that we avoided, thanks to the formal reconstruction algorithm provided by Subsection 3.1.
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 5: This graphic displays several reconstructed sequences $\{ x ^ { t } \} _ { t }$ . The left image corresponds to ${ \bar { \mathbf { \Gamma } } } _ { x } 0$ and the right image to $x ^ { 1 }$ .
|
| 123 |
+
|
| 124 |
+
# 4.2 LINEAR INTERPOLATION AND RECONSTRUCTION
|
| 125 |
+
|
| 126 |
+
Visualizing or understanding the important directions in the representation of inner layers of a CNN, and in particular, the final layer is complex because typically the cascade is either not invertible or unstable. One approach to reconstruct from an output layer consists in finding the input image that matches the activation through via gradient descent. However, this technique leads only to a partial or informal reconstruction (Mahendran & Vedaldi, 2015).
|
| 127 |
+
|
| 128 |
+
Another method consists in embedding the representation in a lower dimensional space and comparing the common attributes of nearest neighbors (Szegedy et al., 2013). It is also possible to train a CNN to reconstruct the representation (Dosovitskiy & Brox, 2016). Yet these methods require a priori knowledge in order to find the appropriate embeddings or training sets. We now discuss the improvements achieved by the $i$ -RevNet.
|
| 129 |
+
|
| 130 |
+
Our main claim is that while the local inversion is ill-conditioned, the inverse $\Phi ^ { - 1 }$ computations do not involve significant round-off errors. The forward pass of the network does not seem to suffer from significant instabilities, thus it seems coherent to assume that this will hold for $\Phi ^ { - 1 }$ as well. For example, adding constraints beyond vanishing moments in the case of a Lifting scheme is difficult (Sweldens, 1998; Mallat, 1999), and this is a weakness of this method. We validate our claim by computing the empirical relative error on several subsets $\mathcal { X }$ of data:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\epsilon ( \mathcal { X } ) = \frac { 1 } { | \mathcal { X } | } \sum _ { \boldsymbol { x } \in \mathcal { X } } \frac { \| \boldsymbol { x } - \Phi ^ { - 1 } \Phi \boldsymbol { x } \| } { \| \boldsymbol { x } \| }
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
We evaluate this measure on a subset $\mathcal { X } _ { 1 }$ of $| \mathcal { X } _ { 1 } | = 1 0 ^ { 4 }$ independent uniform noises and on the validation set $\mathcal { X } _ { 2 }$ of ImageNet. We report $\epsilon ( \mathcal { X } _ { 1 } ) = 5 \times 1 0 ^ { - 6 }$ and $\epsilon ( \mathcal { X } _ { 2 } ) = 3 \times 1 0 ^ { - 6 }$ respectively, which are close to the machine error and indicates that the inversion does not suffer from significant round-off errors.
|
| 137 |
+
|
| 138 |
+
Given a pair of images $\{ x ^ { 0 } , x ^ { 1 } \}$ , we propose to study linear interpolations between the pair of representations $\{ \Phi x ^ { \bar { 0 } } , \Phi x ^ { \mathrm { { 1 } } } \}$ , in the feature domain. Those interpolations correspond to existing images as $\Phi ^ { - 1 }$ is an exact inverse. We reconstruct a convex path between two input points; it means that if:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\phi ^ { t } = t \Phi x ^ { 0 } + ( 1 - t ) \Phi x ^ { 1 } ,
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
then: $x ^ { t } = \Phi ^ { - 1 } \phi ^ { t }$ is a signal that corresponds to an image.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 6: Accuracy at depth $j$ for a linear SVM and a 1-nearest neighbor classifier applied to the spatially averaged $\Phi _ { j }$ .
|
| 148 |
+
|
| 149 |
+
We discretized $[ 0 , 1 ]$ into $\{ t _ { 1 } , . . . , t _ { k } \}$ , adapt the step size manually and reconstruct the sequence of $\{ x ^ { t _ { 1 } } , . . . , x ^ { t _ { k } } \}$ . Results are displayed in the Figure 5. We selected images from the basel face dataset (Paysan et al., 2009), describable texture dataset (Cimpoi et al., 2014) and imagenet.
|
| 150 |
+
|
| 151 |
+
We now interpret the results. First, observe that a linear interpolation in the feature space is not a linear interpolation in the image space and that intermediary images are noisy, even for small deformations, yet they mostly remain recognizable. However, some geometric transformations such as a 3D-rotation seem to have been linearized, as suggested in Aubry & Russell (2015). In the next section, we thus investigate how the linear separation progresses with depth.
|
| 152 |
+
|
| 153 |
+
# 5 A CONTRACTION
|
| 154 |
+
|
| 155 |
+
In this section, we study again the bijective $i$ -RevNet. We first show that a localized or linear classifier progressively improves with depth. Then, we describe the linear subspace spanned by $\Phi$ , namely the feature space, showing that the classification can be performed on a much smaller subspace, which can be built via a PCA.
|
| 156 |
+
|
| 157 |
+
# 5.1 PROGRESSIVE LINEAR SEPARATION AND CONTRACTION
|
| 158 |
+
|
| 159 |
+
We show that both a ResNet and an $i$ -RevNet build a progressively more linearly separable and contracted representation as measured in Oyallon (2017). Observe this property holds for the $i$ - RevNet despite the fact that it can not discard any information.
|
| 160 |
+
|
| 161 |
+
We investigate these properties in each block, with the following experimental protocol. To reduce the computational burden we used a subset of 100 randomly selected imagenet classes, that consist of $N = 1 2 0 k$ images, and keep the same subset during all our following experiments. At each depth $j$ , we extract the features $\{ \Phi _ { j } x ^ { n } \} _ { n \leq N }$ of the training set, we average them along the spatial variable and standardize them in order to avoid any ill-conditioning effects. We used both a nearest neighbor classifier and a linear SVM. The former is a localized classifier that indicates that the $\ell ^ { 2 }$ metric is progressively more important for classification, while a linear SVM measures the linear separation of the different classes. The parameters of the linear SVM are cross-validated on a small subset of the training set, prior to training on the 100 classes. We evaluate both classifiers for each model on the validation set of ImageNet and report the Top-1 accuracy in Figure 6.
|
| 162 |
+
|
| 163 |
+
We observe that both classifiers progressively improve similarly with depth for each model, the linear SVM performing slightly better than the nearest neighbor classifier because it is the more robust and discriminative classifier of the two. In the case of the $i$ -RevNet, the classification performed by the CNN leads to $7 7 \%$ , and the linear SVM performs slightly better because we did not fine-tune the model to 100 classes. Observe that there is a more intense jump of performance on the 3 last layers, which seems to indicate that the former layers have prepared the representation to be more contracted and linearly separated for the final layers.
|
| 164 |
+
|
| 165 |
+
The results suggest a low-dimensional embedding of the data, but this is difficult to validate as estimating local dimensionality in high dimensions is an open problem. However, in the next section, we try to compute the dimension of the discriminative part of the representation built by an $i$ -RevNet.
|
| 166 |
+
|
| 167 |
+
# 5.2 DIMENSIONALITY ANALYSIS OF THE FEATURE SPACE
|
| 168 |
+
|
| 169 |
+
In this section, we investigate if we can refine the dimensionality of informative variabilities in the final layer of an $i$ -RevNet. Indeed, the cascade of convolutional operators has been trained on the training set to separate the 1000 different classes while being a homeomorphism on its feature space. Thus, the dimensionality of the feature space is potentially large.
|
| 170 |
+
|
| 171 |
+
As shown in the previous subsection, the final layer is progressively prepared to be projected on the final probes corresponding to the classes. This indicates that the non-informative variabilities for classification can be removed via a linear projection on the final layer $\Phi$ , which lie in a space of dimension 1000, at most. However, this projection has been built via supervision, which can still retain directions that have been contracted and thus will not be selected by an algorithm such as PCA. We show in fact a PCA retains the necessary information for classification in a small subspace.
|
| 172 |
+
|
| 173 |
+
To do so, we build the linear projectors $\pi _ { d }$ on the subspace of the $d$ first principal components, and we propose to measure the classification power of the projected representation with a supervised classifier, e.g. nearest neighbor or a linear SVM, on the previous 100 class task. Again, the feature representation $\{ \Phi x ^ { n } \} _ { n \leq N }$ are spatially averaged to remove the translation variability, and standardized on the training set. We apply both classifiers, and we report the classification accuracy of $\{ \pi _ { d } \Phi x ^ { n } \} _ { n \leq N }$ w.r.t. to $d$ on the Figure 7. A linear projection removes some information that can not be recovered by a linear classifier, therefore we observe that the classification accuracy only decreases significantly for $d \leq 2 0 0$ . This shows that the signal indeed lies in a subspace much lower dimensional than the original feature dimensions
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 7: Accuracy of a linear SVM and nearest neighbor against the number of principal components retained.
|
| 177 |
+
|
| 178 |
+
that can be extracted simply with a PCA that only considers directions of largest variances, illustrating a successful contraction of the representation.
|
| 179 |
+
|
| 180 |
+
# 6 CONCLUSION
|
| 181 |
+
|
| 182 |
+
Invertible representations and their relationship to loss of information are on the agenda of deep learning for some time. Understanding how transformations in feature space are related to the corresponding input is an important step towards interpretable deep networks, invertible deep networks may play an important role in such analysis since, for example, one could potentially back-track a property from the feature space to the input space. To the best of our knowledge, this work provides the first empirical evidence that learning invertible representations that do not discard any information about their input on large-scale supervised problems is possible.
|
| 183 |
+
|
| 184 |
+
To achieve this we introduce the $i$ -RevNet class of CNN which is fully invertible and permits to exactly recover the input from its last convolutional layer. $i$ -RevNets achieve the same classification accuracy in the classification of complex datasets as illustrated on ILSVRC-2012, when compared to the RevNet (Gomez et al., 2017) and ResNet (He et al., 2016) architectures with a similar number of layers. Furthermore, the inverse network is obtained for free when training an $i$ -RevNet, requiring only minimal adaption to recover inputs from the hidden representations.
|
| 185 |
+
|
| 186 |
+
The absence of loss of information is surprising, given the wide believe, that discarding information is essential for learning representations that generalize well to unseen data. We show that this is not the case and propose to explain the generalization property with empirical evidence of progressive separation and contraction with depth, on ImageNet.
|
| 187 |
+
|
| 188 |
+
# ACKNOWLEDGEMENTS
|
| 189 |
+
|
| 190 |
+
Jorn-Henrik Jacobsen was partially funded by the STW perspective program ImaGene. Edouard ¨ Oyallon was partially funded by the ERC grant InvariantClass 320959, via a grant for PhD Students of the Conseil regional dIle-de-France (RDM-IdF), and a postdoctoral grant from the from DPEI ´ of Inria (AAR 2017POD057) for the collaboration with CWI. We thank Berkay Kicanaoglu for the Basel Face data, Mathieu Andreux, Eugene Belilovsky, Amal Rannen, Patrick Putzky and Kyriacos Shiarlis for feedback on drafts of the paper.
|
| 191 |
+
|
| 192 |
+
# REFERENCES
|
| 193 |
+
|
| 194 |
+
Alessandro Achille and Stefano Soatto. On the emergence of invariance and disentangling in deep representations. arXiv preprint arXiv:1706.01350, 2017.
|
| 195 |
+
|
| 196 |
+
Mathieu Aubry and Bryan C Russell. Understanding deep features with computer-generated imagery. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2875–2883, 2015.
|
| 197 |
+
|
| 198 |
+
Joan Bruna, Arthur Szlam, and Yann LeCun. Signal recovery from pooling representations. arXiv preprint arXiv:1311.4025, 2013.
|
| 199 |
+
|
| 200 |
+
Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3606–3613, 2014.
|
| 201 |
+
|
| 202 |
+
Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. In International Conference on Machine Learning, pp. 854–863, 2017.
|
| 203 |
+
|
| 204 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 205 |
+
|
| 206 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
|
| 207 |
+
|
| 208 |
+
Alexey Dosovitskiy and Thomas Brox. Inverting visual representations with convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4829– 4837, 2016.
|
| 209 |
+
|
| 210 |
+
Aidan N Gomez, Mengye Ren, Raquel Urtasun, and Roger B Grosse. The reversible residual network: Backpropagation without storing activations. arXiv preprint arXiv:1707.04585, 2017.
|
| 211 |
+
|
| 212 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 213 |
+
|
| 214 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015.
|
| 215 |
+
|
| 216 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 217 |
+
|
| 218 |
+
Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5188–5196, 2015.
|
| 219 |
+
|
| 220 |
+
Aravindh Mahendran and Andrea Vedaldi. Visualizing deep convolutional neural networks using natural pre-images. International Journal of Computer Vision, 120(3):233–255, 2016.
|
| 221 |
+
|
| 222 |
+
Stephane Mallat. ´ A wavelet tour of signal processing. Academic press, 1999.
|
| 223 |
+
|
| 224 |
+
Stephane Mallat. Group invariant scattering. ´ Communications on Pure and Applied Mathematics, 65(10):1331–1398, 2012.
|
| 225 |
+
|
| 226 |
+
Stephane Mallat. Understanding deep convolutional networks. ´ Phil. Trans. R. Soc. A, 374(2065): 20150203, 2016.
|
| 227 |
+
|
| 228 |
+
Alfred J Menezes, Paul C Van Oorschot, and Scott A Vanstone. Handbook of applied cryptography. CRC press, 1996.
|
| 229 |
+
|
| 230 |
+
Edouard Oyallon. Building a regular decision boundary with deep networks. arXiv preprint arXiv:1703.01775, 2017.
|
| 231 |
+
|
| 232 |
+
Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In Advanced Video and Signal Based Surveillance, 2009. AVSS’09. Sixth IEEE International Conference on, pp. 296–301. Ieee, 2009.
|
| 233 |
+
|
| 234 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 235 |
+
|
| 236 |
+
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.
|
| 237 |
+
|
| 238 |
+
Wenzhe Shi, Jose Caballero, Ferenc Huszar, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel ´ Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1874–1883, 2016.
|
| 239 |
+
|
| 240 |
+
Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017.
|
| 241 |
+
|
| 242 |
+
Wim Sweldens. The lifting scheme: A construction of second generation wavelets. SIAM journal on mathematical analysis, 29(2):511–546, 1998.
|
| 243 |
+
|
| 244 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
|
| 245 |
+
|
| 246 |
+
Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In Information Theory Workshop (ITW), 2015 IEEE, pp. 1–5. IEEE, 2015.
|
| 247 |
+
|
| 248 |
+
Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015.
|
| 249 |
+
|
| 250 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 251 |
+
|
| 252 |
+
Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014.
|
md/train/HJx7l309Fm/HJx7l309Fm.md
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ACTOR-ATTENTION-CRITIC FOR MULTI-AGENT REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Reinforcement learning in multi-agent scenarios is important for real-world applications but presents challenges beyond those seen in single-agent settings. We present an actor-critic algorithm that trains decentralized policies in multi-agent settings, using centrally computed critics that share an attention mechanism which selects relevant information for each agent at every timestep. This attention mechanism enables more effective and scalable learning in complex multi-agent environments, when compared to recent approaches. Our approach is applicable not only to cooperative settings with shared rewards, but also individualized reward settings, including adversarial settings, and it makes no assumptions about the action spaces of the agents. As such, it is flexible enough to be applied to most multi-agent learning problems.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Reinforcement learning has recently made exciting progress in many domains, including Atari games (Mnih et al., 2015), the ancient Chinese board game, Go (Silver et al., 2016), and complex continuous control tasks involving locomotion (Lillicrap et al., 2016; Schulman et al., 2015; 2017; Heess et al., 2017). While most reinforcement learning paradigms focus on single agents acting in a static environment (or against themselves in the case of Go), real-world agents often compete or cooperate with other agents in a dynamically shifting environment. In order to learn effectively in multi-agent environments, agents must not only learn the dynamics of their environment, but also those of the other learning agents present.
|
| 12 |
+
|
| 13 |
+
To this end, several approaches for multi-agent reinforcement learning have been developed. The simplest approach is to train each agent independently to maximize their individual reward, while treating other agents as part of the environment. However, this approach violates the basic assumption underlying reinforcement learning, that the environment should be stationary and Markovian. Any single agent’s environment is dynamic and nonstationary due to other agents’ changing policies. As such, standard algorithms developed for stationary Markov decision processes fail.
|
| 14 |
+
|
| 15 |
+
At the other end of the spectrum, all agents can be collectively modeled as a single-agent whose action space is the joint action space of all agents (Bus¸oniu et al., 2010). While allowing coordinated behaviors across agents, this approach is not scalable due to the action space size increasing exponentially with the number of agents. It also demands a high degree of communication during execution, as the central policy must collect observations from and distribute actions to the individual agents. In real-world settings, this demand can be problematic.
|
| 16 |
+
|
| 17 |
+
Recent work (Lowe et al., 2017; Foerster et al., 2018) attempts to combine the strengths of these two approaches. In particular, a critic (or a number of critics) is centrally learned with information from all agents. The actors, however, receive information only from their corresponding agents. Thus, during testing, executing the policies does not require the knowledge of other agents’ actions. This paradigm circumvents the challenge of non-Markovian and non-stationary environments during learning. Despite those progresses, however, algorithms for multi-agent reinforcement learning are still far from being scalable (to a larger number of agents) and being generically applicable to environments and tasks that are co-operative (sharing a global reward), competitive, or mixed.
|
| 18 |
+
|
| 19 |
+
Our approach extends these prior works in several directions. The main idea is to centrally learn a critic with an attention mechanism. The intuition behind our idea is that in many real-world environments, it is beneficial for agents to know what other agents it should pay attention to. For example, a soccer defender needs to pay attention to attackers in their vicinity as well as the player with the ball, while she/he rarely needs to pay attention to the opposing team’s goalie. The specific attackers that the defender is paying attention to can change at different parts of the game, depending on the formation and strategy of the opponent. A typical centralized approach to multi-agent reinforcement learning does not take these dynamics into account, instead simply considering all agents at all timepoints. Our attention mechanism is able to dynamically select which agents to attend to at each time point, improving performance in multi-agent domains with complex interactions.
|
| 20 |
+
|
| 21 |
+
The proposed approach has an input space linearly increasing with respect to the number of agents, as opposed to the quadratic increase in a previous approach Lowe et al. (2017). It also works well in co-operative, competitive, and mixed environments, exceeding the capability of some prior work that focuses only on co-operative environments Foerster et al. (2018).
|
| 22 |
+
|
| 23 |
+
We have validated our approach on two simulated environments and tasks. We plan to release the code for both the model and the environments after the reviewing period ends.
|
| 24 |
+
|
| 25 |
+
The rest of the paper is organized as follows. In section 2, we discuss related work, followed by a detailed description of our approach in section 3. We report experimental studies in section 4 and conclude in section 5.
|
| 26 |
+
|
| 27 |
+
# 2 RELATED WORK
|
| 28 |
+
|
| 29 |
+
Multi-Agent Reinforcement Learning (MARL) is a long studied problem (Bus¸oniu et al., 2010). Topics within MARL are diverse, ranging from learning communication between cooperative agents (Tan, 1993; Fischer et al., 2004) to algorithms for optimal play in competitive settings (Littman, 1994), though, until recently, they have been focused on simple gridworld environments with tabular learning methods.
|
| 30 |
+
|
| 31 |
+
As deep learning based approaches to reinforcement learning have grown more popular, they have, naturally, been applied to the MARL setting (Tampuu et al., 2017; Gupta et al., 2017), allowing multi-agent learning in high-dimensional/continuous state spaces; however, naive applications of Deep RL methods to MARL naturally encounter some limitations, such as nonstationarity of the environment from the perspective of individual agents (Foerster et al., 2017; Lowe et al., 2017; Foerster et al., 2018), lack of coordination/communication in cooperative settings (Sukhbaatar et al., 2016; Mordatch & Abbeel, 2018; Lowe et al., 2017; Foerster et al., 2016), credit assignment in cooperative settings with global rewards (Rashid et al., 2018; Sunehag et al., 2018; Foerster et al., 2018), and the failure to take opponent strategies into account when learning agent policies (He et al., 2016).
|
| 32 |
+
|
| 33 |
+
Most relevant to this work are recent, non-attention approaches that propose an actor-critic framework consisting of centralized training with decentralized execution (Lowe et al., 2017; Foerster et al., 2018), as well as some approaches that utilize attention in a fully centralized multi-agent setting (Choi et al., 2017; Jiang & Lu, 2018). Lowe et al. (2017) investigate the challenges of multiagent learning in mixed reward environments (Bus¸oniu et al., 2010). They propose an actor-critic method that uses separate centralized critics for each agent which take in all other agents’ actions and observations as input, while training policies that are conditioned only on local information. This practice reduces the non-stationarity of multi-agent environments, as considering the actions of other agents to be part of the environment makes the state transition dynamics stable from the perspective of one agent. In practice, these ideas greatly stabilize learning, due to reduced variance in the value function estimates.
|
| 34 |
+
|
| 35 |
+
Similarly Foerster et al. (2018) introduce a centralized critic for cooperative settings with shared rewards. Their method incorporates a ”counterfactual baseline” for calculating the advantage function which is able to marginalize a single agent’s actions while keeping others fixed. This method allows for complex multi-agent credit assignment, as the advantage function only encourages actions that directly influence an agent’s rewards.
|
| 36 |
+
|
| 37 |
+
Attention models have recently emerged as a successful approach to intelligently selecting contextual information, with applications in computer vision (Ba et al., 2015; Mnih et al., 2014), natural language processing(Vaswani et al., 2017; Bahdanau et al., 2015; Lin et al., 2017), and reinforcement learning (Oh et al., 2016).
|
| 38 |
+
|
| 39 |
+
In a similar vein, Jiang & Lu (2018) proposed an attention-based actor-critic algorithm for MARL. This work follows the alternative paradigm of centralizing policies while keeping the critics decentralized. Their focus is on learning an attention model for sharing information between the policies. As such, this approach is complementary to ours, and a combination of both approaches could yield further performance benefits in cases where centralized policies are desirable.
|
| 40 |
+
|
| 41 |
+
Our proposed approach is more flexible than the aformentioned approaches for MARL. Our algorithm is able to train policies in environments with any reward setup, different action spaces for each agent, a variance-reducing baseline that only marginalizes the relevant agent’s actions, and with a set of centralized critics that dynamically attend to the relevant information for each agent at each time point. As such, our approach is more scalable to the number of agents, and is more broadly applicable to different types of environments.
|
| 42 |
+
|
| 43 |
+
# 3 OUR APPROACH
|
| 44 |
+
|
| 45 |
+
We start by introducing the necessary notation and basic building blocks for our approach. We then describe our ideas in detail.
|
| 46 |
+
|
| 47 |
+
# 3.1 NOTATION AND BACKGROUND
|
| 48 |
+
|
| 49 |
+
We consider the framework of Markov Games (Littman, 1994), which is a multi-agent extension of Markov Decision Processes. They are defined by a set of states, $S$ , action sets for each of $N$ agents, $A _ { 1 } , . . . , A _ { N }$ , a state transition function, $T : S \times A _ { 1 } \times . . . \times A _ { N } P ( S )$ , which defines the probability distribution over possible next states, given the current state and actions for each agent, and a reward function for each agent that also depends on the global state and actions of all agents, $R _ { i } : S \times A _ { 1 } \times . . . \times A _ { N } \to \mathbb { R }$ . We will specifically be considering a partially observable variant in which an agent, $i$ receives an observation, $o _ { i }$ , which contains partial information from the global state, $s \in S$ . Each agent learns a policy, $\pi _ { i } : O _ { i } \to P ( A _ { i } )$ which maps each agent’s observation to a distribution over it’s set of actions. The agents aim to learn a policy that maximizes their expected discounted returns, $J _ { i } ( \pi _ { i } ) = \mathbb { E } _ { a _ { 1 } \sim \pi _ { 1 } , \dots , a _ { N } \sim \pi _ { N } , s \sim T } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \hat { r _ { i t } } ( s _ { t } , a _ { 1 t } , . . , a _ { N t } ) ]$ , where $\gamma \in [ 0 , 1 ]$ is the discount factor that determines how much the policy favors immediate reward over long-term gain.
|
| 50 |
+
|
| 51 |
+
Policy Gradients Policy gradient techniques (Sutton et al., 2000; Williams, 1992) aim to estimate the gradient of an agent’s expected returns with respect to the parameters of its policy. This gradient estimate takes the following form:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\nabla _ { \theta } J ( \pi _ { \theta } ) = \mathbb { E } _ { a \sim \pi _ { \theta } } \left[ \nabla _ { \theta } \log ( \pi _ { \theta } ( a _ { t } \vert s _ { t } ) ) \sum _ { t ^ { \prime } = t } ^ { \infty } \gamma ^ { t ^ { \prime } - t } r _ { t ^ { \prime } } ( s _ { t ^ { \prime } } , a _ { t ^ { \prime } } ) \right]
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
Actor-Critic and Soft Actor-Critic The term P∞t0=t γ $\begin{array} { r } { \sum _ { t ^ { \prime } = t } ^ { \infty } \gamma ^ { t ^ { \prime } - t } r _ { t ^ { \prime } } ( s _ { t ^ { \prime } } , a _ { t ^ { \prime } } ) } \end{array}$ in the policy gradient estimator leads to high variance, as these returns can vary drastically between episodes. Actor-critic methods (Konda & Tsitsiklis, 2000) aim to ameliorate this issue by using a function approximation of the expected returns, and replacing the original return term in the policy gradient estimator with this function. One specific instance of actor-critic methods learns a function to estimate expected discounted returns, given a state and action, $\begin{array} { r } { Q _ { \psi } ( s _ { t } , a _ { t } ) = \mathbb { E } [ \sum _ { t ^ { \prime } = t } ^ { \infty } \gamma ^ { t ^ { \prime } - t } r _ { t ^ { \prime } } ( s _ { t ^ { \prime } } , a _ { t ^ { \prime } } ) ] } \end{array}$ , learned through temporal-difference learning by minimizing the regression loss:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r } { \mathcal { L } _ { Q } ( \psi ) = \mathbb { E } _ { s , a , r , s ^ { \prime } } \left[ ( Q _ { \psi } ( s , a ) - y ) ^ { 2 } \right] \mathrm { , w h e r e ~ } y = r ( s , a ) + \gamma \mathbb { E } _ { a ^ { \prime } \sim \pi ( s ^ { \prime } ) } \left[ Q _ { \bar { \psi } } ( s ^ { \prime } , a ^ { \prime } ) \right] } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $Q _ { \bar { \psi } }$ is the target Q-value function.
|
| 64 |
+
|
| 65 |
+
To encourage exploration and avoid converging to non-optimal deterministic policies, recent approaches of maximum entropy reinforcement learning learn a soft value function by modifying the policy gradient to incorporate an entropy term (Haarnoja et al., 2018):
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\nabla _ { \theta } J ( \pi _ { \theta } ) = \mathbb { E } _ { a \sim \pi _ { \theta } } \left[ \nabla _ { \theta } \log ( \pi _ { \theta } ( a | s ) ) ( \alpha \log ( \pi _ { \theta } ( a | s ) ) - Q _ { \psi } ( s , a ) + b ( s ) ) \right]
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $b ( s )$ is a state-dependent baseline (for the $\mathbf { Q }$ -value function). The loss function for temporaldifference learning of the value function is also revised accordingly with a new target:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
y = r ( s , a ) + \gamma \mathbb { E } _ { a ^ { \prime } \sim \pi ( s ^ { \prime } ) } \left[ Q _ { \bar { \psi } } ( s ^ { \prime } , a ^ { \prime } ) - \alpha \ \log ( \pi _ { \theta } ( a ^ { \prime } | s ^ { \prime } ) ) \right]
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
While an estimate of the value function $V _ { \phi } ( s )$ can be used a baseline, we provide an alternative that further reduces variance and addresses credit assignment in the multi-agent setting in section 3.2.
|
| 78 |
+
|
| 79 |
+
# 3.2 MULTIPLE-ACTOR-ATTENTION-CRITIC (MAAC)
|
| 80 |
+
|
| 81 |
+
The main idea behind our multi-agent learning approach is to learn the critic for each agent by selectively paying attention to other agents’ actions. This is the same paradigm of training critics centrally (to overcome the challenge of non-stationary non-Markovian environments) and executing learned policies distributedly. Figure 1 illustrates the main components of our approach.
|
| 82 |
+
|
| 83 |
+
Attention The attention mechanism functions in a manner similar to a differentiable key-value memory model (Graves et al., 2014; Oh et al., 2016). Intuitively, each agent queries the other agents for information about their observations and actions and incorporates that information into the estimate of its value function. This paradigm was chosen, in contrast to other attention-based approaches, as it doesn’t make any assumptions about the temporal or spatial locality of the inputs, as opposed to approaches taken in the natural language processing and computer vision fields.
|
| 84 |
+
|
| 85 |
+
To calculate the Q-value function $Q _ { i } ^ { \psi } ( o , a )$ for the agent $i$ , the critic receives the observations, $o = \left( o _ { 1 } , . . . , o _ { N } \right)$ , and actions, $a = ( a _ { 1 } , . . . , a _ { N } )$ , for all agents indexed by $i \in \{ 1 \ldots N \}$ . We represent the set of all agents except $i$ as $\backslash i$ and we index this set with $j$ . $Q _ { i } ^ { \psi } ( o , a )$ is a function of agent $i$ ’s observation and action, as well as other agents’ contributions:
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
Q _ { i } ^ { \psi } ( o , a ) = f _ { i } ( g _ { i } ( o _ { i } , a _ { i } ) , x _ { i } )
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
where $f _ { i }$ is a two-layer multi-layer perceptron (MLP), while $g _ { i }$ is a one-layer MLP embedding function. The contribution from other agents, $x _ { i }$ , is a weighted sum of each agent’s value:
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 1: Calculating $Q _ { i } ^ { \psi } ( o , a )$ with attention for agent $i$ .
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
x _ { i } = \sum _ { j \neq i } \alpha _ { j } v _ { j } = \sum _ { j \neq i } \alpha _ { j } h ( V g _ { j } ( o _ { j } , a _ { j } ) )
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where the value, $v _ { j }$ is a function of agent $j$ ’s
|
| 101 |
+
|
| 102 |
+
embedding, encoded with an embedding function and then linearly transformed by a shared matrix $V , h$ is an element-wise nonlinearity (we have used leaky ReLU).
|
| 103 |
+
|
| 104 |
+
The attention weight $\alpha _ { j }$ compares the embedding $e _ { j }$ with $e _ { i } = g _ { i } ( o _ { i } , a _ { i } )$ , using a bilinear mapping (ie, the query-key system) and passes the similarity value between these two embeddings into a softmax
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\alpha _ { j } \propto \exp ( e _ { j } ^ { \operatorname { T } } W _ { k } ^ { \operatorname { T } } W _ { q } e _ { i } )
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
where $W _ { q }$ transforms $e _ { i }$ into a “query” and $W _ { k }$ transforms $e _ { j }$ into a “key”. The matching is then scaled by the dimensionality of these two matrices to prevent vanishing gradients (Vaswani et al., 2017).
|
| 111 |
+
|
| 112 |
+
In our experiments, we have used multiple attention heads (Vaswani et al., 2017). In this case, each head, using a separate set of parameters $( W _ { k } , W _ { q } , V )$ , gives rise to an aggregated contribution from all other agents to the agent $i$ and we simply concatenate the contributions from all heads as a single vector. Crucially, each head can focus on a different weighted mixture of agents.
|
| 113 |
+
|
| 114 |
+
Note that the weights for extracting selectors, keys, and values are shared across all agents, which encourages a common embedding space. The sharing of critic parameters between agents is possible, even in adversarial settings, because multi-agent value-function approximation is, essentially, a multi-task regression problem. This method can easily be extended to include additional information, beyond local observations and actions, at training time, including the global state if it is available, simply by adding additional encoders, $e$ . (We do not consider this case in our experiments, however, as our approach is effective in combining local observations to predict expected returns in environments where the global state may not be available).
|
| 115 |
+
|
| 116 |
+
Learning with Attentive Critics All critics are updated together to minimize a joint regression loss function, due to the parameter sharing:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\begin{array} { l } { { \displaystyle { \mathcal L } _ { Q } ( \psi ) = \sum _ { i = 1 } ^ { N } \mathbb E _ { ( o , a , r , o ^ { \prime } ) \sim D } \Big [ ( Q _ { i } ^ { \psi } ( o , a ) - y _ { i } ) ^ { 2 } \Big ] , \mathrm { w h e r e } } } \\ { { \displaystyle y _ { i } = r _ { i } + \gamma \mathbb E _ { a ^ { \prime } \sim \pi _ { \bar { \theta } } ( o ^ { \prime } ) } \Big [ Q _ { i } ^ { \bar { \psi } } ( o ^ { \prime } , a ^ { \prime } ) - \alpha \ \log ( \pi _ { \bar { \theta } _ { i } } ( a _ { i } ^ { ' } | o _ { i } ^ { ' } ) ) \Big ] } } \end{array}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $\bar { \psi }$ and $\bar { \theta }$ are the parameters of the target critics and target policies respectively. Note that $Q _ { i } ^ { \psi }$ , the action-value estimate for agent $i$ , receives observations and actions for all agents. $\alpha$ is the temperature parameter determining the balance between maximizing entropy and rewards. The individual policies are updated with the following gradient:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\nabla _ { \theta _ { i } } J ( \pi _ { \theta } ) = \mathbb { E } _ { a \sim \pi _ { \theta } } \left[ \nabla _ { \theta _ { i } } \log ( \pi _ { \theta _ { i } } ( a _ { i } | o _ { i } ) ) ( \alpha \ \log ( \pi _ { \theta _ { i } } ( a _ { i } | o _ { i } ) ) - Q _ { i } ^ { \psi } ( o , a ) + b ( o , a \setminus i ) ) \right]
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where $b ( o , a _ { \backslash i } )$ is the multi-agent baseline used to calculate the advantage function decribed in the following section. Note that we are sampling all actions, $a$ , from all agents’ current policies in order to calculate the gradient estimate for agent $i$ , unlike in the MADDPG algorithm Lowe et al. (2017), where the other agents’ actions are sampled from the replay buffer, potentially causing overgeneralization where agents fail to coordinate based on their current policies Wei et al. (2018). Full training details and hyperparameters can be found in the appendix 6.1.
|
| 129 |
+
|
| 130 |
+
Multi-Agent Advantage Function As shown in Foerster et al. (2018), an advantage function using a baseline that only marginalizes out the actions of the given agent from $Q _ { i } ^ { \psi } ( o , a )$ , can help solve the multi-agent credit assignment problem. In other words, by comparing the value of a specific action to the value of the average action for the agent, with all other agents fixed, we can learn whether said action will cause an increase in expected return or whether any increase in reward is attributed to the actions of other agents. The form of this advantage function is shown below:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\begin{array} { r } { A _ { i } ( o , a ) = Q _ { i } ^ { \psi } ( o , a ) - b ( o , a _ { \backslash i } ) ) , \mathrm { ~ w h e r e ~ } } \\ { b ( o , a _ { \backslash i } ) ) = \mathbb { E } _ { a _ { i } \sim \pi _ { i } ( o _ { i } ) } \left[ Q _ { i } ^ { \psi } ( o , ( a _ { i } , a _ { \backslash i } ) ) \right] } \end{array}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
Using our attention mechanism, we can implement a more general and flexible form of a multiagent baseline that, unlike the advantage function proposed in Foerster et al. (2018), doesn’t assume the same action space for each agent, doesn’t require a global reward, and attends dynamically to other agents, as in our $\mathrm { Q }$ -function. This is made simple by the natural decomposition of an agents encoding, $e _ { i }$ , and the weighted sum of encodings of other agents, $x _ { i }$ , in our attention model.
|
| 137 |
+
|
| 138 |
+
Concretely, in the case of discrete policies, we can calculate our baseline in a single forward pass by outputting the expected return $Q _ { i } { \big ( } o , { \big ( } a _ { i } , a _ { \backslash i } { \big ) } { \big ) }$ for every possible action, $a _ { i } \in A _ { i }$ , that agent $i$ can take. We can then calculate the expectation exactly:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\mathbb { E } _ { a _ { i } \sim \pi _ { i } ( o _ { i } ) } \left[ Q _ { i } ^ { \psi } ( o , ( a _ { i } , a _ { \setminus i } ) ) \right] = \sum _ { a _ { i } ^ { \prime } \in A _ { i } } \pi ( a _ { i } ^ { \prime } | o _ { i } ) Q _ { i } ( o , ( a _ { i } ^ { \prime } , a _ { \setminus i } ) )
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
In order to do so, we must remove $a _ { i }$ from the input of $Q _ { i }$ , and output a value for every action. We add an observation-encoder, $e _ { i } = g _ { i } ^ { o } ( o _ { i } )$ , for each agent, using these encodings in place of the $e _ { i } = g _ { i } ( o _ { i } , a _ { i } )$ described above, and modify $f _ { i }$ such that it outputs a value for each possible action, rather than the single input action. In the case of continuous policies, we do not need to add any parameters, as we can simply estimate the expectation in Equation 9 by sampling actions from our policy and averaging their $\mathbf { Q }$ -values, though, this comes at the cost of multiple expensive passes through the network.
|
| 145 |
+
|
| 146 |
+
# 4 EXPERIMENTS
|
| 147 |
+
|
| 148 |
+
# 4.1 SETUP
|
| 149 |
+
|
| 150 |
+
We construct two environments that test various capabilities of our approach (MAAC) and baselines. We investigate in two main directions. First, we study the scalability of different methods as the number of agents grows. We hypothesize that the current approach of concatenating all agents’ observations (often used as a global state to be shared among agents) and actions in order to centralize critics does not scale well. To this end, we implement a cooperative environment, Cooperative Treasure Collection, with shared rewards where we can vary the total number of agents. The experimental results in sec 4.3 validate our claim.
|
| 151 |
+
|
| 152 |
+
Secondly, we want to evaluate each method’s ability to attend to information relevant to rewards. Moreover, the relevance (to rewards) can dynamically change during an episode. This is analogous to real-life tasks such as the soccer example presented earlier. To this end, we implement a Rover-Tower task environment where randomly paired agents communicate information and coordinate.
|
| 153 |
+
|
| 154 |
+
The two environments are implemented in the multi-agent particle environment framework1 introduced by Mordatch & Abbeel (2018), and extended by Lowe et al. (2017). We found this framework useful for creating environments involving complex interaction between agents, while keeping the control and perception problems simple, as we are primarily interested in addressing agent interaction. To further simplify the control problem, we use discrete action spaces, allowing agents to move up, down, left, right, or stay; however, the agents may not immediately move exactly in the specified direction, as the task framework incorporates a basic physics engine where agents’ momentums are taken into account. Fig. 2 illustrates the two environments.
|
| 155 |
+
|
| 156 |
+
Cooperative Treasure Collection The cooperative environment in Figure 2a) involves 8 total agents, 6 of which are ”treasure hunters” and 2 of which are “treasure banks”, which each correspond to a different color of treasure. The role of the hunters is to collect the treasure of any color, which re-spawn randomly upon being collected (with a total of 6), and then “deposit” the treasure into the correctly colored “bank”. The role of each bank is to simply gather as much treasure as possible from the hunters. All agents are able to see each others’ positions with respect to their own. Hunters receive a global
|
| 157 |
+
|
| 158 |
+
(a) Cooperative Treasure Collection. The small grey agents are “hunters” who collect the colored treasure, and deposit them with the correctly colored large “bank” agents.
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
Figure 2: Our environments
|
| 164 |
+
|
| 165 |
+
(b) Rover-Tower. Each grey “Tower” is paired with a “Rover” and a destination (color of rover corresponds to its destination). Their goal is to communicate with the ”Rover” such that it moves toward the destination.
|
| 166 |
+
|
| 167 |
+
reward for the successful collection of treasure and all agents receive a global reward for the depositing of treasure. Hunters are additionally penalized for colliding with each other. As such, the task contains a mixture of shared and individual rewards and requires different “modes of attention” which depend on the agent’s state and other agents’ potential for affecting its rewards.
|
| 168 |
+
|
| 169 |
+
Rover-Tower The environment in Figure 2b involves 8 total agents, 4 of which are “rovers” and another 4 which are “towers”. At each episode, rovers and towers are randomly paired. The pair is negatively rewarded by the distance of the rover to its goal. The task can be thought of as a navigation task on an alien planet with limited infrastructure and low visibility. The rovers are unable to see in their surroundings and must rely on communication from the towers, which are able to locate the rovers as well as their destinations and can send one of five discrete communication messages to their paired rover. Note that communication is highly restricted and different from centralized policy approaches Jiang & Lu (2018), which allow for free transfer of continuous information among policies. In our setup, the communication is integrated into the environment (in the tower’s action space and the rover’s observation space), rather than being explicitly part of the model, and is limited to a few discrete signals.
|
| 170 |
+
|
| 171 |
+
Table 1: Comparison of various methods for multi-agent RL
|
| 172 |
+
|
| 173 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Base Algorithm</td><td rowspan=1 colspan=1>Attention</td><td rowspan=1 colspan=1>CentralizedCritic(s)</td><td rowspan=1 colspan=1>Numberof Critics</td><td rowspan=1 colspan=1>Multi-taskLearning of Critics</td><td rowspan=1 colspan=1>Multi-AgentAdvantage</td></tr><tr><td rowspan=1 colspan=1>MAAC (ours)</td><td rowspan=1 colspan=1>SAC</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>N</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>MAAC(Uniform) (ours)</td><td rowspan=1 colspan=1>SAC</td><td rowspan=1 colspan=1>uniform</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>N</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>COMA*</td><td rowspan=1 colspan=1>Actor-Critic (On-Policy)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>MADDPG†</td><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>N</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>COMA+SAC</td><td rowspan=1 colspan=1>SAC</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>MADDPG+SAC</td><td rowspan=1 colspan=1>SAC</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>N</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=1>DDPG</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>N</td><td rowspan=1 colspan=1>N/A</td><td rowspan=1 colspan=1>N/A</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Centralized $C r i t i c ( s )$ : each agent’s estimate of $Q _ { i }$ takes the actions and observations of the other agents into account. Number of Critics: number of separate networks used for predicting $Q _ { i }$ for all $N$ agents. Multi-task Learning of Critics: all agents’ estimates of $Q _ { i }$ share information in intermediate layers, benefiting from multi-task learning. Multi-Agent Advantage: cf. Sec 3.2 for details. ∗(Foerster et al., 2018), †(Lowe et al., 2017), ‡(Lillicrap et al., 2016)
|
| 176 |
+
|
| 177 |
+
# 4.2 BASELINES
|
| 178 |
+
|
| 179 |
+
We compare to two recently proposed approaches for centralized training of decentralized policies: MADDPG (Lowe et al., 2017) and COMA (Foerster et al., 2018), as well as a single-agent RL approach, DDPG, trained separately for each agent.
|
| 180 |
+
|
| 181 |
+
In order to enable learning in discrete action spaces for both MADDPG and DDPG, where deterministic policies are not possible, we use the Gumbel-Softmax reparametrization trick (Jang et al., 2017). We will refer to these modified versions as MADDPG (Discrete) and DDPG (Discrete). For a detailed description of this reparametrization, see the appendix 6.2. We use soft actor critic to optimize. Thus, in order to have fair comparisons, we additionally implement MADDPG and COMA with Soft Actor-Critic, named as MADDPG $^ +$ SAC and COMA $^ +$ SAC.
|
| 182 |
+
|
| 183 |
+
We also consider an ablated version of our model as a variant of our approach. In this model, we use uniform attention by fixing the attention weight $\alpha _ { j }$ (Eq. 6) to be $1 / ( N - 1 )$ . This restriction prevents the model from focusing its attention on specific agents.
|
| 184 |
+
|
| 185 |
+
All methods are implemented such that their approximate total number of parameters (across agents) are equal to our method, and each model is trained with 6 random seeds each. Hyperparameters for each underlying algorithm are tuned based on performance and kept constant across all variants of critic architectures for that algorithm. A thorough comparison of all baselines is summarized in Table 1.
|
| 186 |
+
|
| 187 |
+
# 4.3 RESULTS AND ANALYSIS
|
| 188 |
+
|
| 189 |
+
Fig. 3 illustrates averaged rewards per episode by various methods. The proposed approach (MAAC) is competitive with other approaches being compared. In what follows, we provide detailed analysis.
|
| 190 |
+
|
| 191 |
+
Impact of Rewards and Required Attention Uniform attention is competitive with our approach in the Cooperative Treasure Collection (CTC) environment, but not in Rover-Tower. On the other hand, both MADDPG (Discrete) and MADDPG $^ +$ SAC perform well on Rover-Tower, though they do not on CTC. Both variants of COMA do not fare well in our environments. DDPG, arguably a weaker baseline, performs surprisingly well in CTC, but does poorly in Rover-Tower.
|
| 192 |
+
|
| 193 |
+
In CTC, the rewards are shared across agents thus an agent’s critic does not need to focus on information from specific agents in order to calculate its expected rewards. Moreover, each agent’s local observation provides enough information to make a decent prediction of its expected rewards. This might explain why MAAC (uniform) which attends to other agents equally, and DDPG (being very unattentive to other agents) perform well.
|
| 194 |
+
|
| 195 |
+
On the other hand, rewards in the Rover-Tower environment for a specific agent are tied to another single agent’s observations. This environment exemplifies a class of scenarios where dynamic attention can be beneficial: when subgroups of agents are interacting and performing coordinated tasks with separate rewards, but the groups do not remain static. This explains why MAAC (uniform)
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
Figure 3: (Left) Average Rewards on Cooperative Treasure Collection. (Right) Average Rewards on RoverTower. Our model (MAAC) is competitive in both environments. Error bars are a $9 5 \%$ confidence interval across 6 runs.
|
| 199 |
+
|
| 200 |
+
perform poorly and DDPG completely breaks down, as knowing information from another specific agent is crucial in predicting expected rewards.
|
| 201 |
+
|
| 202 |
+
COMA uses a single centralized network for predicting Q-values for all agents with separate forward passes. Thus, this approach may perform best in environments with global rewards and agents with similar action spaces. However, our environments have agents with differing roles (and non-global rewards in the case of Rover-Tower). Thus both variants of COMA do not fare well.
|
| 203 |
+
|
| 204 |
+
MADDPG (and its variant) is a very strong method. However, we suspect its low performance in CTC is due to this environment’s relatively large observation spaces for all agents, as the MADDPG critic concatenates observations for all agents into a single input vector for each agent’s critic. Our next experiments confirm this hypothesis.
|
| 205 |
+
|
| 206 |
+
Scalability We compare the average rewards attained by both approaches (normalized by the range of rewards attained in the environment, as differing the number of agents changes the nature of rewards in each environment), and show that the improvement of our approach MAAC over MADDPG $^ +$ SAC grows with respect to the number of agents. As suspected, MADDPG-like critics use all information non-selectively, while our approach can learn which agents to pay more attention through the attention mechanism. Thus our approach scales better when the number of agents increases. In future research we will continue to improve the scalability when the number of agents further increases by sharing policies among agents, and performing attention on sub-groups (of agents).
|
| 207 |
+
|
| 208 |
+
Table 2: MAAC improves over MADDPG $^ +$ SAC
|
| 209 |
+
|
| 210 |
+
<table><tr><td rowspan=1 colspan=1>#agents</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>16</td></tr><tr><td rowspan=1 colspan=1>Percentage</td><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>49</td><td rowspan=1 colspan=1>53</td></tr></table>
|
| 211 |
+
|
| 212 |
+
While the Rover-Tower task has a lot of agents, each agent only gets information about its paired agent – in other words, the task itself has an intrinsically smaller number of “other agents” (conditioned on each agent) than the CTC environment. As a future direction, we are creating more complicated environments where each agent needs to cope with a large group of agents where selective attention is needed. This naturally models real-life scenarios that multiple agents are organized in clusters/sub-societies (school, work, family, etc) where the agent needs to interact with a small number of agents from many groups. We anticipate that in such complicated scenarios, our approach, combined with some advantages exhibited by other approaches would do well.
|
| 213 |
+
|
| 214 |
+
# 5 CONCLUSION
|
| 215 |
+
|
| 216 |
+
We propose an algorithm for training decentralized policies in multi-agent settings. The key idea is to utilize attention in order to select relevant information for estimating critics. We analyze the performance of the proposed approach with respect to the number of agents, different configurations of rewards, and the span of relevant observational information. Empirical results are promising and we intend to extend to highly complicated and dynamic environments.
|
| 217 |
+
|
| 218 |
+
# REFERENCES
|
| 219 |
+
|
| 220 |
+
Jimmy Ba, Volodymyr Mnih, and Koray Kavukcuoglu. Multiple object recognition with visual attention. In International Conference on Learning Representations, 2015.
|
| 221 |
+
|
| 222 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015.
|
| 223 |
+
|
| 224 |
+
Lucian Bus¸oniu, Robert Babuska, and Bart De Schutter. Multi-agent reinforcement learning: Anˇ overview. In Innovations in multi-agent systems and applications-1, pp. 183–221. Springer, 2010.
|
| 225 |
+
|
| 226 |
+
Jinyoung Choi, Beom-Jin Lee, and Byoung-Tak Zhang. Multi-focus attention network for efficient deep reinforcement learning. arXiv preprint arXiv:1712.04603, December 2017.
|
| 227 |
+
|
| 228 |
+
Felix Fischer, Michael Rovatsos, and Gerhard Weiss. Hierarchical reinforcement learning in communication-mediated multiagent coordination. In Proceedings of the Third International Joint Conference on Autonomous Agents and Multiagent Systems-Volume 3, pp. 1334–1335. IEEE Computer Society, 2004.
|
| 229 |
+
|
| 230 |
+
Jakob Foerster, Ioannis Alexandros Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, pp. 2137–2145, 2016.
|
| 231 |
+
|
| 232 |
+
Jakob Foerster, Nantas Nardelli, Gregory Farquhar, Triantafyllos Afouras, Philip H. S. Torr, Pushmeet Kohli, and Shimon Whiteson. Stabilising experience replay for deep multi-agent reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 1146–1155, International Convention Centre, Sydney, Australia, 06–11 Aug 2017.
|
| 233 |
+
|
| 234 |
+
Jakob Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients, 2018.
|
| 235 |
+
|
| 236 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 237 |
+
|
| 238 |
+
Jayesh K Gupta, Maxim Egorov, and Mykel Kochenderfer. Cooperative multi-agent control using deep reinforcement learning. In Autonomous Agents and Multiagent Systems, Lecture Notes in Computer Science, pp. 66–83. Springer, Cham, May 2017.
|
| 239 |
+
|
| 240 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In 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 2018.
|
| 241 |
+
|
| 242 |
+
He He, Jordan Boyd-Graber, Kevin Kwok, and Hal Daume III. Opponent modeling in deep rein- ´ forcement learning. In International Conference on Machine Learning, pp. 1804–1813, 2016.
|
| 243 |
+
|
| 244 |
+
Nicolas Heess, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, Ali Eslami, Martin Riedmiller, et al. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017.
|
| 245 |
+
|
| 246 |
+
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017.
|
| 247 |
+
|
| 248 |
+
Jiechuan Jiang and Zongqing Lu. Learning attentional communication for multi-agent cooperation. arXiv preprint arXiv:1805.07733, 2018.
|
| 249 |
+
|
| 250 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2014.
|
| 251 |
+
|
| 252 |
+
Vijay R Konda and John N Tsitsiklis. Actor-critic algorithms. In Advances in neural information processing systems, pp. 1008–1014, 2000.
|
| 253 |
+
|
| 254 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. In International Conference on Learning Representations, 2016.
|
| 255 |
+
|
| 256 |
+
Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. In International Conference on Learning Representations, 2017.
|
| 257 |
+
|
| 258 |
+
Michael L Littman. Markov games as a framework for multi-agent reinforcement learning. In Machine Learning Proceedings 1994, pp. 157–163. Elsevier, 1994.
|
| 259 |
+
|
| 260 |
+
Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, OpenAI Pieter Abbeel, and Igor Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. In Advances in Neural Information Processing Systems, pp. 6382–6393, 2017.
|
| 261 |
+
|
| 262 |
+
Volodymyr Mnih, Nicolas Heess, Alex Graves, et al. Recurrent models of visual attention. In Advances in neural information processing systems, pp. 2204–2212, 2014.
|
| 263 |
+
|
| 264 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
|
| 265 |
+
|
| 266 |
+
Igor Mordatch and Pieter Abbeel. Emergence of grounded compositional language in multi-agent populations, 2018.
|
| 267 |
+
|
| 268 |
+
Junhyuk Oh, Valliappa Chockalingam, Honglak Lee, et al. Control of memory, active perception, and action in minecraft. In International Conference on Machine Learning, pp. 2790–2799, 2016.
|
| 269 |
+
|
| 270 |
+
Tabish Rashid, Mikayel Samvelyan, Christian Schroeder, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. QMIX: Monotonic value function factorisation for deep multi-agent reinforcement learning. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 4295–4304, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018.
|
| 271 |
+
|
| 272 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International Conference on Machine Learning, pp. 1889–1897, 2015.
|
| 273 |
+
|
| 274 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 275 |
+
|
| 276 |
+
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016.
|
| 277 |
+
|
| 278 |
+
Sainbayar Sukhbaatar, Rob Fergus, et al. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems, pp. 2244–2252, 2016.
|
| 279 |
+
|
| 280 |
+
Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z. Leibo, Karl Tuyls, and Thore Graepel. Valuedecomposition networks for cooperative multi-agent learning based on team reward. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, AAMAS ’18, pp. 2085–2087, Richland, SC, 2018. International Foundation for Autonomous Agents and Multiagent Systems.
|
| 281 |
+
|
| 282 |
+
Richard S Sutton, David A McAllester, Satinder P Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems, pp. 1057–1063, 2000.
|
| 283 |
+
|
| 284 |
+
Ardi Tampuu, Tambet Matiisen, Dorian Kodelja, Ilya Kuzovkin, Kristjan Korjus, Juhan Aru, Jaan Aru, and Raul Vicente. Multiagent cooperation and competition with deep reinforcement learning. PLoS One, 12(4):e0172395, April 2017.
|
| 285 |
+
|
| 286 |
+
Ming Tan. Multi-agent reinforcement learning: independent versus cooperative agents. In Proceedings of the Tenth International Conference on International Conference on Machine Learning, pp. 330–337. Morgan Kaufmann Publishers Inc., 1993.
|
| 287 |
+
|
| 288 |
+
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. 6000–6010, 2017.
|
| 289 |
+
|
| 290 |
+
Ermo Wei, Drew Wicke, David Freelan, and Sean Luke. Multiagent soft q-learning. arXiv preprint arXiv:1804.09817, 2018.
|
| 291 |
+
|
| 292 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Reinforcement Learning, pp. 5–32. Springer, 1992.
|
| 293 |
+
|
| 294 |
+
# 6 APPENDIX
|
| 295 |
+
|
| 296 |
+
# Algorithm 1 Training Procedure for Attention-Actor-Critic
|
| 297 |
+
|
| 298 |
+
1: Initialize $E$ parallel environments with $N$ agents, each
|
| 299 |
+
2: Initialize replay buffer, $D$
|
| 300 |
+
3: $T _ { \mathrm { u p d a t e } } \gets 0$
|
| 301 |
+
4: for $i _ { \mathrm { e p } } = 1 \ldots$ num episodes do
|
| 302 |
+
5: Reset environments, and get initial $o _ { i } ^ { e }$ for each agent, $i$
|
| 303 |
+
6: for $t = 1$ . . . steps per episode do
|
| 304 |
+
7: Select actions $a _ { i } ^ { e } \sim \pi _ { i } ( \cdot | o _ { i } ^ { e } )$ for each agent, $i$ , in each environment, $e$
|
| 305 |
+
8: Send actions to all parallel environments and get $\boldsymbol { o ^ { \prime } } _ { i } ^ { e }$ , $\boldsymbol { r } _ { i } ^ { e }$ for all agents in all environments
|
| 306 |
+
9: Store transitions $\left( o _ { 1 \dots N } , a _ { 1 \dots N } , r _ { 1 \dots N } , o _ { 1 \dots N } ^ { \prime } \right)$ for all environments in $D$
|
| 307 |
+
10: $T _ { \mathrm { u p d a t e } } = T _ { \mathrm { u p d a t e } } + E$
|
| 308 |
+
11: if $T _ { \mathrm { u p d a t e } } \geq \mathrm { \bar { m i n } }$ steps per update then
|
| 309 |
+
12: for $j = 1$ . . . num critic updates do
|
| 310 |
+
13: Sample minibatch $B \gets m \times ( o _ { 1 . . . N } , a _ { 1 . . . N } , r _ { 1 . . . N } , o _ { 1 . . . N } ^ { \prime } ) \sim D$
|
| 311 |
+
14: UPDATECRITIC $( B )$
|
| 312 |
+
15: end for
|
| 313 |
+
16: for $j = 1 \ldots \mathrm { n u m }$ policy updates do
|
| 314 |
+
17: 18: Sample UPDAT $m \times \left( o _ { 1 \dots N } \right) \sim D$ $( \acute { o } _ { 1 \dots N } ^ { B } )$
|
| 315 |
+
19: end for
|
| 316 |
+
20: Update target critic and policy parameters:
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\begin{array} { c } { { \bar { \psi } = \tau \bar { \psi } + ( 1 - \tau ) \psi } } \\ { { { } } } \\ { { \bar { \theta } = \tau \bar { \theta } + ( 1 - \tau ) \theta } } \end{array}
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
21: $T _ { \mathrm { u p d a t e } } \gets 0$
|
| 323 |
+
22: end if
|
| 324 |
+
23: end for
|
| 325 |
+
24: end for
|
| 326 |
+
25:
|
| 327 |
+
26: 27: function UPDATECRIUnpack minibatch $( B )$
|
| 328 |
+
$( o _ { 1 \dots N } ^ { B } , a _ { 1 \dots N } ^ { B } , r _ { 1 \dots N } ^ { B } , o _ { 1 \dots N } ^ { ' B } ) B$
|
| 329 |
+
28: Calculate $Q _ { i } ^ { \psi } ( o _ { 1 \ldots N } ^ { B } , a _ { 1 \ldots N } ^ { B } )$ for all $i$ in parallel
|
| 330 |
+
29: Calculate $a _ { i } ^ { ' B } \sim \pi _ { i } ^ { \bar { \theta } } ( o _ { i } ^ { ' B } )$ using target policies
|
| 331 |
+
30: Calculate $Q _ { i } ^ { \bar { \psi } } ( o _ { 1 \dots N } ^ { ' B } , a _ { 1 \dots N } ^ { ' B } )$ for all $i$ in parallel, using target critic
|
| 332 |
+
31: Update critic:
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\begin{array} { l } { \displaystyle \mathcal { L } _ { Q } ( \psi ) = \sum _ { i = 1 } ^ { N } \mathbb { E } _ { ( o , a , r , o ^ { \prime } ) \sim D } \Big [ ( Q _ { i } ^ { \psi } ( o , a ) - y _ { i } ) ^ { 2 } \Big ] , \mathrm { w h e r e } } \\ { \displaystyle y _ { i } = r _ { i } + \gamma \mathbb { E } _ { a ^ { \prime } \sim \bar { \pi _ { i } } ( o ^ { \prime } ) } \Big [ Q _ { i } ^ { \bar { \psi } } ( o ^ { \prime } , a ^ { \prime } ) - \alpha l o g ( \pi _ { \bar { \theta _ { i } } } ( a _ { i } ^ { ' } | o _ { i } ^ { ' } ) ) \Big ] } \end{array}
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
32: end function
|
| 339 |
+
|
| 340 |
+
34: function UPDATEPOLICIES $( o _ { 1 \dots N } ^ { B } )$
|
| 341 |
+
|
| 342 |
+
35: Calculate $a _ { 1 \dots N } ^ { B } \sim \pi _ { i } ^ { \bar { \theta } } ( o _ { i } ^ { ' B } ) , i \in 1 \dots N$
|
| 343 |
+
|
| 344 |
+
36: Calculate $Q _ { i } ^ { \psi } ( o _ { 1 \ldots N } ^ { B } , a _ { 1 \ldots N } ^ { B } )$ for all $i$ in parallel
|
| 345 |
+
|
| 346 |
+
37: Update policies:
|
| 347 |
+
|
| 348 |
+
$$
|
| 349 |
+
\nabla _ { \theta _ { i } } J ( \pi _ { \theta } ) = \mathbb { E } _ { a \sim \pi _ { \theta } } \left[ \nabla _ { \theta _ { i } } l o g ( \pi _ { \theta _ { i } } ( a _ { i } | o _ { i } ) ) ( \alpha l o g ( \pi _ { \theta _ { i } } ( a _ { i } | o _ { i } ) ) - Q _ { i } ^ { \psi } ( o , a ) + b ( o , \bar { a } ) ) \right]
|
| 350 |
+
$$
|
| 351 |
+
|
| 352 |
+
# 38: end function
|
| 353 |
+
|
| 354 |
+
# 6.1 TRAINING PROCEDURE
|
| 355 |
+
|
| 356 |
+
We train using Soft Actor-Critic (Haarnoja et al., 2018), an off-policy, actor-critic method for maximum entropy reinforcement learning. Our training procedure consists of performing 12 parallel rollouts, and adding a tuple of $\big ( o _ { t } , a _ { t } , r _ { t } , o _ { t + 1 } \big ) _ { 1 \dots N }$ to a replay buffer (with maximum length 1e6) for each timepoint. We reset each environment after every 100 steps (an episode). After 100 steps (across all rollouts), we perform 4 updates for the attention critic and for all policies. For each update we sample minibatches of 1024 timepoints from the replay buffer and then perform gradient descent on the Q-function loss objective (7), as well as the policy objective (8), using Adam (Kingma & Ba, 2014) as the optimizer for both with a learning rate of 0.001. These updates can be computed efficiently in parallel (across agents) using a GPU. After the updates are complete, we update the parameters $\dot { \psi }$ of our target critic $Q _ { \bar { \psi } }$ to move toward our learned critic’s parameters, $\psi$ , as in Lillicrap et al. (2016); Haarnoja et al. (2018): $\bar { \psi } = ( 1 - \tau ) \bar { \psi } + \tau \psi$ , where $\tau$ is the update rate (set to 0.002 for attention parameters and 0.04 for all other parameters). Using a target critic has been shown to stabilize the use of experience replay for off-policy reinforcement learning with neural network function approximators (Mnih et al., 2015; Lillicrap et al., 2016). We update the parameters of the target policies, $\bar { \theta }$ in the same manner. We use a discount factor, $\gamma$ , of 0.99. All networks (separate policies and contained within the centralized critics) use a hidden dimension of 128 and Leaky Rectified Linear Units as the nonlinearity. We use 0.2 as our temperature setting for Soft Actor-Critic. Additionally, we typically use 4 attention heads in our attention critics unless otherwise specified.
|
| 357 |
+
|
| 358 |
+
# 6.2 REPARAMETRIZATION OF DDPG/MADDPG FOR DISCRETE ACTION SPACES
|
| 359 |
+
|
| 360 |
+
In order to compare to DDPG and MADDPG in our environments with discrete action spaces, we must make a slight modification to the basic algorithm. This modification is first suggested by Lowe et al. (2017) in order to enable policies that output discrete communication messages. Consider the original DDPG policy gradient which takes advantage of the fact that you can easily calculate the gradient of the output of a deterministic policy with respect to its parameters.
|
| 361 |
+
|
| 362 |
+
$$
|
| 363 |
+
\nabla _ { \theta } J = \mathbb { E } _ { s \sim \rho } \left[ \nabla _ { a } Q ( s , a ) | _ { a = \mu ( s ) } \nabla _ { \theta } \mu ( s | \theta ) \right]
|
| 364 |
+
$$
|
| 365 |
+
|
| 366 |
+
Rather than policies that deterministically output an action from within a continuous action space, we use policies that produce differentiable samples through a Gumbel-Softmax distribution (Jang et al., 2017). Using differentiable samples allows us to use the gradient of expected returns to train policies without using the log derivative trick, just as in DDPG.
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\nabla _ { \theta } J = \mathbb { E } _ { s \sim \rho , a \sim \pi ( s ) } \left[ \nabla _ { a } Q ( s , a ) \nabla _ { \theta } a \right]
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
# 6.3 VISUALIZING ATTENTION
|
| 373 |
+
|
| 374 |
+
In order to understand how the use of attention evolves over the course of training, we examine the ”entropy” of the attention weights for each agent for each of the four attention heads that we use in both tasks (Figures 4 and 5). The black bars indicate the maximum possible entropy (i.e. uniform attention across all agents). Lower entropy indicates that the head is focusing on specific agents, with an entropy of 0 indicating attention focusing on one agent. In Rover-Tower, we plot the attention entropy for each rover. Interestingly, each agent appears to use a different combination of the four heads, but their use is not mutually exclusive, indicating that the inclusion of separate attention heads for each agent is not necessary. This differential use of attention heads is sensible due to the nature of rewards in this environment (i.e. individualized rewards). In the case of Treasure Collection, we find that all agents use the attention heads similarly, which is unsurprising considering that rewards are shared in that environment.
|
| 375 |
+
|
| 376 |
+
In order to inspect how the attention mechanism is working on a more fine-grained level, we visualize the attention weights for one of the rovers in Rover-Tower (Figure 6), from the head that the agent appears to use the most (determined by looking at Figure 4), while changing the tower that said rover is paired to. In these plots, we ignore the weights over other rovers for simplicity since these are always near zero. We find that the rover learns to strongly attend to the tower that it is paired with, without any explicit supervision signal to do so. The model implicitly learns which agent is most relevant to estimating the rover’s expecture future returns, and said agent can change dynamically without affecting the performance of the algorithm.
|
| 377 |
+
|
| 378 |
+

|
| 379 |
+
Figure 4: Attention ”entropy” for each head over the course of training for the four rovers in the Rover-Tower environment
|
| 380 |
+
|
| 381 |
+

|
| 382 |
+
Figure 5: Attention ”entropy” for each head over the course of training for two collectors in the Treasure Collection Environment
|
| 383 |
+
|
| 384 |
+
# 6.4 CONTINUOUS ACTION SPACES
|
| 385 |
+
|
| 386 |
+
In order to test our model’s ability to handle continuous action spaces, we add a network for each agent to learn a state-value function $V _ { i } ( o , a _ { \backslash i } )$ , which uses the same weighted attention embedding over other agents as $Q _ { i } ( o , a )$ . The loss functions to learn both networks are provided by Haarnoja et al. (2018). We test on an environment introduced in Lowe et al. (2017) called Cooperative Navigation and compare to MADDPG. Our results are presented in Table 3. This task does not require attention, as all agents are relevant to each others rewards at each time step. As such, it is unsurprising that our approach matches but does not surpass the performance of MADDPG. It is notable, however, both that attention does not harm performance in simple cases and that our approach handles continuous action spaces as well.
|
| 387 |
+
|
| 388 |
+
Table 3: Cooperative Navigation (Continuous)
|
| 389 |
+
|
| 390 |
+
<table><tr><td>MADDPG</td><td>MAAC</td></tr><tr><td>-2.47 ± 0.05</td><td>-2.49 ±0.11</td></tr></table>
|
| 391 |
+
|
| 392 |
+

|
| 393 |
+
Figure 6: Attention weights when subjected to different Tower pairings for Rover 1 in Rover-Tower environment
|
md/train/HJxFrs09YQ/HJxFrs09YQ.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GENERALIZED ADAPTIVE MOMENT ESTIMATION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Adaptive gradient methods have experienced great success in training deep neural networks (DNNs). The basic idea of the methods is to track and properly make use of the first and/or second moments of the gradient for model-parameter updates over iterations for the purpose of removing the need for manual interference. In this work, we propose a new adaptive gradient method, referred to as generalized adaptive moment estimation (Game). From a high level perspective, the new method introduces two more parameters w.r.t. AMSGrad (S. J. Reddi & Kumar (2018)) and one more parameter w.r.t. PAdam (Chen & Gu (2018)) to enlarge the parameterselection space for performance enhancement while reducing the memory cost per iteration compared to AMSGrad and PAdam. The saved memory space amounts to the number of model parameters, which is significant for large-scale DNNs. Our motivation for introducing additional parameters in Game is to provide algorithmic flexibility to facilitate a reduction of the performance gap between training and validation datasets when training a DNN. Convergence analysis is provided for applying Game to solve both convex optimization and smooth nonconvex optimization. Empirical studies for training four convolutional neural networks over MNIST and CIFAR10 show that under proper parameter selection, Game produces promising validation performance as compared to AMSGrad and PAdam.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Stochastic gradient descent (SGD) and its variants have become the mainstream training methods in machine learning (ML) due to its simplicity and effectiveness. In general, SGD is known to work reasonably well regardless of their problem structure if the learning rate is set properly in a dynamical manner over training iterations. Intuitively speaking, if optimization problems admit certain structural properties (e.g., gradients magnitudes not balanced across the parameter set), advanced gradient descent methods exploiting the structural properties would be likely to boost optimization performance. In 2011, Duchi et al. firstly proposed to track the second moment of gradients and then scale each gradient coordinate using the tracked information before updating the model parameters, which is referred to as AdaGrad (Duchi et al. (2011)). From a conceptual point of view, AdaGrad adaptively adjusts “individual learning rates” for all the model parameters, allowing for the parameters to be updated on a roughly equal scale. It is found that AdaGrad converges significantly faster than SGD when the gradients are sparse. Its performance deteriorates when the gradients are dense due to a rapid decay of the learning rates.
|
| 12 |
+
|
| 13 |
+
Since the pioneering work of AdaGrad, various adaptive gradient methods have been proposed on tracking and using the first and/or second moment of the gradients for effective parameter updates. The methods include, for example, RMSProp (Tieleman & Hinton (2012)), Adam (Kingma & Ba (2017)), and NAdam (Dozat (2016)). The main difference of the above methods from AdaGrad is that the first and/or second moment of the gradients are tracked via exponential moving averaging to enhance the importance of the most recent gradients.
|
| 14 |
+
|
| 15 |
+
Despite the wide usage of Adam in ML community, Reddit et al. have recently shown that the method does not even converge for a class of specially constructed convex functions (S. J. Reddi & Kumar (2018)) due to the non-monotonicity of the “individual learning rates” being multiplied to the gradients. To fix the convergence issue of Adam, the authors proposed a so-called AMSGrad method by additionally tracking the maximum value of the second moment of gradients over iterations (i.e., vector $\hat { v }$ of Alg. 1 in Table 1). Later on, Chen and Guo generalized AMSGrad by introducing one free parameter (i.e., $p$ of Alg. 2 in Table 1), referred to as PAdam (Chen & Gu (2018)). The authors’ primary motivation is to improve the generalization performance by tuning the parameter. Both AMSGrad and PAdam require additional memory in comparison to Adam for storing $\hat { v }$ .
|
| 16 |
+
|
| 17 |
+
Table 1: Comparison of three adaptive gradient methods
|
| 18 |
+
|
| 19 |
+
<table><tr><td rowspan=1 colspan=1>Alg.1:AMSGrad</td><td rowspan=1 colspan=2>Alg.2:PAdam</td><td rowspan=1 colspan=1>Alg.3:Game</td></tr><tr><td rowspan=1 colspan=1>Input:x1,{αt},{βit},β2Init.: mo←0,v←0,vo←0fort=1toTdogt=Vf(xt;$t)mt= βitmt-1+(1-βit)gtUt =β2Ut-1+(1- β2)g²Vt = max(vt,Ut-1)Ct+1 ← xt-atV-1/2mtend for</td><td rowspan=1 colspan=2>Input:x1,{αt},{βit},β2Init.:mo←0,vo←0,vo←0fort=1to Tdogt=Vxf(xt;st)mt=β1tmt-1+(1-βit)gtUt = β2Ut-1+(1-β2)g²Ut = max(vt,Ut-1)Xt+1←xt-αtVt-Pmtend for</td><td rowspan=1 colspan=1>Input:x1,{αt},{βit},β2Init.:mo←0,vo←0fort=1toTdogt=Vxf(xt;St)mt=β1tmt-1+(1-βit)gtUt=β2Ut-1+(1-β2)lgt|qUt = max(vt,Ut-1)Xt+1 ← xt -αtVt-Pmtend for</td></tr><tr><td rowspan=1 colspan=3>Comparison of analysis results for smooth nonconvex optimization</td><td rowspan=1 colspan=1>nvexoptimization</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>(Zhou et al. (2018)) :0(+);β<β,p=</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>new results:(+%)when p = 1/4</td><td rowspan=1 colspan=1>new results:0(+)when pq = 1/2</td></tr><tr><td rowspan=1 colspan=2>Notations: Vt = diag(0t); GT = E (</td><td rowspan=1 colspan=2>(∑d1l9:ll2);d:dimensionof</td></tr></table>
|
| 20 |
+
|
| 21 |
+
While machine learning has seen rapid advances in algorithm development, theoretical convergence analysis has also made remarkable progress recently. The work of (Zhou et al. (2018)) extends the original analysis for PAdam in (Chen & Gu (2018)) from convex optimization to smooth nonconvex optimization. In another recent article (Chen et al. (2018)), the authors also considered smooth nonconvex optimization and provided convergence analysis for a class of Adam-related algorithms including AMSGrad and Adam. The convergence bounds developed in the above two articles differ in their analysis approach and step-size selection. From a high level point of view, analysis on nonconvex optimization is highly valuable in practice as training deep neural networks (DNNs) is well known to be a nonconvex optimization problem. An improved convergence analysis on existing algorithms would provide insights on designing more advanced adaptive gradient methods.
|
| 22 |
+
|
| 23 |
+
In this paper, we make two main contributions. Firstly, we propose a new adaptive gradient method named generalized adaptive moment estimation (Game). As shown in Table 1, Game tracks only two variables $( m , \hat { v } )$ 1 over iterations as compared to AMSGrad and PAdam, which track three variables $( m , v , \hat { v } )$ . We emphasize that since the dimension of $\pmb { v }$ is the same as the number of model parameters, the memory saved by Game can be remarkable for modern large-scale neural networks, which usually have millions of parameters. Furthermore, Game introduces two parameters (i.e., $( p , q )$ of Alg. 3 in Table 1) in comparison to PAdam which introduces one parameter (i.e., $p$ of Alg. 2 in Table 1) to further enhance its flexibility. The parameter $q$ enables Game to track information of the qth moment of gradient magnitude rather than only the second moment of the gradients. By doing so, the parameter provides one more degree of freedom for the method to balance the tradeoff between convergence speed on training data and generalization ability on validation data.
|
| 24 |
+
|
| 25 |
+
Secondly, in our theoretical convergence analysis for Game, we manage to remove the condition on the relationship between $\beta _ { 1 }$ and $\beta _ { 2 }$ while $\beta _ { 1 } \leq \beta _ { 2 }$ and $\beta _ { 1 } \leq \beta _ { 2 } ^ { p }$ are required in (S. J. Reddi & Kumar (2018)) for AMSGrad and (Zhou et al. (2018)) for PAdam, respectively. We provide convergence analysis for both convex optimization and smooth nonconvex optimization. The results for nonconvex case are briefly summarized in Table 1 with the analysis results from (Zhou et al. (2018)) as a reference. Finally, our experimental results on training four convolutional neural networks (CNNs) for MNIST and CIFAR10 suggest that with a proper setup of $( p , q )$ , Game produces promising validation performance in comparison to AMSGrad and PAdam.
|
| 26 |
+
|
| 27 |
+
# 2 PROBLEM SETUP
|
| 28 |
+
|
| 29 |
+
Before introducing the problem, we describe the notation used in the paper, which are basically in line with that of (S. J. Reddi & Kumar (2018)) and (Chen & Gu (2018)) for consistency. We denote scalars by lower-case letters, vectors by bold lower-case letters, and matrices by bold upper-case letters. Following convention, we denote the $l _ { p }$ $( p \geq 1 )$ norm of a vector $\pmb { x } \in \mathbb { R } ^ { d }$ by $\| { \pmb x } \| _ { p } =$ $\begin{array} { r } { ( \sum _ { i = 1 } ^ { d } | x _ { i } | ^ { p } ) ^ { 1 / p } } \end{array}$ $p \infty$ , thehere $l _ { \infty }$ norm takes a special form is the ith element of a vector $\| \pmb { x } \| _ { \infty } = \operatorname* { m a x } _ { i = 1 } ^ { d } | x _ { i } |$ . We leto denote $\pmb { g } _ { 1 : t , i } = [ g _ { 1 , i } , g _ { 2 , i } , \cdot \cdot \cdot , g _ { t , i } ]$ $g _ { t , i }$ $\pmb { g } _ { t } \in \mathbb { R } ^ { d }$ $\mathbb { E } [ \cdot ]$ the expectation operation. Given two sequences $\left\{ { { a } _ { t } } \right\}$ and $\{ b _ { t } \}$ , the notation $a _ { t } = O ( b _ { t } )$ indicates that the magnitude of $a _ { t }$ is proportional to that of $b _ { t }$ for $t \geq 0$ .
|
| 30 |
+
|
| 31 |
+
Formally, we reconsider solving the stochastic smooth nonconvex optimization studied in (Ghadimi & Lan (2013; 2016); Zhou et al. (2018))
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\operatorname* { m i n } _ { \pmb { x } \in \mathbb { R } ^ { d } } f ( \pmb { x } ) = \mathbb { E } _ { \xi } \left[ f ( \pmb { x } ; \xi ) \right] ,
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $_ { \textbf { \em x } }$ represents the parameters of a model in a vector form and $\xi$ is a random variable. Due to randomness of $\xi$ , one can only obtain an unbiased noisy gradient $\nabla f ( { \pmb x } ; { \pmb \xi } )$ , satisfying $\nabla f ( { \pmb x } ) =$ $\mathbb { E } _ { \xi } [ \nabla f ( { \pmb x } ; { \pmb \xi } ) ]$ . In practice, the variable $\xi$ often represents the random mini-batch state. For the above situation, we denote the function realization at iteration $t$ as $f _ { t } ( \pmb { x } ; \xi _ { t } )$ , where $\xi _ { t }$ is a realization of $\xi$ Solving (1) is asymptotically equivalent to addressing the following optimization
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\operatorname* { l i m } _ { T \to \infty } \operatorname* { m i n } _ { \substack { { \bf x } \in \mathbb { R } ^ { d } } } \sum _ { t = 1 } ^ { T } f _ { t } ( { \pmb x } ; { \boldsymbol \xi } _ { t } ) .
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
We will consider both the two formulations (1) and (2) in the reminder of the paper.
|
| 44 |
+
|
| 45 |
+
# 3 GENERALIZED ADAPTIVE MOMENT ESTIMATION (GAME)
|
| 46 |
+
|
| 47 |
+
In this section, we present our new adaptive gradient method for solving (1). Our algorithm Game is motivated by making two observations about AMSGrad and PAdam in Table 1. Firstly, both the two methods have to track the parameter $\hat { v }$ in addition to $\pmb { v }$ . In particular, the parameter $\hat { \pmb { v } } _ { t }$ at iteration $t$ is computed as
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\begin{array} { r l } & { \pmb { v } _ { t } = \beta _ { 2 } \pmb { v } _ { t - 1 } + ( 1 - \beta _ { 2 } ) \pmb { g } _ { t } ^ { 2 } } \\ & { \hat { \pmb { v } } _ { t } = \operatorname* { m a x } ( \pmb { v } _ { t } , \hat { \pmb { v } } _ { t - 1 } ) . } \end{array}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
It is seen from (3)-(4) that ${ \mathbf { } } v _ { t }$ is a function of the squared gradients $\{ g _ { j } ^ { 2 } \} _ { j = 1 } ^ { t }$ while $\hat { \mathbf { } } _ { }$ tracks the maximum values of $\{ { v } _ { j } \} _ { j = 1 } ^ { t }$ up to iteration $t$ . From a high level perspective, it feels redundant to keep both ${ \mathbf { } } v _ { t }$ and $\hat { \mathbf { } } _ { }$ in AMSGrad and PAdam as both parameters are related to the second moment of the gradients. One natural question is if it is sufficient to keep only one parameter about the second moment of the gradients without sacrificing convergence speed. Less memory usage is always desirable in designing an algorithm for simplicity and applicability.
|
| 54 |
+
|
| 55 |
+
Secondly, it is clear from Table 1 that PAdam is designed by replacing the diagonal matrix $\hat { V } _ { t } ^ { - \frac { 1 } { 2 } }$ with $\hat { V } _ { t } ^ { - p }$ at iteration $t$ in AMSGrad, where $p \in [ 0 , \frac { 1 } { 2 } ]$ . One can easily show that $p = 0$ corresponds to SGD while $\begin{array} { r } { p = \frac { 1 } { 2 } } \end{array}$ leads to AMSGrad. The parameter $p$ establishes a smooth connection between SGD and AMSGrad, allowing the resulting method PAdam to carry the advantages of both methods. The empirical study in (Chen & Gu (2018)) suggests that when $p$ is properly chosen in the range $[ 0 , \textstyle { \frac { 1 } { 2 } } ]$ , PAdam shows better generalization performance than AMSGrad, which is as expected due to the fact SGD usually produces good generalization performance. To summarize, the above technique of introducing an additional parameter to an existing algorithm adds one more degree of freedom to enhance its applicability. One can find many examples in applied mathematics that use similar techniques for knowledge expansion. For instance, the extension from $l _ { 2 }$ norm to $l _ { p }$ norm and generalization from Cauchy-Schwarz inequality to Hölder’s inequality.
|
| 56 |
+
|
| 57 |
+
Based on the above two observations, we propose a new adaptive gradient method named Game as summarized in Table 1. Basically, the new method only tracks two parameters $( m , \hat { v } )$ , where $\hat { \mathbf { } } _ { }$ at iteration $t$ is computed as
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r l } & { \pmb { v } _ { t } = \beta _ { 2 } \hat { \pmb { v } } _ { t - 1 } + ( 1 - \beta _ { 2 } ) | \pmb { g } _ { t } | ^ { q } } \\ & { \hat { \pmb { v } } _ { t } = \operatorname* { m a x } ( \pmb { v } _ { t } , \hat { \pmb { v } } _ { t - 1 } ) , } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $q > 0$ is our newly introduced parameter and $| g _ { t } | ^ { q }$ denotes element-wise $q$ th power of $\left| g _ { t } \right|$ . It is clear from (5)-(6) that ${ \mathbf { } } v _ { t }$ is only a temporary parameter at iteration $t$ and is not required to be stored in the memory for next iteration. Therefore, it is safe to say that Game saves roughly 33 percent memory per iteration as compared to AMSGrad and PAdam by removing the need for tracking $\{ v _ { t } \}$
|
| 64 |
+
|
| 65 |
+
We now study the impact of saved memory by Game when training large-scale neural networks. Note that the dimension of $\pmb { v }$ is actually the number of model parameters. That is, Game manages to save a memory space which is equivalent to the size of the neural network to be trained. It is known that state-of-the-art neural networks for challenging tasks (e.g., ImageNet competition (Russakovsky et al. (2015))) tend to be extremely deep and consist of millions of parameters (Simonyan & Zisserman (2016)). When applying Game to train those large-scale networks, the memory saved by the new training method becomes remarkable with AMSGrad as a reference.
|
| 66 |
+
|
| 67 |
+
Next we let $q = 2$ and $\begin{array} { r } { p = \frac { 1 } { 2 } } \end{array}$ for Game to make a fair comparison w.r.t. AMSGrad . In this case, one can easily show that $\hat { \mathbf { } } _ { }$ in (6) is either greater than or equal to the one in (4). As a result, Game would always have either equal or smaller effective learning rate $\alpha _ { t } \hat { V } _ { t } ^ { - \frac { 1 } { 2 } }$ than AMSGrad. The above property implies that Game is more conservative than AMSGrad and PAdam due to the update reformulation (5)-(6). If needed, one can adjust the parameters $\left\{ \alpha _ { t } \right\}$ to larger values to make Game more aggressive.
|
| 68 |
+
|
| 69 |
+
Finally we consider the new scalar parameter $q$ introduced in (5). From an algebraic point of view, introduction of parameter $q$ allows $\hat { v }$ in (5)-(6) to track information of the qth moment of the gradient magnitude over iterations. As $q$ decreases, small gradients would be amplified while large gradients would be suppressed, leading to a decreasing dynamic range of $\hat { v }$ . When $q \to 0$ , it is not difficult to show that Game approaches SGD. Therefore, the parameter $q$ has a similar effect as the parameter $p$ of PAdam. We point out that when $\beta _ { 2 } > 0$ , we cannot merge $p$ and $q$ into one parameter via certain reformulation of the updating expressions of Game. That is, $p$ and $q$ play different roles in Game. Our purpose of introducing $q$ in addition to $p$ is to enlarge the parameter-selection space of Game and improve generalization performance with proper parameter setup.
|
| 70 |
+
|
| 71 |
+
# 4 CONVERGENCE ANALYSIS FOR GAME
|
| 72 |
+
|
| 73 |
+
In this section, we analyze the convergence of Game for both convex optimization and smooth nonconvex optimization. The cost regret will be studied for the convex case while gradient expectation will be considered for the nonconvex case, which represents two different analysis approaches.
|
| 74 |
+
|
| 75 |
+
# 4.1 ANALYSIS FOR CONVEX OPTIMIZATION
|
| 76 |
+
|
| 77 |
+
Formally, we define the cost regret up to iteration $T$ as
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
R _ { T } = \sum _ { t = 1 } ^ { T } \left[ f _ { t } ( \pmb { x } _ { t } ; \xi _ { t } ) - f _ { t } ( \pmb { x } _ { T } ^ { * } ; \xi _ { t } ) \right] ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $\begin{array} { r } { \pmb { x } _ { T } ^ { * } = \arg \operatorname* { m i n } \sum _ { t = 1 } ^ { T } f _ { t } ( \pmb { x } ) } \end{array}$ denotes the optimal solution within the iteration range $[ 1 , T ]$ , and $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ is a causal estimate of ${ \pmb x } _ { T } ^ { * }$ at iteration $t$ as obtained by following Game in Table 1. Our objective is to derive an upper bound of $R _ { T }$ and then quantify its convergence behaviour as $T$ increases.
|
| 84 |
+
|
| 85 |
+
Next we present our convergence analysis:
|
| 86 |
+
|
| 87 |
+
Lemma 1. Let $( \beta _ { 1 } , \beta _ { 2 } ) \in [ 0 , 1 )$ , $\beta _ { 1 t } \leq \beta _ { 1 }$ , $p q < 2$ and $p , q > 0$ , and $\alpha _ { t } = \alpha / \sqrt { t }$ . Then the quantity $\begin{array} { r } { \sum _ { t = 1 } ^ { T } \alpha _ { t } \left[ \| \hat { V } _ { t } ^ { - p / 2 } m _ { t } \| _ { 2 } ^ { 2 } \right] } \end{array}$ of Game is upper bounded by
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\sum _ { t = 1 } ^ { T } \alpha _ { t } \left[ \| \hat { V } _ { t } ^ { - p / 2 } m _ { t } \| _ { 2 } ^ { 2 } \right] \leq \frac { \alpha \sqrt { 1 + \log T } } { ( 1 - \beta _ { 1 } ) ^ { 2 } ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \sum _ { i = 1 } ^ { d } \left( \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { 2 ( 2 - p q ) } \right) ^ { 1 / 2 } \right] .
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
Proof. See Appendix A for proof.
|
| 94 |
+
|
| 95 |
+
Remark 1. We emphasize that there is a major difference between the upper bound expression in (8) and those derived in (S. J. Reddi & Kumar (2018)) and (Chen & Gu (2018)) for analyzing AMSGrad and PAdam. That is the new upper bound does not put any restriction on the relationship between $\beta _ { 1 }$ and $\beta _ { 2 }$ for (8) to hold while in the above two articles, it is required that $\beta _ { 1 } \leq \beta _ { 2 } ^ { 2 p }$ , where $p$ is the parameter of PAdam.
|
| 96 |
+
|
| 97 |
+
Theorem 1 (convex). Suppose $\{ f _ { t } \}$ are close, proper and convex functions (Sawaragi et al. (1985)).√ Let $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ , $\beta _ { 1 t } \le \beta _ { 1 }$ , $p q < 2$ and $p , q > 0$ , and $\alpha _ { t } = \alpha / \sqrt { t }$ . Assume $\| \nabla f _ { t } ( \pmb { x } ; \pmb { \xi } _ { t } ) \| _ { \infty } \leq$ $G _ { \infty }$ for all $t \leq T$ and distance between any $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ generated by Game and ${ \pmb x } _ { T } ^ { * }$ is bounded, i.e., $\| \pmb { x } _ { m } - \pmb { x } _ { T } ^ { * } \| _ { \infty } \leq D _ { \infty }$ . Then we have the following bound on the regret
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\begin{array} { r l } & { { \cal R } _ { T } \le \displaystyle \frac { D _ { \infty } ^ { 2 } \sqrt { T } } { \alpha ( 1 - \beta _ { 1 } ) } \sum _ { i = 1 } ^ { d } \hat { v } _ { T , i } ^ { p } + \displaystyle \frac { D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \frac { \beta _ { 1 t } \hat { v } _ { t , i } ^ { p } } { \alpha _ { t } } } \\ & { \quad \quad \quad + \displaystyle \frac { \alpha \sqrt { 1 + \log T } } { ( 1 - \beta _ { 1 } ) ^ { 3 } ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \sum _ { i = 1 } ^ { d } \left( \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { 2 ( 2 - p q ) } \right) ^ { 1 / 2 } \right] } \end{array}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
Based on Lemma 1, one can easily derive the upper bound expression (9) by following the derivation steps for Theorem 4 in (S. J. Reddi & Kumar (2018)). When $p q = 1$ and $p = \bar { 1 / 2 }$ , (9) can be simplified as
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
R _ { T } \leq \frac { D _ { \infty } ^ { 2 } \sqrt { T } } { \alpha ( 1 - \beta _ { 1 } ) } \sum _ { i = 1 } ^ { d } \hat { v } _ { T , i } ^ { 1 / 2 } + \frac { D _ { \infty } ^ { 2 } } { 2 ( 1 - \beta _ { 1 } ) } \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \frac { \beta _ { 1 t } \hat { v } _ { t , i } ^ { p } } { \alpha _ { t } } + \frac { \alpha \sqrt { 1 + \log T } } { ( 1 - \beta _ { 1 } ) ^ { 3 } ( \sqrt { 1 - \beta _ { 2 } } } \left[ \sum _ { i = 1 } ^ { d } \| g _ { 1 : T , i } \| _ { 2 } \right] .
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
One can see that no constraint is imposed between the relationship of $\beta _ { 1 }$ and $\beta _ { 2 }$ for the upper bound to hold. We have conducted empirical studies and found that both AMSGrad and Game converge even when $\beta _ { 2 } < \beta _ { 1 }$ .
|
| 110 |
+
|
| 111 |
+
# 4.2 ANALYSIS FOR SMOOTH NONCONVEX OPTIMIZATION
|
| 112 |
+
|
| 113 |
+
Differently from the analysis for convex optimization, we will consider gradient expectation for nonconvex case. To simplify study later on, we choose the output ${ \mathbf { \mathcal { x } } } _ { o u t }$ from $\bar { \{ } x _ { t } \} _ { t = 2 } ^ { T }$ with probability $\textstyle \alpha _ { t - 1 } / ( \sum _ { j = 1 } ^ { T - 1 } \alpha _ { j } )$ , which is in line with the definition in (Zhou et al. (2018)). In practice, it is natural to take the most recent estimate $\mathbfit { \mathbf { x } } _ { T }$ at last iteration $T$ as output.
|
| 114 |
+
|
| 115 |
+
We now introduce the $L$ -smooth assumption needed for analysis:
|
| 116 |
+
|
| 117 |
+
Assumption 1 ( $L$ -smooth). $f ( \pmb { x } ) = \mathbb { E } _ { \xi } f ( \pmb { x } ; \xi )$ is $L$ -smooth: for any $\ b { x } , \ b { y } \in \mathbb { R } ^ { d }$ , we have
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
| f ( \pmb { x } ) - f ( \pmb { y } ) + \langle \nabla f ( \pmb { y } ) , \pmb { x } - \pmb { y } \rangle | \leq \frac { L } { 2 } \| \pmb { x } - \pmb { y } \| _ { 2 } ^ { 2 } .
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
Furthermore, $f ( { \pmb x } )$ is lower bounded, i.e., $\operatorname* { i n f } _ { \pmb { x } } f ( \pmb { x } ) > - \infty$ .
|
| 124 |
+
|
| 125 |
+
The above smooth assumption is standard for nonconvex optimization. It essentially requires the object function $f$ changes smoothly in the parameter space. See (Zhou et al. (2018); Chen et al. (2018)) for employing the assumption in their analysis.
|
| 126 |
+
|
| 127 |
+
We now present our convergence analysis in two steps. Firstly, we provide upper bounds for the two quantities $\begin{array} { r } { \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \lVert \hat { V } _ { t } ^ { - p } m _ { t } \rVert _ { 2 } ^ { 2 } \right] } \end{array}$ and $\begin{array} { r } { \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \lVert \hat { V } _ { t } ^ { - p } { \pmb g } _ { t } \rVert _ { 2 } ^ { 2 } \right] } \end{array}$ in a lemma below. We then show the main result in a theorem, which are derived based on the lemma.
|
| 128 |
+
|
| 129 |
+
Lemma 2. Let $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ , $p q \leq 1$ and $p , q > 0$ , the step sizes $\alpha _ { j } \leq \alpha _ { j - 1 }$ for all $j > 1$ , and $r \in [ 2 p q - 1 , 1 ]$ . Assuming $\| \nabla f _ { t } ( \pmb { x } ; \xi _ { t } ) \| _ { \infty } \leq G _ { \infty }$ for all $t \leq T$ , we then have
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array} { r l } & { \displaystyle \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \| \hat { V } _ { t } ^ { - p } m _ { t } \| _ { 2 } ^ { 2 } \right] \leq \frac { \alpha _ { 1 } ^ { 2 } G _ { \infty } ^ { ( 1 + r - 2 p q ) } T ^ { ( 1 + r ) / 2 } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \sum _ { i = 1 } ^ { d } ( \| g _ { 1 : T , i } \| _ { 2 } ) ^ { ( 1 - r ) } \right] } \\ & { \displaystyle \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \| \hat { V } _ { t } ^ { - p } g _ { t } \| _ { 2 } ^ { 2 } \right] \leq \frac { \alpha _ { 1 } ^ { 2 } T ^ { p q } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \sum _ { i = 1 } ^ { d } ( \| | g _ { 1 : T , i } \| _ { 2 } ) ^ { 2 ( 1 - p q ) } \right] . } \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
Proof. See Appendix B for proof.
|
| 136 |
+
|
| 137 |
+
We note that a scalar parameter $r \in [ 2 p q - 1 , 1 ]$ is introduced in the upper bound expression of Lemma 2. As will be discussed in Corollary 1 later on, the parameter $r$ provides a freedom to tune the expression (12) and merge with other expressions for simplicity.
|
| 138 |
+
|
| 139 |
+
Remark 2. Again the two upper bounds (12)-(13) do not require any constraint on the relationship of $\beta _ { 1 }$ and $\beta _ { 2 }$ , which is consistent with the results in Lemma $^ { l }$ .
|
| 140 |
+
|
| 141 |
+
Theorem 2 (nonconvex). Let $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ , $p q < 1$ and $p , q > 0$ , the step sizes $\alpha _ { t } = \alpha _ { 1 }$ for all $t > 1$ , and $r \in [ 2 p q - 1 , 1 ]$ . Assume $\| \nabla f _ { t } ( \pmb { x } ; \xi _ { t } ) \| _ { \infty } \leq G _ { \infty }$ for all $t \leq T$ and Assumption $^ { l }$ holds. The output ${ \pmb x } _ { o u t }$ of Game satisfies
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\begin{array} { r l r } { { \mathbb { E } [ \| \nabla f ( { \pmb x } _ { o u t } ) \| _ { 2 } ^ { 2 } ] \le \frac { M _ { 1 } } { T - 1 } + \frac { M _ { 2 } d } { T - 1 } + \frac { M _ { 3 } T ^ { p q } } { T - 1 } \mathbb { E } ( \sum _ { i = 1 } ^ { d } ( \| { \pmb g } _ { 1 : T , i } \| _ { 2 } ) ^ { 2 ( 1 - p q ) } ) } } \\ & { } & { + \frac { M _ { 4 } T ^ { ( 1 + r ) / 2 } } { T - 1 } \mathbb { E } ( \sum _ { i = 1 } ^ { d } ( \| { \pmb g } _ { 1 : T , i } \| _ { 2 } ) ^ { 1 - r } ) \quad T \ge 2 , } \end{array}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
where
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\begin{array} { l } { M _ { 1 } = G _ { \infty } ^ { p q } \Delta f / \alpha _ { 1 } } \\ { M _ { 2 } = \displaystyle \frac { G _ { \infty } ^ { 2 + p q } \| \hat { v } _ { 1 } ^ { - p } \| _ { 1 } } { d ( 1 - \beta _ { 1 } ) } + \frac { G _ { \infty } ^ { 2 } } { ( 1 - \beta _ { 2 } ) ^ { p } } } \\ { M _ { 3 } = \displaystyle \frac { 2 L G _ { \infty } ^ { p q } \alpha _ { 1 } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } } \\ { M _ { 4 } = \displaystyle \frac { 4 L G _ { \infty } ^ { 1 + r - p q } \alpha _ { 1 } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \left( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } \right) ^ { 2 } } \end{array}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
where $\begin{array} { r } { \Delta f = f ( \pmb { x } _ { 1 } ) - \operatorname* { i n f } _ { \pmb { x } } f ( \pmb { x } ) } \end{array}$ .
|
| 154 |
+
|
| 155 |
+
Proof. See Appendix C for proof.
|
| 156 |
+
|
| 157 |
+
It is clear from Theorem 2 that the two parameters $p$ and $q$ have to satisfy certain conditions. That is $p , q > 0$ and $p q < 1$ . The conditions suggest if one parameter is chosen large, the other one should be set small to avoid divergence. In practice, it is found that Game also converges when $p q = 1$ . This leaves us an open question on how to elaborate the convergence analysis to cover the special case of $p q = 1$ for Game.
|
| 158 |
+
|
| 159 |
+
We now study the upper bound on the right hand side of (14). The expression includes four quantities, where the first two quantities are independent of the gradients $\{ \pmb { g } _ { 1 : T , i } | i = 1 , \ldots , d \}$ while the last two are contributed by the inequalities derived in Lemma 2. All the four scalar parameters $M _ { i }$ , $i = 1 , \dots , 4$ , are independent of iteration number $T$ . The convergence of Game can be established if one can show that the upper bound expression approaches to zero as $T$ increases.
|
| 160 |
+
|
| 161 |
+
In the following, we simplify the upper bound expression in (14) by specifying $p q$ and $r$ with particular values and then study its convergence behaviour.
|
| 162 |
+
|
| 163 |
+
Corollary 1. Let $\begin{array} { r } { p q = \frac { 1 } { 2 } } \end{array}$ and $r = 2 p q - 1$ in Theorem 2, the upper bound of E $[ \| \nabla f ( \pmb { x } _ { o u t } ) \| _ { 2 } ^ { 2 } ]$ then takes the form of
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
\mathbb { E } \left[ \Vert \nabla f ( \pmb { x } _ { o u t } ) \Vert _ { 2 } ^ { 2 } \right] \leq \frac { M _ { 1 } } { ( T - 1 ) \alpha _ { 1 } } + \frac { M _ { 2 } d } { T - 1 } + \frac { ( M _ { 3 } + M _ { 4 } ) \alpha _ { 1 } \sqrt { T } } { T - 1 } \mathbb { E } \left( \sum _ { i = 1 } ^ { d } \Vert \pmb { g } _ { 1 : T , i } \Vert _ { 2 } \right) \quad T \geq 2 .
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
As summarized in Table 1, It is immediate that the upper bound in (19) is proportional to $O ( d / T +$ $G _ { T } / \sqrt { T } )$ , where $\begin{array} { r } { G _ { T } = \mathbb { E } \left( \sum _ { i = 1 } ^ { d } \| g _ { 1 : T , i } \| _ { 2 } \right) } \end{array}$ . As reflected in Table 1, the upper bound also holds for PAdam even though the iteration procedure (3)-(4) of PAdam is different from (5)-(6) of Game.
|
| 170 |
+
|
| 171 |
+
We are now in a position to study under what conditions Game would converge. It is not difficult to conclude that when $G _ { T }$ is of order $G _ { T } = O ( ( d T ) ^ { s } )$ where $s < \frac { 1 } { 2 }$ , (19) tends to converge with the speed $O ( d / T + d ^ { s } / T ^ { 1 / 2 - s } )$ . We note that in Duchi et al. (2011)), the assumption $G _ { T } \ll \sqrt { d T }$ was used for analyzing AdaGrad, which was later on employed for convergence analysis of other adaptive gradient methods (see (Zhou et al. (2018)) and (S. J. Reddi & Kumar (2018)) for example). The assumption $G _ { T } = O ( ( d T ) ^ { s } )$ is slightly stronger than $G _ { T } \ll \sqrt { d T }$ as in practice, the dimension $d$ could be larger than $T$ when training large-scale neural networks.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 1: Performance comparison of PAdam, AMSGrad, and Game for training four CNNs (see Table 2-5 for the detailed CNN architectures in Appendix D).
|
| 175 |
+
|
| 176 |
+
# 5 EXPERIMENTAL RESULTS
|
| 177 |
+
|
| 178 |
+
In the experiment, we evaluated the effectiveness of AMSGrad, PAdam and Game for training convolutional neural networks (CNNs). The classification problems on the two datasets MNIST and CIFAR10 were considered. To alleviate overfitting, each of the two datasets was augmented with additional training data (e.g., shifting images vertically and/or horizontally, and image flipping for CIFAR10). In brief, we tested four CNNs: the 1st one consists of four layers for MNIST using the activation function SERLU (Zhang & Li (2018)), the 2nd consists of 8 layers for CIFAR10 using SERLU, and the 3rd and 4th have the same structure as the 2nd one but using ELU (Clevert et al. (2016)) and ReLU (Nair & Hinton (2010)), respectively. More detailed information of the four CNNs can be found in Table 2-5 of Appendix D.
|
| 179 |
+
|
| 180 |
+
We first consider the CNN training for MNIST using SERLU. The shared parameters among the three methods include $( \alpha _ { t } , \beta _ { 1 } , \beta _ { 2 } ) ^ { - } = ( 0 . 0 0 1 , 0 . 9 , 0 . 9 9 9 )$ , which was recommended in (Kingma & Ba (2017)) for Adam. On the other hand, the special parameters include $p = 0 . 1 2 5$ for PAdam2 and $( p , q ) = ( 0 . 5 , 1 )$ for Game. The setup $( p , q ) \stackrel { \textstyle - } { = } ( 0 . 5 , { \bar { 1 } } )$ was found empirically to be more effective than other tested values. It is worth noting that $q = 1$ indicates that Game tracks information of the gradient magnitude rather than the second moment of gradients.
|
| 181 |
+
|
| 182 |
+
Next we study the CNN training for CIFAR10 using SERLU, ELU and ReLU. As the three neural networks (see Table 3-5) are deeper than that for MNIST, we employed shift-dropout for SERLU and dropout for ELU and ReLU to combat overfitting, respectively. The parameter setup is slightly different from the one for MNIST. In particular, the shared parameters among the three methods include $( \beta _ { 1 } , \beta _ { 2 } ) = ( 0 . 9 , 0 . 9 9 9 )$ and dropout rate of 0.2. Special parameters include $\alpha _ { t } = 0 . 0 0 0 1$ for AMSGrad, 3 $( \alpha _ { t } , p ) = ( 0 . 0 0 1 , 0 . 1 2 5 )$ for PAdam, and $( \hat { \alpha _ { t } } , p , q ) \hat { = } ( 0 . 0 0 1 , 0 . 5 , 1 )$ for Game.
|
| 183 |
+
|
| 184 |
+
The convergence results for training the four CNNs are demonstrated in Figure 1. It is seen that Game produces better generalization performance (on validation datasets) than AMSGrad in subplot $( a )$ and $( c ) - ( d )$ while in the same three subplots, AMSGrad exhibits the fastest convergence speed over training data. The two methods have roughly the same convergence performance in subplot $( b )$ , suggesting that selection of activation functions also affects the convergence behaviours. It is observed that SERLU performs slightly better than ELU and ReLU in terms of validation loss. In all the four subplots, PAdam converges slightly slower due to the fact the a small value $p = 0 . 1 2 5$ is selected as compared to $p = 0 . 5$ of AMSGrad.
|
| 185 |
+
|
| 186 |
+
To briefly summarize, the above convergence results suggest that Game produces promising generalization performance in comparison to AMSGrad and PAdam on validation datasets. The nice convergence behaviour of Game might be because the method tracks the 1st moment of gradient magnitude by setting $q = 1$ . As a result, Game achieves better validation performance by slightly sacrificing convergence speed on training dataset. If one also takes into account of memory usage (see Table 1), it is clear that Game is simpler to implement and requires less memory resource, rendering Game an advantage over AMSGrad and PAdam.
|
| 187 |
+
|
| 188 |
+
# 6 CONCLUSIONS AND FUTURE WORKS
|
| 189 |
+
|
| 190 |
+
In this paper, we have proposed a new adaptive gradient method termed as Game. The new method only needs to track two parameters $( m , \hat { v } )$ in comparison to AMSGrad and PAdam, which track three parameters $( m , v , \hat { v } )$ , thus requiring only two-thirds of memory w.r.t. the two methods. The saved memory scales along with the number of model parameters, which becomes significant when training large-scale neural networks. Furthermore, Game introduces one additional parameter $q$ , allowing the method to track information of the $q$ th moment of the gradient magnitude, while AMSGrad and PAdam only consider tracking the 2nd moment of gradients. The freedom of tuning parameter $q$ makes Game more flexible. Theoretical convergence analysis is provided for applying Game to solve both convex and smooth nonconvex optimization. Experimental results on MNIST and CIFAR10 demonstrate that Game produces promising generalization performance in comparison to AMSGrad and PAdam. Given that Game demands only two-thirds of memory in implementation, we conclude that the new method is a promising candidate for training large-scale neural networks.
|
| 191 |
+
|
| 192 |
+
# REFERENCES
|
| 193 |
+
|
| 194 |
+
J. Chen and Q. Gu. Closing the Generalization Gap of Adaptive Gradient Methods in Training Deep Neural Netwoks. arXiv preprint arXiv:1806.0676v1, June 2018.
|
| 195 |
+
X. Chen, S. Liu, R. Sun, and M. Hong. On the Convergence of A Class of Adam-Type Algorithms for Non-Convex Optimization. arXiv:1808.02941v1 [cs. LG], 2018.
|
| 196 |
+
D.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs). arXiv:1511.07289v5 [cs.LG], 2016.
|
| 197 |
+
T. Dozat. Incorporating Nesterov Momentum into Adam. In International conference on Learning Representations (ICLR), 2016.
|
| 198 |
+
J. Duchi, E. Hazan, and Y. Singer. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. Journal of Machine Learning Research, 12:2121–2159, 2011.
|
| 199 |
+
S. Ghadimi and G. Lan. Stochastic First-and Zeroth-Order Methods for Nonconvex Stochastic Programming. SIAM Journal on Optimization, 23:2341–2368, 2013.
|
| 200 |
+
S. Ghadimi and G. Lan. Accelerated Gradients Methods for Nonxonvex Nonlinear and Stochastic Programming. Mathematical Programming, 156:59–99, 2016.
|
| 201 |
+
D. P. Kingma and J. L. Ba. Adam: A Method for Stochastic Optimization. arXiv preprint arXiv:1412.6980v9, 2017.
|
| 202 |
+
V. Nair and G. E. Hinton. Rectified Linear Units Improve Restricted Boltzmann Machines. In Proceedings of the 27th International Conference on Machine Learning,, 2010.
|
| 203 |
+
O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and F.-F. Li. Unified Convergence Analysis of Stochastic Momentum Methods for Convex and Non-Convex Optimization. arXiv:1409.0575v3, 2015.
|
| 204 |
+
S. Kale S. J. Reddi and S. Kumar. On The Convergence of Adam and Beyond. In International conference on Learning Representations (ICLR), 2018.
|
| 205 |
+
Y. Sawaragi, H. Nakayama, and T. Tanino. Theory of Multiobjective Optimization. Elsevier Science, 1985.
|
| 206 |
+
K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. In International conference on Learning Representations (ICLR), 2016.
|
| 207 |
+
T. Tieleman and G. Hinton. Lecture 6.5-RMSProp: Divide The Gradient by a Running Average of Its Recent Magnitude. COURSERA: Neural networks for machine learning, 2012.
|
| 208 |
+
T. Yang, Q. Lin, and Z. Li. Unified Convergence Analysis of Stochastic Momentum Methods for Convex and Non-Convex Optimization. arXiv:1604.03257, 2016.
|
| 209 |
+
G. Zhang and H. Li. Effectiveness of Scaled Exponentially-Regularized Linear Units (SERLUs). arXiv:1807.10117 [cs.LG], July 2018.
|
| 210 |
+
D. Zhou, Y. Tang, Z. Yang, Y. Cao, and Q. Gu. On the Convergence of Adaptive Gradient Methods for Nonconvex Optimization. arXiv:1808.05671v1 [cs. LG], 2018.
|
| 211 |
+
|
| 212 |
+
# APPENDIX
|
| 213 |
+
|
| 214 |
+
# A PROOF OF LEMMA 1
|
| 215 |
+
|
| 216 |
+
Before formally presenting the proof, we first introduce a lemma below:
|
| 217 |
+
Lemma 3. Let $\hat { \mathbf { } v } _ { t }$ be defined as in Game and $q > 0$ . Then each component $\hat { v } _ { t , i }$ is lower bounded by $\hat { v } _ { t , i } \geq ( 1 - \beta _ { 2 } ) | g _ { t , i } | ^ { q }$ , $i = 1 , \ldots , d .$ .
|
| 218 |
+
|
| 219 |
+
Proof. The proof follows directly from the computation $\begin{array} { r } { \hat { v } _ { t , i } = \operatorname* { m a x } ( \hat { v } _ { t - 1 , i } , \beta _ { 2 } \hat { v } _ { t - 1 , i } + ( 1 - \beta _ { 2 } ) | g _ { t , i } | ^ { q } ) } \end{array}$ as summarized in Table 1 for Game.
|
| 220 |
+
|
| 221 |
+
With Lemma 3, we are ready to describe the proof for Lemma 1. Firstly, the quantity $\alpha _ { t } \mathbb { E } \left[ \| \hat { V } _ { t } ^ { - p / 2 } m _ { t } \| _ { 2 } ^ { 2 } \right]$ can be upper bounded by
|
| 222 |
+
|
| 223 |
+
$$
|
| 224 |
+
\begin{array} { r l } & { v _ { \tau } \left[ \left| \hat { X } _ { \tau } ^ { \tau } \star \mathbf { w } _ { 0 , \tau } \hat { X } _ { \tau } \right| ^ { 2 } \right] } \\ & { = v _ { \tau } \left[ \frac { 1 } { \tau } \frac { \hat { X } _ { \tau } ^ { \tau } } { \hat { X } _ { \tau } ^ { \tau } } \right] } \\ & { \quad - v _ { \tau } \left[ \frac { 1 } { \tau } \frac { \hat { X } _ { \tau } ^ { \tau } } { \hat { X } _ { \tau } ^ { \tau } } \right] } \\ & { \quad - v _ { \tau } \left[ \frac { 1 } { \tau } \frac { \hat { X } _ { \tau } ^ { \tau } } { \hat { X } _ { \tau } ^ { \tau } } \right] \left( \sum _ { m = 1 } ^ { n } \hat { \mu } _ { m } \prod _ { m = 1 } ^ { T } \lambda _ { m } \frac { \hat { \mu } _ { m } } { \mu _ { m } } \exp ^ { \lambda _ { m } ^ { m } } \right) ^ { \frac { 1 } { 2 } } } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \ \end{array}
|
| 225 |
+
$$
|
| 226 |
+
|
| 227 |
+
where step $( a )$ uses $\beta _ { 1 t } ~ \leq ~ \beta _ { 1 } ~ < ~ 1$ , step $( b )$ uses Cauchy-Schwarz inequality, step $( c )$ uses $\textstyle \sum _ { j = 1 } ^ { t } \beta _ { 1 } ^ { t - j } \leq 1 / ( 1 - \beta _ { 1 } )$ , step $( d )$ uses $\hat { v } _ { t , i } ^ { p } \geq \hat { v } _ { j , i } ^ { p }$ for all $j \le t$ , and step $( e )$ uses the results in Lemma 3.
|
| 228 |
+
|
| 229 |
+
Next taking the summation of (20) over $t = 1$ to $t = T$ produces
|
| 230 |
+
|
| 231 |
+
$$
|
| 232 |
+
\begin{array} { r l } & { \displaystyle \sum _ { t = 1 } ^ { T } \alpha _ { t } \left[ | \hat { V } _ { t } ^ { - p / 2 } m _ { t } | | _ { 2 } ^ { 2 } \right] } \\ & { \le \displaystyle \frac { 1 } { ( 1 - \beta _ { 1 } ) ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \sum _ { j = 1 } ^ { t } \alpha _ { t } \beta _ { 1 } ^ { t - i } | g _ { j , i } | ^ { ( 2 - p q ) } \right] } \\ & { \stackrel { ( a ) } { \le } \frac { \alpha } { ( 1 - \beta _ { 1 } ) ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { ( 2 - p q ) } \sum _ { t = j } ^ { T } \frac { \beta _ { 1 } ^ { t - j } } { \sqrt { d } } \right] } \\ & { \le \displaystyle \frac { \alpha } { ( 1 - \beta _ { 1 } ) ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \sum _ { j = 1 } ^ { T } \frac { 1 } { \sqrt { j } } | g _ { j , i } | ^ { ( 2 - p q ) } \sum _ { t = j } ^ { T } \beta _ { 1 } ^ { t - j } \right] } \end{array} .
|
| 233 |
+
$$
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
\begin{array} { l } { { \displaystyle { \stackrel { ( b ) } { \leq } } \frac { \alpha } { ( 1 - \beta _ { 1 } ) ^ { 2 } ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \displaystyle { \sum _ { i = 1 } ^ { d } \sum _ { j = 1 } ^ { T } \frac { 1 } { \sqrt { j } } | g _ { j , i } | ^ { ( 2 - p q ) } } \right] } } \\ { \displaystyle { \stackrel { ( c ) } { \leq } \frac { \alpha } { ( 1 - \beta _ { 1 } ) ^ { 2 } ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \displaystyle { \sum _ { i = 1 } ^ { d } \left( \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { 2 ( 2 - p q ) } \right) ^ { 1 / 2 } \left( \sum _ { j = 1 } ^ { T } \frac { 1 } { j } \right) ^ { 1 / 2 } } \right] } } \\ { \displaystyle { \stackrel { ( d ) } { \leq } \frac { \alpha \sqrt { 1 + \log T } } { ( 1 - \beta _ { 1 } ) ^ { 2 } ( 1 - \beta _ { 2 } ) ^ { p } } \left[ \displaystyle { \sum _ { i = 1 } ^ { d } \left( \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { 2 ( 2 - p q ) } \right) ^ { 1 / 2 } } \right] } } \end{array}
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
where step $( a )$ uses $\alpha _ { t } = \alpha / \sqrt { t }$ , step $( b )$ uses $\begin{array} { r } { \sum _ { t = j } ^ { T } \beta _ { 1 } ^ { t - j } < 1 / ( 1 - \beta _ { 1 } ) } \end{array}$ , step $( c )$ follows from Cauchy-Schwarz inequality, and step $( d )$ uses $\textstyle \sum _ { t = 1 } ^ { T } 1 / t \leq ( 1 + \log T ) .$ . The proof is complete.
|
| 240 |
+
|
| 241 |
+
# B PROOF OF LEMMA 2
|
| 242 |
+
|
| 243 |
+
We first consider the summation $\begin{array} { r } { \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \lVert \hat { V } _ { t } ^ { - p } m _ { t } \rVert _ { 2 } ^ { 2 } \right] } \end{array}$ . Each quantity $\alpha _ { t } ^ { 2 } \mathbb { E } \left[ \Vert \hat { V } _ { t } ^ { - p } m _ { t } \Vert _ { 2 } ^ { 2 } \right]$ can be upper bounded by
|
| 244 |
+
|
| 245 |
+
$$
|
| 246 |
+
\begin{array} { r l } & { = a _ { 2 } ^ { 2 } ( \displaystyle \sum _ { i = 1 } ^ { n } \frac { 1 } { n \beta _ { i } ^ { 2 } } ( \sum _ { t = - 1 } ^ { n } \frac { 1 } { n \beta _ { i } ^ { 2 } } ( \sum _ { t = - 1 } ^ { n } \beta _ { i } ^ { 2 } \beta _ { t , t } ^ { 2 \prime } \beta _ { t , t } ) ^ { t } ) ) } \\ & { \stackrel { \mathrm { R e p } } { \underset { \mathrm { \scriptsize \sum } \alpha } { = } } a _ { 2 } ^ { 2 } ( 1 - b _ { 1 } ^ { 2 } \beta _ { i } ^ { 2 } \mathbb { E } [ \displaystyle \sum _ { t = - 1 } ^ { n } \frac { 1 } { n \beta _ { i } ^ { 2 } } ( \sum _ { t = - 1 } ^ { n } \beta _ { i } ^ { 2 } \sigma _ { t , t } ^ { 2 \prime \prime } \beta _ { t , t } ) ^ { ( t ) ( t ) ( t - t - t - t ) \alpha \alpha \beta } ) ( \sum _ { t = - 1 } ^ { n } \beta _ { i } ^ { 2 } \mathbb { E } [ \displaystyle \frac { 1 } { n \beta _ { i } ^ { 2 } } \beta _ { t , t } ^ { 2 \prime \prime } ] ^ { ( t ) ( t - t - t ) \alpha \beta } ) ) } \\ & { \stackrel { \mathrm { R e p } } { \underset { \mathrm { \scriptsize \sum } \alpha } { = } } a _ { 2 } ^ { 2 } ( 1 - b _ { 1 } ^ { 2 } ) \mathbb { E } [ \displaystyle \sum _ { t = - 1 } ^ { n } \frac { 1 } { n \beta _ { i } ^ { 2 } } ( \sum _ { t = - 1 } ^ { n } \beta _ { i } ^ { 2 } \mathbb { E } ( \displaystyle \sum _ { t = - 1 } ^ { n } \beta _ { i } ^ { 2 } \mathbb { E } ( \displaystyle \sum _ { t = - 1 } ^ { n } \beta _ { t } ^ { 2 } ) ( \sum _ { t = - 1 } ^ { n } \beta _ { i } ^ { 2 } \mathbb { E } ( \displaystyle \frac { 1 } { n \beta _ { i } ^ { 2 } } ) ^ { ( t - t ) \alpha \beta } ) ) ] } \\ & \stackrel { \mathrm { R e p } } { \underset { \mathrm { \scriptsize \sum } \alpha } { = } } a _ { 2 } ^ { 2 } ( 1 - b _ { 1 } ) G _ { \alpha \beta } ^ { ( 1 - t ) \alpha \beta } = \mathbb { P } \Bigg [ \displaystyle \sum _ \end{array}
|
| 247 |
+
$$
|
| 248 |
+
|
| 249 |
+
whestep $( a )$ rz ine, step lity uses $2 p q - 1 \leq r \leq 1$ aes $p q \leq 1$ $( b )$ $| g _ { j , i } | \leq \| g _ { j } \| _ { \infty } \leq G _ { \infty }$ $( c )$ $\begin{array} { r } { \sum _ { j = 1 } ^ { t } \beta _ { 1 } ^ { t - j } \le 1 / ( 1 - \beta _ { 1 } ) } \end{array}$ $( d )$ $\hat { v } _ { t , i } ^ { 2 p } \geq \hat { v } _ { j , i } ^ { 2 p }$ $j \le t$ $( e )$
|
| 250 |
+
|
| 251 |
+
Taking the summation of (22) over $t = 1$ to $t = T$ produces
|
| 252 |
+
|
| 253 |
+
$$
|
| 254 |
+
\begin{array} { r l } & { \displaystyle \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \| \hat { V } _ { t } ^ { - p } m _ { t } \| _ { 2 } ^ { 2 } \right] } \\ & { \leq \frac { \displaystyle ( 1 - \beta _ { 1 } ) G _ { \infty } ^ { ( 1 + r - 2 p q ) } } { \displaystyle ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \sum _ { t = 1 } ^ { T } \sum _ { i = 1 } ^ { d } \sum _ { j = 1 } ^ { t } \alpha _ { t } ^ { 2 } \beta _ { 1 } ^ { t - j } | g _ { j , i } | ^ { ( 1 - r ) } \right] } \end{array}
|
| 255 |
+
$$
|
| 256 |
+
|
| 257 |
+
$$
|
| 258 |
+
\begin{array} { r l } & { \stackrel { \langle \alpha \rangle } { \leq } \frac { \alpha _ { 1 } ^ { 2 } ( 1 - \beta _ { 1 } ) G _ { \infty } ^ { ( 1 + r - 2 p q ) } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \displaystyle \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { ( 1 - r ) } \displaystyle \sum _ { t = j } ^ { T } \beta _ { 1 } ^ { t - j } \right] } \\ & { \stackrel { \langle \alpha \rangle } { \leq } \frac { \alpha _ { 1 } ^ { 2 } G _ { \infty } ^ { ( 1 + r - 2 p q ) } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \displaystyle \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { ( 1 - r ) } \right] } \\ & { \stackrel { \langle \alpha \rangle } { \leq } \frac { \alpha _ { 1 } ^ { 2 } G _ { \infty } ^ { ( 1 + r - 2 p q ) } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \left( \displaystyle \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { 2 } \right) ^ { ( 1 - r ) / 2 } \right] } \\ & { = \frac { \alpha _ { 1 } ^ { 2 } G _ { \infty } ^ { ( 1 + r - 2 p q ) } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \left( \displaystyle \sum _ { j = 1 } ^ { T } | g _ { j , i } | ^ { 2 } \right) ^ { ( 1 - r ) / 2 } \right] T ^ { ( 1 + r ) / 2 } } \\ & { = \frac { \alpha _ { 1 } ^ { 2 } G _ { \infty } ^ { ( 1 + r - 2 p q ) } T ^ { ( 1 + r ) / 2 } } { ( 1 - \beta _ { 2 } ) ^ { 2 p } } \mathbb { E } \left[ \displaystyle \sum _ { i = 1 } ^ { d } \left( \| g _ { 1 } \gamma _ { , i } \| ^ { ( 1 - r ) } \right) ^ { ( 1 - r ) } \right] } \end{array}
|
| 259 |
+
$$
|
| 260 |
+
|
| 261 |
+
where step $( a )$ uses the property that $a _ { j } \leq a _ { j - 1 }$ for all $j > 1$ , step (b) uses $\begin{array} { r } { \sum _ { t = j } ^ { T } \beta _ { 1 } ^ { t - j } < 1 / ( 1 - \beta _ { 1 } ) } \end{array}$ and step $( c )$ follows from Holder’s inequality. The proof is complete for (12).
|
| 262 |
+
|
| 263 |
+
The quantity $\begin{array} { r } { \sum _ { t = 1 } ^ { T } \alpha _ { t } ^ { 2 } \mathbb { E } \left[ \lVert \hat { V } _ { t } ^ { - p } \pmb { g } _ { t } \rVert _ { 2 } ^ { 2 } \right] } \end{array}$ in (13) can be upper bounded as
|
| 264 |
+
|
| 265 |
+
$$
|
| 266 |
+
\begin{array} { r l } & { \frac { 1 } { \omega } \sum _ { i = 1 } ^ { n } [ | \hat { \mathcal { X } } _ { i } ^ { \dagger } \hat { \mathcal { Y } } _ { i } | \hat { \mathcal { Z } } _ { i } ^ { \dagger } | ] } \\ & { = \frac { 1 } { \omega } \sum _ { i = 1 } ^ { n } \omega ^ { 2 } [ \frac { \omega } { \omega _ { i } } \frac { \hat { \mathcal { X } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } } ] } \\ & { \stackrel { ( a ) } { \leq } \frac { \sum _ { i = 1 } ^ { n } \omega ^ { 2 } } { \epsilon _ { i } - \beta _ { i } } \mathbb { E } [ \frac { \frac { \omega } { \omega } } { \omega _ { i } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } } ] } \\ & { \stackrel { ( b ) } { \leq } \frac { \sum _ { i = 1 } ^ { n } \omega ^ { 2 } } { \epsilon _ { i } - \beta _ { i } } \mathbb { E } [ \frac { \frac { \omega } { \omega } } { \omega _ { i } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } } ] } \\ & { \stackrel { ( b ) } { \leq } \frac { \alpha _ { i } ^ { 2 } } { ( 1 - \beta _ { i } ^ { 2 } ) ^ { \beta _ { 0 } / 2 } } \mathbb { E } [ \frac { \frac { \omega } { \omega } } { \omega _ { i } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } - \beta _ { i } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { \omega _ { i } ^ { 2 } } \frac { \hat { \mathcal { Y } } _ { i } ^ { \dagger } } { 2 } ] } \\ & \stackrel { ( b ) } { \leq } \frac { \alpha _ { i } ^ { 2 } } { ( 1 - \beta _ { i } ^ { 2 } ) ^ { \beta _ { 0 } / 2 } } \mathbb { E } [ \frac { \omega } { \omega _ { i } } ( \frac \hat { \mathcal { Y } } _ { i } ^ \end{array}
|
| 267 |
+
$$
|
| 268 |
+
|
| 269 |
+
where step $( a )$ uses the property that $a _ { j } \leq a _ { j - 1 }$ for all $j > 1$ and the results in Lemma 3, step $( b )$ uses $p q < 1$ , $p , q > 0$ , and step $( c ) - ( \bar { d } )$ follow from Holder’s inequality. The proof is complete for (13).
|
| 270 |
+
|
| 271 |
+
# C PROOF OF THEOREM 2
|
| 272 |
+
|
| 273 |
+
In brief, we use the technique of parameter transformation proposed in (Yang et al. (2016)) to study Game for solving stochastic nonconvex optimization. In particular, we let $\pmb { x } _ { 0 } = \pmb { x } _ { 1 }$ and for each $t \geq 1$
|
| 274 |
+
|
| 275 |
+
$$
|
| 276 |
+
z _ { t } = { \pmb x } _ { t } + \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } ( { \pmb x } _ { t } - { \pmb x } _ { t - 1 } ) = \frac { 1 } { 1 - \beta _ { 1 } } { \pmb x } _ { t } - \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } { \pmb x } _ { t - 1 } ,
|
| 277 |
+
$$
|
| 278 |
+
|
| 279 |
+
where $z _ { 1 } = x _ { 1 }$ for the special case $t = 1$ . We note that the technique has also been employed in (Zhou et al. (2018)) and (Chen et al. (2018)) for analyzing PAdam and a class of Adam-type methods. Instead of considering $\{ \pmb { x } _ { j } \} _ { j = 0 } ^ { T }$ directly, we tackle $\{ z _ { j } \} _ { j = 1 } ^ { T }$ as in the literature.
|
| 280 |
+
|
| 281 |
+
In (Zhou et al. (2018)) and (Chen et al. (2018)), the authors provided a general upper bound for $f ( z _ { t + 1 } ) - f ( z _ { t } )$ , which also holds for Game. We now summarize their result in a lemma below:
|
| 282 |
+
|
| 283 |
+
Lemma 4. Suppose the sequence $\{ z _ { j } \} _ { j = 1 } ^ { T }$ is as defined in (24). Then under Assumption $^ { l }$ , the quantity $f ( z _ { t + 1 } ) - f ( z _ { t } )$ is upper bounded by
|
| 284 |
+
|
| 285 |
+
$$
|
| 286 |
+
\begin{array} { r l } & { \quad f ( z _ { 2 } ) - f ( z _ { 1 } ) \leq - \nabla f ( { \boldsymbol x } _ { 1 } ) ^ { T } \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } + 2 L \| \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } \| _ { 2 } ^ { 2 } } \\ & { f ( z _ { t + 1 } ) - f ( z _ { t } ) \leq - \nabla f ( { \boldsymbol x } _ { t } ) ^ { T } \alpha _ { t - 1 } \hat { V } _ { t - 1 } ^ { - p } g _ { t } + \displaystyle \frac { 1 } { 1 - \beta _ { 1 } } G _ { \infty } ^ { 2 } ( \| \alpha _ { t - 1 } \hat { v } _ { t - 1 } ^ { - p } \| _ { 1 } - \| \alpha _ { t } \hat { v } _ { t } ^ { - p } \| _ { 1 } ) } \\ & { \qquad + \displaystyle 2 L \| \alpha _ { t } \hat { V } _ { t } ^ { - p } g _ { t } \| _ { 2 } ^ { 2 } + 4 L \left( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } \right) ^ { 2 } \| { \boldsymbol x } _ { t } - { \boldsymbol x } _ { t - 1 } \| _ { 2 } ^ { 2 } \quad t \geq 2 . } \end{array}
|
| 287 |
+
$$
|
| 288 |
+
|
| 289 |
+
With Lemma 4, we are ready to present the proof for Theorem 2. Firstly, taking expectation on both sides of (25) produces
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
\begin{array} { r l } & { \mathbb { E } [ f ( z _ { 2 } ) - f ( z _ { 1 } ) ] \le \mathbb { E } \left[ - \nabla f ( x _ { 1 } ) ^ { T } \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } + 2 L \| \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } \| _ { 2 } ^ { 2 } \right] } \\ & { \qquad \le \mathbb { E } \left[ d \alpha _ { 1 } \| \nabla f ( x _ { 1 } ) \| _ { \infty } \cdot \| \hat { V } _ { 1 } ^ { - p } g _ { 1 } \| _ { \infty } + 2 L \| \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } \| _ { 2 } ^ { 2 } \right] } \\ & { \qquad \overset { ( a ) } { \le } \mathbb { E } \left[ \frac { d \alpha _ { 1 } } { ( 1 - \beta _ { 2 } ) ^ { p } } \| \nabla f ( x _ { 1 } ) \| _ { \infty } \cdot \| | g | ^ { 1 - p q } \| _ { \infty } + 2 L \| \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } \| _ { 2 } ^ { 2 } \right] } \\ & { \qquad \overset { ( b ) } { \le } \mathbb { E } \left[ \frac { d \alpha _ { 1 } G _ { \infty } ^ { 2 - p q } } { ( 1 - \beta _ { 2 } ) ^ { p } } + 2 L \| \alpha _ { 1 } \hat { V } _ { 1 } ^ { - p } g _ { 1 } \| _ { 2 } ^ { 2 } \right] , } \end{array}
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
where step $( a )$ uses $\hat { V } _ { 1 } = ( 1 - \beta _ { 2 } ) | g _ { 1 } | ^ { q }$ and $p q < 1$ , and step $( b )$ uses $\| \nabla f _ { t } ( \pmb { x } ; \xi _ { t } ) \| _ { \infty } \leq G _ { \infty }$
|
| 296 |
+
|
| 297 |
+
Next by rearranging terms and taking expectation in (26), we have
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\begin{array} { r l } & { \mathbb { E } \bigg [ f ( z _ { t + 1 } ) + \frac { G _ { \infty } ^ { 2 } } { 1 - \beta _ { 1 } } \| \alpha _ { t } \hat { v } _ { t } ^ { - p } \| _ { 1 } - \bigg ( f ( z _ { t } ) + \frac { G _ { \infty } ^ { 2 } } { 1 - \beta _ { 1 } } \| \alpha _ { t - 1 } \hat { v } _ { t - 1 } ^ { - p } \| _ { 1 } \bigg ) \bigg ] } \\ & { \leq \mathbb { E } \bigg [ - \nabla f ( x _ { t } ) ^ { t } \alpha _ { t - 1 } \hat { V } _ { t - 1 } ^ { - p } g _ { t } + 2 L \| \alpha _ { t } \hat { V } _ { t } ^ { - p } g _ { t } \| _ { 2 } ^ { 2 } + 4 L \bigg ( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } \bigg ) ^ { 2 } \| x _ { t - 1 } - x _ { t } \| _ { 2 } ^ { 2 } \bigg ] } \\ & { \overset { ( a ) } { = } - \nabla f ( x _ { t } ) ^ { t } \alpha _ { t - 1 } \hat { V } _ { t - 1 } ^ { - p } \nabla f ( x _ { t } ) + \mathbb { E } \bigg [ 2 L \| \alpha _ { t } \hat { V } _ { t } ^ { - p } g _ { t } \| _ { 2 } ^ { 2 } + 4 L \bigg ( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } \bigg ) ^ { 2 } \| \alpha _ { t - 1 } \hat { V } _ { t - 1 } ^ { - p } m _ { t - 1 } \| _ { 2 } ^ { 2 } \bigg ] } \\ & { \overset { ( b ) } { \leq } - \alpha _ { t - 1 } \| \nabla f ( x _ { t } ) \| _ { 2 } ^ { 2 } ( G _ { \infty } ^ { p } ) ^ { - 1 } + \mathbb { E } \bigg [ 2 L \| \alpha _ { t } \hat { V } _ { t } ^ { - p } g _ { t } \| _ { 2 } ^ { 2 } + 4 L \bigg ( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } \bigg ) ^ { 2 } \| \alpha _ { t - 1 } \hat { V } _ { t - 1 } ^ { - p } m _ { t - 1 } \| _ { 2 } ^ { 2 } \bigg ] , ( 3 ) } \end{array}
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
where step $( a )$ uses the property that $\mathbb { E } [ { \pmb { g } } _ { t } ] = \nabla f ( { \pmb { x } } _ { t } )$ , and step $( b )$ uses the inequality $\| \hat { \pmb { v } } _ { t - 1 } \| _ { \infty } \leq$ $G _ { \infty } ^ { q }$ which can be derived from $\| \nabla f _ { t } ( \pmb { x } ; \xi _ { t } ) \| _ { \infty } \leq G _ { \infty } ,$ $t \geq 1$ .
|
| 304 |
+
|
| 305 |
+
Taking the summation of (27)-(28) over $t = 1$ to $T$ produces
|
| 306 |
+
|
| 307 |
+
$$
|
| 308 |
+
\begin{array} { r l } & { \boldsymbol { G } _ { \infty } ^ { p } ^ { - 1 } \displaystyle \sum _ { t = 2 } ^ { T } \alpha _ { t - 1 } \mathbb { E } \| \nabla f ( \boldsymbol { x } _ { t } ) \| _ { 2 } ^ { 2 } } \\ & { \leq \mathbb { E } [ f ( \boldsymbol { x } _ { 1 } ) + \frac { G _ { \infty } ^ { 2 } } { 1 - \beta _ { 1 } } \big \| \alpha _ { 1 } \hat { \boldsymbol { v } } _ { 1 } ^ { - p } \big \| _ { 1 } + \frac { d \alpha _ { 1 } G _ { \infty } ^ { 2 - p q } } { ( 1 - \beta _ { 2 } ) ^ { p } } - ( f ( \boldsymbol { z } _ { T + 1 } ) + \frac { G _ { \infty } ^ { 2 } } { 1 - \beta _ { 1 } } \big \| \alpha _ { T } \hat { \boldsymbol { v } } _ { T } ^ { - p } \big \| _ { 1 } ) ] } \\ & { \qquad + 2 L \displaystyle \sum _ { t = 1 } ^ { T } \mathbb { E } [ \| \alpha _ { t } \hat { V } _ { t } ^ { - p } \boldsymbol { g } _ { t } \| _ { 2 } ^ { 2 } ] + 4 L ( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } ) ^ { 2 } \displaystyle \sum _ { t = 2 } ^ { T } \mathbb { E } [ \| \alpha _ { t - 1 } \hat { V } _ { t - 1 } ^ { - p } \boldsymbol { m } _ { t - 1 } \| _ { 2 } ^ { 2 } ] } \\ & { \overset { ( a ) } { \leq } \mathbb { E } [ \Delta f + \frac { G _ { \infty } ^ { 2 } } { 1 - \beta _ { 1 } } \big \| \alpha _ { 1 } \hat { \boldsymbol { v } } _ { 1 } ^ { - p } \big \| _ { 1 } + \frac { d \alpha _ { 1 } G _ { \infty } ^ { 2 - p q } } { ( 1 - \beta _ { 2 } ) ^ { p } } ] + 2 L \displaystyle \sum _ { t = 1 } ^ { T } \mathbb { E } [ \| \alpha _ { t } \hat { V } _ { t } ^ { - p } \boldsymbol { g } _ { t } \| _ { 2 } ^ { 2 } ] } \\ & \qquad + 4 L ( \frac { \beta _ { 1 } } { 1 - \beta _ { 1 } } ) ^ { 2 } \displaystyle \sum _ { t = 1 } ^ { T } \mathbb { E } [ \| \alpha _ { t } \hat { V } _ { t } ^ { - p } \boldsymbol { m } _ { t } \| _ { 2 } ^ \end{array}
|
| 309 |
+
$$
|
| 310 |
+
|
| 311 |
+
where step $( a )$ uses the inequality $\begin{array} { r } { \Delta f = f ( { \pmb x } _ { 1 } ) - \operatorname* { i n f } _ { { \pmb x } } f ( { \pmb x } ) \geq f ( { \pmb x } _ { 1 } ) - f ( { \pmb z } _ { T + 1 } ) } \end{array}$ and ${ \pmb z } _ { 1 } = { \pmb x } _ { 1 }$ .
|
| 312 |
+
|
| 313 |
+
Finally, substituting (12)-(13) into (29) produces
|
| 314 |
+
|
| 315 |
+
$$
|
| 316 |
+
\begin{array} { r l } & { \quad \times \frac { \sqrt { ( \mathbf { F } + \mathbf { x } ) ^ { 2 } } } { 2 } } \\ & { = \frac { \sqrt { ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } } } { 2 } \quad \sum _ { i = 1 } ^ { N } \mu _ { i } \sum _ { j = 1 } ^ { N } \mu _ { i } \mu _ { j } \sum _ { k = 1 } ^ { N } \mu _ { k } ^ { i } } \\ & \quad - \frac \sqrt { ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } } \\ & \quad + \frac \sqrt { ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + ( \mathbf { F } + \mathbf { x } ) ^ { 2 } + \mu _ { 0 } } \\ & \quad + \frac \sqrt ( \mathbf \end{array}
|
| 317 |
+
$$
|
| 318 |
+
|
| 319 |
+
where step $( a )$ uses the property $\alpha _ { t } = \alpha _ { 1 }$ for all $t \geq 2$ , and $\{ M _ { l } \} _ { l = 1 } ^ { 4 }$ are given by (15)-(18). The proof is complete.
|
| 320 |
+
|
| 321 |
+
# D CNN ARCHITECTURES IN EXPERIMENTS
|
| 322 |
+
|
| 323 |
+
Remark 3. The full name of SERLU in Table 3 is so called scaled exponentially-regularized linear unit. Furthermore, the shift-dropout in Table 3 is designed specifically for SERLU, which includes dropout as a special case.
|
| 324 |
+
|
| 325 |
+
Table 2: CNN for MNIST using SERLU
|
| 326 |
+
|
| 327 |
+
<table><tr><td rowspan=1 colspan=1>Layer 1</td><td rowspan=1 colspan=1>conv.: 3 ×3@32(SERLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 2</td><td rowspan=1 colspan=1>conv.: 3 × 3@64 (SERLU)max-pooling</td></tr><tr><td rowspan=1 colspan=1>Layer 3</td><td rowspan=1 colspan=1>dense: 512 neurons(SERLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 4</td><td rowspan=1 colspan=1>dense+ softmax</td></tr></table>
|
| 328 |
+
|
| 329 |
+
Table 3: CNN for CIFAR10 using SERLU
|
| 330 |
+
|
| 331 |
+
<table><tr><td rowspan=1 colspan=1>Layer 1</td><td rowspan=1 colspan=1>conv.: 3 × 3@32(SERLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 2</td><td rowspan=1 colspan=1>conv.: 3 × 3@32 (SERLU)max-poolingshift-dropout</td></tr><tr><td rowspan=1 colspan=1>Layer 3</td><td rowspan=1 colspan=1>conv.: 3 × 3@64 (SERLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 4</td><td rowspan=1 colspan=1>conv.: 3 × 3@64 (SERLU)max-poolingshift-dropout</td></tr><tr><td rowspan=1 colspan=1>Layer 5</td><td rowspan=1 colspan=1>conv.: 3 × 3@128(SERLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 6</td><td rowspan=1 colspan=1>conv.: 3 × 3@128 (SERLU)max-poolingshift-dropout</td></tr><tr><td rowspan=1 colspan=1>Layer 7</td><td rowspan=1 colspan=1>dense: 512 neurons (SERLU)shift-dropout</td></tr><tr><td rowspan=1 colspan=1>Layer 8</td><td rowspan=1 colspan=1>dense+softmax</td></tr></table>
|
| 332 |
+
|
| 333 |
+
Table 4: CNN for CIFAR10 using ELU
|
| 334 |
+
|
| 335 |
+
<table><tr><td rowspan=1 colspan=1>Layer 1</td><td rowspan=1 colspan=1>conv.: 3 × 3@32(ELU)</td></tr><tr><td rowspan=1 colspan=1>Layer 2</td><td rowspan=1 colspan=1>conv.: 3 × 3@32 (ELU)max-poolingdropout</td></tr><tr><td rowspan=1 colspan=1>Layer 3</td><td rowspan=1 colspan=1>conv.: 3 × 3@64(ELU)</td></tr><tr><td rowspan=1 colspan=1>Layer 4</td><td rowspan=1 colspan=1>conv.: 3 × 3@64 (ELU)max-poolingdropout</td></tr><tr><td rowspan=1 colspan=1>Layer 5</td><td rowspan=1 colspan=1>conv.: 3 × 3@128(ELU)</td></tr><tr><td rowspan=1 colspan=1>Layer 6</td><td rowspan=1 colspan=1>conv.: 3 × 3@1283(ELU)max-poolingdropout</td></tr><tr><td rowspan=1 colspan=1>Layer 7</td><td rowspan=1 colspan=1>dense: 512 neurons (ELU)dropout</td></tr><tr><td rowspan=1 colspan=1>Layer 8</td><td rowspan=1 colspan=1>dense + softmax</td></tr></table>
|
| 336 |
+
|
| 337 |
+
Table 5: CNN for CIFAR10 using ReLU
|
| 338 |
+
|
| 339 |
+
<table><tr><td rowspan=1 colspan=1>Layer 1</td><td rowspan=1 colspan=1>conv.: 3 ×3@32(ReLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 2</td><td rowspan=1 colspan=1>conv.: 3 × 3@32 (ReLU)max-poolingdropout</td></tr><tr><td rowspan=1 colspan=1>Layer 3</td><td rowspan=1 colspan=1>conv.: 3 × 3@64(ReLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 4</td><td rowspan=1 colspan=1>conv.: 3 × 3@64 (ReLU)max-poolingdropout</td></tr><tr><td rowspan=1 colspan=1>Layer 5</td><td rowspan=1 colspan=1>conv.: 3 × 3@128(ReLU)</td></tr><tr><td rowspan=1 colspan=1>Layer 6</td><td rowspan=1 colspan=1>conv.: 3 × 3@1283 (ReLU)max-poolingdropout</td></tr><tr><td rowspan=1 colspan=1>Layer 7</td><td rowspan=1 colspan=1>dense: 512 neurons (ReLU)dropout</td></tr><tr><td rowspan=1 colspan=1>Layer 8</td><td rowspan=1 colspan=1>dense + softmax</td></tr></table>
|
md/train/HJzgZ3JCW/HJzgZ3JCW.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EFFICIENT SPARSE-WINOGRAD CONVOLUTIONAL NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Xingyu Liu∗, Jeff Pool†, Song $\mathbf { H a n } ^ { \ddag \mathsection }$ , William J. Dally∗†
|
| 4 |
+
∗ Stanford University, † NVIDIA, ‡ Massachusetts Institute of Technology, § Google Brain
|
| 5 |
+
{xyl, dally}@stanford.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Convolutional Neural Networks (CNNs) are computationally intensive, which limits their application on mobile devices. Their energy is dominated by the number of multiplies needed to perform the convolutions. Winograd’s minimal filtering algorithm (Lavin, 2015) and network pruning (Han et al., 2015) can reduce the operation count, but these two methods cannot be directly combined – applying the Winograd transform fills in the sparsity in both the weights and the activations. We propose two modifications to Winograd-based CNNs to enable these methods to exploit sparsity. First, we move the ReLU operation into the Winograd domain to increase the sparsity of the transformed activations. Second, we prune the weights in the Winograd domain to exploit static weight sparsity. For models on CIFAR-10, CIFAR-100 and ImageNet datasets, our method reduces the number of multiplications by $1 0 . 4 \times$ , $6 . 8 \times$ and $1 0 . 8 \times$ respectively with loss of accuracy less than $0 . 1 \%$ , outperforming previous baselines by $2 . 0 { \times } { - } 3 . 0 { \times }$ . We also show that moving ReLU to the Winograd domain allows more aggressive pruning.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Deep Convolutional Neural Networks (CNNs) have shown significant improvement in many machine learning applications. However, CNNs are compute-limited. Their performance is dominated by the number of multiplies needed to perform the convolutions. Moreover, the computational workload of CNNs continues to grow over time. LeCun et al. (1998) proposed a CNN model with less than $2 . 3 \times 1 0 ^ { 7 }$ multiplies for handwritten digit classification. Later, Krizhevsky et al. (2012) developed AlexNet, an ImageNet-winning CNN with more than $1 . 1 \times 1 0 ^ { 9 }$ multiplies. In 2014, ImageNetwinning and runner up CNNs increased the number of multiplies to $1 . 4 \times 1 0 ^ { 9 }$ (Szegedy et al., 2015) and $1 . \check { 6 } \times 1 0 ^ { 1 0 }$ (Simonyan & Zisserman, 2015) respectively. Despite the powerful representational ability of large scale CNNs, their computational workload prohibits deployment on mobile devices.
|
| 14 |
+
|
| 15 |
+
Two research directions have been explored to address the problem. Lavin (2015) proposed using Winograd’s minimal filtering algorithm (Winograd, 1980) to reduce the number of multiplies needed to perform $3 \times 3$ kernel convolutions. On the other end, pruning the model (Han et al., 2015; 2016b) and exploiting the dynamic sparsity of activations due to ReLU also reduces the required multiplies.
|
| 16 |
+
|
| 17 |
+
Unfortunately, the above two directions are not compatible: the Winograd transformation fills in the zeros in both the weights and the activations (Figure 1(a)) – eliminating the gain from exploiting sparsity. Thus, for a pruned network, Winograd’s algorithm actually increases the number of multiplies; the loss of sparsity more than offsets the reduced operation count.
|
| 18 |
+
|
| 19 |
+
In this paper, we introduce two modifications to the original Winograd-based convolution algorithm to eliminate this problem. First, we move the ReLU operation to be after the Winograd transform to also make the activations sparse at the point where the multiplies are performed. Second, we prune the weights after (rather than before) they are transformed. Thus, the weights are sparse when the elementwise multiply is performed — reducing the operation count. Together, these two modifications enable the gains of Winograd’s algorithm and of exploiting sparsity to be combined. We open-source our code and models at https://github.com/xingyul/Sparse-Winograd-CNN.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Combining Winograd convolution with sparse weights and activations. (a) Conventional Winograd-based convolution fills in the zeros in both the weights and activations. (b) Pruning the $4 \times 4$ transformed kernel restores sparsity to the weights. (c) Our proposed Winograd-ReLU CNN. Moving the ReLU layer after Winograd transformation also restores sparsity to the activations.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Linear Algebra property in Convolution: Previous research proposes using the linear algebra property of convolution to reduce the number of multiplies by trading additions for multiplies. Cong & Xiao (2014) convert convolution into matrix multiplies and utilize the linear algebra property at the sub-matrix block level. This approach achieves a $47 \%$ saving in multiplies. Lavin (2015) exploits the element-level linear algebra property of convolution, i.e. Winograd’s minimal filtering algorithm (Winograd, 1980). This approach reduces the number of multiplies by $2 . 2 5 \times$ to $4 \times$ , depending on the image patch size used in the algorithm. Winograd’s algorithm is also used in a state-of-the-art deep learning library, cuDNN (Chetlur et al., 2014), to improve computation efficiency.
|
| 27 |
+
|
| 28 |
+
Model Compression: Model compression reduces the number of multiplies of CNNs by pruning network parameters (LeCun et al., 1990; Hassibi et al., 1993) and exploiting weight sparsity. Han et al. (2015; 2016b) proposed learning the sparsity pattern of network weights by eliminating weights whose absolute value is less than an empirical threshold. This approach can prune the convolutional layers of the model to only $3 0 \% - 5 0 \%$ of the original size and reduce the number of multiplies required. Liu et al. (2017) first proposed pruning and re-training the weights in Winograd domain for conventional Winograd convolution. Li et al. (2017) later showed promising results on large datasets and reported $9 0 \%$ sparsity in the Winograd parameters of AlexNet with less than $0 . 1 \%$ accuracy loss.
|
| 29 |
+
|
| 30 |
+
Dynamic Activation Sparsity: The ReLU non-linearity sets activations whose values are negative to zero, causing dynamic sparsity in activations. Model compression can work in tandem with dynamic activation sparsity and reduce multiplication workload. Han et al. (2015) showed that exploiting sparsity of both weights and activations can reduce the number of multiplies by $4 - 1 1 \times$ . Huan et al. (2016) further proposed to manually set a small positive ReLU threshold at test time to exploit greater sparsity in activation without losing testing accuracy. Research in novel architectures also led to optimizations for deep learning accelerators to exploit the sparsity in activations. Han et al. (2016a) proposed using a Leading Non-zero Detection unit (LNZD) for their fully-connected layer accelerator to efficiently skip zeros in input activations. Albericio et al. (2016) proposed a similar mechanism for a convolution layer accelerator.
|
| 31 |
+
|
| 32 |
+
# 3 SPARSE WINOGRAD CONVOLUTION
|
| 33 |
+
|
| 34 |
+
We first introduce the conventional Winograd convolution and show how sparsity of weights or activations is lost during the dataflow of the algorithm. We then present the novel Winograd-ReLU CNN architecture. It preserves sparsity in both weights and activations before multiplies are performed and significantly reduces the computational workload.
|
| 35 |
+
|
| 36 |
+
# 3.1 SPARSITY IN CONVENTIONAL SPATIAL AND WINOGRAD CNN
|
| 37 |
+
|
| 38 |
+
The basic block of the conventional Winograd convolution algorithm works on an $p \times p$ patch (denoted by $d$ ) extracted with stride of $( p - 2 ) \times ( p - 2 )$ from an $H \times W$ input feature map. With “valid” padding, the $p \times p$ patch is convolved with a $3 \times 3$ kernel (denoted by $g$ ) to produce an $\bar { ( \boldsymbol { p } - 2 ) } \times ( \boldsymbol { p } - 2 )$ output patch (denoted by $S$ ). The output patches are assembled into an output feature map.
|
| 39 |
+
|
| 40 |
+
Input activation patch $d$ and kernel $g$ (spatial-domain activation and weights) are transformed using matrices $B$ and $G$ to be $B ^ { T } d B$ and $G g G ^ { T }$ (Winograd-domain activation and weights) respectively, both with shape $p \times p$ . After element-wise product in Winograd-domain, the output activation $S$ is obtained using matrix $A$ (equation (1)). Matrices $B$ , $G$ and $A$ are $p$ -specific. When $p = 4$ , $B$ and $A$ consists of 1, $- 1$ and 0, so the multiplication with $B$ and $A$ only requires addition. It reduces the number of multiplies from $9 ( p - 2 ) ^ { 2 }$ to $p ^ { 2 }$ . Lavin (2015) gives details of the algorithm.
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
S = A ^ { T } [ [ G g G ^ { T } ] \odot [ B ^ { T } d B ] ] A
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
Spatial Baseline Network: When using a “vanilla” pruned network, as introduced by Han et al. (2015), a ReLU non-linear operation is performed by the previous layer on spatial-domain input $d$ and spatial-domain weight $g$ is pruned. The output activation patch $S$ is obtained from equation (2). This is illustrated in Figure 1(a) for $p = 4$ . Though $g$ and $d$ may both be sparse due to pruning and ReLU respectively, the element-wise multiply is dense due to $\dot { G } ( \cdot ) G ^ { T }$ and $\mathsf { \bar { B } } ( \cdot ) B ^ { T }$ transformations filling the spatial-domain zeros. Sparsity does not reduce the number of multiplies in Winograd’s algorithm.
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
S = A ^ { T } [ [ G \mathrm { P r u n e } ( g ) G ^ { T } ] \odot [ B ^ { T } \mathrm { R e L U } ( d ) B ] ] A
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
Winograd Native Pruned Network: When using the Winograd-domain pruned network introduced by Liu et al. (2017) and Li et al. (2017), the spatial-domain input $d$ is ReLU-ed by the previous layer while the Winograd-domain weight $G g G ^ { T }$ is pruned. The output activation patch $S$ is obtained from equation (3). The algorithm when $p = 4$ is also illustrated in Figure 1(b). Though Winograd-domain weights are sparse due to pruning, Winograd-domain activations are still dense due to $B ( \cdot ) B ^ { T }$ transforms. The sparsity in spatial activations due to ReLU does not reduce the number of multiplies.
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
S = A ^ { T } [ [ \mathrm { P r u n e } ( G g G ^ { T } ) ] \odot [ B ^ { T } \mathrm { R e L U } ( d ) B ] ] A
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
# 3.2 WINOGRAD-RELU CNN
|
| 59 |
+
|
| 60 |
+
To address the above problems, we introduce the Winograd-ReLU Network. Instead of applying ReLU to the activations in the spatial domain, we apply ReLU to the activations in the Winograd domain, as in equation (4) and Figure 1(c). The ReLU operation zeros all negative transformed activations, reducing the number of multiplies in the Winograd domain.
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
S = A ^ { T } [ [ \mathrm { P r u n e } ( G g G ^ { T } ) ] \odot [ \mathrm { R e L U } ( B ^ { T } d B ) ] ] A
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
In the Winograd-ReLU CNN, we eliminate the spatial-domain kernel entirely. Because this ReLU is really associated with the previous layer, we perform this transformed ReLU starting with the second layer. We point out that the proposed new CNN architecture is not mathematically equivalent to the vanilla CNN nor the conventional Winograd CNN. Due to the change of network architecture, the training and pruning should also be changed. Our method operates in three phases: dense training, pruning, and retraining.
|
| 67 |
+
|
| 68 |
+
Dense training: we train a dense $p \times p$ kernel directly in the transform domain. The transformed kernel is initialized and trained directly by back-propagation through the inverse transform — eliminating the need to maintain a kernel in the spatial domain or to transform a spatial kernel.
|
| 69 |
+
|
| 70 |
+
Pruning: we prune the transformed kernel by computing the threshold $t$ required to achieve a desired pruning rate $r$ and setting all weights whose absolute value less than $t$ to zero. In our experiments, we used the same $r$ for all Winograd-ReLU layers. Because sensitivity varies from layer to layer, we expect that better performance could be achieved by varying the pruning rate $r _ { i }$ for each layer $i$ .
|
| 71 |
+
|
| 72 |
+
Re-training: we re-train the model using a “sparsity mask” to force the weights that were pruned to remain zero. The sparsity mask is computed during the pruning step and is kept constant during re-training. The gradient of the network’s loss, $L$ , with respect to the input activation and Winograd weights can be derived using the chain rule. Equation (5) shows the calculation of input activation gradient $\nabla _ { d } L$ and Winograd weight gradient $\nabla _ { G g G ^ { T } } L$ using the loss gradient passed from upstream layers $\nabla _ { S } L$ .
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array} { r l } & { \nabla _ { G g G ^ { T } } L = ( A \nabla _ { S } L A ^ { T } ) \odot ( B ^ { T } d B ) \odot m a s k } \\ & { \nabla _ { d } L = B [ ( A \nabla _ { S } L A ^ { T } ) \odot ( G g G ^ { T } ) \odot m a s k ] B ^ { T } } \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
# 4 EXPERIMENTS
|
| 79 |
+
|
| 80 |
+
We applied the methodology described above to several different CNNs on different datasets. The original network models are chosen such that the majority of the convolution layers have $3 \times 3$ kernels. This ensures the largest portion of layers can be converted to Winograd convolution layers and ReLU be put in Winograd domain. We used image classification datasets of different scales: CIFAR-10, CIFAR-100 (Krizhevsky & Hinton, 2009) and ImageNet 2012 (Russakovsky et al., 2015). For network architectures, we chose VGG-nagadomi (Nagadomi, 2014), ConvPool-CNN-C model (Springenberg et al., 2015) and a variation of ResNet-18 (He et al., 2016a) respectively on three datasets. Using the Tensorflow (Abadi et al., 2016) framework, we trained the spatial baseline CNN, corresponding conventional Winograd CNN, and Winograd-ReLU CNN models from scratch. Then the three models are iteratively pruned and re-trained. For a specific dataset, we used the same data augmentation for the training of all models on the dataset.
|
| 81 |
+
|
| 82 |
+
# 4.1 CIFAR-10
|
| 83 |
+
|
| 84 |
+
We used VGG-nagadomi (Nagadomi, 2014) on the CIFAR-10 dataset. VGG-nagadomi is a lightweight version of VGGNet (Simonyan & Zisserman, 2015). It contains 8 convolution layers with $3 \times 3$ kernels. The best reported validation set accuracy it achieves on CIFAR-10 is $9 3 . 3 1 \%$ (Nagadomi, 2014). We trained three models from scratch. The corresponding conventional Winograd CNN model and Winograd-ReLU CNN model can achieve validation set accuracy of $9 3 . 3 0 \%$ and $9 3 . 4 3 \%$ respectively. The first convolution layer is most sensitive to pruning and we set its density to a constant of $8 0 \%$ . We iteratively pruned and re-trained other convolution layers with density from $8 0 \%$ down to $2 0 \%$ .
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2: Test accuracy vs density for the three models in Figure 1 on VGG-nagadomi.
|
| 88 |
+
|
| 89 |
+
Figure 2 shows test accuracy as a function of weight density for the three models. The two baseline models can only be pruned to $6 0 \%$ density before accuracy falls significantly $( > ~ 0 . 1 \% )$ . Our Winograd-ReLU CNN model can be pruned to $4 0 \%$ density before falling to the same accuracy.
|
| 90 |
+
|
| 91 |
+
Table 1 shows the input activation density and compares the workloads for each pruned convolution layer in three models. Pruning two baseline models reduces the convolution layer workload by $5 . 1 \times$ and $3 . 7 \times \mathbf { \Omega } ^ { 1 }$ respectively. Pruning the Winograd-ReLU model reduces the convolution layer workload by $1 3 . 3 \times$ , a $2 . 6 \times$ and $3 . 6 \times$ improvement respectively over the two baselines. The improvement of overall network workload reduction is $2 . 2 \times$ and $3 . 0 \times$ respectively over two baselines.
|
| 92 |
+
|
| 93 |
+
Table 1: VGG-nagadomi weight and activation density on CIFAR-10.
|
| 94 |
+
|
| 95 |
+
<table><tr><td rowspan=3 colspan=1>Layer</td><td rowspan=1 colspan=3>Spatial Baseline CNNPruning (Han et al., 2015)</td><td rowspan=1 colspan=3>Winograd CNNNativePruning (Li et al., 2017)</td><td rowspan=1 colspan=3>Winograd-ReLU CNNPruning (ours)</td></tr><tr><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=1>Workload</td><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=1>Workload</td><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=1>Workload</td></tr><tr><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td></tr><tr><td rowspan=1 colspan=1>convo</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>80%</td></tr><tr><td rowspan=1 colspan=1>conv1</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>30%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>46%</td><td rowspan=1 colspan=1>8%</td></tr><tr><td rowspan=1 colspan=1>conv2</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>19%</td><td rowspan=1 colspan=1>12%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>39%</td><td rowspan=1 colspan=1>7%</td></tr><tr><td rowspan=1 colspan=1>conv3</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>37%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>7%</td></tr><tr><td rowspan=1 colspan=1>conv4</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>18%</td><td rowspan=1 colspan=1>11%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>7%</td></tr><tr><td rowspan=1 colspan=1>conv5</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>26%</td><td rowspan=1 colspan=1>15%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>38%</td><td rowspan=1 colspan=1>7%</td></tr><tr><td rowspan=1 colspan=1>conv6</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>24%</td><td rowspan=1 colspan=1>14%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>6%</td></tr><tr><td rowspan=1 colspan=1>conv7</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>21%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>27%</td><td rowspan=1 colspan=1>40%</td><td rowspan=1 colspan=1>36%</td><td rowspan=1 colspan=1>6%</td></tr><tr><td rowspan=1 colspan=1>conv total</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>20%(5.1x)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>27%(3.7x)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>8%(13.3x)</td></tr><tr><td rowspan=1 colspan=1>overall</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>21%(4.7x)</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>29%(3.5x)</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>10%(10.4x)</td></tr></table>
|
| 96 |
+
|
| 97 |
+
# 4.2 CIFAR-100
|
| 98 |
+
|
| 99 |
+
We used the ConvPool-CNN-C (Springenberg et al., 2015) model on on the CIFAR-100 dataset. ConvPool-CNN-C contains 9 convolution layers, out of which 7 have $3 \times 3$ kernels. We trained three models from scratch. The spatial baseline CNN model and conventional Winograd CNN model can achieve single model validation accuracy of $6 9 . 3 4 \%$ and $6 9 . 3 2 \%$ respectively. The corresponding Winograd-ReLU network model can achieve validation set accuracy of $6 9 . 7 5 \%$ . We pruned the first convolution layer to a constant density of $8 0 \%$ . We iteratively pruned and re-trained the other layers to densities from $8 0 \%$ down to $2 0 \%$ .
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 3: Test accuracy vs density for the three models in Figure 1 on ConvPool-CNN-C.
|
| 103 |
+
|
| 104 |
+
Figure 3 shows the accuracy as a function of density for spatial baseline and Winograd-ReLU models. The spatial-baseline and Winograd-ReLU models can be pruned to $6 0 \%$ density without significant $( > 0 . 1 \% )$ loss of accuracy. In contrast, the conventional Winograd CNN model can only be pruned to $7 0 \%$ density. At a given density, the Winograd-ReLU model has the highest accuracy.
|
| 105 |
+
|
| 106 |
+
Table 2: ConvPool-CNN-C weight and activation density on CIFAR-100.
|
| 107 |
+
|
| 108 |
+
<table><tr><td rowspan=3 colspan=1>Layer</td><td rowspan=1 colspan=4>Spatial Baseline CNNPruning (Han et al.,2015)</td><td rowspan=1 colspan=3>Winograd CNNNativePruning (Li et al., 2017)</td><td rowspan=1 colspan=4>Winograd-ReLU CNNPruning (ours)</td></tr><tr><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=2>Workload</td><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=1>Workload</td><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=2>Workload</td></tr><tr><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td></tr><tr><td rowspan=1 colspan=1>conv0</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=2>80%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=2>80%</td></tr><tr><td rowspan=1 colspan=1>conv1</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>53%</td><td rowspan=1 colspan=2>33%</td><td rowspan=1 colspan=1>70%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>31%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>54%</td><td rowspan=1 colspan=2>14%</td></tr><tr><td rowspan=1 colspan=1>conv2</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>52%</td><td rowspan=1 colspan=2>32%</td><td rowspan=1 colspan=1>70%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>31%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>53%</td><td rowspan=1 colspan=2>14%</td></tr><tr><td rowspan=1 colspan=1>conv3</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>77%</td><td rowspan=1 colspan=2>46%</td><td rowspan=1 colspan=1>70%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>31%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>54%</td><td rowspan=1 colspan=2>14%</td></tr><tr><td rowspan=1 colspan=1>conv4</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=2>21%</td><td rowspan=1 colspan=1>70%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>31%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>54%</td><td rowspan=1 colspan=2>14%</td></tr><tr><td rowspan=1 colspan=1>conv5</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>32%</td><td rowspan=1 colspan=2>19%</td><td rowspan=1 colspan=1>70%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>31%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>42%</td><td rowspan=1 colspan=2>11%</td></tr><tr><td rowspan=1 colspan=1>conv6</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>56%</td><td rowspan=1 colspan=2>33%</td><td rowspan=1 colspan=1>70%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>31%</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>43%</td><td rowspan=1 colspan=2>11%</td></tr><tr><td rowspan=1 colspan=1>conv total</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>29%(3.5x)</td><td></td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>31%(3.2x)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>14%(7.1x)</td><td></td></tr><tr><td rowspan=1 colspan=1>overall</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>30%(3.4x)</td><td></td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32%(3.1x)</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>15%(6.8x)</td><td rowspan=1 colspan=1></td></tr></table>
|
| 109 |
+
|
| 110 |
+
Table 2 shows the input activation density and compares the workloads for each pruned convolution layer in three models. Pruning two baseline models reduces the convolution layer workload by $3 . 5 \times$ and $3 . 2 \times$ respectively. Pruning the Winograd-ReLU model reduces the workload by $7 . 1 \times$ , a $2 . 1 \times$ and $2 . 2 \times$ improvement respectively over the two baselines. The improvement of overall network workload reduction is $2 . 0 \times$ and $2 . 2 \times$ respectively over two baselines.
|
| 111 |
+
|
| 112 |
+
# 4.3 IMAGENET
|
| 113 |
+
|
| 114 |
+
We used a variation of the full pre-activation version (He et al., 2016b) of ResNet-18 (He et al., 2016a) on the ImageNet 2012 dataset. We used this version because it performs the best among various ResNet versions and its structure suits our Winograd-ReLU approach – its ReLU units are located before convolutions in the residual modules. The variation is different from original ResNet-18 by replacing all $2 \times 2$ -stride $3 \times 3$ convolution layers with a $2 \times 2$ max-pooling layer followed by a $1 \times 1$ -stride $3 \times 3$ convolution layer. Such difference ensure most of convolution layers can be converted to Winograd convolution layer. Another difference is that it doesn’t have the last max pooling layer so the last group of residual modules has spatial size of $1 4 \times 1 4$ , in order to keep the spatial size even instead of odd. This setting suits Winograd convolution with $p = 4$ best in that even spatial size is required for even $p$ values.
|
| 115 |
+
|
| 116 |
+
We trained three models from scratch. For single model and single central $2 2 4 \times 2 2 4$ cropping, the spatial baseline CNN model and conventional Winograd CNN model can achieve single model top1/top-5 validation accuracy of $6 6 . 6 7 \% / 8 7 . 4 2 \%$ and $6 6 . 8 4 \% / 8 7 . 4 7 \%$ . The corresponding WinogradReLU CNN model can achieve validation top-1/top-5 accuracy of $6 6 . 7 8 \% / 8 7 . 4 3 \%$ . We kept the first convolution layer intact. We iteratively pruned other convolution layers with density rate from $8 0 \%$ down to $1 0 \%$ .
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 4: Top-1 and top-5 validation accuracy vs density for three models on a variation of ResNet-18.
|
| 120 |
+
|
| 121 |
+
Figure 4 shows the accuracy as a function of density for three models. The spatial baseline CNN model and conventional Winograd CNN model can be pruned to $6 0 \%$ and $5 0 \%$ respectively without significant $( > 0 . 1 \% )$ loss of top-1 or top-5 accuracy. The Winograd-ReLU model can be pruned much further, to $3 0 \% / 3 5 \%$ density without significant $( > 0 . 1 \% )$ ) loss of top-1/top-5 accuracy. At these densities, top-1 accuracies are $6 6 . 5 3 \%$ , $6 6 . 4 5 \%$ and $6 6 . 6 1 \%$ for three models respectively, with a dense spatial baseline of $6 6 . 6 7 \%$ ; top-5 accuracies are $8 7 . 2 9 \%$ , $8 7 . 3 0 \%$ and $8 7 . 3 5 \%$ for three models respectively, with a dense spatial baseline of $8 7 . 4 2 \%$ .
|
| 122 |
+
|
| 123 |
+
Table 3 shows the input activation density and compares the workloads for each pruned convolution layer in three models. Pruning the two baseline models reduces the convolution layer workload by $5 . 1 \times$ and $4 . 5 \times$ respectively. Pruning the Winograd-ReLU model reduces the workload by $1 3 . 2 \times$ a $2 . 6 \times$ and $2 . 9 \times$ improvement respectively over the two baselines. The improvement of overall network workload reduction is $2 . 3 \times$ and $2 . 6 \times$ respectively over two baselines.
|
| 124 |
+
|
| 125 |
+
# 5 DISCUSSION
|
| 126 |
+
|
| 127 |
+
In this section, we summarize the experiment results and compare the three models in terms of a) weight and activation dimensions and b) the dynamic density of activations. We then visualize the kernels to illustrate the pattern of the proposed Winograd-ReLU model kernel.
|
| 128 |
+
|
| 129 |
+
Table 3: ResNet-18 variation weight and activation density on ImageNet.
|
| 130 |
+
|
| 131 |
+
<table><tr><td rowspan=3 colspan=1>Layer</td><td rowspan=1 colspan=4>Spatial Baseline CNNPruning (Han et al., 2015)</td><td rowspan=1 colspan=3>Winograd CNNNativePruning (Li et al.,2017)</td><td rowspan=1 colspan=4>Winograd-ReLU CNNPruning (ours)</td></tr><tr><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=2>Workload</td><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=1>Workload</td><td rowspan=1 colspan=2>Density</td><td rowspan=2 colspan=2>Workload</td></tr><tr><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td><td rowspan=1 colspan=1>Weight</td><td rowspan=1 colspan=1>Act</td></tr><tr><td rowspan=1 colspan=1>res2a_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>90%</td><td rowspan=1 colspan=2>54%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>48%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res2a_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>64%</td><td rowspan=1 colspan=2>39%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res2b_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>71%</td><td rowspan=1 colspan=2>43%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res2b_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>53%</td><td rowspan=1 colspan=2>32%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res3a_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>94%</td><td rowspan=1 colspan=2>56%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>49%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res3a_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=2>21%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res3b_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>47%</td><td rowspan=1 colspan=2>28%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>49%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res3b_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>29%</td><td rowspan=1 colspan=2>17%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>49%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res4a_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>88%</td><td rowspan=1 colspan=2>53%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>49%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res4a_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>23%</td><td rowspan=1 colspan=2>14%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res4b_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>36%</td><td rowspan=1 colspan=2>22%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res4b_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>21%</td><td rowspan=1 colspan=2>13%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>49%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res5a_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>45%</td><td rowspan=1 colspan=2>27%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>res5a_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>14%</td><td rowspan=1 colspan=2>9%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>48%</td><td rowspan=1 colspan=2>7%</td></tr><tr><td rowspan=1 colspan=1>res5b_2a</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>16%</td><td rowspan=1 colspan=2>10%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>48%</td><td rowspan=1 colspan=2>7%</td></tr><tr><td rowspan=1 colspan=1>res5b_2b</td><td rowspan=1 colspan=1>60%</td><td rowspan=1 colspan=1>12%</td><td rowspan=1 colspan=2>7%</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>100%</td><td rowspan=1 colspan=1>22%</td><td rowspan=1 colspan=1>35%</td><td rowspan=1 colspan=1>49%</td><td rowspan=1 colspan=2>8%</td></tr><tr><td rowspan=1 colspan=1>conv total</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>20%(5.1x)</td><td></td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>22%(4.5x)</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>8%(13.2x)</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>overall</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>21%(4.7x)</td><td></td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>24%(4.2x)</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>9%(10.8x)</td><td rowspan=1 colspan=1></td></tr></table>
|
| 132 |
+
|
| 133 |
+
# 5.1 WEIGHT AND ACTIVATION DIMENSION
|
| 134 |
+
|
| 135 |
+
In a convolutional neural network, a convolution-ReLU pair acts as a classifier on a spatial patch of an input feature. The dimension of the space being classified is the total number of elements passing through the ReLU layer. The decision boundaries of the classifier are determined by the weights. Insufficient non-zero weights or insufficient activations results in too simple a decision boundary and causes accuracy loss.
|
| 136 |
+
|
| 137 |
+
Experimental results have shown that Winograd-ReLU CNN can reach the same accuracy as both vanilla spatial baseline CNN and conventional Winograd CNN without pruning, and that WinogradReLU CNN is more robust to aggressive pruning. In this subsection we provide an explanation for the latter observation from the aspect of activation and weight dimensions. We provide a summary on dimensions in Table 4.
|
| 138 |
+
|
| 139 |
+
Table 4: Comparison of ReLU dimension and weight dimension in three types of networks. Assume the convolution-ReLU pair operates on input activation of spatial size of $H \times W$ and the number of input and output channels are $C$ and $K$ respectively.
|
| 140 |
+
|
| 141 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>SpatialBaselineCNN (Han et al., 2015)</td><td rowspan=1 colspan=1>Winograd nativeprunedCNN (Li et al., 2017)</td><td rowspan=1 colspan=1>Winograd-ReLUCNN (ours)</td></tr><tr><td rowspan=1 colspan=1>Weightdimension</td><td rowspan=1 colspan=1>KxC×3×3</td><td rowspan=1 colspan=1>KxCxpxp</td><td rowspan=1 colspan=1>KxCxpxp</td></tr><tr><td rowspan=1 colspan=1>ReLUdimension</td><td rowspan=1 colspan=1>HxW×K</td><td rowspan=1 colspan=1>HxW×K</td><td rowspan=1 colspan=1>WxKp-2</td></tr></table>
|
| 142 |
+
|
| 143 |
+
Weight Dimension Increase: Compared to a vanilla $3 \times 3$ CNN, a conventional Winograd CNN uses $( p \times p )$ -dimension Winograd kernels. Training a Winograd CNN from scratch allows higher dimension $( p \times p )$ for Winograd kernels, and a Winograd-ReLU CNN shares these characteristics.
|
| 144 |
+
|
| 145 |
+
ReLU Dimension Increase: A major difference between our Winograd-ReLU CNN and conventional Winograd CNN is that the ReLU layers in Winograd-ReLU CNN have higher dimension. The dimension increase comes from the Winograd transformation extracting $p \times p$ feature patches with $( p - 2 ) \times ( p - 2 )$ strides from $H \times W$ activations. The total number of extracted Winograd-domain activations is $\textstyle { \frac { p } { p - 2 } } H \times { \frac { p } { p - 2 } } W$ , an increase from the spatial domain’s $H \times W$ .
|
| 146 |
+
|
| 147 |
+
We can see that our Winograd-ReLU architecture has an advantage on the dimensions of weights and activations over other two models. This means Winograd-ReLU CNNs classify on a higher dimension with more complex decision boundaries, which forms a stronger representational ability in high dimensional image feature space.
|
| 148 |
+
|
| 149 |
+
# 5.2 DYNAMIC ACTIVATION DENSITY
|
| 150 |
+
|
| 151 |
+
As is shown in the ImageNet results in the previous section, dynamic activation density of spatial baseline CNN model varies significantly among layers. Layers at earlier stages typically have higher density in activation than later stages. In Winograd-ReLU CNN model, the dynamic activation densities vary little among layers and are all close to $5 0 \%$ .
|
| 152 |
+
|
| 153 |
+
An explanation is that the nature of image convolution ensures activations $d$ to be spatially smooth. Thus, due to the structure of matrix $B$ (Lavin, 2015), 15 of 16 elements in the $4 \times 4$ matrix of Winograd-domain activation patch $B ^ { T } \cdot d \cdot B$ have a mean close to zero. This benefits classification within a patch since ReLU layer is most powerful when half of activations are positive.
|
| 154 |
+
|
| 155 |
+
# 5.3 KERNEL VISUALIZATION
|
| 156 |
+
|
| 157 |
+
We visualize the kernels of the proposed Winograd-ReLU model. We selected the first 6 input and output channels of layer res2a_2a of ResNet-18 at three different pruning densities. Unlike spatial domain kernels, Winograd-ReLU kernels do not show clear physical meanings such as edge or corner detectors. However, we observe that values of the $( 2 , 2 )$ elements (from top-left, 1-based indices) in each kernel are typically distinct in a kernel and are most likely kept during aggressive pruning. A possible reason for this is that the $( 2 , 2 )$ elements of Winograd-domain activation in a $4 \times 4$ patch are special: interested readers can calculate $B ^ { T } \cdot d \cdot B$ symbolically and will realize that $( 2 , 2 )$ elements are the only elements that are transformed with a linear combination of only adding and no subtraction. In a spatially smooth activation patch, this means the $( 2 , 2 )$ elements are the ones and the only ones with a non-zero mean.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Figure 5: Kernels of ResNet-18 Winograd-ReLU model res2a_2a layer with density of $1 0 0 \%$ (left, $8 7 . 4 3 \%$ top-5 accuracy), $3 5 \%$ (middle, $8 7 . 3 6 \%$ top-5 accuracy) and $1 5 \%$ (right, $8 6 . 5 7 \%$ top-5 accuracy). Positive, negative and pruned weights are in red, blue and black respectively.
|
| 161 |
+
|
| 162 |
+
# 6 CONCLUSION AND FUTURE WORK
|
| 163 |
+
|
| 164 |
+
We have shown that we can combine the computational savings of sparse weights and activations with the savings of the Winograd transform by making two modifcations to conventional CNNs. To make the weights sparse at the point of multiplication, we train and prune the weights in the transform domain. This simple approach does not reduce the workload with respect to spatial pruning, though, so we move the ReLU non-linear operation after the Winograd transform to make the activations sparse at the point of multiplication. Moving ReLU to the Winograd domain also allows the weights to be more aggressively pruned without losing accuracy. With a $2 \times 2$ output patch $( p = 4 )$ ), the net result is a reduction of $1 0 . 4 \times$ , $6 . 8 \times$ and $1 0 . 8 \times$ in computation on three datasets: CIFAR-10, CIFAR-100 and ImageNet.
|
| 165 |
+
|
| 166 |
+
We plan to extend this work in the following directions. First, we expect that even greater savings on computation can be realized by using larger patch sizes (e.g., $p = 6$ ), and there may be benefit in exploring different Winograd transformation matrices ( $^ { \prime } B , G$ and $A$ ). Second, we expect that using different pruning rates $r _ { i }$ for each network layer will help maintain accuracy and improve overall workload reduction. Finally, we expect that combining our Winograd-ReLU network with other network simplification techniques, e.g. quantization of weights and/or activations (Courbariaux et al., 2015; Lin et al., 2016; Rastegari et al., 2016), will reduce the energy of computation even further.
|
| 167 |
+
|
| 168 |
+
# REFERENCES
|
| 169 |
+
|
| 170 |
+
Martín Abadi et al. Tensorflow: A system for large-scale machine learning. In Proceedings of the 12th USENIX Conference on Operating Systems Design and Implementation (OSDI), 2016.
|
| 171 |
+
|
| 172 |
+
Jorge Albericio, Patrick Judd, Tayler Hetherington, Tor Aamodt, Natalie Enright Jerger, and Andreas Moshovos. Cnvlutin: Ineffectual-neuron-free Deep Neural Network Computing. In Proceedings of the 43rd International Symposium on Computer Architecture (ISCA), 2016.
|
| 173 |
+
|
| 174 |
+
Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cuDNN: Efficient primitives for deep learning. CoRR, abs/1410.0759, 2014. URL http://arxiv.org/abs/1410.0759.
|
| 175 |
+
|
| 176 |
+
Jason Cong and Bingjun Xiao. Minimizing computation in convolutional neural networks. In International Conference on Artificial Neural Networks (ICANN), pp. 281–290. Springer, 2014.
|
| 177 |
+
|
| 178 |
+
Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in neural information processing systems (NIPS), 2015.
|
| 179 |
+
|
| 180 |
+
Song Han, Jeff Pool, John Tran, and William J. Dally. Learning both weights and connections for efficient neural networks. In Advances in neural information processing systems (NIPS), 2015.
|
| 181 |
+
|
| 182 |
+
Song Han, Xingyu Liu, Huizi Mao, Jing Pu, Ardavan Pedram, Mark A. Horowitz, and William J. Dally. EIE: Efficient inference engine on compressed deep neural network. In Proceedings of the 43rd International Symposium on Computer Architecture (ISCA), 2016a.
|
| 183 |
+
|
| 184 |
+
Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In International Conference on Learning Representations (ICLR), 2016b.
|
| 185 |
+
|
| 186 |
+
Babak Hassibi, David G Stork, et al. Second order derivatives for network pruning: Optimal brain surgeon. Advances in Neural Information Processing Systems (NIPS), pp. 164–164, 1993.
|
| 187 |
+
|
| 188 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016a.
|
| 189 |
+
|
| 190 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision (ECCV), pp. 630–645. Springer, 2016b.
|
| 191 |
+
|
| 192 |
+
Yuxiang Huan, Yifan Qin, Yantian You, Lirong Zheng, and Zhuo Zou. A multiplication reduction technique with near-zero approximation for embedded learning in IoT devices. In System-on-Chip Conference (SOCC), 29th IEEE International, pp. 102–107. IEEE, 2016.
|
| 193 |
+
|
| 194 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 195 |
+
|
| 196 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems (NIPS), 2012.
|
| 197 |
+
|
| 198 |
+
Andrew Lavin. Fast algorithms for convolutional neural networks. CoRR, abs/1509.09308, 2015. URL http://arxiv.org/abs/1509.09308.
|
| 199 |
+
|
| 200 |
+
Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In Advances in neural information processing systems (NIPS), pp. 598–605, 1990.
|
| 201 |
+
|
| 202 |
+
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.
|
| 203 |
+
|
| 204 |
+
Sheng R. Li, Jongsoo Park, and Ping Tak Peter Tang. Enabling sparse Winograd convolution by native pruning. CoRR, abs/1702.08597, 2017. URL http://arxiv.org/abs/1702.08597.
|
| 205 |
+
|
| 206 |
+
Zhouhan Lin, Matthieu Courbariaux, Roland Memisevic, and Yoshua Bengio. Neural networks with few multiplications. In Proceedings of International Conference on Learning Representations (ICLR), 2016.
|
| 207 |
+
|
| 208 |
+
Xingyu Liu, Song Han, Huizi Mao, and William J. Dally. Efficient sparse-winograd convolutional neural networks. International Conference on Learning Representations (ICLR) Workshop, 2017.
|
| 209 |
+
|
| 210 |
+
Nagadomi. Code for kaggle-cifar10 competition. 5th place. https://github.com/ nagadomi/kaggle-cifar10-torch7, 2014.
|
| 211 |
+
|
| 212 |
+
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. XNOR-Net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision (ECCV), 2016.
|
| 213 |
+
|
| 214 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 2015.
|
| 215 |
+
|
| 216 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Proceedings of International Conference on Learning Representations (ICLR), 2015.
|
| 217 |
+
|
| 218 |
+
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. International Conference on Learning Representations (ICLR) Workshop, 2015.
|
| 219 |
+
|
| 220 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1–9, June 2015.
|
| 221 |
+
|
| 222 |
+
Shmuel Winograd. Arithmetic complexity of computations, volume 33. Siam, 1980.
|
md/train/Hk4fpoA5Km/Hk4fpoA5Km.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DISCRIMINATOR-ACTOR-CRITIC:ADDRESSING SAMPLE INEFFICIENCY AND REWARDBIAS IN ADVERSARIAL IMITATION LEARNING
|
| 2 |
+
|
| 3 |
+
Ilya Kostrikov1,2,\*, Kumar Krishna Agrawal2, †, Debidatta Dwibedi2, †, Sergey Levine2, and Jonathan Tompson2
|
| 4 |
+
|
| 5 |
+
1Courant Institute of Mathematical Sciences, New York University, New York, NY 2Google Brain, Mountain View, CA
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Algorithms for imitation learning based on adversarial optimization, such as generative adversarial imitation learning (GAIL) and adversarial inverse reinforcement learning (AIRL), can effectively mimic demonstrated behaviours by employing both reward and reinforcement learning (RL). However, applications of such algorithms are challenged by the inherent instability and poor sample efficiency of on-policy RL. In particular, the inadequate handling of absorbing states in canonical implementations of RL environments causes an implicit bias in reward functions used by these algorithms. While these biases might work well for some environments, they lead to sub-optimal behaviors in others. Moreover, despite the ability of these algorithms to learn from a few demonstrations, they require a prohibitively large number of the environment interactions for many real-world applications. To address these issues, we first propose to extend the environment MDP with absorbing states which leads to task-independent, and more importantly, unbiased rewards. Secondly, we introduce an off-policy learning algorithm, which we refer to as Discriminator-Actor-Critic. We demonstrate the effectiveness of proper handling of absorbing states, while empirically improving the sample efficiency by an average factor of 10. Our implementation is available online 1.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
The Adversarial Imitation Learning (AIL) class of algorithms learns a policy that robustly imitates an expert’s actions via a collection of expert demonstrations, an adversarial discriminator and a reinforcement learning method. For example, the Generative Adversarial Imitation Learning (GAIL) algorithm (Ho & Ermon, 2016) uses a discriminator reward and a policy gradient algorithm to imitate an expert RL policy. Similarly, the Adversarial Inverse Reinforcement Learning (AIRL) algorithm (Fu et al., 2017) makes use of a modified GAIL discriminator to recover a reward function to perform Inverse Reinforcement Learning (IRL) (Abbeel & Ng, 2004). Additionally, this subsequent dense reward is robust to changes in dynamics or environment properties. Importantly, AIL algorithms such as GAIL and AIRL, obtain higher performance than supervised Behavioral Cloning (BC) when using a small number of expert demonstrations; experimentally suggesting that AIL algorithms alleviate some of the distributional drift (Ross et al., 2011) issues associated with BC. However, these AIL methods suffer from two important issues that will be addressed by this work: 1) a large number of policy interactions with the learning environment is required for policy convergence and 2) although in principle these methods can learn rewards for absorbing states, the original implementations suffer from improper handling of the environment terminal states. This introduces implicit rewards priors which can either improve or degrade policy performance.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: The Discriminator-Actor-Critic imitation learning framework combined with a method to explicitly learn rewards for the absorbing states.
|
| 17 |
+
|
| 18 |
+
While GAIL requires as little as 200 expert frame transitions (from 4 expert trajectories) to learn a robust reward function on most MuJoCo (Todorov et al., 2012) tasks, the number of policy frame transitions sampled from the environment can be as high as 25 million in order to reach convergence. If PPO (Schulman et al., 2017) is used in place of TRPO (Schulman et al., 2015), the sample complexity can be improved (for example, as in Figure 3, 25 million steps reduces to approximately 10 million steps), however it is still intractable for many robotics or real-world applications. In this work we address this issue by incorporating an off-policy RL algorithm (TD3 (Fujimoto et al., 2018)) and an off-policy discriminator to dramatically decrease the sample complexity by orders of magnitude.
|
| 19 |
+
|
| 20 |
+
In this work, we also illustrate how specific design choices for AIL algorithms and MDPs used in practice, have a large impact on agent performance for environments with absorbing states. For instance, as we will demonstrate, if the implementation assigns zero rewards for absorbing states, a strictly positive reward function can prevent the agent from solving tasks with a minimal number of steps, while a strictly negative reward function is unable to emulate a survival bonus. Therefore, one must have some knowledge of the true environment reward and incorporate such priors to choose a suitable reward function for successful application of GAIL and AIRL. We will discuss these issues formally, and present a simple - yet effective - solution that drastically improves policy performance for environments with absorbing states; we explicitly handle absorbing state transitions by learning the reward associated with these states.
|
| 21 |
+
|
| 22 |
+
First we propose a new algorithm, which we call Discriminator-Actor-Critic (DAC) (Figure 1), that is compatible with the GAIL and AIRL frameworks by extending them with an off-policy discriminator and an off-policy actor-critic reinforcement learning algorithm. Then we propose a general approach to handling absorbing states in inverse reinforcement learning and reward learning methods. We experimentally demonstrate that this removes the bias due to incorrect absorbing state handling in both GAIL-like and AIRL-like variants of our DAC algorithm. In our experiments, we demonstrate that DAC achieves state-of-the-art AIL performance for a number of difficult imitation learning tasks, where proper handling of terminal states is crucial for matching expert performance in the presence of absorbing states. More specifically, in this work we:
|
| 23 |
+
|
| 24 |
+
• Identify, and propose solutions for the problem of handling terminal states of policy rollouts in standard RL benchmarks in the context of AIL algorithms. • Accelerate learning from demonstrations by providing an off-policy variant for AIL algorithms, which significantly reduces the number of agent-environment interactions. • Illustrate the robustness of DAC to noisy, multi-modal and constrained expert demonstrations, by performing experiments with human demonstrations on non-trivial robotic tasks.
|
| 25 |
+
|
| 26 |
+
# 2 RELATED WORK
|
| 27 |
+
|
| 28 |
+
Imitation learning has been broadly studied under the twin umbrellas of Behavioral Cloning (BC) (Bain & Sommut, 1999; Ross et al., 2011) and Inverse Reinforcement Learning (IRL) (Ng & Russell, 2000). To recover the underlying policy, IRL performs an intermediate step of estimating the reward function followed by RL on this function (Abbeel & Ng, 2004; Ratliff et al., 2006). Operating in the Maximum Entropy IRL formulation (Ziebart et al., 2008), Finn et al. (2016b) introduce an iterativesampling based estimator for the partition function, deriving an algorithm for recovering non-linear reward functions in high-dimensional state and action spaces. Finn et al. (2016a) and $\mathrm { F u }$ et al.
|
| 29 |
+
|
| 30 |
+
(2017) further extend this by exploring the theoretical and practical considerations of an adversarial IRL framework, and draw connections between IRL and cost learning in GANs (Goodfellow et al., 2014).
|
| 31 |
+
|
| 32 |
+
In practical scenarios, we are often interested in recovering the expert’s policy, rather than the reward function. Following Syed et al. (2008), and by treating imitation learning as an occupancy matching problem, Ho & Ermon (2016) proposed a Generative Adversarial Imitation Learning (GAIL) framework for learning a policy from demonstrations, which bypasses the need to recover the expert’s reward function. More recent work extends the framework by improving on stability and robustness (Wang et al., 2017; Kim & Park, 2018) and making connections to model-based imitation learning (Baram et al., 2017). These approaches generally use on-policy algorithms for policy optimization, trading off sample efficiency for training stability.
|
| 33 |
+
|
| 34 |
+
Learning complex behaviors from sparse reward signals poses a significant challenge in reinforcement learning. In this context, expert demonstrations or template trajectories have been successfully used (Peters & Schaal, 2008) for initializing RL policies. There has been a growing interest in combining extrinsic sparse reward signals with imitation learning for guided exploration (Zhu et al., 2018; Kang et al., 2018; Le et al., 2018; Vecer´ık et al., 2017). Off policy learning from demonstration has been previously studied under the umbrella of accelerating reinforcement learning by structured exploration (Nair et al., 2017; Hester et al., 2017) An implicit assumption of these approaches is access to demonstrations and reward from the environment; our approach requires access only to expert demonstrations.
|
| 35 |
+
|
| 36 |
+
Biases associated with specific MDP benchmarks also arise in the standard RL setup. In particular, Pardo et al. (2017) and Tucker et al. (2018) discuss handling of time limits in RL specifically with MDPs where time limits make the problems non-Markovian and might affect optimality of the training policy and value function estimation. The problem with the biases associated with episode terminations also prove to be severe for AIL algorithms because for specific RL benchmarks the absorbing states might not even be adequately taken into consideration. We discuss this in more detail in Section 4.1.
|
| 37 |
+
|
| 38 |
+
Our work is most related to AIL algorithms (Ho & Ermon, 2016; Fu et al., 2017; Torabi et al., 2018). In contrast to Ho & Ermon (2016) which assumes (state-action-state’) transition tuples, Torabi et al. (2018) has weaker assumptions, by relying only on observations and removing the dependency on actions. The contributions in this work are complementary (and compatible) to Torabi et al. (2018).
|
| 39 |
+
|
| 40 |
+
Concurrent to our work, several other papers introduced algorithms for sample efficient imitation learning. Blonde & Kalousis (2018) introduced Sample-efficient Adversarial Mimic (SAM) algo- ´ rithm that combines Deep Deterministic Policy Gradients (DDPG) from Lillicrap et al. (2015) with GAIL. While Reddy et al. (2019) and Sasaki et al. (2019) proposed imitation learning algorithms based on off-policy reinforcement learning that does not require to learn rewards.
|
| 41 |
+
|
| 42 |
+
# 3 BACKGROUND
|
| 43 |
+
|
| 44 |
+
# 3.1 MARKOV DECISION PROCESS
|
| 45 |
+
|
| 46 |
+
We consider problems that satisfy the definition of a Markov Decision Process (MDP), formalized by the tuple: $( \bar { S ^ { , } } A , p ( s ) , p ( s ^ { \prime } \vert s , a ) , r ( s , a , s ^ { \prime } ) , \gamma )$ . Here $s$ , $\mathcal { A }$ represent the state and action spaces respectively, $p ( s )$ is the initial state distribution, $p ( s ^ { \prime } | s , a )$ defines environment dynamics represented as a conditional state distribution, $r ( s , a , s ^ { \prime } )$ is reward function and $\gamma$ the return discount factor.
|
| 47 |
+
|
| 48 |
+
In continuing tfor a trajectory $\tau = \{ ( s _ { t } , a _ { t } ) \} _ { t = 0 } ^ { \infty }$ nment interactio, are defined as $\begin{array} { r } { R _ { t } = \sum _ { k = t } ^ { \infty } \gamma ^ { k - t } r \bigl ( s _ { k } , \dot { a } _ { k } , s _ { k + 1 } \bigr ) } \end{array}$ ngth, the returns. In order to use the same notation for tasks with absorbing states, whose finite length episodes end when reaching a terminal state, we can define a set of absorbing states $s _ { a }$ (Sutton et al., 1998) that an agent enters after the end of episode, has zero reward and transitions to itself for all agent actions: $s _ { a } \sim p ( \cdot | s _ { T } , a _ { T } )$ , can be defined simply as learn a policy that maxim $r ( s _ { a } , \cdot , \cdot ) = 0$ and $s _ { a } \sim p ( \cdot | s _ { a } , \cdot )$ $\begin{array} { r } { R _ { t } = \sum _ { k = t } ^ { T } \gamma ^ { k - t } r \big ( s _ { k } , a _ { k } , s _ { k + 1 } \big ) } \end{array}$ (see Figure 2). With this above absorbing state notation, returns . In reinforcement learning, the goal is to
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2: We depict an episode of MDP with an absorbing state. The absorbing state transitions to itself with zero reward.
|
| 52 |
+
|
| 53 |
+
In many imitation learning and IRL algorithms a common assumption is to assign zero reward value, often implicitly, to absorbing states. Moreover, standard benchmark MDPs, such as the tasks in OpenAI Gym, omit absorbing states and corresponding transitions from rollouts. Under this omission and a de-facto reward of 0 to absorbing states, the standard AIL algorithms do not have access to absorbing states in the buffer, which biases the reward learning process. We propose a modification that enables our DAC algorithm to assign a learned, potentially non-zero, reward for absorbing states. We discuss this in detail in Section 4.1, and demonstrate empirically in Section 5.2 that it is extremely important to properly handle the absorbing states for algorithms where rewards are learned.
|
| 54 |
+
|
| 55 |
+
Considering the implications of adequate handling of terminal states, it is worth mentioning that practical implementations of MDP benchmarks terminate episodes after a specific number of steps. We refer to this as time dependent termination, which makes the tasks non-Markovian, since the returns are now time-dependent as observed in Pardo et al. (2017), Tucker et al. (2018). These works propose to fix this problem by using a time-dependent value function, or by bootstrapping after the terminal state instead of masking the returns, which can be achieved using an algorithm that incorporates value function learning (Fujimoto et al., 2018). Because our solution is derived for infinite horizon problems, we do not treat states that occur after time-dependent termination as absorbing states and assume that after explicitly adding absorbing states and transitions all tasks have infinite horizon (for example, see Figure 2). For this reason, in our implementation we use the latter approach and perform bootstrapping for the terminal states (for elaborate discussion on time limits in MDPs, we refer the reader to Pardo et al. (2017)).
|
| 56 |
+
|
| 57 |
+
# 3.2 ADVERSARIAL IMITATION LEARNING
|
| 58 |
+
|
| 59 |
+
In order to learn a robust reward function we use the GAIL framework (Ho & Ermon, 2016). Inspired by maximum entropy IRL (Ziebart et al., 2008) and Generative Adversarial Networks (GANs) (Goodfellow et al., 2014), GAIL trains a binary classifier, $D ( s , a )$ , referred to as the discriminator, to distinguish between transitions sampled from an expert and those generated by the trained policy. In standard GAN frameworks, a generator gradient is calculated by backprop through the learned discriminator. However, in GAIL the policy is instead provided a reward for confusing the discriminator, which is then maximized via some on-policy RL optimization scheme (e.g. TRPO (Schulman et al., 2015)):
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\operatorname* { m i n } _ { \pi } \operatorname* { m a x } _ { D } \mathbb { E } _ { \pi } [ \log ( D ( s , a ) ) ] + \mathbb { E } _ { \pi _ { E } } [ \log ( 1 - D ( s , a ) ) ] - \lambda H ( \pi )
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $H ( \pi )$ is an entropy regularization term and $\pi _ { E }$ is a policy provided by an expert.
|
| 66 |
+
|
| 67 |
+
The rewards learned by GAIL might not correspond to a true reward ( $\mathrm { F u }$ et al., 2017) but can be used to match the expert occupancy measure, which is defined as $\begin{array} { r } { \rho _ { \pi _ { E } } ( s , a ) = \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } p ( s _ { t } = } \end{array}$ $s , a _ { t } = a | \pi _ { E } )$ ). Ho & Ermon (2016) draw analogies between distribution matching using GANs and occupancy matching with GAIL. They demonstrate that by maximizing the above reward, the algorithm matches occupancy measures of the expert and trained policies with some regularization term defined by the choice of GAN loss function.
|
| 68 |
+
|
| 69 |
+
In principle, GAIL can be incorporated with any on-policy RL algorithm. However, in this work we adapt it for off-policy training (discussed in Section 4.3). As can be seen from Equation 1, the algorithm requires state-action pairs to be sampled from the learned policy. In Section 4.3 we will discuss what modifications are necessary to adapt the algorithm to off-policy training.
|
| 70 |
+
|
| 71 |
+
# 4 DISCRIMINATOR-ACTOR-CRITIC
|
| 72 |
+
|
| 73 |
+
In this section we first elaborate on specific instances of biased rewards in AIL algorithms due to insufficient handling of terminal states. Following that in Section 4.2, we present an approach for unbiasing rewards for existing AIL algorithms. Then, we derive an off-policy formulation of AIL in Section 4.3, which we name Discriminator-Actor-Critic (DAC). A high level pictorial representation of this algorithm is shown in Figure 1, and it is formally summarized in Appendix A.
|
| 74 |
+
|
| 75 |
+
# 4.1 BIAS IN REWARDS
|
| 76 |
+
|
| 77 |
+
In the following section, we present examples of bias present in implementations of different AIL algorithms as they assign zero rewards to absorbing states:
|
| 78 |
+
|
| 79 |
+
• Absorbing states in MDPs: In the GAIL framework (and follow-up methods, such as GMMIL (Kim & Park, 2018), OptionGAN (Henderson et al., 2017a), AIRL and the widely used implementation of GAIL from OpenAI Baselines (Dhariwal et al., 2017)), for some benchmarks such as MuJoCo locomotion tasks from OpenAI Gym, a reward function $r ( s , a )$ assigns rewards to intermediate states depending on properties of a task. At the same time, policies executed on these MDPs generate rollouts that ignore absorbing states. Subsequently, the algorithms do not have access to these absorbing states in the buffer, cannot learn proper rewards, and therefore do not perform bootstrapping after terminal states; thus, 0 reward is implicitly assigned for absorbing states. For certain environments, a survival bonus in the form of per-step positive reward is added to the rewards received by the agent. This encourages agents to survive longer in the environment to collect more rewards. We observe that a commonly used form of the reward function: $r ( s , a ) = - \log ( 1 - D ( s , a ) )$ has worked well for environments that require a survival bonus. Under the implicit assumption of zero rewards for absorbing states in the MDP implementation, this strictly positive estimator cannot recover the true reward function for environments where an agent is required to solve the task as quickly as possible. Using this form of the reward function will lead to sub-optimal solutions. The agent is now incentivized to move in loops or take small actions (in continuous action spaces) that keep it close to the states in the expert’s trajectories. The agent keeps collecting positive rewards without actually attempting to solve the task demonstrated by the expert.2 Another reward formulation is $r ( s , a ) = \log ( D ( s , a ) )$ . This is often used for tasks with a per step penalty, when a part of a reward function consists of a negative constant assigned unconditionally of states and actions. However, this variant assigns only negative rewards and cannot learn a survival bonus. Such strong priors might lead to good results even with no expert trajectories (as shown in Figure 4).
|
| 80 |
+
|
| 81 |
+
From an end-user’s perspective, it is undesirable to have to craft a different reward function for every new task. In the next section, we propose a method to handle absorbing states of the standard benchmark MDPs in such a way that AIL algorithms are able to recover different reward functions without adjusting the form of reward estimator.
|
| 82 |
+
|
| 83 |
+
# 4.2 UNBIASING REWARDS
|
| 84 |
+
|
| 85 |
+
In order to resolve the issues described in Section 4.1, we suggest explicitly learning rewards for absorbing states for expert demonstrations and trajectories produced by a policy. Thus, the returns episode that consists o with a learned reward $T$ nsitions are defiinstead of just $R _ { T } = r ( s _ { T } , a _ { T } ) \ : +$ $\scriptstyle \sum _ { t = T + 1 } ^ { \infty } \gamma ^ { t - T } r ( s _ { a } , \cdot )$ $r ( s _ { a } , \cdot )$ $R _ { T } = r ( s _ { T } , a _ { T } )$ used due to issues described in Section 4.2. This formulation allows the algorithms to correctly estimate returns for the final transitions and optimize the policy accordingly.
|
| 86 |
+
|
| 87 |
+
In order to enable the AIL algorithms to learn the rewards for absorbing states and RL algorithms to take into account learned rewards, we suggest to update rollouts sampled from MDPs in the following way. After terminating an episode, we explicitly add a transition from the terminal state of the episode to an absorbing state $\left( { { s _ { T } } , { s _ { a } } } \right)$ and a transition from an absorbing state to itself $( s _ { a } , s _ { a } )$ .
|
| 88 |
+
|
| 89 |
+
Thus, when sample from the replay buffer AIL algorithms will be able to see absorbing states there were previous hidden, while RL algorithms will be able to properly estimate values for terminal states using transitions $\left( { { s _ { T } } , { s _ { a } } } \right)$ and $( s _ { a } , s _ { a } )$ using the following recursions:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\begin{array} { c } { { Q ( s _ { T } , a ) = r ( s _ { T } , a ) + \gamma Q ( s _ { a } , \cdot ) } } \\ { { Q ( s _ { a } , \cdot ) = r ( s _ { a } , \cdot ) + \gamma Q ( s _ { a } , \cdot ) } } \end{array}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
We implemented these absorbing states by adding an extra indicator dimension that indicates whether the state is absorbing or not, for absorbing states we set the indicator dimension to one and all other dimensions to zero. The GAIL discriminator can distinguish whether reaching an absorbing state is a desirable behavior from the expert’s perspective and assign the rewards accordingly.
|
| 96 |
+
|
| 97 |
+
# 4.3 ADDRESSING SAMPLE INEFFICIENCY
|
| 98 |
+
|
| 99 |
+
As previously mentioned, GAIL requires a significant number of interactions with a learning environment in order to imitate an expert policy. To address the sample inefficiency of GAIL, we use an off-policy RL algorithm and perform off-policy training of the GAIL discriminator performed in the following way: instead of sampling trajectories from a policy directly, we sample transitions from a replay buffer $\mathcal { R }$ collected while performing off-policy training:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\operatorname* { m a x } _ { D } \mathbb { E } _ { \mathcal { R } } [ \log ( D ( s , a ) ) ] + \mathbb { E } _ { \pi _ { E } } [ \log ( 1 - D ( s , a ) ) ] - \lambda H ( \pi ) .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Equation 2 tries to match the occupancy measures between the expert and the distribution induced by the replay buffer $\mathcal { R }$ , which can be seen as a mixture of all policy distributions that appeared during training, instead of the latest trained policy $\pi$ . In order to recover the original on-policy expectation, one needs to use importance sampling:
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\operatorname* { m a x } _ { D } \mathbb { E } _ { \mathcal { R } } \left[ \frac { p _ { \pi _ { \theta } } ( s , a ) } { p _ { \mathcal { R } } ( s , a ) } \log ( D ( s , a ) ) \right] + \mathbb { E } _ { \pi _ { E } } [ \log ( 1 - D ( s , a ) ) ] - \lambda H ( \pi ) .
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
However, it can be challenging to properly estimate these densities and the discriminator updates might have large variance. We found that the algorithm works well in practice with the importance weight omitted.
|
| 112 |
+
|
| 113 |
+
We use the GAIL discriminator in order to define rewards for training a policy using TD3; we update per-step rewards every time when we pull transitions from the replay buffer using the latest discriminator. The TD3 algorithm provides a good balance between sample complexity and simplicity of implementation and so is a good candidate for practical applications. Additionally, depending on the distribution of expert demonstrations and properties of the task, off-policy RL algorithms can effectively handle multi-modal action distributions; for example, this can be achieved for the Soft Actor Critic algorithm (Haarnoja et al., 2018b) using the reparametrization trick (Kingma & Ba, 2014) with a normalizing flow (Rezende & Mohamed, 2015) as described in Haarnoja et al. (2018a).
|
| 114 |
+
|
| 115 |
+
# 5 EXPERIMENTS
|
| 116 |
+
|
| 117 |
+
We implemented the DAC algorithm described in Section 4.3 using TensorFlow Eager (Abadi et al., 2015) and we evaluated it on popular benchmarks for continuous control simulated in MuJoCo (Todorov et al., 2012). We also define a new set of robotic continuous control tasks (described in detail below) simulated in PyBullet (Coumans & Bai, 2016), and a Virtual Reality (VR) system for capturing human examples in this environment; human examples constitute a particularly challenging demonstration source due to their noisy, multi-modal and potentially sub-optimal nature, and we define multi-task environments as a challenging setup for adversarial imitation learning.
|
| 118 |
+
|
| 119 |
+
For the critic and policy networks we used the same architecture as in Fujimoto et al. (2018): a 2 layer MLP with ReLU activations and 400 and 300 hidden units correspondingly. We also add gradient clipping (Pascanu et al., 2013) to the actor network with clipping value of 40. For the discriminator we used the same architecture as in Ho & Ermon (2016): a 2 layer MLP with 100 hidden units and tanh activations. We trained all networks with the Adam optimizer (Kingma & Ba, 2014) and decay learning rate by starting with initial learning rate of $1 0 ^ { - 3 }$ and decaying it by 0.5 every $1 0 ^ { 5 }$ training steps for the actor network.
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 3: Comparisons of algorithms using 4 expert demonstrations. y-axis corresponds to normalized reward (0 corresponds to a random policy, while 1 corresponds to an expert policy).
|
| 123 |
+
|
| 124 |
+
In order to make the algorithm more stable, especially in the off-policy regime when the discriminator can easily over-fit to training data, we use regularization in the form of gradient penalties (Gulrajani et al., 2017) for the discriminator. Originally, this was introduced as an alternative to weight clipping for Wasserstein GANs (Arjovsky et al., 2017), but later it was shown that it helps to make JS-based GANs more stable as well (Lucic et al., 2017).
|
| 125 |
+
|
| 126 |
+
We replicate the experimental setup of Ho & Ermon (2016): expert trajectories are sub-sampled by retaining every 20 time steps starting with a random offset (and fixed stride). It is worth mentioning that, as in Ho & Ermon (2016), this procedure is done in order to make the imitation learning task harder. With full trajectories, behavioral cloning provides competitive results to GAIL.
|
| 127 |
+
|
| 128 |
+
Following Henderson et al. (2017b) and Fujimoto et al. (2018), we perform evaluation using 10 different random seeds. For each seed, we compute average episode reward using 10 episodes and running the policy without random noise. As in Ho & Ermon (2016) we plot reward normalized in such a way that zero corresponds to a random reward while one corresponds to expert rewards. We compute mean over all seeds and visualize half standard deviations. In order to produce the same evaluation for GAIL we used the original implementation3 of the algorithm.
|
| 129 |
+
|
| 130 |
+
# 5.1 OFF POLICY DAC ALGORITHM
|
| 131 |
+
|
| 132 |
+
Evaluation results of the DAC algorithm on a suite of MuJoCo tasks are shown in Figure 3, as are the GAIL (TRPO) and BC basline results. In the top-left plot, we show DAC is an order of magnitude more sample efficent than then TRPO and PPO based GAIL baselines. In the other plots, we show that by using a significantly smaller number of environment steps (orders of magnitude fewer), our DAC algorithm reaches comparable expected reward as the GAIL baseline. Furthermore, DAC outperforms the GAIL baseline on all environments within a 1 million step threshold. We obtained slightly worse results for Walker2d. However, as mentioned earlier, GAIL uses a reward function that already has some biases encoded in it that aids training on this specific environment. A comprehensive suit of results can be found in Appendix B, Figure 7.
|
| 133 |
+
|
| 134 |
+
# 5.2 REWARD BIAS
|
| 135 |
+
|
| 136 |
+
As discussed in Section 4.1, the reward function variants used with GAIL can have implicit biases when used without handling absorbing states. Figure 4 demonstrates how bias affects results on an environment with survival bonus when using the reward function of Ho & Ermon (2016): $r ( s , a ) =$ $- \log ( 1 - D ( s , a ) )$ . Surprisingly, when using a fixed and untrained GAIL discriminator that outputs 0.5 for every state-action pair, we were able to reach episode rewards of around 1000 on the Hopper environment, corresponding to approximately one third of the expert performance. Without any reward learning, and using no expert demonstrations, the agent can learn a policy that outperforms behavioral cloning (Figure 4). Therefore, the choice of a specific reward function might already provide strong prior knowledge that helps the RL algorithm to move towards recovering the expert policy, irrespective of the quality of the learned reward.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
|
| 140 |
+

|
| 141 |
+
Figure 4: Even without training, some reward functions can perform well on some tasks.
|
| 142 |
+
Figure 5: Effect of absorbing state handling on Kuka environments. For these environments, we use human demonstrations as expert trajectories, and GAIL framework with a positive reward function.
|
| 143 |
+
|
| 144 |
+
Additionally, we evaluated our method on two environments with per-step penalty (see Figure 5). These environment are simulated in PyBullet and consist of a Kuka IIWA arm and 3 blocks on a virtual table. A rendering of the environment can be found in Appendix C, Figure 8. Using a Cartesian displacement action for the gripper end-effector and a compact observation-space (consisting of each block’s 6DOF pose and the Kuka’s end-effector pose), the agent must either a) reach one of the 3 blocks in the shortest number of frames possible (the target block is provided to the policy as a one-hot vector), which we call Kuka-Reach, or b) push one block along the table so that it is adjacent to another block, which we call Kuka-PushNext. For evaluation, we define a sparse reward indicating successful task completion (within some threshold). For these imitation learning experiments, we use human demonstrations collected with a VR setup, where the participant wears a VR headset and controls in real-time the gripper end-effector using a 6DOF controller.
|
| 145 |
+
|
| 146 |
+
Using the reward defined as $r ( s , a ) = - l o g ( 1 - D ( s , a ) )$ and without absorbing state handling, the agent completely fails to recover the expert policy given 600 expert trajectories without subsampling (as shown in Figure 4). In contrast, our DAC algorithm quickly learns to imitate the expert, despite using noisy and potentially sub-optimal human demonstrations.
|
| 147 |
+
|
| 148 |
+
As discussed, alternative reward functions do not have this positive bias but still require proper handling of the absorbing states as well in order to avoid early termination due to incorrectly assigned per-frame penalty. Figure 6 illustrates results for AIRL with and without learning rewards for absorbing states. For these experiments we use the discriminator structure from $\mathrm { F u }$ et al. (2017) in combination with the TD3 algorithm.
|
| 149 |
+
|
| 150 |
+
# 6 CONCLUSION
|
| 151 |
+
|
| 152 |
+
In this work we address several important issues associated with the popular GAIL framework. In particular, we address 1) sample inefficiency with respect to policy transitions in the environment and 2) we demonstrate a number of reward biases that can either implicitly impose prior knowledge about the true reward, or alternatively, prevent the policy from imitating the optimal expert. To address reward bias, we propose a simple mechanism whereby the rewards for absorbing states are also learned, which negates the need to hand-craft a discriminator reward function for the properties of the task at hand. In order to improve sample efficiency, we perform off-policy training of the discriminator and use an off-policy RL algorithm. We show that our algorithm reaches state-of-theart performance for an imitation learning algorithm on several standard RL benchmarks, and is able to recover the expert policy given a significantly smaller number of samples than in recent GAIL work.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 6: Effect of learning absorbing state rewards when using an AIRL discriminator within the DAC Framework in OpenAI Gym environments.
|
| 156 |
+
|
| 157 |
+
# ACKNOWLEDGMENTS
|
| 158 |
+
|
| 159 |
+
We would like to thank Justin Fu and the ICLR Reproducibility Workshop team for insightful discussions and feedback.
|
| 160 |
+
|
| 161 |
+
# REFERENCES
|
| 162 |
+
|
| 163 |
+
Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris ´ Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wat- ´ tenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL https://www.tensorflow.org/. Software available from tensorflow.org.
|
| 164 |
+
|
| 165 |
+
Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, pp. 1. ACM, 2004.
|
| 166 |
+
|
| 167 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 168 |
+
|
| 169 |
+
Michael Bain and Claude Sommut. A framework for behavioural cloning. Machine intelligence, 15 (15):103, 1999.
|
| 170 |
+
|
| 171 |
+
Nir Baram, Oron Anschel, Itai Caspi, and Shie Mannor. End-to-end differentiable adversarial imitation learning. In International Conference on Machine Learning, pp. 390–399, 2017.
|
| 172 |
+
|
| 173 |
+
Lionel Blonde and Alexandros Kalousis. Sample-efficient imitation learning via generative adver- ´ sarial nets. arXiv preprint arXiv:1809.02064, 2018.
|
| 174 |
+
|
| 175 |
+
E Coumans and Y Bai. Pybullet, a python module for physics simulation for games, robotics and machine learning. GitHub repository, 2016.
|
| 176 |
+
|
| 177 |
+
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.
|
| 178 |
+
|
| 179 |
+
Chelsea Finn, Paul Christiano, Pieter Abbeel, and Sergey Levine. A connection between generative adversarial networks, inverse reinforcement learning, and energy-based models. NIPS Workshop on Adversarial Training, 2016a.
|
| 180 |
+
|
| 181 |
+
Chelsea Finn, Sergey Levine, and Pieter Abbeel. Guided cost learning: Deep inverse optimal control via policy optimization. In International Conference on Machine Learning, pp. 49–58, 2016b.
|
| 182 |
+
|
| 183 |
+
Justin Fu, Katie Luo, and Sergey Levine. Learning robust rewards with adversarial inverse reinforcement learning. arXiv preprint arXiv:1710.11248, 2017.
|
| 184 |
+
|
| 185 |
+
Scott Fujimoto, Herke van Hoof, and Dave Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
|
| 186 |
+
|
| 187 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 188 |
+
|
| 189 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pp. 5767–5777, 2017.
|
| 190 |
+
|
| 191 |
+
Tuomas Haarnoja, Kristian Hartikainen, Pieter Abbeel, and Sergey Levine. Latent space policies for hierarchical reinforcement learning. arXiv preprint arXiv:1804.02808, 2018a.
|
| 192 |
+
|
| 193 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018b.
|
| 194 |
+
|
| 195 |
+
Peter Henderson, Wei-Di Chang, Pierre-Luc Bacon, David Meger, Joelle Pineau, and Doina Precup. Optiongan: Learning joint reward-policy options using generative adversarial inverse reinforcement learning. arXiv preprint arXiv:1709.06683, 2017a.
|
| 196 |
+
|
| 197 |
+
Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. arXiv preprint arXiv:1709.06560, 2017b.
|
| 198 |
+
|
| 199 |
+
Todd Hester, Matej Vecerik, Olivier Pietquin, Marc Lanctot, Tom Schaul, Bilal Piot, Dan Horgan, John Quan, Andrew Sendonaris, Gabriel Dulac-Arnold, et al. Deep q-learning from demonstrations. arXiv preprint arXiv:1704.03732, 2017.
|
| 200 |
+
|
| 201 |
+
Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, pp. 4565–4573, 2016.
|
| 202 |
+
|
| 203 |
+
Bingyi Kang, Zequn Jie, and Jiashi Feng. Policy optimization with demonstrations. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 2469–2478. PMLR, 2018.
|
| 204 |
+
|
| 205 |
+
Kee-Eung Kim and Hyun Soo Park. Imitation learning via kernel mean embedding. AAAI, 2018.
|
| 206 |
+
|
| 207 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 208 |
+
|
| 209 |
+
Hoang M Le, Nan Jiang, Alekh Agarwal, Miroslav Dud´ık, Yisong Yue, and Hal Daume III. Hierar- ´ chical imitation and reinforcement learning. arXiv preprint arXiv:1803.00590, 2018.
|
| 210 |
+
|
| 211 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 212 |
+
|
| 213 |
+
Mario Lucic, Karol Kurach, Marcin Michalski, Sylvain Gelly, and Olivier Bousquet. Are gans created equal? a large-scale study. arXiv preprint arXiv:1711.10337, 2017.
|
| 214 |
+
|
| 215 |
+
Ashvin Nair, Bob McGrew, Marcin Andrychowicz, Wojciech Zaremba, and Pieter Abbeel. Overcoming exploration in reinforcement learning with demonstrations. arXiv preprint arXiv:1709.10089, 2017.
|
| 216 |
+
|
| 217 |
+
Andrew Y. $\mathrm { N g }$ and Stuart Russell. Algorithms for inverse reinforcement learning. In in Proc. 17th International Conf. on Machine Learning, pp. 663–670. Morgan Kaufmann, 2000.
|
| 218 |
+
|
| 219 |
+
Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ , Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, volume 99, pp. 278–287, 1999.
|
| 220 |
+
|
| 221 |
+
Fabio Pardo, Arash Tavakoli, Vitaly Levdik, and Petar Kormushev. Time limits in reinforcement learning. arXiv preprint arXiv:1712.00378, 2017.
|
| 222 |
+
|
| 223 |
+
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In International Conference on Machine Learning, pp. 1310–1318, 2013.
|
| 224 |
+
|
| 225 |
+
Jan Peters and Stefan Schaal. Reinforcement learning of motor skills with policy gradients. Neural networks, 21(4):682–697, 2008.
|
| 226 |
+
|
| 227 |
+
Nathan D Ratliff, J Andrew Bagnell, and Martin A Zinkevich. Maximum margin planning. In Proceedings of the 23rd international conference on Machine learning, pp. 729–736. ACM, 2006.
|
| 228 |
+
|
| 229 |
+
Siddharth Reddy, Anca D. Dragan, and Sergey Levine. What would pi\* do?: Imitation learning via off-policy reinforcement learning, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ B1excoAqKQ.
|
| 230 |
+
|
| 231 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015.
|
| 232 |
+
|
| 233 |
+
Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and struc- ´ tured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011.
|
| 234 |
+
|
| 235 |
+
Fumihiro Sasaki, Tetsuya Yohira, and Atsuo Kawaguchi. Sample efficient imitation learning for continuous control. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ BkN5UoAqF7.
|
| 236 |
+
|
| 237 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International Conference on Machine Learning, pp. 1889–1897, 2015.
|
| 238 |
+
|
| 239 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 240 |
+
|
| 241 |
+
Richard S Sutton, Andrew G Barto, et al. Reinforcement learning: An introduction. MIT press, 1998.
|
| 242 |
+
|
| 243 |
+
Umar Syed, Michael Bowling, and Robert E Schapire. Apprenticeship learning using linear programming. In Proceedings of the 25th international conference on Machine learning, pp. 1032– 1039. ACM, 2008.
|
| 244 |
+
|
| 245 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
|
| 246 |
+
|
| 247 |
+
Faraz Torabi, Garrett Warnell, and Peter Stone. Generative adversarial imitation from observation. arXiv preprint arXiv:1807.06158, 2018.
|
| 248 |
+
|
| 249 |
+
Matej Vecer´ık, Todd Hester, Jonathan Scholz, Fumin Wang, Olivier Pietquin, Bilal Piot, Nicolas Heess, Thomas Rothorl, Thomas Lampe, and Martin A Riedmiller. Leveraging demonstrations for ¨ deep reinforcement learning on robotics problems with sparse rewards. CoRR, abs/1707.08817, 2017.
|
| 250 |
+
|
| 251 |
+
Ziyu Wang, Josh S Merel, Scott E Reed, Nando de Freitas, Gregory Wayne, and Nicolas Heess. Robust imitation of diverse behaviors. In Advances in Neural Information Processing Systems, pp. 5320–5329, 2017.
|
| 252 |
+
|
| 253 |
+
Yuke Zhu, Ziyu Wang, Josh Merel, Andrei Rusu, Tom Erez, Serkan Cabi, Saran Tunyasuvunakool, Janos Kram ´ ar, Raia Hadsell, Nando de Freitas, et al. Reinforcement and imitation learning for ´ diverse visuomotor skills. arXiv preprint arXiv:1802.09564, 2018.
|
| 254 |
+
|
| 255 |
+
Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008.
|
| 256 |
+
|
| 257 |
+
# A DAC ALGORITHM
|
| 258 |
+
|
| 259 |
+
# Algorithm 1 Discriminative-Actor-Critic Adversarial Imitation Learning Algorithm
|
| 260 |
+
|
| 261 |
+
<table><tr><td>nput:expert replay buffer RE procedure WRAPFORABSORBINGSTATES(T)</td></tr><tr><td>if sT is a terminal state not caused by time limits then T ←T\{(st,aT,:,st)}U{(st,aT,:,Sa)} T←TU{(sa,,:,sa)}</td></tr><tr><td>end if return T</td></tr><tr><td>end procedure</td></tr><tr><td></td></tr><tr><td>Initialize replaybufferR←@ for T={(St,at,,st)}T=1 ∈REdo</td></tr><tr><td>T ←WrapForAbsorbingState(T) Wrap expert rollouts with absorbing states end for</td></tr><tr><td></td></tr><tr><td>for n = 1,...,do</td></tr><tr><td>Sample T = {(st,at,:,st)}T=1 with π0 R ←RU WrapForAbsorbingState(τ) Update Policy Replay Buffer</td></tr></table>
|
| 262 |
+
|
| 263 |
+

|
| 264 |
+
B SUPPLEMENTARY RESULTS ON MUJOCO ENVIRONMENTS
|
| 265 |
+
Figure 7: Comparisons of different algorithms given the same number of expert demonstrations. y-axis corresponds to normalized reward (0 corresponds to a random policy, while 1 corresponds to an expert policy).
|
| 266 |
+
|
| 267 |
+
# C KUKA-IIWA SIMULATED ENVIRONMENT
|
| 268 |
+
|
| 269 |
+

|
| 270 |
+
Figure 8: Renderings of our Kuka-IIWA environment. Using a VR headset and 6DOF controller, a human participant can control the 6DOF end-effector pose in order to record expert demonstrations. In the Kuka-Reach tasks, the agent must bring the robot gripper to 1 of the 3 blocks (where the state contains a 1-hot encoding of the task) and for the Kuka-PushNext tasks, the agent must use the robot gripper to push one block next to another.
|
md/train/HkcdHtqlx/HkcdHtqlx.md
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GATED-ATTENTION READERS FOR TEXT COMPREHENSION
|
| 2 |
+
|
| 3 |
+
Bhuwan Dhingra∗, Hanxiao Liu∗, Zhilin Yang, William W. Cohen & Ruslan Salakhutdinov
|
| 4 |
+
|
| 5 |
+
School of Computer Science
|
| 6 |
+
Carnegie Mellon University
|
| 7 |
+
{bdhingra,hanxiaol,zhiliny,wcohen,rsalakhu}@cs.cmu.edu
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
In this paper we study the problem of answering cloze-style questions over documents. Our model, the Gated-Attention (GA) Reader, integrates a multi-hop architecture with a novel attention mechanism, which is based on multiplicative interactions between the query embedding and the intermediate states of a recurrent neural network document reader. This enables the reader to build query-specific representations of tokens in the document for accurate answer selection. The GA Reader obtains state-of-the-art results on three benchmarks for this task–the CNN & Daily Mail news stories and the Who Did What dataset. The effectiveness of multiplicative interaction is demonstrated by an ablation study, and by comparing to alternative compositional operators for implementing the gated-attention.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
A recent trend to measure progress towards machine reading is to test a system’s ability to answer questions about a document it has to comprehend. Towards this end, several large-scale datasets of cloze-style questions over a context document have been introduced recently, which allow the training of supervised machine learning systems (Hermann et al., 2015; Hill et al., 2015; Onishi et al., 2016). Such datasets can be easily constructed automatically and the unambiguous nature of their queries provides an objective benchmark to measure a system’s performance at text comprehension.
|
| 16 |
+
|
| 17 |
+
Deep learning models have recently been shown to outperform traditional shallow approaches on text comprehension tasks (Hermann et al., 2015). The success of many recent models can be attributed primarily to two factors: (1) Multi-hop architectures allow a (Weston et al., 2014; Sordoni et al., 2016; Shen et al., 2016), model to scan the document and the question iteratively for multiple passes. (2) Attention mechanisms, (Weston et al., 2014; Chen et al., 2016; Hermann et al., 2015) borrowed from the machine translation literature (Bahdanau et al., 2014), allow the model to focus on appropriate subparts of the context document. Intuitively, the multi-hop architecture allows the reader to incrementally refine token representations, and the attention mechanism re-weights different parts in the document according to their relevance to the query.
|
| 18 |
+
|
| 19 |
+
The effectiveness of multi-hop reasoning and attentions have been explored orthogonally so far in the literature. In this paper, we focus on combining both in a complementary manner, by designing a novel attention mechanism which gates the evolving token representations across hops. More specifically, unlike existing models where the query attention is applied either token-wise (Hermann et al., 2015; Kadlec et al., 2016; Chen et al., 2016; Hill et al., 2015) or sentence-wise (Weston et al., 2014; Sukhbaatar et al., 2015) to allow weighted aggregation, the Gated-Attention (GA) module proposed in this work allows the query to directly interact with each dimension of the token embeddings at the semantic-level, and is applied layer-wise as information filters during the multi-hop representation learning process. Such a fine-grained attention enables our model to learn conditional token representations with respect to the given question, leading to accurate answer selections.
|
| 20 |
+
|
| 21 |
+
We show in our experiments that the proposed GA reader, despite its relative simplicity, consistently improves over a variety of strong baselines on three benchmark datasets1. Our key contribution, the GA module, provides a significant improvement when the dataset size is large. Qualitatively, visualization of the attentions at intermediate layers of the GA reader shows that in each layer the GA reader attends to distinct salient aspects of the query which help in determining the answer.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
The cloze-style QA task involves tuples of the form $( d , q , a , \mathcal { C } )$ , where $d$ is a document (context), $q$ is a query over the contents of $d$ , in which a phrase is replaced with a placeholder, and $a$ is the answer to $q$ , which comes from a set of candidates $\mathcal { C }$ . In this work we consider datasets where each candidate $c \in { \mathcal { C } }$ has at least one token which also appears in the document. The task can then be described as: given a document-query pair $( d , q )$ , find $a \in { \mathcal { C } }$ which answers $q$ . Below we provide an overview of representative neural network architectures which have been applied to this problem.
|
| 26 |
+
|
| 27 |
+
LSTMs with Attention: Several architectures introduced in (Hermann et al., 2015) employ LSTM units to compute a combined document-query representation $g ( d , q )$ , which is used to rank the candidate answers. Their techniques include the DeepLSTM Reader which performs a single forward pass through the concatenated (document, query) pair to obtain $g ( d , q )$ ; the Attentive Reader which first computes a document vector $d ( q )$ by a weighted aggregation of words according to attentions based on $q$ , and then combines $d ( q )$ and $q$ to obtain their joint representation $g ( d ( q ) , q )$ ; and the Impatient Reader where the document representation is built incrementally. The architecture of the Attentive Reader has been simplified recently in Stanford Attentive Reader, where shallower recurrent units were used with a bilinear form for the query-document attention (Chen et al., 2016).
|
| 28 |
+
|
| 29 |
+
Attention Sum: The Attention-Sum (AS) Reader (Kadlec et al., 2016) uses two bi-directional GRU networks (Cho et al., 2014) to encode both $d$ and $q$ into vectors, similar to Stanford AR. A probability distribution over the entities in $d$ is obtained by computing dot products between $q$ and the entity embeddings and taking a softmax. An aggregation scheme named pointer-sum attention is further applied to sum the probabilities of the same entity, so that frequent entities the document will be favored compared to rare ones. Building on the AS Reader, the Attention-over-Attention (AoA) Reader (Cui et al., 2016) introduces a two-way attention mechanism where the query and the document are mutually attentive to each other.
|
| 30 |
+
|
| 31 |
+
Mulit-hop Architectures: Memory Networks (MemNets) were proposed in (Weston et al., 2014), where each sentence in the document is encoded to a memory by aggregating nearby words. Attention over the memory slots given the query is used to compute an overall memory and to renew the query representation over multiple iterations, allowing certain types of reasoning over the salient facts in the memory and the query. Neural Semantic Encoders (NSE) (Munkhdalai & Yu, 2016a) extended MemNets by introducing a write operation which can evolve the memory over time during the course of reading. Iterative reasoning has been found effective in several more recent models, including the Iterative Attentive Reader (Sordoni et al., 2016) and ReasoNet (Shen et al., 2016). The latter allows a dynamic number of reasoning steps and is trained with reinforcement learning.
|
| 32 |
+
|
| 33 |
+
Other related works include Dynamic Entity Representation network (DER) (Kobayashi et al., 2016), which builds dynamic representations of the candidate answers while reading the document, and accumulates the information about an entity by max-pooling. EpiReader (Trischler et al., 2016) consists of two networks, where one proposes a small set of candidate answers, and the other reranks the proposed candidates conditioned on the query and the context. (Bajgar et al., 2016) showed a $10 \%$ improvement on the CBT corpus (Hill et al., 2015) by training the AS Reader on an augmented training set of about 14 million examples, making a case for community to exploit data abundance. The focus of this paper, however, is on designing models which exploit the available data efficiently.
|
| 34 |
+
|
| 35 |
+
# 3 GATED-ATTENTION READER
|
| 36 |
+
|
| 37 |
+
# 3.1 MOTIVATION
|
| 38 |
+
|
| 39 |
+
Our proposed GA readers perform multiple hops over the document (context), similar to the Memory Networks architecture (Sukhbaatar et al., 2015). Multi-hop architectures mimic the multi-step comprehension process of human readers, and have shown promising results in several recent models for text comprehension (Sordoni et al., 2016; Kumar et al., 2015; Shen et al., 2016). The contextual representations in GA readers, namely the embeddings of words in the document, are iteratively refined across hops until reaching a final attention-sum module (Kadlec et al., 2016) which maps the contextual representations in the last hop to a probability distribution over candidate answers.
|
| 40 |
+
|
| 41 |
+
The attention mechanism has been introduced recently to model human focus, leading to significant improvement in machine translation and image captioning (Bahdanau et al., 2014; Mnih et al., 2014). In reading comprehension tasks, ideally, the semantic meanings carried by the contextual embeddings should be aware of the query across hops. As an example, human readers are able to keep the question in mind during multiple passes of reading, to successively mask away information irrelevant to the query. However, existing neural network readers are restricted to either attend to tokens (Hermann et al., 2015; Chen et al., 2016) or entire sentences (Weston et al., 2014), with the assumption that certain sub-parts of the document are more important than others. In contrast, we propose a finer-grained model which attends to components of the semantic representation being built up by the GRU. The new attention mechanism, called gated-attention, is implemented based on multiplicative interactions between the query and the contextual embeddings, and is applied per hop to act as fine-grained information filters during the multi-step reasoning. The filters weigh individual components of the vector representation of each token in the document separately.
|
| 42 |
+
|
| 43 |
+
The design of gated-attention layers is motivated by the effectiveness of multiplicative interaction among vector-space representations, e.g., in various types of recurrent units (Hochreiter & Schmidhuber, 1997; Wu et al., 2016) and in relational learning (Yang et al., 2014; Kiros et al., 2014). While other types of compositional operators are possible, such as concatenation or addition (Mitchell & Lapata, 2008), we find that multiplication has strong empirical performance (section 4.4). Intuitively, multiplicative interaction $e \odot q$ between two word embeddings $e$ and $q$ adjusts the semantic meaning of $e$ towards $q$ , keeping the compositionality of the original embeddings preserved.2
|
| 44 |
+
|
| 45 |
+
# 3.2 MODEL DETAILS
|
| 46 |
+
|
| 47 |
+
Several components of the model use a Gated Recurrent Unit (GRU) (Cho et al., 2014) which maps an input sequence $X = [ x _ { 1 } , x _ { 2 } , \dots , x _ { T } ]$ to an ouput sequence $H = [ h _ { 1 } , h _ { 2 } , \ldots , h _ { T } ]$ as follows:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\begin{array} { r l } & { { \boldsymbol r } _ { t } = \sigma ( { \boldsymbol W } _ { r } { \boldsymbol x } _ { t } + { \boldsymbol U } _ { r } h _ { t - 1 } + b _ { r } ) , } \\ & { \boldsymbol z _ { t } = \sigma ( { \boldsymbol W } _ { z } { \boldsymbol x } _ { t } + { \boldsymbol U } _ { z } h _ { t - 1 } + b _ { z } ) , } \\ & { \tilde { \boldsymbol h } _ { t } = \operatorname { t a n h } ( { \boldsymbol W } _ { h } { \boldsymbol x } _ { t } + { \boldsymbol U } _ { h } ( r _ { t } \odot h _ { t - 1 } ) + b _ { h } ) , } \\ & { \boldsymbol h _ { t } = ( 1 - z _ { t } ) \odot h _ { t - 1 } + z _ { t } \odot \tilde { \boldsymbol h } _ { t } . } \end{array}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $\odot$ denotes the Hadamard product or the element-wise multiplication. $r _ { t }$ and $z _ { t }$ are called the reset and update gates respectively, and $\tilde { h } _ { t }$ the candidate output. A Bi-directional GRU (BiGRU) processes the sequence in both forward and backward directions to produce two sequences $[ h _ { 1 } ^ { f } , h _ { 2 } ^ { f } , \ldots , h _ { T } ^ { f } ]$ and $[ h _ { 1 } ^ { b } , h _ { 2 } ^ { b } , \ldots , h _ { T } ^ { b } ]$ , which are concatenated at the output
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\overleftrightarrow { \mathrm { G R U } } ( X ) = [ h _ { 1 } ^ { f } \| h _ { T } ^ { b } , \dots , h _ { T } ^ { f } \| h _ { 1 } ^ { b } ]
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where ${ \stackrel { \longleftrightarrow } { \operatorname { G R U } } } ( X )$ denotes the full output of the Bi-GRU obtained by concatenating each forward state $h _ { i } ^ { f }$ and backward state $h _ { T - i + 1 } ^ { b }$ at time-step $i$ given the input $X$ . Note ${ \stackrel { \longleftrightarrow } { \operatorname { G R U } } } ( X )$ is a matrix in $\mathbb { R } ^ { 2 n _ { h } \times T }$ where $n _ { h }$ stands for the number of hidden units in GRU.
|
| 60 |
+
|
| 61 |
+
Let $X ^ { ( 0 ) } = [ x _ { 1 } ^ { ( 0 ) } , x _ { 2 } ^ { ( 0 ) } , \dots x _ { | D | } ^ { ( 0 ) } ]$ denote the token embeddings of the document, which are also inputs at layer 1 for the document reader below, and $Y = [ y _ { 1 } , y _ { 2 } , \dots y _ { | Q | } ]$ denote the token embeddings of the query. Here $| D |$ and $| Q |$ denote the document and query lengths respectively.
|
| 62 |
+
|
| 63 |
+
# 3.2.1 MULTI-HOP ARCHITECTURE
|
| 64 |
+
|
| 65 |
+
Figure 1 illustrates the Gated-Attention (GA) reader. The model reads the document and the query over $K$ horizontal layers, where layer $k$ receives the contextual embeddings $X ^ { ( k - 1 ) }$ of the document from the previous layer. The document embeddings are transformed by taking the full output of a document Bi-GRU (indicated in blue in Figure 1):
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\frac { D ^ { ( k ) } = \overset { \longleftrightarrow } { \mathrm { G R U } } _ { D } ^ { ( k ) } \left( X ^ { ( k - 1 ) } \right) } { \mathrm { \Lambda } ^ { 2 } e _ { 1 } \odot q + e _ { 2 } \odot q = \left( e _ { 1 } + e _ { 2 } \right) \odot q , \forall e _ { 1 } , e _ { 2 } . }
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 1: Gated-Attention Reader. Dashed lines represent dropout connections.
|
| 73 |
+
|
| 74 |
+
At the same time, a layer-specific query representation is computed as the full output of a separate query Bi-GRU (indicated in green in Figure 1):
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
Q ^ { ( k ) } = \overleftrightarrow { \mathrm { G R U } } _ { Q } ^ { ( k ) } ( Y )
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
Next, Gated-Attention is applied to $D ^ { ( k ) }$ and $Q ^ { ( k ) }$ to compute inputs for the next layer $X ^ { ( k ) }$ .
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
X ^ { ( k ) } = \mathrm { G A } ( D ^ { ( k ) } , Q ^ { ( k ) } )
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where GA is defined in the following subsection.
|
| 87 |
+
|
| 88 |
+
# 3.2.2 GATED-ATTENTION MODULE
|
| 89 |
+
|
| 90 |
+
For brevity, let us drop the superscript $k$ in this subsection as we are focusing on a particular layer. For each token $d _ { i }$ in $D$ , the GA module forms a token-specific representation of the query $\tilde { q } _ { i }$ using soft attention, and then multiplies the query representation element-wise with the document token representation. Specifically, for $i = 1 , \ldots , | D |$ :
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array} { r l } & { \alpha _ { i } = \operatorname { s o f t m a x } ( Q ^ { \top } d _ { i } ) } \\ & { { \tilde { q } } _ { i } = Q \alpha _ { i } } \\ & { x _ { i } = d _ { i } \odot { \tilde { q } } _ { i } } \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
In equation (6) we use the multiplication operator to model the interactions between $d _ { i }$ and $\tilde { q } _ { i }$ . In the experiments section, we also report results for other choices of gating functions, including addition $x _ { i } = d _ { i } + \tilde { q } _ { i }$ and concatenation $x _ { i } = d _ { i } \| \tilde { q } _ { i }$ .
|
| 97 |
+
|
| 98 |
+
# 3.2.3 ANSWER PREDICTION
|
| 99 |
+
|
| 100 |
+
Let q(\` $q _ { \ell } ^ { ( K ) } = q _ { \ell } ^ { f } \| q _ { T - \ell + 1 } ^ { b }$ be an intermediate output of the final layer query Bi-GRU at the location $\ell$ of the cloze token in the query, and $D ^ { ( K ) } = \overleftrightarrow { \mathrm { G R U } } _ { D } ^ { ( K ) } ( X ^ { ( K - 1 ) } )$ be the full output of final layer document Bi-GRU. To obtain the probability that a particular token in the document answers the query, we take an inner-product between these two, and pass through a softmax layer:
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
s = \mathrm { s o f t m a x } ( ( q _ { \ell } ^ { ( K ) } ) ^ { T } D ^ { ( K ) } )
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
where vector $s$ defines a probability distribution over the $| D |$ tokens in the document. The probability of a particular candidate $c \in { \mathcal { C } }$ as being the answer is then computed by aggregating the probabilities of all document tokens which appear in $c$ and renormalizing over the candidates:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\operatorname* { P r } ( c | d , q ) \propto \sum _ { i \in \mathbb { I } ( c , d ) } s _ { i }
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
Table 1: Dataset statistics.
|
| 113 |
+
|
| 114 |
+
<table><tr><td></td><td>CNN</td><td>Daily Mail</td><td>CBT-NE</td><td>CBT-CN</td><td> WDW-Strict</td><td>WDW-Relaxed</td></tr><tr><td># train</td><td>380,298</td><td>879,450</td><td>108,719</td><td>120,769</td><td>127,786</td><td>185,978</td></tr><tr><td># validation</td><td>3,924</td><td>64,835</td><td>2.000</td><td>2,000</td><td>10,000</td><td>10,000</td></tr><tr><td>#test</td><td>3,198</td><td>53,182</td><td>2,500</td><td>2.500</td><td>10,000</td><td>10,000</td></tr><tr><td># vocab</td><td>118,497</td><td>208.045</td><td>53,063</td><td>53,185</td><td>347,406</td><td>308,602</td></tr><tr><td>max doc length</td><td>2,000</td><td>2,000</td><td>1,338</td><td>1,338</td><td>3,085</td><td>3,085</td></tr></table>
|
| 115 |
+
|
| 116 |
+
where $\mathbb { I } ( c , d )$ is the set of positions where a token in $c$ appears in the document $d$ . This aggregation operation is the same as the pointer sum attention applied in the AS Reader (Kadlec et al., 2016).
|
| 117 |
+
|
| 118 |
+
Finally, the candidate with maximum probability is selected as the predicted answer:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
a ^ { * } = \mathrm { a r g m a x } _ { c \in { \mathcal C } } ~ \operatorname* { P r } ( c | d , q ) .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
During the training phase, model parameters of the GA reader are updated w.r.t. a cross-entropy loss between the predicted probabilities and the true answers.
|
| 125 |
+
|
| 126 |
+
# 3.2.4 FURTHER ENHANCEMENTS
|
| 127 |
+
|
| 128 |
+
Character-level Embeddings: Given a token $w$ from the document or query, its vector space representation is computed as $x = L ( w ) | | C ( w )$ . $L ( w )$ retrieves the word-embedding for $w$ from a lookup table $L \in \mathbb { R } ^ { | V | \times n _ { l } }$ , whose rows hold a vector for each unique token in the vocabulary. We also utilize a character composition model $C ( w )$ which generates an orthographic embedding of the token. Such embeddings have been previously shown to be helpful for tasks like Named Entity Recognition (Yang et al., 2016) and dealing with OOV tokens at test time (Dhingra et al., 2016). The embedding $C ( w )$ is generated by taking the final outputs $z _ { n _ { c } } ^ { f }$ and $z _ { n _ { c } } ^ { b }$ of a Bi-GRU applied to embeddings from a lookup table of characters in the token, and applying a linear transformation:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\begin{array} { r } { z = z _ { n _ { c } } ^ { f } \vert \vert z _ { n _ { c } } ^ { b } } \\ { C ( w ) = W z + b } \end{array}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
Question Evidence Common Word Feature (qe-comm): (Li et al., 2016) recently proposed a simple token level indicator feature which significantly boosts reading comprehension performance in some cases. For each token in the document we construct a one-hot vector $f _ { i } \in \{ 0 , 1 \bar \} ^ { 2 }$ indicating whether that token is present in the query or not. It can be incorporated into the GA reader by assigning a feature lookup table $F \in \bar { \mathbb { R } ^ { n _ { F } \times 2 } }$ (we use $n _ { F } = 2 $ ), taking the feature embedding $e _ { i } = f _ { i } ^ { \underline { { { T } } } } F$ and appending it to the inputs of the last layer document BiGRU as, $x _ { i } ^ { ( K ) } \| f _ { i }$ for all $i$ . We conducted several experiments both with and without this feature and observed some interesting trends, which are discussed below. Henceforth, we refer to this feature as the qe-comm feature or just feature.
|
| 135 |
+
|
| 136 |
+
# 4 EXPERIMENTS AND RESULTS
|
| 137 |
+
|
| 138 |
+
# 4.1 DATASETS
|
| 139 |
+
|
| 140 |
+
We evaluate the GA reader on five large-scale datasets recently proposed in the literature. The first two, CNN and Daily Mail news stories3 consist of articles from the popular CNN and Daily Mail websites (Hermann et al., 2015). A query over each article is formed by removing an entity from the short summary which follows the article. Further, entities within each article were anonymized to make the task purely a comprehension one. N-gram statistics, for instance, computed over the entire corpus are no longer useful in such an anonymized corpus.
|
| 141 |
+
|
| 142 |
+
The next two datasets are formed from two different subsets of the Children’s Book Test (CBT)4 (Hill et al., 2015). Documents consist of 20 contiguous sentences from the body of a popular children’s book, and queries are formed by deleting a token from the $2 1 ^ { \mathrm { s t } }$ sentence. We only focus on subsets where the deleted token is either a common noun (CN) or named entity (NE) since simple language models already give human-level performance on the other types (cf. (Hill et al., 2015)).
|
| 143 |
+
|
| 144 |
+
Table 2: Hyperparameter settings for each dataset. $\dim ( )$ indicates hidden state size of GRU.
|
| 145 |
+
|
| 146 |
+
<table><tr><td>Hyperparameter</td><td>CNN</td><td>Daily Mail</td><td>CBT-NE</td><td>CBT-CN</td><td>WDW-Strict</td><td>WDW-Relaxed</td></tr><tr><td>Dropout</td><td>0.2</td><td>0.1</td><td>0.4</td><td>0.4</td><td>0.3</td><td>0.3</td></tr><tr><td>dim(GRU*)</td><td>256</td><td>256</td><td>128</td><td>128</td><td>128</td><td>128</td></tr></table>
|
| 147 |
+
|
| 148 |
+
The final dataset we evaluate on is Who Did What5 (WDW) (Onishi et al., 2016), constructed from the LDC English Gigaword newswire corpus. First, article pairs which appeared around the same time and with overlapping entities are chosen, and then one article forms the document and a cloze query is constructed from the other. Missing tokens are always person named entities. Questions which are easily answered by simple baselines are filtered out, to make the task more challenging. There are two versions of the training set—a small but focused “Strict” version and a large but noisy “Relaxed” version. We report results on both settings which share the same validation and test sets. Statistics of all the datasets used in our experiments are summarized in Table 1.
|
| 149 |
+
|
| 150 |
+
# 4.2 IMPLEMENTATION DETAILS
|
| 151 |
+
|
| 152 |
+
Our model was implemented using the Theano (Theano Development Team, 2016) and Lasagne6 Python libraries. We used stochastic gradient descent with ADAM updates for optimization, which combines classical momentum and adaptive gradients (Kingma & Ba, 2014). The batch size was 32 and the initial learning rate was $5 \times 1 0 ^ { - 4 }$ which was halved every epoch after the second epoch. The same setting is applied to all models and datasets. We also used gradient clipping with a threshold of 10 to stabilize GRU training (Pascanu et al., 2012). We set the number of layers $K$ to be 3 for all experiments, and provide further analysis below. The number of hidden units for the character GRU was set to 50. The remaining two hyperparameters—size of document and query GRUs, and dropout rate—were tuned on the validation set, and their optimal values are shown in Table 2. In general, the optimal GRU size increases and the dropout rate decreases as the corpus size increases.
|
| 153 |
+
|
| 154 |
+
The word lookup table was initialized with $1 0 0 d$ GloVe vectors7 (Pennington et al., 2014) and OOV tokens at test time were assigned unique random vectors. We empirically observed that initializing with pre-trained embeddings gives higher performance compared to random initialization for all datasets. Furthermore, for smaller datasets (WDW and CBT) we found that fixing these embeddings to their pretrained values led to higher test performance, possibly since it avoids overfitting. We do not use the character composition model for CNN and Daily Mail, since entities (and hence candidate answers) are anonymized to generic tokens in these datasets. For other datasets the character lookup table was randomly initialized with $2 5 d$ vectors. All other parameters were initialized to their default values as specified in the Lasagne library.
|
| 155 |
+
|
| 156 |
+
# 4.3 PERFORMANCE COMPARISON
|
| 157 |
+
|
| 158 |
+
Tables 3 and 5 show a comparison of the performance of GA Reader with previously published results on WDW and CNN, Daily Mail, CBT datasets respectively. The numbers reported for GA Reader are for single best models, though we compare to both ensembles and single models from prior work. GA Reader-- refers to an earlier version of the model, unpublished but described in a preprint, with the following differences—(1) it does not utilize token-specific attentions within the GA module, as described in equation (5), (2) it does not use a character composition model, (3) it is initialized with word embeddings pretrained on the corpus itself rather than GloVe. A detailed analysis of these differences is studied in the next section. Here we present 4 variants of the latest GA Reader, using combinations of whether the qe-comm feature is used (+feature) or not, and whether the word lookup table $L ( w )$ is updated during training or fixed to its initial value.
|
| 159 |
+
|
| 160 |
+
Interestingly, we observe that feature engineering leads to significant improvements for WDW and CBT datasets, but not for CNN and Daily Mail datasets. We note that anonymization of the latter datasets means that there is already some feature engineering (it adds hints about whether a token is an entity), and these are much larger than the other four. In machine learning it is common to see the effect of feature engineering diminish with increasing data size. Similarly, fixing the word
|
| 161 |
+
|
| 162 |
+
Table 3: Validation/Test accuracy $( \% )$ on WDW dataset for both “Strict” and “Relaxed” settings. Results marked with $^ \dagger$ are cf previously published works.
|
| 163 |
+
|
| 164 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Strict</td><td colspan="2">Relaxed</td></tr><tr><td>Val</td><td>Test</td><td>Val</td><td>Test</td></tr><tr><td>Human †</td><td></td><td>84</td><td></td><td>/</td></tr><tr><td>Attentive Reader t AS Reader †</td><td></td><td>53 57</td><td></td><td>55 59</td></tr><tr><td>Stanford AR † NSE +</td><td>66.5</td><td>64 66.2</td><td>67.0</td><td>65 66.7</td></tr><tr><td>GA-- t</td><td>1</td><td>57</td><td>1</td><td>60.0</td></tr><tr><td>GA (update L(w))</td><td>67.8</td><td>67.0</td><td>67.0</td><td>66.6</td></tr><tr><td>GA (fix L(ω))</td><td>68.3</td><td>68.0</td><td></td><td>69.1</td></tr><tr><td></td><td></td><td></td><td>69.6</td><td></td></tr><tr><td>GA (+feature, update L(w))</td><td>70.1</td><td>69.5</td><td>70.9</td><td>71.0</td></tr><tr><td>GA (+feature, fix L(w))</td><td>71.6</td><td>71.2</td><td>72.6</td><td>72.6</td></tr></table>
|
| 165 |
+
|
| 166 |
+
Table 4: Top: Performance of different gating functions. Bottom: Effect of varying the number of hops $K$ . Results on WDW dataset without using the qe-comm feature and with fixed $L ( w )$ .
|
| 167 |
+
|
| 168 |
+
<table><tr><td rowspan=2 colspan=1>Gating Function</td><td rowspan=1 colspan=2> Accuracy</td></tr><tr><td rowspan=1 colspan=1>Val</td><td rowspan=1 colspan=1>Test</td></tr><tr><td rowspan=2 colspan=1>SumConcatenateMultiply</td><td rowspan=2 colspan=1>64.964.468.3</td><td rowspan=1 colspan=1>64.5</td></tr><tr><td rowspan=1 colspan=1>63.768.0</td></tr><tr><td rowspan=1 colspan=1>K</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=2 colspan=1>1 (AS) t234</td><td rowspan=2 colspan=1>65.668.368.3</td><td rowspan=1 colspan=1>5765.668.0</td></tr><tr><td rowspan=1 colspan=1>68.2</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 5: Validation/Test accuracy $( \% )$ on CNN, Daily Mail and CBT. Results marked with $^ \dagger$ are cf previously published works. Results marked with $^ \ddag$ were obtained by training on a larger training set. Best performance on standard training sets is in bold, and on larger training sets in italics.
|
| 171 |
+
|
| 172 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">CNN</td><td colspan="2">Daily Mail</td><td colspan="2">CBT-NE</td><td colspan="2">CBT-CN</td></tr><tr><td>Val</td><td>Test Val</td><td>Test</td><td>Val</td><td>Test</td><td>Val</td><td></td><td>Test</td></tr><tr><td>Humans (query) †</td><td></td><td></td><td></td><td></td><td>一</td><td>52.0</td><td>1</td><td>64.4</td></tr><tr><td>Humans (context + query) +</td><td>1</td><td>1</td><td>1</td><td>1 一</td><td>1 51.2</td><td>81.6 41.8</td><td>1 62.6</td><td>81.6 56.0</td></tr><tr><td>LSTMs (context + query) t</td><td>1 55.0</td><td>1 57.0</td><td>1 63.3</td><td>62.2</td><td>1</td><td>1</td><td></td><td></td></tr><tr><td>Deep LSTM Reader t Attentive Reader †</td><td>61.6</td><td>63.0</td><td>70.5</td><td>69.0</td><td>1</td><td>1</td><td>1 1</td><td>1 1</td></tr><tr><td>Impatient Reader +</td><td>61.8</td><td>63.8</td><td>69.0</td><td>68.0</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>MemNets †</td><td>63.4</td><td>66.8</td><td></td><td></td><td>70.4</td><td>66.6</td><td>64.2</td><td>63.0</td></tr><tr><td>AS Reader †</td><td>68.6</td><td>69.5</td><td>75.0</td><td>73.9</td><td>73.8</td><td>68.6</td><td>68.8</td><td>63.4</td></tr><tr><td>DER Network †</td><td>71.3</td><td>72.9</td><td></td><td>1</td><td></td><td></td><td></td><td></td></tr><tr><td>Stanford AR (relabeling) t</td><td>73.8</td><td>73.6</td><td>1 77.6</td><td>76.6</td><td>1</td><td>1 1</td><td>1</td><td>1</td></tr><tr><td>Iterative Attentive Reader †</td><td>72.6</td><td>73.3</td><td></td><td></td><td>75.2</td><td>68.6</td><td>1 72.1</td><td>1 69.2</td></tr><tr><td></td><td>73.4</td><td>74.0</td><td>1</td><td>1</td><td>75.3</td><td>69.7</td><td></td><td></td></tr><tr><td>EpiReader †</td><td>73.1</td><td>74.4</td><td>1</td><td>1</td><td></td><td></td><td>71.5</td><td>67.4</td></tr><tr><td>AoA Reader †</td><td></td><td>74.7</td><td></td><td>76.6</td><td>77.8</td><td>72.0</td><td>72.2</td><td>69.4</td></tr><tr><td>ReasoNet † NSE †</td><td>72.9</td><td></td><td>77.6</td><td></td><td>1 78.2</td><td>1 73.2</td><td>1</td><td>1</td></tr><tr><td></td><td>1</td><td>1</td><td>1</td><td>1</td><td></td><td></td><td>74.3</td><td>71.9</td></tr><tr><td>MemNets (ensemble) † AS Reader (ensemble) t</td><td>66.2 73.9</td><td>69.4 75.4</td><td></td><td>77.7</td><td>一</td><td></td><td>1</td><td>1</td></tr><tr><td></td><td></td><td></td><td>78.7</td><td>79.2</td><td>76.2</td><td>71.0</td><td>71.1</td><td>68.9</td></tr><tr><td>Stanford AR (relabeling,ensemble) †</td><td>77.2</td><td>77.6</td><td>80.2</td><td></td><td>一</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Iterative Attentive Reader (ensemble) †</td><td>75.2</td><td>76.1</td><td>1</td><td>1</td><td>76.9</td><td>72.0</td><td>74.1</td><td>71.0</td></tr><tr><td>EpiReader (ensemble) †</td><td>1</td><td>1</td><td>1</td><td>1</td><td>76.6</td><td>71.8</td><td>73.6</td><td>70.6</td></tr><tr><td>AS Reader (+BookTest) † ‡</td><td>1</td><td>一</td><td>1</td><td>一</td><td>80.5</td><td>76.2</td><td>83.2</td><td>80.8</td></tr><tr><td>AS Reader (+BookTest,ensemble) † ‡</td><td>1</td><td>一</td><td>1</td><td>1</td><td>82.3</td><td>78.4</td><td>85.7</td><td>83.7</td></tr><tr><td>GA--</td><td>73.0</td><td>73.8</td><td>76.7</td><td>75.7</td><td>74.9</td><td>69.0</td><td>69.0</td><td>63.9</td></tr><tr><td>GA (update L(w))</td><td>77.9</td><td>77.9</td><td>81.5</td><td>80.9</td><td>76.7</td><td>70.1</td><td>69.8</td><td>67.3</td></tr><tr><td>GA (fix L(w))</td><td>77.9</td><td>77.8</td><td>80.4</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>77.3</td><td>76.9</td><td></td><td>79.6</td><td>77.2</td><td>71.4</td><td>71.6</td><td>68.0</td></tr><tr><td>GA (+feature, update L(w))</td><td>76.7</td><td>77.4</td><td>80.7</td><td>80.0 79.3</td><td>77.2</td><td>73.3 74.9</td><td>73.0 74.4</td><td>69.8</td></tr><tr><td>GA (+feature, fix L(w))</td><td></td><td></td><td>80.0</td><td></td><td>78.5</td><td></td><td></td><td>70.7</td></tr></table>
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 2: Performance in accuracy with and without the Gated-Attention module over different amounts of training data. $p$ -values for an exact one-sided Mcnemar’s test are given inside the parentheses for each setting.
|
| 176 |
+
|
| 177 |
+
embeddings provides an improvement for the WDW and CBT, but not for CNN and Daily Mail.
|
| 178 |
+
This is not surprising given that the latter datasets are larger and less prone to overfitting.
|
| 179 |
+
|
| 180 |
+
Comparing with prior work, on the WDW dataset the basic version of the GA Reader outperforms all previously published models when trained on the Strict setting. By adding the qe-comm feature the performance increases by $3 . 2 \%$ and $3 . 5 \%$ on the Strict and Relaxed settings respectively to set a new state of the art on this dataset. On the CNN and Daily Mail datasets the GA Reader leads to an improvement of $3 . 2 \%$ and $4 . 3 \%$ respectively over the best previous single models. They also outperform previous ensemble models, setting a new state of that art for both datasets. For CBT-NE, GA Reader with the qe-comm feature outperforms all previous single and ensemble models except the AS Reader trained on the much larger BookTest Corpus (Bajgar et al., 2016). Lastly, on CBTCN the GA Reader with the qe-comm feature outperforms all previously published single models except the NSE, and AS Reader trained on a larger corpus.
|
| 181 |
+
|
| 182 |
+
# 4.4 GA READER ANALYSIS
|
| 183 |
+
|
| 184 |
+
In this section we do an ablation study to see the effect of Gated Attention. We compare the GA Reader as described here to a model which is exactly the same in all aspects, except that it passes document embeddings $D ^ { ( k ) }$ in each layer directly to the inputs of the next layer without using the GA module. In other words $X ^ { ( k ) } = D ^ { ( k ) }$ for all $k > 0$ . This model ends up using only one query GRU at the output layer for selecting the answer from the document. We compare these two variants both with and without the qe-comm feature on CNN and WDW datasets for three subsets of the training data - $50 \%$ , $7 5 \%$ and $100 \%$ . Test set accuracies for these settings are shown in Figure 2. On CNN when tested without feature engineering, we observe that GA provides a significant boost in performance compared to without GA. When tested with the feature it still gives an improvement, but the improvement is significant only with $100 \%$ training data. On WDW-Strict, which is a third of the size of CNN, without the feature we see an improvement when using GA versus without using GA, which becomes significant as the training set size increases. When tested with the feature on WDW, for a small data size without GA does better than with GA, but as the dataset size increases they become equivalent. We conclude that Gated Attention provides a boost in the absence of feature engineering, or as the training set size increases.
|
| 185 |
+
|
| 186 |
+
Next we look at the question of how to gate intermediate document reader states from the query, i.e. what operation to use in equation 6. Table 4 (top) shows the performance on WDW dataset for three common choices – sum $( x = d + q )$ ), concatenate $( x = d \lVert q )$ and multiply $( x = d \odot q )$ . Empirically we find that element-wise multiplication does significantly better than the other two, which justifies our motivation to “filter” out document features which are irrelevant to the query.
|
| 187 |
+
|
| 188 |
+
At the bottom of Table 4 we show the effect of varying the number of hops $K$ of the GA Reader on the final performance. We note that for $K = 1$ , our model is equivalent to the AS Reader without any GA modules. We see a steep and steady rise in accuracy as the number of hops is increased from $K = 1$ to $K = 3$ , which remains constant beyond that. This is a fairly common trend in machine learning as model complexity is increased, however we note that a multi-hop architecture is important to achieve a high performance for this task, and provide further evidence for this in the next section.
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 3: Layer-wise attention visualization of GA Reader trained on WDW-Strict. See text for details.
|
| 192 |
+
DOCjapaesei avetompilatdaiefdfisdsi nsotolsafee entblamedll ncialifelieedosoald new global financial regulatory standardsat the london summit.
|
| 193 |
+
QRYbegupsicilaoadi <end> ANS:timothy geithner
|
| 194 |
+
|
| 195 |
+
Lastly, we perform an ablation study for the three components of the GA Reader which were absent in the preprint version (GA Reader--). Table 6 shows accuracy on WDW by removing one component at a time. The steepest reduction is observed when we replace pretrained GloVe vectors with those pretrained on the corpus itself. GloVe vectors were trained on a large corpus of about 6 billion tokens (Pennington et al., 2014), and provide an important source of prior knowledge for the model. We note here that the strongest baseline on WDW, NSE (Munkhdalai & Yu, 2016b), also uses pretrained GloVe vectors, hence the comparison is fair in that respect. Next, we observe a substantial drop when removing token-specific attentions over the query in the GA module, which allow gating indi
|
| 196 |
+
|
| 197 |
+
Table 6: Ablation study on WDW dataset, without using the qe-comm feature and with fixed $L ( w )$ . Results marked with $^ \dagger$ are cf Onishi et al. (2016).
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=2>AccuracyVal Test</td></tr><tr><td rowspan=2 colspan=1>GA-char-token-attentions (eq. 5)-glove,+corpus</td><td rowspan=1 colspan=1>68.366.9</td><td rowspan=1 colspan=1>68.066.9</td></tr><tr><td rowspan=1 colspan=1>65.764.0</td><td rowspan=1 colspan=1>65.062.5</td></tr><tr><td rowspan=1 colspan=1>GA--t</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>57</td></tr></table>
|
| 200 |
+
|
| 201 |
+
vidual tokens in the document only by parts of the query relevant to that token rather than the overall query representation. Finally, removing the character embeddings, which were only used for WDW and CBT datasets, leads to a reduction of about $1 \%$ in the performance.
|
| 202 |
+
|
| 203 |
+
# 4.5 ATTENTION VISUALIZATION
|
| 204 |
+
|
| 205 |
+
To gain an insight into the reading process employed by the model we analyzed the attention distributions at intermediate layers of the reader. Figure 3 shows an example from the validation set of WDW dataset (several more are in the Appendix). In each figure, the left and middle plots visualize attention over the query (equation 5) for candidates in the document after layers $1 \ \& \ 2$ respectively. The right plot shows attention over candidates in the document of cloze placeholder (XXX) in the query at the final layer. The full document, query and correct answer are shown at the bottom.
|
| 206 |
+
|
| 207 |
+
A generic pattern observed in these examples is that in intermediate layers, candidates in the document (shown along rows) tend to pick out salient tokens in the query which provide clues about the cloze, and in the final layer the candidate with the highest match with these tokens is selected as the answer. In Figure 3 there is a high attention of the correct answer on financial regulatory standards in the first layer, and on us president in the second layer. The incorrect answer, in contrast, only attends to one of these aspects, and hence receives a lower score in the final layer despite the n-gram overlap it has with the cloze token in the query. Importantly, different layers tend to focus on different tokens in the query, which supports the hypothesis that the multi-hop architecture of GA Reader is able to combine distinct pieces of information to answer the query.
|
| 208 |
+
|
| 209 |
+
# 5 CONCLUSION
|
| 210 |
+
|
| 211 |
+
We presented the Gated-Attention reader for answering cloze-style questions over documents. The GA reader features a novel multiplicative gating mechanism, combined with a multi-hop architecture. Our model achieves state-of-the-art performance on several large-scale benchmark datasets with more than $4 \%$ improvements over competitive baselines. Our model design is backed up by an ablation study showing statistically significant improvements of using Gated Attention as information filters. We also showed empirically that multiplicative gating is superior to addition and concatenation operations for implementing gated-attentions, though a theoretical justification remains part of future research goals. Analysis of document and query attentions in intermediate layers of the reader further reveals that the model iteratively attends to different aspects of the query to arrive at the final answer. In this paper we have focused on text comprehension, but we believe that the Gated-Attention mechanism may benefit other tasks as well where multiple sources of information interact. Concurrent to our work (Chu et al., 2016) have also shown the effectiveness of GA Readers on the LAMBADA dataset (Paperno et al., 2016) for language modeling.
|
| 212 |
+
|
| 213 |
+
# REFERENCES
|
| 214 |
+
|
| 215 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 216 |
+
Ondrej Bajgar, Rudolf Kadlec, and Jan Kleindienst. Embracing data abundance: Booktest dataset for reading comprehension. arXiv preprint arXiv:1610.00956, 2016.
|
| 217 |
+
Danqi Chen, Jason Bolton, and Christopher D Manning. A thorough examination of the cnn/daily mail reading comprehension task. arXiv preprint arXiv:1606.02858, 2016.
|
| 218 |
+
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
|
| 219 |
+
Zewei Chu, Hai Wang, Kevin Gimpel, and David McAllester. Broad context language modeling as reading comprehension. arXiv preprint arXiv:1610.08431, 2016.
|
| 220 |
+
Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. arXiv preprint arXiv:1607.04423, 2016.
|
| 221 |
+
Bhuwan Dhingra, Zhong Zhou, Dylan Fitzpatrick, Michael Muehl, and William W Cohen. Tweet2vec: Character-based distributed representations for social media. ACL, 2016.
|
| 222 |
+
Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pp. 1684–1692, 2015.
|
| 223 |
+
Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. arXiv preprint arXiv:1511.02301, 2015.
|
| 224 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 225 |
+
Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. arXiv preprint arXiv:1603.01547, 2016.
|
| 226 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 227 |
+
Ryan Kiros, Richard Zemel, and Ruslan R Salakhutdinov. A multiplicative model for learning distributed text-based attribute representations. In Advances in Neural Information Processing Systems, pp. 2348–2356, 2014.
|
| 228 |
+
Sosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. Dynamic entity representations with max-pooling improves machine reading. In NAACL-HLT, 2016.
|
| 229 |
+
|
| 230 |
+
Ankit Kumar, Ozan Irsoy, Jonathan Su, James Bradbury, Robert English, Brian Pierce, Peter Ondruska, Ishaan Gulrajani, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. arXiv preprint arXiv:1506.07285, 2015.
|
| 231 |
+
|
| 232 |
+
Peng Li, Wei Li, Zhengyan He, Xuguang Wang, Ying Cao, Jie Zhou, and Wei Xu. Dataset and neural recurrent sequence labeling model for open-domain factoid question answering. arXiv preprint arXiv:1607.06275, 2016.
|
| 233 |
+
|
| 234 |
+
Jeff Mitchell and Mirella Lapata. Vector-based models of semantic composition. In ACL, pp. 236– 244, 2008.
|
| 235 |
+
|
| 236 |
+
Volodymyr Mnih, Nicolas Heess, Alex Graves, et al. Recurrent models of visual attention. In Advances in Neural Information Processing Systems, pp. 2204–2212, 2014.
|
| 237 |
+
|
| 238 |
+
Tsendsuren Munkhdalai and Hong Yu. Neural semantic encoders. arXiv preprint arXiv:1607.04315, 2016a.
|
| 239 |
+
|
| 240 |
+
Tsendsuren Munkhdalai and Hong Yu. Reasoning with memory augmented neural networks for language comprehension. arXiv preprint arXiv:1610.06454, 2016b.
|
| 241 |
+
|
| 242 |
+
Takeshi Onishi, Hai Wang, Mohit Bansal, Kevin Gimpel, and David McAllester. Who did what: A large-scale person-centered cloze dataset. EMNLP, 2016.
|
| 243 |
+
|
| 244 |
+
Denis Paperno, German Kruszewski, Angeliki Lazaridou, Quan Ngoc Pham, Raffaella Bernardi, ´ Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fernandez. The lambada dataset: ´ Word prediction requiring a broad discourse context. arXiv preprint arXiv:1606.06031, 2016.
|
| 245 |
+
|
| 246 |
+
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. arXiv preprint arXiv:1211.5063, 2012.
|
| 247 |
+
|
| 248 |
+
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, 2014. URL http://www.aclweb.org/anthology/D14-1162.
|
| 249 |
+
|
| 250 |
+
Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. arXiv preprint arXiv:1609.05284, 2016.
|
| 251 |
+
|
| 252 |
+
Alessandro Sordoni, Phillip Bachman, and Yoshua Bengio. Iterative alternating neural attention for machine reading. arXiv preprint arXiv:1606.02245, 2016.
|
| 253 |
+
|
| 254 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in Neural Information Processing Systems, pp. 2431–2439, 2015.
|
| 255 |
+
|
| 256 |
+
Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. URL http://arxiv.org/abs/ 1605.02688.
|
| 257 |
+
|
| 258 |
+
Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the epireader. arXiv preprint arXiv:1606.02270, 2016.
|
| 259 |
+
|
| 260 |
+
Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. arXiv preprint arXiv:1410.3916, 2014.
|
| 261 |
+
|
| 262 |
+
Yuhuai Wu, Saizheng Zhang, Ying Zhang, Yoshua Bengio, and Ruslan Salakhutdinov. On multiplicative integration with recurrent neural networks. arXiv preprint arXiv:1606.06630, 2016.
|
| 263 |
+
|
| 264 |
+
Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Learning multi-relational semantics using neural-embedding models. arXiv preprint arXiv:1411.4072, 2014.
|
| 265 |
+
|
| 266 |
+
Zhilin Yang, Ruslan Salakhutdinov, and William Cohen. Multi-task cross-lingual sequence tagging from scratch. arXiv preprint arXiv:1603.06270, 2016.
|
| 267 |
+
|
| 268 |
+
# A ATTENTION PLOTS
|
| 269 |
+
|
| 270 |
+

|
| 271 |
+
Figure 4: Layer-wise attention visualization of GA Reader trained on WDW-Strict. See text for details.
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
DOC:resultsundfrothe(uro)5(\$97tptudodcourtevetataaisssports(edisite $) :$ singl efinalmij ulian knowle,austria and robert lindstedt,sweden(1),6-4,6-3.
|
| 275 |
+
QRY:<beg> france 's michael llodra beat his compatriot and doubles partner XXX.<end> ANS: julien benneteau
|
| 276 |
+
|
| 277 |
+
DOC:englandatsatdilo gonedayerdalod'sadfiealfdebo treelyosiveoineioodidespaewastaltersic pontingsoaieettieddtfiris forkshiessil ybodisfocusdeidtheseitseetfaideino sstringprospeast sdees lot'shappenedtomeinthelast sixmonths.ifthechancecomes-ryan'sgotaniggle,butidon'tthinkit $\cdot _ { \mathsf { S } }$ too bad -i've just got toput inadecen tpeforncentsddetb can get the nod."
|
| 278 |
+
|
| 279 |
+
QRY:<beg>yrksowdaldd‘soteatdfdamstrd> ANS:ryan sidebottom
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
Figure 5: Layer-wise attention visualization of GA Reader trained on WDW-Strict. See text for details.
|
| 283 |
+
DOC:usseeaitotitee"tt twaswhatitsotindssfiisteoaditteifis uxuryotelinrliausresidetdeiuriofeet ythattheistdooittotiad ouldworktogddseprofedtitttserelaoil togetherdgutodetset sianword.doyou thinkwegot it $? ^ { n }$ clintonaskedlavrov.yougotitwrong,"herespondedas theyboth laughed.it shouldbe'perezagrouzka‘(t e thattous"lsaeaatastaedrasdo k.
|
| 284 |
+
|
| 285 |
+

|
| 286 |
+
QRY:<beg>usecrearyfstatehilaryinonmeetsXXofiddsesidseissureteywillotoveromealldifereesed> ANS:sergei lavrov
|
| 287 |
+
DOC: illinois governor arrested on corruption charges chicago,dec.9( xinhua $textsc { -- } u . s .$ federal prosecutors on tuesday arrested illinois governor rod blagojevich a nhischiefofdsds ingtoeoeateatcntsittacifoaaitsfdelfoo alsochargdimia tabout6sp ansaid he did not know the development.
|
| 288 |
+
|
| 289 |
+
QRY:<beg>rescddf $" { \mathsf { s } }$ senate seat
|
| 290 |
+
.<end>
|
| 291 |
+
ANS: rod blagojevich
|
| 292 |
+
QRY: ${ \tt { < b e g > } }$ europeancmmissocejemaroaldxprssthu’appnt"taffisiua
|
| 293 |
+
,an aide said.<end>
|
| 294 |
+
ANS:vladimirputin
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
Figure 6: Layer-wise attention visualization of GA Reader trained on WDW-Strict. See text for details.
|
| 298 |
+
DC:europealpldttcffirosr threaerosteos ingdisapomettcfaturafoeodedtlitsifoei barososteitheondtcsfotispac rdingtoisidutiaettpdstso ukraianouteostart hcausesdatsl iistlsteetacsi moshenkoprteodasorotilo wednesdayamidapricingdisputewithukranethecutoffleftanumberofeuropeancountriesinlackofheatinggasamidfrezingeather
|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
|
| 302 |
+
DC:presidftabliil eetecti eepeteti wseportetlipsaorucftfoe subectofurtatetei thepalestinll cess between israel and palestine.this has been abbas'third oficial visit to france since 2007.
|
| 303 |
+
|
| 304 |
+
QRYbeg
|
| 305 |
+
reconsideringa freeze.<end>
|
| 306 |
+
ANS:benjaminnetanyahu
|
| 307 |
+
|
| 308 |
+

|
| 309 |
+
Figure 7: Layer-wise attention visualization of GA Reader trained on WDW-Strict. See text for details.
|
| 310 |
+
DC:iftheredooid intinge evenofthmrrididldidfdt losnddadrdebarsidoidth d,bytakingolndaingosdeableutiacesideo'sltiveilloko
|
| 311 |
+
|
| 312 |
+

|
| 313 |
+
ORYbi from Xxx.<end> ANS: lionel messi
|
| 314 |
+
|
| 315 |
+
DOC:dinarafetsedtfidtoebf forcederorscadlastli)afi teroftwotiampaaiodtrilduedfa eadowsece he u.s.openand has won one grand slam match.she never has defeated anyone ranked better than 47th.
|
| 316 |
+
|
| 317 |
+
QRYbeg>rbilrstiffsdi same wayXXX did in 20o0.<end>
|
md/train/HknbyQbC-/HknbyQbC-.md
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GENERATING ADVERSARIAL EXAMPLES WITH ADVERSARIAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Deep neural networks (DNNs) have been found to be vulnerable to adversarial examples resulting from adding small-magnitude perturbations to inputs. Such adversarial examples can mislead DNNs to produce adversary-selected results. Different attack strategies have been proposed to generate adversarial examples, but how to produce them with high perceptual quality and more efficiently requires more research efforts. In this paper, we propose AdvGAN to generate adversarial examples with generative adversarial networks (GANs), which can learn and approximate the distribution of original instances. For AdvGAN, once the generator is trained, it can generate adversarial perturbations efficiently for any instance, so as to potentially accelerate adversarial training as defenses. We apply AdvGAN in both semi-whitebox and black-box attack settings. In semi-whitebox attacks, there is no need to access the original target model after the generator is trained, in contrast to traditional white-box attacks. In black-box attacks, we dynamically train a distilled model for the black-box model and optimize the generator accordingly. Adversarial examples generated by AdvGAN on different target models have high attack success rate under state-of-the-art defenses compared to other attacks. Our attack has placed the first with $9 2 . 7 6 \%$ accuracy on a public MNIST black-box attack challenge (M ˛adry et al., 2017b).
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep Neural Networks (DNNs) have achieved great successes in a variety of applications ranging from image recognition (Krizhevsky et al., 2012; He et al., 2016) to speech processing (Hinton et al., 2012) and from robotics training (Levine et al., 2016) to medical diagnostics (Ciresan et al., 2012). However, recent work has demonstrated that DNNs are vulnerable to adversarial perturbations (Szegedy et al., 2014; Goodfellow et al., 2015). An adversary can add small-magnitude perturbations to inputs and generate adversarial examples to mislead DNNs. Such maliciously perturbed instances can cause the learning system to misclassify them into either a maliciously-chosen target class (in a targeted attack) or classes that are different from the ground truth (in an untargeted attack). Different algorithms have been proposed for generating such adversarial examples, such as the fast gradient sign method (FGSM) (Goodfellow et al., 2015) and optimization-based methods (Opt.) (Carlini & Wagner, 2017a; Liu et al., 2017).
|
| 12 |
+
|
| 13 |
+
Most of the the current attack algorithms (Carlini & Wagner, 2017a; Liu et al., 2017) rely on optimization schemes with simple pixel space metrics, such as $L _ { \infty }$ distance from a benign image, to encourage visual realism. To generate more perceptually realistic adversarial examples, in this paper, we propose to train a feed-forward network to generate perturbations such that the resulting example must be realistic according to a discriminator network. We apply generative adversarial networks (GANs) (Goodfellow et al., 2014) to produce adversarial examples in both the semi-whitebox and black-box settings. As conditional GANs are capable of producing high-quality images (Isola et al., 2017), we apply a similar paradigm to produce perceptually realistic adversarial instances. We name our method AdvGAN.
|
| 14 |
+
|
| 15 |
+
Note that in the previous white-box attacks, such as FGSM and optimization methods, the adversary needs to have white-box access to the architecture and parameters of the model all the time. However, by deploying AdvGAN, once the feed-forward network is trained, it can instantly produce adversarial perturbations for any input instances without requiring access to the model itself anymore. We name this attack setting semi-whitebox.
|
| 16 |
+
|
| 17 |
+
To evaluate the effectiveness of our attack strategy AdvGAN, we first generate adversarial instances based on AdvGAN and other attack strategies on different target models. We then apply the stateof-the-art defenses to defend against these generated adversarial examples (Goodfellow et al., 2015; Tramèr et al., 2017a; M ˛adry et al., 2017a). We evaluate these attack strategies in both semi-whitebox and black-box settings. We show that adversarial examples generated by AdvGAN can achieve a high attack success rate, potentially due to the fact that these adversarial instances appear closer to real instances compared to other recent attack strategies.
|
| 18 |
+
|
| 19 |
+
Our contributions are listed as follows.
|
| 20 |
+
|
| 21 |
+
• Different from the previous optimization-based methods, we train a conditional adversarial network to directly produce adversarial examples, which are both perceptually realistic and achieve state-of-the-art attack success rate against different target models. • We show that AdvGAN can attack black-box models by training a distilled model. We propose to dynamically train the distilled model with query information and achieve high black-box attack success rate and targeted black-box attack, which is difficult to achieve for transferability-based black-box attacks. We use the state-of-the-art defense methods to defend against adversarial examples and show that AdvGAN achieves much higher attack success rate under current defenses. We apply AdvGAN on M ˛adry et al.’s MNIST challenge (2017a) and achieve $8 8 . 9 3 \%$ accuracy on the published robust model in the semi-whitebox setting and $9 2 . 7 6 \%$ in the blackbox setting, which wins the top position in the challenge (M ˛adry et al., 2017b).
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Here we review recent work on adversarial examples and generative adversarial networks.
|
| 26 |
+
|
| 27 |
+
Adversarial Examples A number of attack strategies to generate adversarial examples have been proposed in the white-box setting, where the adversary has full access to the classifier (Szegedy et al., 2014; Goodfellow et al., 2015; Carlini & Wagner, 2017a; Moosavi-Dezfooli et al., 2015; Papernot et al., 2016; Biggio et al., 2013; Kurakin et al., 2016). Goodfellow et al. propose the fast gradient sign method (FGSM), which applies a first-order approximation of the loss function to construct adversarial samples. Formally, given an instance $x$ , an adversary generates adversarial example $x _ { A } = x + \eta$ with $L _ { \infty }$ constraints in the untargeted attack setting as $\eta = \epsilon \cdot \mathrm { s i g n } ( \nabla _ { x } \ell _ { f } ( x , y ) )$ , where $\ell _ { f } ( \cdot )$ is the cross-entropy loss used to train the neural network $f$ , and $y$ represents the ground truth of $x$ . Optimization based methods have also been proposed to optimize adversarial perturbation for targeted attacks while satisfying certain constraints (Carlini & Wagner, 2017a; Liu et al., 2017). Its goal is to minimize the objective function as $| | \eta | | + \lambda \ell _ { f } ( x _ { A } , y )$ , where $| | \cdot | |$ is an appropriately chosen norm function. However, the optimization process is slow and can only optimize perturbation for one specific instance each time. In contrast, our feed-forward network can produce perturbation for any instance. It achieves higher attack success rate against different defenses and performs much faster than the current attack algorithms.
|
| 28 |
+
|
| 29 |
+
Independently from our work, feed-forward networks have been applied to generate adversarial perturbation (Baluja & Fischer, 2017). However, Baluja & Fischer combine the re-ranking loss and an $L _ { 2 }$ norm loss, aiming to constrain the generated adversarial instance to be close to the original one in terms of $L _ { 2 }$ ; while we apply a deep neural network as a discriminator to help distinguish the instance with other real images to encourage the perceptual quality of the generated adversarial examples.
|
| 30 |
+
|
| 31 |
+
Black-box Attacks Current learning systems usually do not allow white-box accesses against the model for security reasons. Therefore, there is a great need for black-box attacks analysis. Most of the black-box attack strategies are based on the transferability phenomenon (Papernot et al., 2017), where an adversary can train a local model first and generate adversarial examples against it, hoping the same adversarial examples will also be able to attack the other models. Many learning systems allow query accesses to the model. However, there is little work that can leverage query-based access to target models to construct adversarial samples and move beyond transferability. Papernot et al. (2017) proposed to train a local substitute model with queries to the target model to generate adversarial samples, but this strategy still relies on transferability. In contrast, we show that the proposed AdvGAN can perform black-box attacks without depending on transferability.
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 1: Overview of AdvGAN
|
| 35 |
+
|
| 36 |
+
Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) have achieved visually appealing results in both image generation (Radford et al., 2015; Gulrajani et al., 2017; Berthelot et al., 2017) and manipulation (Zhu et al., 2016) settings. Recently, image-to-image conditional GANs have further improved the quality of synthesis results (Isola et al., 2017; Zhu et al., 2017). We adopt a similar adversarial loss and image-to-image network architecture to learn the mapping from an original image to a perturbed output such that the perturbed image cannot be distinguished from real images in the original class. Different from prior work, we aim to produce output results that are not only visually realistic but also able to mislead target learning models.
|
| 37 |
+
|
| 38 |
+
# 3 GENERATING ADVERSARIAL EXAMPLES WITH ADVERSARIAL NETWORKS
|
| 39 |
+
|
| 40 |
+
# 3.1 PROBLEM DEFINITION
|
| 41 |
+
|
| 42 |
+
Let ${ \mathcal { X } } \subseteq { \mathcal { R } } ^ { n }$ be the feature space, with $n$ the number of features. Suppose that $( x _ { i } , y _ { i } )$ is the ith instance within the training set, which is comprised of feature vectors $x _ { i } \in \mathcal X$ , generated according to some unknown distribution $x _ { i } \sim \mathcal { P } _ { \mathrm { d a t a } }$ , and $y _ { i } ~ \in ~ \mathcal { V }$ the corresponding true class labels. The learning system aims to learn a classifier $f : \mathcal { X } \mathcal { Y }$ from the domain $\mathcal { X }$ to the set of classification outputs $\mathcal { V }$ , where $| \mathcal { V } |$ denotes the number of possible classification outputs. Given an instance $x$ , the goal of an adversary is to generate adversarial example $x _ { A }$ , which is classified as $f ( x _ { A } ) \neq y$ (untargeted attack), where $y$ denotes the true label; or $f ( x _ { A } ) = t$ (targeted attack) where $t$ is the target class. $x _ { A }$ should also be close to the original instance $x$ in terms of $L _ { 2 }$ or other distance metric.
|
| 43 |
+
|
| 44 |
+
# 3.2 ADVGAN FRAMEWORK
|
| 45 |
+
|
| 46 |
+
Figure 1 illustrates the overall architecture of AdvGAN, which mainly consists of three parts: a generator $\mathcal { G }$ , a discriminator $\mathcal { D }$ , and the target neural network $f$ . Here the generator $\mathcal { G }$ takes the original instance $x$ as its input and generates a perturbation $\mathcal G ( x )$ . Then $x + \mathcal { G } ( x )$ will be sent to the discriminator $\mathcal { D }$ , which is used to distinguish the generated data and the original instance $x$ . The goal of $\mathcal { D }$ is to encourage that the generated instance is indistinguishable with the data from its original class. To fulfill the goal of fooling a learning model, we first perform the white-box attack, where the target model is $f$ in this case. $f$ takes $x + \mathcal { G } ( x )$ as its input and outputs its loss $\mathcal { L } _ { a d v }$ , which represents the distance between the prediction and the target class $t$ (targeted attack), or the opposite of the distance between the prediction and the ground truth class (untargeted attack).
|
| 47 |
+
|
| 48 |
+
The adversarial loss (Goodfellow et al., 2014) can be written as: 1
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\mathcal { L } _ { \mathrm { G A N } } = \mathbb { E } _ { x } \log \mathcal { D } ( x ) + \mathbb { E } _ { x } \log ( 1 - \mathcal { D } ( x + \mathcal { G } ( x ) ) ) .
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Here, the discriminator $\mathcal { D }$ aims to distinguish the perturbed data $x + \mathcal { G } ( x )$ from the original data $x$ . 2 Note that the real data is sampled from the true class, so as to encourage that the generated instances are close to data from the original class.
|
| 55 |
+
|
| 56 |
+
The loss for fooling the target model $f$ in a targeted attack is:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathcal { L } _ { \mathrm { a d v } } ^ { f } = \mathbb { E } _ { x } \ell _ { f } ( x + \mathcal { G } ( x ) , t ) ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where origin $t$ is the t model get cl. The nd lo $\ell _ { f }$ denotes the loss function (e.g., cross-entropy loss) used to train t encourages the perturbed image to be misclassified as target class . $f$ $\mathcal { L } _ { a d v } ^ { f }$ $t$ Here we can also perform the untargeted attack by maximizing the distance between the prediction and the ground truth, but we will focus on the targeted attack in the rest of the paper.
|
| 63 |
+
|
| 64 |
+
To bound the magnitude of the perturbation, which is a common practice in prior work (Carlini & Wagner, $2 0 1 7 \mathrm { a }$ ; Liu et al., 2017; Bartlett & Wegkamp, 2008), we add a soft hinge loss on the $L _ { 2 }$ norm as
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathcal { L } _ { \mathrm { h i n g e } } = \mathbb { E } _ { x } \operatorname* { m a x } ( 0 , \| \mathcal { G } ( x ) \| _ { 2 } - c ) ,
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $c$ denotes a user-specified bound. This can also stabilize the GAN’s training, as shown in Isola et al. (2017). Finally, our full objective can be expressed as
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathcal { L } = \mathcal { L } _ { \mathrm { a d v } } ^ { f } + \alpha \mathcal { L } _ { \mathrm { G A N } } + \beta \mathcal { L } _ { \mathrm { h i n g e } } ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\alpha$ and $\beta$ control the relative importance of each objective. Note that ${ \mathcal { L } } _ { \mathrm { G A N } }$ here is used to encourage the perturbed data to appear similar to the original data $x$ , while $\mathcal { L } _ { \mathrm { a d v } } ^ { f }$ is leveraged to generate adversarial examples, optimizing for the high attack success rate. We obtain our $\mathcal { G }$ and $\mathcal { D }$ by solving the minmax game arg $\operatorname* { m i n } _ { \mathcal { G } } \operatorname* { m a x } _ { \mathcal { D } } \mathcal { L }$ .
|
| 77 |
+
|
| 78 |
+
# 3.3 BLACK-BOX ATTACKS WITH ADVERSARIAL NETWORKS
|
| 79 |
+
|
| 80 |
+
Static Distillation For black-box attack, we assume adversaries have no prior knowledge of training data or the model itself. In our experiments in Section 4, we randomly draw data that is disjoint from the training data of the black-box model to distill it, since we assume the adversaries have no prior knowledge about the training data or the model. To achieve black-box attacks, we first build a distilled network $f$ based on the output of the black-box model $b$ (Hinton et al., 2015). Once we obtain the distilled network $f$ , we carry out the same attack strategy as described in the white-box setting (see Equation (4)). Here, we minimize the following network distillation objective:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\arg \operatorname* { m i n } _ { \boldsymbol { f } } \mathbb { E } _ { \boldsymbol { x } } \mathcal { H } ( \boldsymbol { f } ( \boldsymbol { x } ) , \boldsymbol { b } ( \boldsymbol { x } ) ) ,
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where $f ( x )$ and $b ( x )$ denote the output from the distilled model and black-box model respectively for the given training image $x$ , and $\mathcal { H }$ denotes the commonly used cross-entropy loss. By optimizing the objective over all the training images, we can obtain a model $f$ which behaves very close to the black-box model $b$ . We then carry out the attack on the distilled network.
|
| 87 |
+
|
| 88 |
+
Note that unlike training the discriminator $\mathcal { D }$ , where we only use the real data from the original class to encourage that the generated instance is close to its original class, here we train the distilled model with data from all classes.
|
| 89 |
+
|
| 90 |
+
Dynamic Distillation Only training the distilled model with all the pristine training data is not enough, since it is unclear how close the black-box and distilled model perform on the generated adversarial examples, which have not appeared in the training set before. Here we propose an alternative minimization approach to dynamically make queries and train the distilled model $f$ and our generator $\mathcal { G }$ jointly. We perform the following two steps in each iteration. During iteration $i$ :
|
| 91 |
+
|
| 92 |
+
Table 1: Comparison with the state-of-the-art attack methods. Run time is measured for generating 1,000 adversarial instances during test time. Opt. represents the optimization based method, and Trans. denotes black-box attacks based on transferability.
|
| 93 |
+
|
| 94 |
+
<table><tr><td></td><td>FGSM</td><td>Opt.</td><td>Trans.</td><td>AdvGAN</td></tr><tr><td>Run time</td><td>0.06s</td><td>>3h</td><td>1</td><td><0.01s</td></tr><tr><td>Targeted Attack</td><td>√</td><td>√</td><td>Ens.</td><td>√</td></tr><tr><td>Black-box Attack</td><td></td><td></td><td>√</td><td><</td></tr></table>
|
| 95 |
+
|
| 96 |
+
1. Update $\mathcal { G } _ { i }$ given a fixed network $f _ { i - 1 }$ : We follow the white-box setting (see Equation 4) and train the generator and discriminator based on a previously distilled model $f _ { i - 1 }$ . We initialize the weights $\mathcal { G } _ { i }$ as $\mathcal { G } _ { i - 1 }$ .
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathcal { G } _ { i } , D _ { i } = \arg \operatorname* { m i n } _ { \mathcal { G } } \operatorname* { m a x } _ { \mathcal { D } } \mathcal { L } _ { \mathrm { a d v } } ^ { f _ { i - 1 } } + \alpha \mathcal { L } _ { \mathrm { G A N } } + \beta \mathcal { L } _ { \mathrm { h i n g e } }
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
2. Update $f _ { i }$ given a fixed generator $\mathcal { G } _ { i }$ : First, we use $f _ { i - 1 }$ to initialize $f _ { i }$ . Then, given the generated adversarial examples $x + \mathcal { G } _ { i } ( x )$ from $\mathcal { G } _ { i }$ , the distilled model $f _ { i }$ will be updated based on the set of new query results for the generated adversarial examples against the black-box model, as well as the original training images.
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
f _ { i } = \arg \operatorname* { m i n } _ { f } \mathbb { E } _ { x } \mathcal { H } ( f ( x ) , b ( x ) ) + \mathbb { E } _ { x } \mathcal { H } ( f ( x + \mathcal { G } _ { i } ( x ) ) , b ( x + \mathcal { G } _ { i } ( x ) ) ) ,
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where we use both the original images $x$ and the newly generated adversarial examples $x + s \mathcal { G } _ { i } ( x )$ to update $f$ .
|
| 109 |
+
|
| 110 |
+
In the experiment section, we compare the performance of both the static and dynamic distillation approaches and observe that simultaneously updating $\mathcal { G }$ and $f$ produces higher attack performance. See Table 2 for more details.
|
| 111 |
+
|
| 112 |
+
# 4 EXPERIMENTAL RESULTS
|
| 113 |
+
|
| 114 |
+
In this section, we first evaluate AdvGAN for both semi-whitebox and black-box settings on MNIST (LeCun & Cortes, 1998) and CIFAR-10 (Krizhevsky et al., 2014). We also perform a semi-whitebox attack on the ImageNet dataset(Deng et al., 2009). We then apply AdvGAN to generate adversarial examples on different target models and test the attack success rate for them under the state-of-theart defenses and show that our method can achieve higher attack success rates compared to other existing attack strategies. We generate all adversarial examples for different attack methods based on the under $L _ { \infty }$ bound of 0.3 on MNIST and 8 on CIFAR-10, for a fair comparison.
|
| 115 |
+
|
| 116 |
+
In general, as shown in Table 1, AdvGAN has several advantages over other white-box and blackbox attacks. For instance, regarding computation efficiency, AdvGAN performs much faster than others even including the efficient FGSM, although AdvGAN needs extra training time to train the generator. All these strategies can perform targeted attack except transferability based attack, although the ensemble strategy can help to improve. Besides, FGSM and optimization methods can only perform white-box attack, while AdvGAN is able to attack in semi-whitebox setting.
|
| 117 |
+
|
| 118 |
+
Implementation Details Our code and models will be available upon publication. We adopt a similar architecture from image-to-image translation literature (Isola et al., 2017; Zhu et al., 2017). In particular, we use the architecture of generator $\mathcal { G }$ from Johnson et al. (2016), and our discriminator $\mathcal { D }$ ’s architecture is similar to model C for MNIST and ResNet-32 for CIFAR-10. We apply the loss in Carlini & Wagner (2017c) as our loss $\begin{array} { r } { \mathcal { L } _ { a d v } ^ { f } = \operatorname* { m a x } ( \operatorname* { m a x } _ { i \neq t } f ( x _ { A } ) _ { i } - f ( x _ { A } ) _ { t } , \kappa ) } \end{array}$ , where $t$ is the represents the target network in the semi-whitebox setting and the distilled model in the black-box setting. We set the confidence $\kappa = 0$ for both Opt. and AdvGAN. We use Adam as our solver (Kingma & Ba, 2014), with a batch size of 128 and a learning rate of 0.001. For GANs training, we use the least squares objective proposed by LSGAN (Mao et al., 2016), as it has been shown to produce better results with more stable training.
|
| 119 |
+
|
| 120 |
+
Table 2: Accuracy of different models on pristine data, and the attack success rate of adversarial examples generated against different models by AdvGAN on MNIST and CIFAR-10. p: pristine test data; w: semi-whitebox attack; b-D: black-box attack with dynamic distillation strategy; b-S: black-box attack with static distillation strategy.
|
| 121 |
+
|
| 122 |
+
<table><tr><td>Model</td><td>MNIST A B</td><td>C</td><td>ResNet-32</td><td>CIFAR-10 Wide ResNet-34</td></tr><tr><td>Accuracy (p)</td><td>98.97% 99.17%</td><td>99.09%</td><td>92.41%</td><td>95.01%</td></tr><tr><td>Attack Success Rate (w)</td><td>97.9% 97.1%</td><td>98.3%</td><td>94.71%</td><td>99.30%</td></tr><tr><td>Attack Success Rate (b-D)</td><td>93.4% 90.1%</td><td>94.02%</td><td>78.47 %</td><td>81.81%</td></tr><tr><td>Attack Success Rate (b-S)</td><td>30.7% 66.63%</td><td>87.3%</td><td>10.3%</td><td>13.3%</td></tr></table>
|
| 123 |
+
|
| 124 |
+
Models Used in the Experiments For MNIST, in all of our experiments, we generate adversarial examples for three models whose architectures are shown in Appendix A. Models A and B are used in Tramèr et al. (2017b), which represent different architectures. Model C is the target network architecture used in (Carlini & Wagner, 2017a) for evaluating optimization based strategy. For CIFAR-10, we select ResNet-32 and Wide ResNet-34 (He et al., 2016; Zagoruyko & Komodakis, 2016) for our experiments. Specifically, we use a 32-layer ResNet implemented in TensorFlow3 and Wide ResNet derived from the variant of “w32-10 wide.”4 We show the classification accuracy of pristine MNIST and CIFAR-10 test data (p) and attack success rate of adversarial examples generated by AdvGAN on different models in Table 2.
|
| 125 |
+
|
| 126 |
+
# 4.1 ADVGAN IN SEMI-WHITEBOX SETTING
|
| 127 |
+
|
| 128 |
+
First, we apply different architectures for the target model $f$ as listed in Appendix A for MNIST and with ResNet and Wide ResNet for CIFAR-10. We first apply AdvGAN to perform semi-whitebox attack against each model on MNIST dataset. From the performance of semi-whitebox attack (Attack Rate (w)) in Table 2, we can see that AdvGAN is able to generate adversarial instances to attack all models with high attack success rate.
|
| 129 |
+
|
| 130 |
+
We also generate adversarial examples from the same original instance $x$ , targeting other different classes, as shown in Figures 2. In the semi-whitebox setting on MNIST (a)-(c), we can see that the generated adversarial examples for different models appear close to the ground truth/pristine images (lying on the diagonal of the matrix). Figure 2 (d)-(f) show the generated adversarial examples on MNIST in black-box setting. These adversarial examples generated by AdvGAN can successfully fool the black-box model and be misclassified as the target class shown on the top. The original images are shown on the diagonal. We also generate adversarial examples based on random original images, and results are shown in Appendix C.
|
| 131 |
+
|
| 132 |
+
In addition, we analyze the attack success rate based on different loss functions on MNIST. Under the same bounded perturbations (0.3), if we replace the full loss function in (4) with $\mathcal { L } = | | \mathcal { G } ( \boldsymbol { x } ) | | _ { 2 } +$ $\mathcal { L } _ { \mathrm { a d v } } ^ { f }$ , which is similar to the objective used in Baluja & Fischer (2017), the attack success rate becomes $8 6 . 2 \%$ . If we replace the loss function with $\begin{array} { r } { \mathcal { L } = \mathcal { L } _ { \mathrm { h i n g e } } + \mathcal { L } _ { \mathrm { a d v } } ^ { f } } \end{array}$ , the attack success rate is $9 1 . 1 \%$ , compared to that of AdvGAN, $9 8 . 3 \%$ .
|
| 133 |
+
|
| 134 |
+
Similarly, on CIFAR-10, we apply the same semi-whitebox attack for ResNet and Wide ResNet based on AdvGAN, and Figure 3(a) shows some adversarial examples, which are perceptually realistic. We show adversarial examples for the same original instance targeting different other classes. It is clear that with different targets, the adversarial examples keep similar visual quality compared to the pristine instances on the diagonal.
|
| 135 |
+
|
| 136 |
+
We also apply AdvGAN to generate adversarial examples on the ImageNet as shown in Figure 4 with $L _ { \infty }$ bound as 8. The added perturbation is unnoticeable while all the adversarial instances are misclassified into other target classes with high confidence.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 2: Adversarial examples generated from the same original image to different targets by AdvGAN on MNIST with semi-whitebox attack, (a), (b), and (c), and black-box attack, (c), (d), and (e). On the diagonal, the original images are shown.
|
| 140 |
+
|
| 141 |
+
# 4.2 ADVGAN IN BLACK-BOX SETTING
|
| 142 |
+
|
| 143 |
+
In this section, we evaluate the performance of AdvGAN for the black-box attack. Our black-box attack here is based on the dynamic distillation strategy. We construct a local model to distill model $f$ , and we select the architecture of Model C as our local model. Note that we randomly select a subset of instances disjoint from the training data of AdvGAN to train the local model; that is, we assume the adversaries do not have any prior knowledge of the training data or the model itself. With the dynamic distillation strategy, the adversarial examples generated by AdvGAN achieve an attack success rate, above $9 0 \%$ for MNIST and $8 0 \%$ for CIFAR-10, compared to $3 0 \%$ and $1 0 \%$ with the static distillation approach, as shown in Table 2.
|
| 144 |
+
|
| 145 |
+
We apply AdvGAN to generate adversarial examples for the same instance targeting different classes on MNIST and randomly select some instances to show in Figure 2 (d)-(f). By comparing with the pristine instances on the diagonal, we can see that these adversarial instances can achieve high perceptual quality as the original digits. Specifically, the original digit is somewhat highlighted by adversarial perturbations, which implies a type of perceptually realistic manipulation. Figure 3 (b) shows similar results for adversarial examples generated on CIFAR-10. These adversarial instances appear photo-realistic compared with the original ones on the diagonal. We show additional results in Appendix C.
|
| 146 |
+
|
| 147 |
+
# 4.3 ATTACK EFFECTIVENESS UNDER DEFENSES
|
| 148 |
+
|
| 149 |
+
Facing different types of attack strategies, various defenses have been provided. Among them, different types of adversarial training methods are the most effective. Goodfellow et al. (2015) first propose adversarial training as an effective way to improve the robustness of DNNs, and Tramèr et al. (2017a) extend it to ensemble adversarial learning. M ˛adry et al. (2017a) have also proposed robust networks against adversarial examples based on well-defined adversaries. Given the fact that AdvGAN strives to generate adversarial instances from the underlying true data distribution, it can essentially produce more photo-realistic adversarial perturbations compared with other attack strategies. Thus, AdvGAN could have a higher chance to produce adversarial examples that are resilient under different defense methods. In this section, we quantitatively evaluate this property for AdvGAN compared with other attack strategies.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 3: Adversarial examples generated by AdvGAN on CIFAR-10 for (a) semi-whitebox attack and (b) black-box attack. Image from each class is perturbed to other different classes. On the diagonal, the original images are shown. The corresponding perturbations (amplified by $1 0 \times$ ) are shown in (c) and (d).
|
| 153 |
+
|
| 154 |
+
Threat Model As shown in the literature, most of the current defense strategies are not robust when attacking against them (Carlini & Wagner, 2017b; He et al., 2017). Here we consider a weaker threat model, where the adversary is not aware of the defenses and directly tries to attack the original learning model, which is also the first threat model analyzed in Carlini & Wagner (2017b). In this case, if an adversary can still successfully attack the model, it implies the robustness of the attack strategy. Under this setting, we first apply different attack methods to generate adversarial examples based on the original model without being aware of any defense. Then we apply different defenses to directly defend against these adversarial instances.
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 4: Adversarial examples (a) generated by AdvGAN on ImageNet in the semi-whitebox setting, which are classified as (from left to right) poodle, ambulance, basketball, and electric guitar. Corresponding perturbations are visualized in (b).
|
| 158 |
+
|
| 159 |
+
Semi-whitebox Attack First, we consider the semi-whitebox attack setting, where the adversary has white-box access to the model architecture as well as the parameters. Here, we replace $f$ in Figure 1 with our model A, B, and C, respectively. As a result, adversarial examples will be generated against different models. We use three adversarial training defenses to train different models for each model architecture: standard FGSM adversarial training (Adv.) (Goodfellow et al., 2015), ensemble adversarial training (Ensemble) (Tramèr et al., 2017b), and iterative training (Iter. Adv.) (M ˛adry et al., 2017a).5 We evaluate the effectiveness of these attacks against these defended models. In Table 3, we show that the attack success rate of adversarial examples generated by AdvGAN on different models is higher than those of the fast gradient sign method (FGSM) and optimization methods (Opt.) (Carlini & Wagner, 2017a).
|
| 160 |
+
|
| 161 |
+
Black-box Attack For AdvGAN, we use model B as the black-box model and train a distilled model to perform black-box attack against model B and report the attack success rate in Table 4. For the black-box attack comparison purpose, transferability based attack is applied for FGSM and optimization-based methods (Opt.). We use FGSM and optimization-based methods (Opt.) to attack model A on MNIST, and we use these adversarial examples to test on model B and report the corresponding classification accuracy. We can see that the adversarial examples generated by the black-box AdvGAN consistently achieve much higher attack success rate compared with other attack methods. For CIFAR-10, we use ResNet as black-box model and train a distilled model to perform black-box attack against ResNet. To evaluate black-box attack for optimization method and FGSM, we use adversarial examples generated by attacking Wide ResNet and test them on ResNet to report black-box attack results for these two methods.
|
| 162 |
+
|
| 163 |
+
In addition, we apply AdvGAN to the MNIST challenge (M ˛adry et al., 2017b). Among all the methods, for white-box attack we achieve $8 8 . 9 3 \%$ accuracy on the published local model as shown in Table 5. For the reported black-box attack, we achieved the accuracy as $9 2 . 7 6 \%$ , outperforming all other state-of-the-art attack strategies.
|
| 164 |
+
|
| 165 |
+
Table 3: Attack success rate of adversarial examples generated by AdvGAN in semi-whitebox setting, and other white-box attacks under defenses on MNIST and CIFAR-10.
|
| 166 |
+
|
| 167 |
+
<table><tr><td>Data</td><td>Model</td><td>Defense</td><td>FGSM</td><td>Opt.</td><td>AdvGAN</td></tr><tr><td rowspan="4">MNIST</td><td>A</td><td>Adv. Ensemble</td><td>4.3% 1.6%</td><td>4.6% 4.2%</td><td>8.0% 6.3%</td></tr><tr><td>B</td><td>Iter.Adv. Adv. Ensemble</td><td>4.4% 6.0% 2.7%</td><td>2.96% 4.5%</td><td>5.6% 7.2%</td></tr><tr><td></td><td>Iter.Adv. Adv.</td><td>9.0% 2.7%</td><td>3.18% 3.0% 2.95%</td><td>5.8% 6.6%</td></tr><tr><td>C</td><td>Ensemble Iter.Adv.</td><td>1.6% 1.6%</td><td>2.2% 1.9%</td><td>18.7% 13.5% 12.6%</td></tr><tr><td rowspan="2">CIFAR</td><td>ResNet</td><td>Adv. Ensemble. Iter.Adv</td><td>13.10% 10.00% 22.8%</td><td>11.9% 10.3% 21.4%</td><td>16.03% 14.32 % 29.47 %</td></tr><tr><td>WideResNet</td><td>Adv. Ensemble Iter.Adv.</td><td>5.04% 4.65% 14.9%</td><td>7.61% 8.43% 13.90%</td><td>14.26% 13.94 % 20.75%</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Table 4: Attack success rate of adversarial examples generated by different black-box adversarial strategies under defenses on MNIST and CIFAR-10
|
| 170 |
+
|
| 171 |
+
<table><tr><td></td><td colspan="3">MNIST</td><td colspan="3">CIFAR-10</td></tr><tr><td>Defense</td><td>FGSM</td><td>Opt.</td><td>AdvGAN</td><td>FGSM</td><td>Opt.</td><td>AdvGAN</td></tr><tr><td>Adv.</td><td>3.1%</td><td>3.5%</td><td>11.5%</td><td>13.58%</td><td>10.8%</td><td>15.96%</td></tr><tr><td>Ensemble</td><td>2.5%</td><td>3.4%</td><td>10.3%</td><td>10.49%</td><td>9.6%</td><td>12.47 %</td></tr><tr><td>Iterative Adv.</td><td>2.4%</td><td>2.5%</td><td>12.2%</td><td>22.96%</td><td>21.70%</td><td>24.28%</td></tr></table>
|
| 172 |
+
|
| 173 |
+
Table 5: Accuracy of the MadryLab public model under different attacks in white-box setting. The AdvGAN here achieved the best performance.
|
| 174 |
+
|
| 175 |
+
<table><tr><td>Method</td><td>Accuracy (xent loss)</td><td>Accuracy (cw loss)</td></tr><tr><td>FGSM</td><td>95.23%</td><td>96.29%</td></tr><tr><td>PGD</td><td>93.66%</td><td>93.79%</td></tr><tr><td>Opt</td><td>1</td><td>91.69%</td></tr><tr><td>AdvGAN</td><td>1</td><td>88.93%</td></tr></table>
|
| 176 |
+
|
| 177 |
+
# 4.4 ADVERSARIAL PERTURBATION ANALYSIS.
|
| 178 |
+
|
| 179 |
+
To understand the adversarial perturbation pattern better, we plot out corresponding perturbations (amplified by a factor of 10) for CIFAR-10 in Figure 3 (c) and (d) and ImageNet in Figure 4 (b). From the visualization of perturbation, it shows that the perturbations do not resemble anything in particular about the original image or the target class. Although training AdvGAN exposes it to realistic instances, the perturbations it generates do not simply interpolate towards an example of the target class.
|
| 180 |
+
|
| 181 |
+
# 4.5 HIGH RESOLUTION ADVERSARIAL EXAMPLES ANALYSIS
|
| 182 |
+
|
| 183 |
+
To evaluate AdvGAN’s ability to generate high resolution adversarial examples, we generate the high resolution adversarial examples for Inception_v3 and quantify their attack success rate and perceptual realism.
|
| 184 |
+
|
| 185 |
+
Experiment settings. In the following experiments, we select toy poodle as our target label for all images. We select 100 benign images from the DEV set of the NIPS 2017 targeted adversarial attack competition.6 This competition provided a dataset compatible with ImageNet. We generate adversarial examples $2 9 9 \times 2 9 9$ pixels) under an $L _ { \infty }$ perturbation bound of 0.01 (pixels values are in the range $\in \ [ 0 , 1 ] )$ for the Inception_v3 model, whose input size is $2 9 9 \times 2 9 9$ . The details of architectures for generator and discriminator we used are listed in Appendix D.
|
| 186 |
+
|
| 187 |
+
Table 6: Parameters of generated high resolution adversarial examples
|
| 188 |
+
|
| 189 |
+
<table><tr><td>Dateset</td><td>Model</td><td>Target Label</td><td>Resolution</td><td>Loo bound</td><td>Attack Success Rate</td></tr><tr><td>ImageNet</td><td>Inception_v3</td><td>toy poodle</td><td>299×299</td><td>0.01</td><td>100%</td></tr></table>
|
| 190 |
+
|
| 191 |
+
In Figure 8 in the appendix, we show the original images on the left with the correct label, and we show adversarial examples generated by AdvGAN on the right with the target label.
|
| 192 |
+
|
| 193 |
+
Human Perceptual Study. We validate the realism of AdvGAN’s adversarial examples with a user study on Amazon Mechanical Turk (AMT). We use 100 pairs of original images and adversarial examples (generated as described above) and ask workers to choose which image of a pair is more visually realistic.
|
| 194 |
+
|
| 195 |
+
Our study follows a protocol from Zhang et al. (2016) and Isola et al. (2017), where a worker is shown a pair of images for 2 seconds, then the worker has unlimited time to choose. We limit each worker to at most 20 of these tasks. We collected 500 choices, about 5 per pair of images, from 50 workers on AMT.
|
| 196 |
+
|
| 197 |
+
The AdvGAN examples were chosen as more realistic than the original image in $4 9 . 4 \% \pm 1 . 9 6 \%$ of the tasks (random guessing would result in about $5 0 \%$ ). This result show that these high-resolution AdvGAN adversarial examples are about as realistic as benign images.
|
| 198 |
+
|
| 199 |
+
# 5 CONCLUSION
|
| 200 |
+
|
| 201 |
+
In this paper, we propose AdvGAN to generate adversarial examples using generative adversarial networks (GANs). In our AdvGAN framework, once trained, the feed-forward generator can produce adversarial perturbations efficiently. It can also perform both semi-whitebox and black-box attacks with high attack success rate. In addition, when we apply AdvGAN to generate adversarial instances on different models without knowledge of the defenses in place, the generated adversarial examples can attack the state-of-the-art defenses with higher attack success rate than examples generated by the competing methods. This property makes AdvGAN a promising candidate for improving adversarial training defense methods. The generated adversarial examples produced by AdvGAN preserve high perceptual quality due to GANs’ distribution approximation property.
|
| 202 |
+
|
| 203 |
+
# REFERENCES
|
| 204 |
+
|
| 205 |
+
Shumeet Baluja and Ian Fischer. Adversarial transformation networks: Learning to generate adversarial examples. arXiv preprint arXiv:1703.09387, 2017.
|
| 206 |
+
|
| 207 |
+
Peter L Bartlett and Marten H Wegkamp. Classification with a reject option using a hinge loss. JMLR, 9(Aug):1823–1840, 2008.
|
| 208 |
+
|
| 209 |
+
David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017.
|
| 210 |
+
|
| 211 |
+
Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndic, Pavel Laskov, Gior- ´ gio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 387– 402. Springer, 2013.
|
| 212 |
+
|
| 213 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, 2017, 2017a.
|
| 214 |
+
|
| 215 |
+
Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. arXiv preprint arXiv:1705.07263, 2017b.
|
| 216 |
+
|
| 217 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pp. 39–57. IEEE, 2017c.
|
| 218 |
+
|
| 219 |
+
Dan Ciresan, Alessandro Giusti, Luca M Gambardella, and Jürgen Schmidhuber. Deep neural networks segment neuronal membranes in electron microscopy images. In NIPS, pp. 2843–2851, 2012.
|
| 220 |
+
|
| 221 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pp. 248–255. IEEE, 2009.
|
| 222 |
+
|
| 223 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pp. 2672–2680, 2014.
|
| 224 |
+
|
| 225 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
|
| 226 |
+
|
| 227 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. In NIPS, 2017.
|
| 228 |
+
|
| 229 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016.
|
| 230 |
+
|
| 231 |
+
Warren He, James Wei, Xinyun Chen, Nicholas Carlini, and Dawn Song. Adversarial example defenses: Ensembles of weak defenses are not strong. arXiv preprint arXiv:1706.04701, 2017.
|
| 232 |
+
|
| 233 |
+
Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012.
|
| 234 |
+
|
| 235 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 236 |
+
|
| 237 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. CVPR, 2017.
|
| 238 |
+
|
| 239 |
+
Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, pp. 694–711. Springer, 2016.
|
| 240 |
+
|
| 241 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 242 |
+
|
| 243 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, pp. 1097–1105, 2012.
|
| 244 |
+
|
| 245 |
+
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 2014.
|
| 246 |
+
|
| 247 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016.
|
| 248 |
+
|
| 249 |
+
Yann LeCun and Corrina Cortes. The MNIST database of handwritten digits. 1998.
|
| 250 |
+
|
| 251 |
+
Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuo motor policies. JMLR, 17(39):1–40, 2016.
|
| 252 |
+
|
| 253 |
+
Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. In ICLR, 2017.
|
| 254 |
+
|
| 255 |
+
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. arXiv preprint ArXiv:1611.04076, 2016.
|
| 256 |
+
|
| 257 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. arXiv preprint arXiv:1511.04599, 2015.
|
| 258 |
+
|
| 259 |
+
Aleksander M ˛adry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv:1706.06083 [cs, stat], June 2017a.
|
| 260 |
+
|
| 261 |
+
Aleksander M ˛adry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu, 2017b. URL https://github.com/MadryLab/mnist_challenge.
|
| 262 |
+
|
| 263 |
+
Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In 2016 IEEE European Symposium on Security and Privacy (EuroS&P), pp. 372–387. IEEE, 2016.
|
| 264 |
+
|
| 265 |
+
Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against deep learning systems using adversarial examples. In Proceedings of the 2017 ACM Asia Conference on Computer and Communications Security, 2017.
|
| 266 |
+
|
| 267 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 268 |
+
|
| 269 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
|
| 270 |
+
|
| 271 |
+
Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017a.
|
| 272 |
+
|
| 273 |
+
Florian Tramèr, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. The space of transferable adversarial examples. arXiv preprint arXiv:1704.03453, 2017b.
|
| 274 |
+
|
| 275 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 276 |
+
|
| 277 |
+
Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European Conference on Computer Vision, pp. 649–666. Springer, 2016.
|
| 278 |
+
|
| 279 |
+
Jun-Yan Zhu, Philipp Krähenbühl, Eli Shechtman, and Alexei A Efros. Generative visual manipulation on the natural image manifold. In ECCV, pp. 597–613. Springer, 2016.
|
| 280 |
+
|
| 281 |
+
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. ICCV, 2017.
|
| 282 |
+
|
| 283 |
+
# A ARCHITECTURE OF MODELS
|
| 284 |
+
|
| 285 |
+
Table 7: Model architectures for the MNIST
|
| 286 |
+
|
| 287 |
+
<table><tr><td>A</td><td>B</td><td>C</td></tr><tr><td>Conv(64,5,5)+Relu</td><td>Conv(64,8,8)+Relu</td><td>Conv(32,3,3)+Relu</td></tr><tr><td>Conv(64,5,5)+Relu</td><td>Dropout(0.2)</td><td>Conv(32,3,3)+Relu</td></tr><tr><td>Dropout(0.25)</td><td>Conv(128,6,6)+Relu</td><td>MaxPooling(2,2)</td></tr><tr><td>FC(128)+Relu</td><td>Conv(128,5,5)+Relu</td><td>Conv(64,3,3)+Relu</td></tr><tr><td>Dropout(0.5)</td><td>Dropout(0.5)</td><td>Conv(64,3,3)+Relu</td></tr><tr><td>FC(10)+Softmax</td><td>FC(10)+Softma</td><td>MaxPooling(2,2) FC(200)+Relu</td></tr></table>
|
| 288 |
+
|
| 289 |
+
# B NETWORK ARCHITECTURES
|
| 290 |
+
|
| 291 |
+
Generator architecture We follow the naming rules used in Johnson et al. (2016)’s Github repository7 as well as Zhu et al. (2017) . Let $\mathrm { c } 3 \mathrm { s } 1 \mathrm { - } \mathrm { k }$ denotes $3 \times 3$ Convolution-InstanceNorm-ReLU layer with $\mathbf { k }$ filter and stride 1. Rk means residual block that contains two $3 \times 3$ convolution layers with the same numbers of filters. dk denotes the $3 \times 3$ Convolution-InstanceNorm-ReLU layer with $\mathbf { k }$ filters and stride 2. uk denotes a $3 \times 3$ fractional-strided-ConvolutionInstanceNorm-ReLU layer with $\mathbf { k }$ filters, and stride $\textstyle { \frac { 1 } { 2 } }$ . .
|
| 292 |
+
|
| 293 |
+
The generator structures consists of: $\mathbf { \Delta } _ { \mathbf { C } } 3 \mathbf { s } 1 - 8$ , d16, d32, $\tt { r 3 2 }$ , $\tt { r 3 2 }$ , r32, r32, u16, u8, c3s1-3
|
| 294 |
+
|
| 295 |
+
Discriminator architecture We use CNNs as our discriminator network (Radford et al., 2015). Let Ck denote a $4 \times 4$ Convolution-InstanceNorm-LeakyReLU layer with k filters and stride 2. After the last conv layer, we apply a FC layer to produce a 1 dimensional output. We do not use InstanceNorm for the first C8 layer. We use leaky ReLUs with slope 0.2.
|
| 296 |
+
|
| 297 |
+
The discriminator architecture is: C8, C16, C32, FC
|
| 298 |
+
|
| 299 |
+
# C ADDITIONAL ADVERSARIAL EXAMPLES
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
Figure 5: Adversarial examples generated by AdvGAN on MNIST against different models in the semi-whitebox setting. Here the adversarial examples are randomly sampled corresponding to different original images.
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
Figure 6: Adversarial examples generated by AdvGAN on MNIST against different models in the black-box setting. Here the adversarial examples are randomly sampled corresponding to different original images.
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 7: Adversarial examples generated by AdvGAN on CIFAR-10. Here the adversarial examples are randomly sampled corresponding to different original images.
|
| 309 |
+
|
| 310 |
+
Table 8: Comparisons of perturbations generated by AdvGAN and the state-of-the-art algorithms on MNIST and CIFAR-10. We report the mean value of perturbation amount as “mean” and attack success rate as “prob.”
|
| 311 |
+
|
| 312 |
+
<table><tr><td rowspan="3">Method</td><td colspan="6">MNIST</td><td colspan="4">CIFAR-10</td></tr><tr><td colspan="2">A</td><td colspan="2">B</td><td colspan="2">C</td><td colspan="2">ResNet-32</td><td colspan="2">Wide ResNet-34</td></tr><tr><td>mean</td><td>prob</td><td>mean</td><td>prob</td><td>mean</td><td>prob</td><td>mean</td><td>prob</td><td>mean</td><td>prob</td></tr><tr><td>AdvGAN</td><td>0.149</td><td>98%</td><td>0.157</td><td>97%</td><td>0.144</td><td>98%</td><td>0.025</td><td>95%</td><td>0.024</td><td>99%</td></tr><tr><td>Cw</td><td>0.089</td><td>99%</td><td>0.100</td><td>99%</td><td>0.070</td><td>100%</td><td>0.023</td><td>100%</td><td>0.020</td><td>98%</td></tr><tr><td>FGSM</td><td>0.202</td><td>55%</td><td>0.193</td><td>49%</td><td>0.192</td><td>18%</td><td>0.0301</td><td>23%</td><td>0.031</td><td>26%</td></tr></table>
|
| 313 |
+
|
| 314 |
+
# D HIGH RESOLUTION ADVERSARIAL EXAMPLES FOR AN IMAGENET-COMPATIBLE SET
|
| 315 |
+
|
| 316 |
+
The structure of generator for ImageNet consists of:
|
| 317 |
+
c7s1-8, d16, d32, d64, d64, d64, d64, r64, r64, r64, r64, u64,
|
| 318 |
+
u64, u64, u64, u32, u16, u8, c7s1-3
|
| 319 |
+
|
| 320 |
+
The architecture of discriminator for ImageNet is: C8, C16, C32, FC
|
| 321 |
+
|
| 322 |
+

|
| 323 |
+
|
| 324 |
+

|
| 325 |
+
(a) Benign image (labeled as dung beetle)
|
| 326 |
+
|
| 327 |
+

|
| 328 |
+
(c) Benign image (labeled as vase)
|
| 329 |
+
(e) Benign image (labeled as bottlecap)
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
|
| 333 |
+

|
| 334 |
+
(b) Adversarial image (labeled as toy poodle)
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
(d) Adversarial image (labeled as toy poodle)
|
| 338 |
+
(f) Adversarial image (labeled as toy poodle)
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
|
| 342 |
+

|
| 343 |
+
(g) Benign image (labeled as folding chair)
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
(i) Benign image (labeled as yurt)
|
| 347 |
+
(k) Benign image (labeled as buckeye)
|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
(h) Adversarial image (labeled as toy poodle)
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
(j) Adversarial image (labeled as toy poodle)
|
| 356 |
+
(l) Adversarial image (labeled as toy poodle)
|
| 357 |
+
|
| 358 |
+

|
| 359 |
+
Figure 8: Examples from an ImageNet-compatible set. Left: original image; right: adversaria image generated by AdvGAN against Inception_v3.
|
md/train/HktK4BeCZ/HktK4BeCZ.md
ADDED
|
@@ -0,0 +1,439 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING DEEP MEAN FIELD GAMES FOR MODELING LARGE POPULATION BEHAVIOR
|
| 2 |
+
|
| 3 |
+
Jiachen Yang1, Xiaojing $\mathbf { Y e } ^ { 2 }$ , Rakshit Trivedi1, Huan $\mathbf { X } \mathbf { u } ^ { 1 }$ & Hongyuan Zha1
|
| 4 |
+
yjiachen@gmail.com, xye@gsu.edu, rstrivedi@gatech.edu,
|
| 5 |
+
huan.xu@isye.gatech.edu, zha@cc.gatech.edu
|
| 6 |
+
1Georgia Institute of Technology
|
| 7 |
+
2Georgia State University
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
We consider the problem of representing collective behavior of large populations and predicting the evolution of a population distribution over a discrete state space. A discrete time mean field game (MFG) is motivated as an interpretable model founded on game theory for understanding the aggregate effect of individual actions and predicting the temporal evolution of population distributions. We achieve a synthesis of MFG and Markov decision processes (MDP) by showing that a special MFG is reducible to an MDP. This enables us to broaden the scope of mean field game theory and infer MFG models of large real-world systems via deep inverse reinforcement learning. Our method learns both the reward function and forward dynamics of an MFG from real data, and we report the first empirical test of a mean field game model of a real-world social media population.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Nothing takes place in the world whose meaning is not that of some maximum or minimum. (Leonhard Euler)
|
| 16 |
+
|
| 17 |
+
Major global events shaped by large populations in social media, such as the Arab Spring, the Black Lives Matter movement, and the fake news controversy during the 2016 U.S. presidential election, provide significant impetus for devising new models that account for macroscopic population behavior resulting from the aggregate decisions and actions taken by all individuals (Howard et al., 2011; Anderson & Hitlin, 2016; Silverman, 2016). Just as physical systems behave according to the principle of least action, to which Euler’s statement alludes, population behavior consists of individual actions that may be optimal with respect to some objective. The increasing usage of social media in modern societies lends plausibility to this hypothesis (Perrin, 2015), since the availability of information enables individuals to plan and act based on their observations of the global population state. For example, a population’s behavior directly affects the ranking of a set of trending topics on social media, represented by the global population distribution over topics, while each user’s observation of this global state influences their choice of the next topic in which to participate, thereby contributing to future population behavior (Twitter, 2017). In general, this feedback may be present in any system where the distribution of a large population over a state space is observable (or partially observable) by each individual, whose behavior policy generates actions given such observations. This motivates multiple criteria for a model of population behavior that is learnable from real data:
|
| 18 |
+
|
| 19 |
+
1. The model captures the dependency between population distribution and their actions.
|
| 20 |
+
2. It represents observed individual behavior as optimal for some implicit reward.
|
| 21 |
+
3. It enables prediction of future population distribution given measurements at previous times.
|
| 22 |
+
|
| 23 |
+
We present a mean field game (MFG) approach to address the modeling and prediction criteria. Mean field games originated as a branch of game theory that provides tractable models of large agent populations, by considering the limit of $N$ -player games as $N$ tends to infinity (Lasry & Lions, 2007). In this limit, an agent population is represented via their distribution over a state space, and each agent’s optimal strategy is informed by a reward that is a function of the population distribution and their aggregate actions. The stochastic differential equations that characterize MFG can be specialized to many settings: optimal production rate of exhaustible resources such as oil among many producers (Gueant et al. ´ , 2011); optimizing between conformity to popular opinion and consistency with one’s initial position in opinion networks (Bauso et al., 2016); and the transition between competing technologies with economy of scale (Lachapelle et al., 2010). Representing agents as a distribution means that MFG is scalable to arbitrary population sizes, enabling it to simulate real-world phenomenon such as the Mexican wave in stadiums (Gueant et al. ´ , 2011).
|
| 24 |
+
|
| 25 |
+
As the model detailed in Section 3 will show, MFG naturally addresses the modeling criteria in our problem context while overcoming limitations of alternative predictive methods. For example, time series analysis builds predictive models from data, but these models are incapable of representing any motivation (i.e. reward) that may produce a population’s behavior policy. Alternatively, methods that employ the underlying population network structure have assumed that nodes are only influenced by a local neighborhood, do not account for a global state, and may face difficulty in explaining events as the result of any implicit optimization. (Farajtabar et al., 2015; De et al., 2016). MFG is unique as a descriptive model whose solution tells us how a system naturally behaves according to its underlying optimal control policy. This observation enables us to draw a connection with the framework of Markov decision processes (MDP) and reinforcement learning (RL) (Sutton & Barto, 1998). The crucial difference from a traditional MDP viewpoint is that we frame the problem as MFG model inference via MDP policy optimization: we use the MFG model to describe natural system behavior by solving an associated MDP, without imposing any control on the system. MFG offers a computationally tractable framework for adapting inverse reinforcement learning (IRL) methods (Ng & Russell, 2000; Ziebart et al., 2008; Finn et al., 2016), with flexible neural networks as function approximators, to learn complex reward functions that may explain behavior of arbitrarily large populations. In the other direction, RL enables us to devise a data-driven method for solving an MFG model of a real-world system for temporal prediction. While research on the theory of MFG has progressed rapidly in recent years, with some examples of numerical simulation of synthetic toy problems, there is a conspicuous absence of scalable methods for empirical validation (Lachapelle et al., 2010; Achdou et al., 2012; Bauso et al., 2016). Therefore, while we show how MFG is well-suited for the specific problem of modeling population behavior, we also demonstrate a general data-driven approach to MFG inference via a synthesis of MFG and MDP.
|
| 26 |
+
|
| 27 |
+
Our main contributions are the following. We propose a data-driven approach to learn an MFG model along with its reward function, showing that research in MFG need not be confined to toy problems with artificial reward functions. Specifically, we derive a discrete time graph-state MFG from general MFG and provide detailed interpretation in a real-world setting (Section 3). Then we prove that a special case can be reduced to an MDP and show that finding an optimal policy and reward function in the MDP is equivalent to inference of the MFG model (Section 4). Using our approach, we empirically validate an MFG model of a population’s activity distribution on social media, achieving significantly better predictive performance compared to baselines (Section 5). Our synthesis of MFG with MDP has potential to open new research directions for both fields.
|
| 28 |
+
|
| 29 |
+
# 2 RELATED WORK
|
| 30 |
+
|
| 31 |
+
Mean field games originated in the work of Lasry & Lions (2007), and independently as stochastic dynamic games in Huang et al. (2006), both of which proposed mean field problems in the form of differential equations for modeling problems in economics and analyzed the existence and uniqueness of solutions. Gueant et al. ´ (2011) provided a survey of MFG models and discussed various applications in continuous time and space, such as a model of population distribution that informed the choice of application in our work. Even though the MFG framework is agnostic towards the choice of cost function (i.e. negative reward), prior work make strong assumptions on the cost in order to attain analytic solutions. We take a view that the dynamics of any game is heavily impacted by the reward function, and hence we propose methods to learn the MFG reward function from data.
|
| 32 |
+
|
| 33 |
+
Discretization of MFGs in time and space have been proposed (Gomes et al., 2010; Achdou et al., 2012; Gueant ´ , 2015), serving as the starting point for our model of population distribution over discrete topics; while these early work analyze solution properties and lack empirical verification, we focus on algorithms for attaining solutions in real-world settings. Related to our application case, prior work by Bauso et al. (2016) analyzed the evolution of opinion dynamics in multi-population environments, but they imposed a Gaussian density assumption on the initial population distribution and restrictions on agent actions, both of which limit the generality of the model and are not assumed in our work. There is a collection of work on numerical finite-difference methods for solving continuous mean field games (Achdou et al., 2012; Lachapelle et al., 2010; Carlini & Silva, 2014). These methods involve forward-backward or Newton iterations that are sensitive to initialization and have inherent computational challenges for large real-valued state and action spaces, which limit these methods to toy problems and cannot be scaled to real-world problems. We overcome these limitations by showing how the MFG framework enables adaptation of RL algorithms that have been successful for problems involving unknown reward functions in large real-world domains.
|
| 34 |
+
|
| 35 |
+
In reinforcement learning, there are numerous value- and policy-based algorithms employing deep neural networks as function approximators for solving MDPs with large state and action spaces (Mnih et al., 2013; Silver et al., 2014; Lillicrap et al., 2015). Even though there are generalizations to multi-agent settings (Hu et al., 1998; Littman, 2001; Lowe et al., 2017), the MDP and Markov game frameworks do not easily suggest how to represent systems involving thousands of interacting agents whose actions induce an optimal trajectory through time. In our work, mean field game theory is the key to framing the modeling problem such that RL can be applied.
|
| 36 |
+
|
| 37 |
+
Methods in unknown MDP estimation and inverse reinforcement learning aim to learn an optimal policy while estimating an unknown quantity of the MDP, such as the transition law (Burnetas & Katehakis, 1997), secondary parameters (Budhiraja et al., 2012), and the reward function (Ng & Russell, 2000). The maximum entropy IRL framework has proved successful at learning reward functions from expert demonstrations (Ziebart et al., 2008; Boularias et al., 2011; Kalakrishnan et al., 2013). This probabilistic framework can be augmented with deep neural networks for learning complex reward functions from demonstration samples (Wulfmeier et al., 2015; Finn et al., 2016). Our MFG model enables us to extend the sample-based IRL algorithm in Finn et al. (2016) to the problem of learning a reward function under which a large population’s behavior is optimal, and we employ a neural network to process MFG states and actions efficiently.
|
| 38 |
+
|
| 39 |
+
# 3 MEAN FIELD GAMES
|
| 40 |
+
|
| 41 |
+
We begin with an overview of a continuous-time mean field games over graphs, and derive a general discrete-time graph-state MFG (Gueant ´ , 2015). Then we give a detailed presentation of a discretetime MFG over a complete graph, which will be the focus for the rest of this paper.
|
| 42 |
+
|
| 43 |
+
# 3.1 MEAN FIELD GAMES ON GRAPHS
|
| 44 |
+
|
| 45 |
+
Let $\mathcal { G } = ( \nu , \mathcal { E } )$ be a directed graph, where the vertex set $\mathcal { V } = \{ 1 , \ldots , d \}$ represents $d$ possible states of each agent, and $\mathcal { E } \subseteq \mathcal { V } \times \mathcal { V }$ is the edge set consisting of all possible direct transition between states (i.e., a agent can hop from $i$ to $j$ only if $( i , j ) \in \mathcal { E } )$ ). For each node $i \in \nu$ , define $\mathcal { V } _ { i } ^ { + } : = \{ j : ( j , i ) \in$ $\mathcal { E } \}$ , $, \mathcal { V } _ { i } ^ { - } : = \{ j : ( i , j ) \in E \}$ , and $\bar { \mathcal { V } } _ { i } ^ { + } : = \mathcal { V } _ { i } ^ { + } \cup \{ i \}$ and $\bar { \mathcal { V } } _ { i } ^ { - } : = \mathcal { V } _ { i } ^ { - } \cup \{ i \}$ . Let $\pi _ { i } ( t )$ be the density (proportion) of agent population in state $i$ at time $t$ , and $\pi ( t ) : = ( \pi _ { 1 } ( t ) , \ldots , \pi _ { d } ( t ) )$ . Population dynamics are generated by right stochastic matrices $P ( t ) \in \mathbb { S } ( \mathcal { G } )$ , where $\mathbb { S } ( \mathcal { G } ) : = \mathbb { S } _ { 1 } ( \mathcal { G } ) \times \dots \times \quad$ $\mathbb { S } _ { d } ( \mathcal { G } )$ and each row $P _ { i } ( t )$ belongs to $\mathbb { S } _ { i } ( \mathcal { G } ) : = \{ p \in \Delta ^ { d - 1 } \mid \mathsf { s u p p } ( p ) \subset \bar { \mathcal { V } } _ { i } ^ { - } \}$ where $\Delta ^ { d - 1 }$ is the simplex in $\mathbb { R } ^ { d }$ . Moreover, we have a value function $V _ { i } ( t )$ of state $i$ at time $t$ , and a reward function $r _ { i } ( \bar { \pi } ( t ) , P _ { i } ( t ) ) ^ { \mathrm { ~ 1 ~ } }$ , quantifying the instantaneous reward for agents in state $i$ taking transitions with probability $P _ { i } ( t )$ when the current distribution is $\pi ( t )$ . We are mainly interested in a discrete time graph state MFG, which is derived from a continuous time MFG by the following proposition. Appendix A provides a derivation from the continuous time MFG.
|
| 46 |
+
|
| 47 |
+
Proposition 1. Under a semi-implicit discretization scheme with unit time step labeled by $n$ , the backward Hamilton-Jacobi-Bellman (HJB) equation and the forward Fokker-Planck equation for each $i \in \{ 1 , \ldots , d \}$ and $n = 0 , \ldots , N - 1$ in a discrete time graph state MFG are given by:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\begin{array} { c c c } { { ( H J B ) } } & { { } } & { { V _ { i } ^ { n } \ = \mathrm { m a x } _ { P _ { i } ^ { n } \in \mathbb { S } _ { i } ( \mathcal { G } ) } \left\{ r _ { i } ( \pi ^ { n } , P _ { i } ^ { n } ) + \sum _ { j \in \bar { \mathcal { V } } _ { i } ^ { - } } P _ { i j } ^ { n } V _ { j } ^ { n + 1 } \right\} } } \\ { { ( F o k k e r . P l a n c k ) } } & { { } } & { { \ \pi _ { i } ^ { n + 1 } = \sum _ { j \in \bar { \mathcal { V } } _ { i } ^ { + } } P _ { j i } ^ { n } \pi _ { j } ^ { n } } } \end{array}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
# 3.2 DISCRETE TIME MFG OVER COMPLETE GRAPH
|
| 54 |
+
|
| 55 |
+
Proposition 1 shows that a discrete time MFG given in Gomes et al. (2010) can be seen as a special case of a discrete time graph state MFG with a complete graph (such that $\mathbb { S } ( \mathcal { G } ) = \Delta ^ { d - 1 } \times \cdot \cdot \cdot \times \dot { \Delta } ^ { d - 1 }$ ( $\mathit { \Delta } \cdot \mathit { \Delta } \mathcal { d }$ of $\Delta ^ { d - 1 } )$ )). We focus on the complete graph in this paper, as the methodology can be readily applied to general directed graphs. While Section 4 will show a connection between MFG and MDP, we note here that a “state” in the MFG sense is a node in $\nu$ and not an MDP state. 2 We now interpret the model using the example of evolution of user activity distribution over topics on social media, to provide intuition and set the context for our real-world experiments in Section 5. Independent of any particular interpretation, the MFG approach is generally applicable to any problem where population size vastly outnumbers a set of discrete states.
|
| 56 |
+
|
| 57 |
+
• Population distribution $\pi ^ { n } \in \Delta ^ { d - 1 }$ for $n = 0 , \ldots , N$ . Each $\pi ^ { n }$ is a discrete probability distribution over $d$ topics, where $\pi _ { i } ^ { n }$ is the fraction of people who posted on topic $i$ at time $n$ . Although a person may participate in more than one topic within a time interval, normalization can be enforced by a small time discretization or by using a notion of “effective population size”, defined as population size multiplied by the max participation count of any person during any time interval. $\mathbf { \bar { \boldsymbol { \pi } } } ^ { 0 }$ is a given initial distribution.
|
| 58 |
+
|
| 59 |
+
• Transition matrix $P ^ { n } \in \mathbb { S } ( { \mathcal { G } } )$ . $P _ { i j } ^ { n }$ is the probability of people in topic $i$ switching to topic $j$ at time $n$ , so we refer to $P _ { i } ^ { n }$ as the action of people in topic $i$ . $P ^ { n }$ generates the forward equation
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\pi _ { j } ^ { n + 1 } = \sum _ { i = 1 } ^ { d } P _ { i j } ^ { n } \pi _ { i } ^ { n }
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
• Reward $\begin{array} { r } { r _ { i } ( \pi ^ { n } , P _ { i } ^ { n } ) : = \sum _ { j = 1 } ^ { d } P _ { i j } ^ { n } r _ { i j } ( \pi ^ { n } , P _ { i } ^ { n } ) } \end{array}$ , for $i \in \{ 1 , \ldots , d \}$ . This is the ard received $i$ $P _ { i } ^ { n }$ $n$ $\pi ^ { n }$ to previous work, we learn the reward function from data (Section 4.1). We make a locality assumption: reward for $i$ depends only on $P _ { i } ^ { n }$ , not on the entire $P ^ { n }$ , which means that actions by people in $j \neq i$ have no instantaneous effect on the reward for people in topic $i$ . 3
|
| 66 |
+
|
| 67 |
+
• Value function $V ^ { n } \in \mathbb { R } ^ { d }$ . $V _ { i } ^ { n }$ is the expected maximum total reward of being in topic $i$ at time $n$ . A terminal value $V ^ { N }$ is given, which we set to zero to avoid making any assumption on the problem structure beyond what is contained in the learned reward function.
|
| 68 |
+
|
| 69 |
+
• Average reward $e _ { i } ( \pi , P , V )$ , for $i \in \{ 1 , \ldots , d \}$ and $V \in \mathbb { R } ^ { d }$ and $P \in \mathbb { S } ( \mathcal { G } )$ . This is the average reward received by agents at topic $i$ when the current distribution is $\pi$ , action $P$ is chosen, and the subsequent expected maximum total reward is $V$ . For a general $r _ { i j } ( \pi , P )$ , it is defined as:
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
e _ { i } ( \pi , P , V ) = \sum _ { j = 1 } ^ { d } P _ { i j } ( r _ { i j } ( \pi , P ) + V _ { j } )
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
Intuitively, agents want to act optimally in order to maximize their expected total average reward. For $P \in \mathbb { S } ( \mathcal { G } )$ and a vector $q \in \mathbb { S } _ { i } ( \mathcal { G } )$ , define $\mathcal { P } ( P , i , q )$ to be the matrix equal to $P$ , except with the $i$ -th row replaced by $q$ . Then a Nash maximizer is defined as follows:
|
| 76 |
+
|
| 77 |
+
Definition 1. A right stochastic matrix $P \in \mathbb { S } ( \mathcal { G } )$ is a Nash maximizer of $e ( \pi , P , V )$ if, given a fixed $\pi \in \Delta ^ { d - 1 }$ and a fixed $V \in \mathbb { R } ^ { d }$ , there is
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
e _ { i } ( \pi , P , V ) \ge e _ { i } ( \pi , { \mathcal { P } } ( P , i , q ) , V )
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
for any $i \in \{ 1 , \ldots , d \}$ and any $q \in \mathbb { S } _ { i } ( \mathcal { G } )$ .
|
| 84 |
+
|
| 85 |
+
The rows of $P$ form a Nash equilibrium set of actions, since for any topic $i$ , the people in topic $i$ cannot increase their reward by unilaterally switching their action from $P _ { i }$ to any $q$ . Under Definition 1, the value function of each topic $i$ at each time $n$ satisfies the optimality criteria:
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
V _ { i } ^ { n } = \operatorname* { m a x } _ { q \in \mathbb { S } _ { i } ( \mathcal { G } ) } \left\{ \sum _ { j = 1 } ^ { d } q _ { j } \left[ r _ { i j } ( \pi ^ { n } , \mathcal { P } ( P ^ { n } , i , q ) ) + V _ { j } ^ { n + 1 } \right] \right\}
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
A solution of the MFG is a sequence of pairs $\{ ( \pi ^ { n } , V ^ { n } ) \} _ { n = 0 , \dots , N }$ satisfying optimality criteria (6) and forward equation (3).
|
| 92 |
+
|
| 93 |
+
# 4 INFERENCE OF MFG VIA MDP OPTIMIZATION
|
| 94 |
+
|
| 95 |
+
A Markov decision process is a well-known framework for optimization problems. We focus on the discrete time MFG in Section 3.2 and prove a reduction to a finite-horizon deterministic MDP, whose state trajectory under an optimal policy coincides with the forward evolution of the MFG. This leads to the essential insight that solving the optimization problem of an MDP is equivalent to solving an MFG that describes population behavior. This connection will enable us to apply efficient inverse RL methods, using measured population trajectories, to learn an MFG model along with its reward function in Section 4.1. The MDP is constructed as follows:
|
| 96 |
+
|
| 97 |
+
Definition 2. A finite-horizon deterministic MDP for a discrete time MFG over a complete graph is defined as:
|
| 98 |
+
|
| 99 |
+
• States: $\pi ^ { n } \in \Delta ^ { d - 1 }$ , the population distribution at time $n$ .
|
| 100 |
+
|
| 101 |
+
• Actions: $P ^ { n } \in \mathbb { S } ( { \mathcal { G } } )$ , the transition probability matrix at time $n$ • Reward: $\begin{array} { r } { R ( \pi ^ { n } , P ^ { n } ) : = \sum _ { i = 1 } ^ { d } \pi _ { i } ^ { n } \sum _ { j = 1 } ^ { d } P _ { i j } ^ { n } r _ { i j } ( \pi ^ { n } , P _ { i } ^ { n } ) } \end{array}$ • Finite-horizon state transition, given by Eq (3): $\begin{array} { r } { \forall n \in \{ 0 , \ldots , N - 1 \} : \pi _ { j } ^ { n + 1 } = \sum _ { i = 1 } ^ { d } P _ { i j } ^ { n } \pi _ { i } ^ { n } . } \end{array}$
|
| 102 |
+
|
| 103 |
+
Theorem 2. The value function of a solution to the discrete time MFG over a complete graph defined by optimality criteria (6) and forward equation (3) is a solution to the Bellman optimality equation of the MDP in Definition 2.
|
| 104 |
+
|
| 105 |
+
Proof. Since $r _ { i j }$ depends on $P ^ { n }$ only through row $P _ { i } ^ { n }$ , optimality criteria 6 can be written as
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
V _ { i } ^ { n } = \operatorname* { m a x } _ { P _ { i } \in \mathbb { S } _ { i } ( \mathcal { G } ) } \left\{ \sum _ { j } P _ { i j } r _ { i j } ( \pi ^ { n } , P _ { i } ) + \sum _ { j } P _ { i j } V _ { j } ^ { n + 1 } \right\} .
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
We now define $V ^ { * } ( \pi ^ { n } )$ as follows and show that it is the value function of the constructed MDP in Definition 2 by verifying that it satisfies the Bellman optimality equation:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\begin{array} { r l } & { V ^ { * } ( \pi ^ { n } ) : = \displaystyle \sum _ { i = 1 } ^ { d } \pi _ { i } ^ { n } V _ { i } ^ { n } = \displaystyle \sum _ { i = 1 } ^ { d } \pi _ { i } ^ { n } \operatorname* { m a x } _ { P _ { i } \in \mathbb { S } _ { + } ( \mathcal { G } ) } \left\{ \displaystyle \sum _ { j = 1 } ^ { d } P _ { i j } r _ { i j } ( \pi ^ { n } , P _ { i } ) + \displaystyle \sum _ { j = 1 } ^ { d } P _ { i j } V _ { j } ^ { n + 1 } \right\} } \\ & { \quad \quad \quad \quad \quad \quad = \displaystyle \operatorname* { m a x } _ { P \in \mathbb { S } ( \mathcal { G } ) } \left\{ \displaystyle \sum _ { i = 1 } ^ { d } \pi _ { i } ^ { n } \sum _ { j = 1 } ^ { d } P _ { i j } r _ { i j } ( \pi ^ { n } , P _ { i } ) + \displaystyle \sum _ { j = 1 } ^ { d } \left( \displaystyle \sum _ { i = 1 } ^ { d } P _ { i j } \pi _ { i } ^ { n } \right) V _ { j } ^ { n + 1 } \right\} } \\ & { \quad \quad \quad \quad \quad = \displaystyle \operatorname* { m a x } _ { P \in \mathbb { S } ( \mathcal { G } ) } \left\{ R ( \pi ^ { n } , P ) + \displaystyle \sum _ { j = 1 } ^ { d } \pi _ { j } ^ { n + 1 } V _ { j } ^ { n } + \right\} } \\ & { \quad \quad \quad \quad = \displaystyle \operatorname* { m a x } _ { P \in \mathbb { S } ( \mathcal { G } ) } \left\{ R ( \pi ^ { n } , P ) + V ^ { * } ( \pi ^ { n + 1 } ) \right\} } \end{array}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
which is the Bellman optimality equation for the MDP in Definition 2.
|
| 118 |
+
|
| 119 |
+
Corollary 1. Given a start state $\pi ^ { 0 }$ , the state trajectory under the optimal policy of the MDP in Definition 2 is equivalent to the forward evolution part of the solution to the MFG.
|
| 120 |
+
|
| 121 |
+
Proof. Under the optimal policy, equations 11 and 8 are satisfied, which means the matrix $P$ generated by the optimal policy at any state $\pi ^ { n }$ is the Nash maximizer matrix. Therefore, the state trajectory $\{ \pi ^ { n } \} _ { n = 0 , \ldots , N }$ is the forward part of the MFG solution. □
|
| 122 |
+
|
| 123 |
+
# 4.1 REINFORCEMENT LEARNING SOLUTION FOR MFG
|
| 124 |
+
|
| 125 |
+
MFG provides a general framework for addressing the problem of modeling population dynamics, while the new connection between MFG and MDP enables us to apply inverse RL algorithms to solve the MDP in Definition 2 with unknown reward. In contrast to previous MFG research, most of which impose reward functions that are quadratic in actions and logarithmic in the state distribution (Gueant ´ , 2009; Lachapelle et al., 2010; Bauso et al., 2016), we learn a reward function using demonstration trajectories measured from actual population behavior, to ground the MFG representation of population dynamics on real data.
|
| 126 |
+
|
| 127 |
+
We leverage the MFG forward dynamics (Eq 3) in a sample-based IRL method based on the maximum entropy IRL framework (Ziebart et al., 2008). From this probabilistic viewpoint, we minimize the relative entropy between a probability distribution $p ( \tau )$ over a space of trajectories $T : = \{ \tau _ { i } \} _ { i }$ and a distribution $q ( \tau )$ from which demonstrated expert trajectories are generated (Boularias et al., 2011). This is related to a path integral IRL formulation, where the likelihood of measured optimal trajectories is evaluated only using trajectories generated from their local neighborhood, rather than uniformly over the whole trajectory space (Kalakrishnan et al., 2013). Specifically, making no assumption on the true distribution of optimal demonstration other than matching of reward expectation, we posit that demonstration trajectories $\tau _ { i } = ( \pi ^ { 0 } , P ^ { 1 } , \ldots , \pi ^ { N - 1 } , P ^ { N - 1 } ) _ { i }$ πN−1, P N−1)i are sampled from the maximum entropy distribution (Jaynes, 1957):
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
p ( \tau ) = \frac { 1 } { Z } \exp ( R _ { W } ( \tau ) )
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
where $\begin{array} { r } { R _ { W } ( \tau ) = \sum _ { n } R _ { W } ( \pi ^ { n } , P ^ { n } ) } \end{array}$ is the sum of reward of single state-action pairs over a trajectory $\tau$ , and $W$ are the parameters of the reward function approximator (derivation in Appendix E). Intuitively, this means that trajectories with higher reward are exponentially more likely to be sampled. Given $M$ sample trajectories $\tau _ { j } ~ \in ~ { \mathcal { D } } _ { \operatorname { s a m p } }$ from $k$ distributions $F _ { 1 } ( \tau ) , \dots , F _ { k } ( \dot { \tau } )$ , an unbiased estimator of the partition function $\begin{array} { r } { Z = \int \exp ( R _ { W } ( \tau ) ) d \tau } \end{array}$ using multiple importance sampling is $\begin{array} { r } { \hat { Z } : = \frac { 1 } { M } \sum _ { \tau _ { j } } z _ { j } \exp ( R _ { W } ( \tau _ { j } ) ) } \end{array}$ (Owen & Zhou, 2000), where importance weights are $\begin{array} { r } { z _ { j } : = \left[ \frac { 1 } { k } \sum _ { k } F _ { k } ( \tau _ { j } ) \right] ^ { - 1 } } \end{array}$ (derivation in Appendix F). Each action matrix $P$ is sampled from a stochastic policy $F _ { k } ( P ; \pi , \theta )$ (overloading notation with $F ( \tau ) )$ , where $\pi$ is the current state and $\theta$ the policy parameter. The negative log likelihood of $L$ demonstration trajectories $\tau _ { i } \in \mathcal { D } _ { \mathrm { d e m o } }$ is:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\mathcal { L } ( W ) = - \frac { 1 } { L } \sum _ { \tau _ { i } \in \mathcal { D } _ { \mathrm { d e m o } } } R _ { W } ( \tau _ { i } ) + \log \left( \frac { 1 } { M } \sum _ { \tau _ { j } \in \mathcal { D } _ { \mathrm { s a m p } } } z _ { j } \exp ( R _ { W } ( \tau _ { j } ) ) \right)
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
We build on Guided Cost Learning (GCL) in Finn et al. (2016) $( \mathrm { A l g \ 1 } )$ to learn a deep neural network approximation of $R _ { W } ( \pi , P )$ via stochastic gradient descent on $\mathcal { L } ( W )$ , and learn a policy $F ( P ; \pi , \theta )$ using a simple actor-critic algorithm (Sutton $\&$ Barto, 1998). In contrast to GCL, we employ a combination of convolutional neural nets and fully-connected layers to process both the action matrix $P$ and state vector $\pi$ efficiently in a single architecture (Appendix C), analogous to how Lillicrap et al. (2015) handle image states in Atari games. Due to our choice of policy parameterization (described below), we also set importance weights to unity for numerical stability. These implementation choices result in successful learning of a reward representation (Fig 1).
|
| 140 |
+
|
| 141 |
+
Our forward MDP solver $( \mathrm { A l g } ~ 2 )$ performs gradient ascent on the policy’s expected start value $\mathbb { E } [ v ( \pi ^ { 0 } ) | F ( P ; \pi , \theta ) ]$ w.r.t. $\theta$ , to find successively better policies $F _ { k } ( P ; \pi , \theta )$ . We construct the joint distribution $F ( P ; \pi , \theta )$ informed by domain knowledge about human population behavior on social media, but this does not reduce the generality of the MFG framework since it is straightforward to employ flexible policy and value networks in a DDPG algorithm when intuition is not available (Silver et al., 2014; Lillicrap et al., 2015). Our joint distribution is $d$ instances of a $d$ -dimensional Dirichlet distribution, each parameterized by an $\mathbf { \bar { \boldsymbol { \alpha } } } ^ { i } \in \mathbb { R } _ { + } ^ { d }$ . Each row $P _ { i }$ is sampled from
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
f ( P _ { i 1 } , \dots , P _ { i d } ; \alpha _ { 1 } ^ { i } , \dots , \alpha _ { d } ^ { i } ) = { \frac { 1 } { B ( \alpha ^ { i } ) } } \prod _ { j = 1 } ^ { d } ( P _ { i j } ) ^ { \alpha _ { j } ^ { i } - 1 }
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
where $B ( \cdot )$ is the Beta function and $\alpha _ { j } ^ { i }$ is defined using the softplus function $\alpha _ { j } ^ { i } ( \pi , \theta ) : =$ $\ln ( 1 + \exp \{ \theta ( \pi _ { j } - \pi _ { i } ) \} )$ , which is a monotonically increasing function of the population density difference $\pi _ { j } - \pi _ { i }$ . In practice, a constant scaling factor $c \in \mathbb { R }$ can be applied to $\alpha$ for variance reduction. Finally, we let $\begin{array} { r } { F ( P ^ { n } ; \pi ^ { n } , \theta ) = \prod _ { i = 1 } ^ { d } f ( P _ { i } ^ { n } ; \alpha ^ { i } ( \pi ^ { n } , \theta ) ) } \end{array}$ denote the parameterized policy, from which $P ^ { n }$ is sampled based on $\pi ^ { n }$ , and whose logarithmic gradient $\nabla _ { \theta } \ln ( F )$ can be used in a policy gradient algorithm. We learned an approximate value function $\hat { V } ( \pi ; w )$ as a baseline for variance reduction, approximated as a linear combination of all polynomial features of $\pi$ up to second order, with parameter $w$ (Sutton et al., 2000).
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 1: (a) JSD between train demo and generated transitions is 0.130. (b) JSD between test demo and generated transitions is 0.017. (c) Reward of state-action pairs. States: large negative mass gradient from $\pi _ { 1 }$ to $\pi _ { d }$ (S0), less negative gradient (S1), uniform (S2). Actions: high probability transitions to smaller indices (A0), uniform transition (A1), row-reverse of A0 (A2).
|
| 151 |
+
|
| 152 |
+
# 5 EXPERIMENTS
|
| 153 |
+
|
| 154 |
+
We demonstrate the effectiveness of our method with two sets of experiments: (i) inference of an interpretable reward function and (ii) prediction of population trajectory over time. Our experiment matches the discrete time mean field game given in Section 3.2: we use data representing the activity of a Twitter population consisting of 406 users. We model the evolution of the population distribution over $d = 1 5$ topics and $N = 1 6$ time steps (9am to midnight) each day for 27 days. The sequence of state-action pairs $\{ ( \pi ^ { n } , P ^ { n } ) \} _ { n = 0 , \dots , \bar { N } - 1 }$ measured on each day shall be called a demonstration trajectory. Although the set of topics differ semantically each day, indexing topics in order of decreasing initial popularity suffices for identifying the topic sets across all days. As explained earlier, the MFG framework can model populations of arbitrarily large size, and we find that our chosen size is sufficient for extracting an informative reward and policy from the data. For evaluating performance on trajectory prediction, we compare MFG with two baselines:
|
| 155 |
+
|
| 156 |
+
VAR. Vector autoregression of order 18 trained on 21 demonstration trajectories.
|
| 157 |
+
|
| 158 |
+
RNN. Recurrent neural network with a single fully-connected layer and rectifier nonlinearity.
|
| 159 |
+
|
| 160 |
+
We use Jenson-Shanon Divergence (JSD) as metric to report all our results. Appendix D provides comprehensive implementation details.
|
| 161 |
+
|
| 162 |
+
# 5.1 INTERPRETATION OF REWARD FUNCTION
|
| 163 |
+
|
| 164 |
+
We evaluated the reward using four sets of state-action pairs acquired from: 1. all train demo trajectories; 2. trajectories generated by the learned policy given initial states $\pi ^ { 0 }$ of train trajectories; 3. all test demo trajectories; 4. trajectories generated by the learned policy given initial states $\pi ^ { 0 }$ of test trajectories. We find three distinct modes in the density of reward values for both the train group of sets 1 and 2 (Fig 1a) and the test group of sets 3 and 4 (Fig 1b). Although we do not have access to a ground truth reward function, the low JSD values of 0.13 and 0.017 between reward distributions for demo and generated state-action pairs show generalizability of the learned reward function. We further investigated the reward landscape with nine state-action pairs (Figure 1c), and find that the mode with highest rewards is attained by pairing states that have large mass in topics having high initial popularity (S0) with action matrices that favor transition to topics with higher density (A0). Uniformly distributed state vectors (S2) attain the lowest rewards, and states with a small negative mass gradient from topic 1 to topic $d$ (S1) attain medium rewards. Simply put, MFG agents who optimize for this reward are more likely to move towards more popular topics. While this numerical exploration of the reward reveals interpretable patterns, the connection between such rewards learned via our method and any optimization process in the population requires more empirical study.
|
| 165 |
+
|
| 166 |
+
# 5.2 TRAJECTORY PREDICTION
|
| 167 |
+
|
| 168 |
+
To test the usefulness of the reward and MFG model for prediction, the learned policy was used with the forward equation to generate complete trajectories, given initial distributions. Fig 2a (log scale) shows that MFG has $5 8 \%$ smaller error than VAR when evaluated on the JSD between generated and measured final distributions (πN−1generated, πN−1measured), and 40% smaller error when evaluated on the average JSD over all hours in a day $\begin{array} { r } { \frac { 1 } { N } \sum _ { n = 0 } ^ { N - 1 } \mathbf { J } \mathbf { S } \mathbf { D } ( \pi _ { \mathrm { g e n e r a t e d } } ^ { n } , \pi _ { \mathrm { m e a s u r e d } } ^ { n } ) } \end{array}$ . Both measures were averaged over held-out test trajectories. It is worth emphasizing that learning the MFG model required only the initial population distribution of each day in the training set (line 4 in Alg 2), while VAR and RNN used the distributions over all hours of each day. MFG achieves better prediction performance even with fewer training samples, possibly because it is a more structured approximation of the true mechanism underlying population dynamics, in contrast to VAR and RNN that rely on regression. As shown by sample trajectories for topic 0 and 2 in Figures 3, and the average transition matrices in Figure 2b, MFG correctly represents the fact that the real population tends to congregate to topics with higher initial popularity (lower topic indices), and that the popularity of topic 0 becomes more dominant across time in each day. The small real-world dataset size, and the fact that RNN mainly learns state transitions without accounting for actions, could be contributing factors to the lower performance of RNN. We acknowledge that our design of policy parameterization, although informed by domain knowledge, introduced bias and resulted in noticeable differences between demonstration and generated transition matrices. This can be addressed using deep policy and value networks, since the MFG framework is agnostic towards choice of policy representation.
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 2: (a) Test error on final distribution and mean over entire trajectory (log scale). MFG: (2.9e3, 4.9e-3), VAR: (7.0e-3, 8.1e-3), RNN: (0.58, 0.57). (b) heatmap of action matrix $P \in \mathbb { R } ^ { 1 5 \times 1 5 }$ averaged element-wise over demo train set, and absolute difference between average demo action matrix and average matrix generated from learned policy.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 3: (a) Measured and predicted trajectory of topic 0 popularity over test days for MFG and VAR (RNN outside range and not shown). (b) Measured and predicted trajectory of topic 2 popularity over test days for all methods.
|
| 175 |
+
|
| 176 |
+
# 6 CONCLUSION
|
| 177 |
+
|
| 178 |
+
We have motivated and demonstrated a data-driven method to solve a mean field game model of population evolution, by proving a connection to Markov decision processes and building on methods in reinforcement learning. Our method is scalable to arbitrarily large populations, because the MFG framework represents population density rather than individual agents, while the representations are linear in the number of MFG states and quadratic in the transition matrix. Our experiments on real data show that MFG is a powerful framework for learning a reward and policy that can predict trajectories of a real world population more accurately than alternatives. Even with a simple policy parameterization designed via some domain knowledge, our method attained superior performance on test data. It motivates exploration of flexible neural networks for more complex applications.
|
| 179 |
+
|
| 180 |
+
An interesting extension is to develop an efficient method for solving the discrete time MFG in a more general setting, where the reward at each state $i$ is coupled to the full population transition matrix. Our work also opens the path to a variety of real-world applications, such as a synthesis of MFG with models of social networks at the level of individual connections to construct a more complete model of social dynamics, and mean field models of interdependent systems that may display complex interactions via coupling through global states and reward functions.
|
| 181 |
+
|
| 182 |
+
# ACKNOWLEDGMENTS
|
| 183 |
+
|
| 184 |
+
We sincerely thank our anonymous ICLR reviewers for critical feedback that helped us to improve the clarity and precision of our presentation. This work was supported in part by NSF CMMI1745382 and NSF IIS-1717916.
|
| 185 |
+
|
| 186 |
+
# REFERENCES
|
| 187 |
+
|
| 188 |
+
Yves Achdou, Fabio Camilli, and Italo Capuzzo-Dolcetta. Mean field games: numerical methods for the planning problem. SIAM Journal on Control and Optimization, 50(1):77–109, 2012.
|
| 189 |
+
Monica Anderson and Paul Hitlin. Social Media Conversations About Race. Pew Research Center, August 2016.
|
| 190 |
+
Dario Bauso, Raffaele Pesenti, and Marco Tolotti. Opinion dynamics and stubbornness via multi-population mean-field games. Journal of Optimization Theory and Applications, 170(1):266293, 2016.
|
| 191 |
+
Abdeslam Boularias, Jens Kober, and Jan Peters. Relative entropy inverse reinforcement learning. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pp. 182–189, 2011.
|
| 192 |
+
Amarjit Budhiraja, Xin Liu, and Adam Shwartz. Action time sharing policies for ergodic control of markov chains. SIAM Journal on Control and Optimization, 50(1):171–195, 2012.
|
| 193 |
+
Apostolos N Burnetas and Michael N Katehakis. Optimal adaptive policies for markov decision processes. Mathematics of Operations Research, 22(1):222–255, 1997.
|
| 194 |
+
Elisabetta Carlini and Francisco Jose Silva. A fully discrete semi-lagrangian scheme for a first order mean field ´ game problem. SIAM Journal on Numerical Analysis, 52(1):45–67, 2014.
|
| 195 |
+
Abir De, Isabel Valera, Niloy Ganguly, Sourangshu Bhattacharya, and Manuel Gomez Rodriguez. Learning and forecasting opinion dynamics in social networks. In Advances in Neural Information Processing Systems, pp. 397–405, 2016.
|
| 196 |
+
Mehrdad Farajtabar, Yichen Wang, Manuel Gomez Rodriguez, Shuang Li, Hongyuan Zha, and Le Song. Coevolve: A joint point process model for information diffusion and network co-evolution. In Advances in Neural Information Processing Systems, pp. 1954–1962, 2015.
|
| 197 |
+
Chelsea Finn, Sergey Levine, and Pieter Abbeel. Guided cost learning: Deep inverse optimal control via policy optimization. In International Conference on Machine Learning, pp. 49–58, 2016.
|
| 198 |
+
Diogo A Gomes, Joana Mohr, and Rafael Rigao Souza. Discrete time, finite state space mean field games. Journal de mathematiques pures et appliqu ´ ees ´ , 93(3):308–328, 2010.
|
| 199 |
+
Olivier Gueant. A reference case for mean field games models. ´ Journal de mathematiques pures et appliqu ´ ees ´ , 92(3):276–294, 2009.
|
| 200 |
+
Olivier Gueant. Existence and uniqueness result for mean field games with congestion effect on graphs. ´ Applied Mathematics & Optimization, 72(2):291–303, 2015.
|
| 201 |
+
Olivier Gueant, Jean-Michel Lasry, and Pierre-Louis Lions. Mean field games and applications. In ´ ParisPrinceton lectures on mathematical finance 2010, pp. 205–266. Springer, 2011.
|
| 202 |
+
Philip N Howard, Aiden Duffy, Deen Freelon, Muzammil M Hussain, Will Mari, and Marwa Maziad. Opening closed regimes: what was the role of social media during the arab spring?, 2011.
|
| 203 |
+
Junling Hu, Michael P Wellman, et al. Multiagent reinforcement learning: theoretical framework and an algorithm. In ICML, volume 98, pp. 242–250. Citeseer, 1998.
|
| 204 |
+
Minyi Huang, Roland P Malhame, Peter E Caines, et al. Large population stochastic dynamic games: closed- ´ loop mckean-vlasov systems and the nash certainty equivalence principle. Communications in Information & Systems, 6(3):221–252, 2006.
|
| 205 |
+
Edwin T Jaynes. Information theory and statistical mechanics. Physical review, 106(4):620, 1957.
|
| 206 |
+
Mrinal Kalakrishnan, Peter Pastor, Ludovic Righetti, and Stefan Schaal. Learning objective functions for manipulation. In Robotics and Automation (ICRA), 2013 IEEE International Conference on, pp. 1331–1336. IEEE, 2013.
|
| 207 |
+
Aime Lachapelle, Julien Salomon, and Gabriel Turinici. Computation of mean field equilibria in economics. ´ Mathematical Models and Methods in Applied Sciences, 20(04):567–588, 2010.
|
| 208 |
+
Jean-Michel Lasry and Pierre-Louis Lions. Mean field games. Japanese journal of mathematics, 2(1):229–260, 2007.
|
| 209 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 210 |
+
Michael L Littman. Value-function reinforcement learning in markov games. Cognitive Systems Research, 2 (1):55–66, 2001.
|
| 211 |
+
Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, Pieter Abbeel, and Igor Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. arXiv preprint arXiv:1706.02275, 2017.
|
| 212 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
|
| 213 |
+
Andrew Y. Ng and Stuart Russell. Algorithms for inverse reinforcement learning. In in Proc. 17th International Conf. on Machine Learning, pp. 663–670. Morgan Kaufmann, 2000.
|
| 214 |
+
Art Owen and Yi Zhou. Safe and effective importance sampling. Journal of the American Statistical Association, 95(449):135–143, 2000.
|
| 215 |
+
Andrew Perrin. Social Media Usage: 2005-2015. Pew Research Center, October 2015.
|
| 216 |
+
Skipper Seabold and Josef Perktold. Statsmodels: Econometric and statistical modeling with python. In 9th Python in Science Conference, 2010.
|
| 217 |
+
David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 387–395, 2014.
|
| 218 |
+
Craig Silverman. This analysis shows how viral fake election news stories outperformed real news on facebook, 2016. URL https://www.buzzfeed.com/craigsilverman/ viral-fake-election-news-outperformed-real-news-on-facebook.
|
| 219 |
+
Richard S. Sutton and Andrew G. Barto. Introduction to Reinforcement Learning. MIT Press, Cambridge, MA, USA, 1st edition, 1998. ISBN 0262193981.
|
| 220 |
+
Richard S Sutton, David A McAllester, Satinder P Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems, pp. 1057–1063, 2000.
|
| 221 |
+
Twitter. Faqs about trends on twitter, 2017. URL https://support.twitter.com/articles/ 101125.
|
| 222 |
+
Markus Wulfmeier, Peter Ondruska, and Ingmar Posner. Maximum entropy deep inverse reinforcement learning. arXiv preprint arXiv:1507.04888, 2015.
|
| 223 |
+
Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008.
|
| 224 |
+
|
| 225 |
+
# A PROOF OF PROPOSTION 1
|
| 226 |
+
|
| 227 |
+
Given the definitions in Section 3.1, a mean field game is defined by a Hamilton-Jacobi-Bellman (HJB) equation evolving backwards in time and a Fokker-Planck equation evolving forward in time. The continuous-time Hamilton-Jacobi-Bellman (HJB) equation on $\mathcal { G }$ is
|
| 228 |
+
|
| 229 |
+
$$
|
| 230 |
+
V _ { i } ^ { \prime } ( t ) = - \mathrm { m a x } _ { P _ { i } } \left\{ \sum _ { j \in \bar { \mathcal { V } } _ { i } ^ { - } } P _ { i j } ( t ) ( V _ { j } ( t ) - V _ { i } ( t ) ) + r _ { i } ( \pi ( t ) , P _ { i } ( t ) ) \right\}
|
| 231 |
+
$$
|
| 232 |
+
|
| 233 |
+
where $r _ { i } ( \pi , P _ { i } )$ is the reward function, and $V _ { i } ( t )$ is the value function of state $i$ at time $t$ . Note that the reward function $r _ { i } ( \pi ( t ) , P _ { i } ( t ) )$ is often presented as $- c _ { i } ( \pi ( t ) , P _ { i } ( t ) )$ for some cost function $c _ { i } ( \pi ( t ) , P _ { i } ( t ) )$ in the MFG context, and similarly for $V _ { i } ( t )$ . In addition, we set $r _ { i } ( \pi ( t ) , P _ { i } ( t ) ) =$ $- \infty$ if $P _ { i } ( t ) \not \in { \mathbb S } _ { i } ( { \mathcal G } )$ (i.e. $P ( t )$ must be a valid transition matrix). For any fixed $\pi ( t )$ , let $\mathcal { H } _ { i } ( \pi ( t ) , \cdot )$ be the Legendre transform of $c _ { i } ( \pi ( t ) , \cdot )$ defined by
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
\begin{array} { r } { \mathcal { H } _ { i } ( \pi ( t ) , \cdot ) = \operatorname* { m a x } _ { P _ { i } } \left\{ \langle \cdot , P _ { i } \rangle - c _ { i } ( \pi ( t ) , P _ { i } ) \right\} = \operatorname* { m a x } _ { P _ { i } } \left\{ \langle \cdot , P _ { i } \rangle + r _ { i } ( \pi ( t ) , P _ { i } ) \right\} } \end{array}
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
Then the HJB equation (15) is an analogue to the backward equation in mean field games
|
| 240 |
+
|
| 241 |
+
$$
|
| 242 |
+
V _ { i } ^ { \prime } ( t ) + \mathcal { H } _ { i } ( \pi ( t ) , [ V _ { j } ( t ) - V _ { i } ( t ) ] _ { j \in \bar { \mathcal { V } } _ { i } ^ { - } } ) = 0
|
| 243 |
+
$$
|
| 244 |
+
|
| 245 |
+
where $[ V _ { j } ( t ) - V _ { i } ( t ) ] _ { j \in \bar { \mathcal { V } } _ { i } ^ { - } } \ \in \ \mathbb { R } ^ { | \bar { \mathcal { V } } _ { i } ^ { - } | }$ is the dual variable of $P _ { i }$ . We can discretize (15) using a semi-implicit scheme with unit time step labeled by $n$ to obtain
|
| 246 |
+
|
| 247 |
+
$$
|
| 248 |
+
\begin{array} { r } { V _ { i } ^ { n + 1 } - V _ { i } ^ { n } = - \operatorname* { m a x } _ { P _ { i } } \left\{ \sum _ { j \in \bar { \mathcal { V } } _ { i } ^ { - } } P _ { i j } ^ { n } ( V _ { j } ^ { n + 1 } - V _ { i } ^ { n + 1 } ) + r _ { i } ( \pi ^ { n } , P _ { i } ^ { n } ) \right\} } \end{array}
|
| 249 |
+
$$
|
| 250 |
+
|
| 251 |
+
Rearranging (18) yields the discrete time HJB equation over a graph (19)
|
| 252 |
+
|
| 253 |
+
$$
|
| 254 |
+
V _ { i } ^ { n } = \mathrm { m a x } _ { P _ { i } } \left\{ r _ { i } ( \pi ^ { n } , P _ { i } ^ { n } ) + \sum _ { j \in \bar { \mathcal { V } } _ { i } ^ { - } } P _ { i j } ^ { n } V _ { j } ^ { n + 1 } \right\}
|
| 255 |
+
$$
|
| 256 |
+
|
| 257 |
+
The forward evolving Fokker-Planck equation for the continuous-time graph-state MFG is given by
|
| 258 |
+
|
| 259 |
+
$$
|
| 260 |
+
\begin{array} { l } { { \pi _ { i } ^ { \prime } ( t ) = \displaystyle \sum _ { j \in \mathcal { V } _ { i } ^ { + } } Q _ { j i } ( t ) \pi _ { j } ( t ) - \sum _ { j \in \mathcal { V } _ { i } ^ { - } } Q _ { i j } ( t ) \pi _ { i } ( t ) } } \\ { { \mathrm { ~ w h e r e ~ } Q _ { j i } ( t ) = \partial _ { u _ { i } } \mathcal { H } _ { j } ( \pi ( t ) , [ V _ { k } ( t ) - V _ { j } ( t ) ] _ { k \in \bar { \mathcal { V } } _ { j } ^ { - } } ) } } \end{array}
|
| 261 |
+
$$
|
| 262 |
+
|
| 263 |
+
where $\partial _ { u _ { i } } \mathcal { H } _ { j } ( \pi , u )$ is the partial derivative w.r.t. the coordinate corresponding to the $i$ -th index of the argument $u \in \mathbb { R } ^ { | \bar { \nu } _ { j } ^ { - } | }$ . We can set $Q _ { j i } ( t ) = 0$ for all $( j , i ) \notin \mathcal { E }$ , so that $Q ( t ) : = [ Q _ { j i } ( t ) ]$ can be regarded as the $d$ -by- $d$ infinitesimal generator matrix of states $\pi ( t )$ , and hence (20) can be written as $\pi ^ { \prime } ( t ) = \pi ( t ) Q ( t )$ , where $\pi ( t ) \in \mathbb { R } ^ { d }$ is a row vector. Then an Euler discretization of (20) with unit time step reduces to $\pi ^ { n + 1 } - \pi ^ { n } = \pi ^ { n } Q ^ { n }$ , which can be written as
|
| 264 |
+
|
| 265 |
+
$$
|
| 266 |
+
\pi _ { i } ^ { n + 1 } = \sum _ { j \in \bar { \mathcal { V } } _ { i } ^ { + } } P _ { j i } ^ { n } \pi _ { j } ^ { n }
|
| 267 |
+
$$
|
| 268 |
+
|
| 269 |
+
where $P _ { i j } ^ { n } : = Q _ { i j } ^ { n } + \delta _ { i j }$ . If the graph $\mathcal { G }$ is complete, meaning $\mathcal { E } = \{ ( i , j ) : 1 \leq i , j \leq d \}$ , then the summation is taken over $j = 1 , \ldots , d$ . For ease of presentation, we only consider the complete graph in this paper, as all derivations can be carried out similarly for general directed graphs. A solution of a mean field game defined by (19) and (22) is a collection of $V _ { i } ^ { n }$ and $\pi _ { i } ^ { n }$ for $i = 1 , \ldots , d$ and $n = 0 , \ldots , N$ .
|
| 270 |
+
|
| 271 |
+
# B ALGORITHMS
|
| 272 |
+
|
| 273 |
+
We learn a reward function and policy using an adaptation of GCL (Finn et al., 2016) in $\mathrm { A l g \ 1 }$ and a simple actor-critic Alg 2 (Sutton & Barto, 1998) as a forward RL solver.
|
| 274 |
+
|
| 275 |
+
# Algorithm 1 Guided cost learning
|
| 276 |
+
|
| 277 |
+
1: procedure GUIDED COST LEARNING
|
| 278 |
+
2: Initialize $F _ { 0 } ( P ; \pi , \theta )$ as random policy and reward network weights $W ^ { 0 }$
|
| 279 |
+
3: for iteration 1 to $I$ do
|
| 280 |
+
4: Generate sample trajectories $\mathcal { D } _ { \mathrm { t r a j } }$ from $F _ { k } ( P ; \pi , \theta )$
|
| 281 |
+
5: $\mathcal { D } _ { \mathrm { s a m p } } \mathcal { D } _ { \mathrm { s a m p } } \cup \mathcal { D } _ { \mathrm { t r a j } }$
|
| 282 |
+
6: while $\left| \operatorname { A v g } _ { \pi _ { i } , P _ { i } \sim \mathcal { D } _ { \mathrm { d e m o } } } \left( R _ { W ^ { t } } ( \pi _ { i } , P _ { i } ) - R _ { W ^ { t - 1 } } ( \pi _ { i } , P _ { i } ) \right) \right| > d R$ do
|
| 283 |
+
7: Sample demonstration $\hat { \mathcal { D } } _ { \mathrm { d e m o } } \subset \mathcal { D } _ { \mathrm { d e m o } }$ from expert demonstration
|
| 284 |
+
8: Sample $\hat { \mathcal { D } } _ { \mathrm { s a m p } } \subset \mathcal { D } _ { \mathrm { s a m p } }$
|
| 285 |
+
9: $\begin{array} { r } { W ^ { t + 1 } \gets W ^ { t } - \epsilon \nabla \mathcal { L } ( W ^ { t } ) } \end{array}$ using $\hat { \mathcal { D } } _ { \mathrm { d e m o } }$ and $\hat { \mathcal { D } } _ { \mathrm { s a m p } }$
|
| 286 |
+
10: end while
|
| 287 |
+
11: Run $\mathrm { A l g } 2$ with new $R _ { W }$ for improved $F _ { k + 1 }$
|
| 288 |
+
12: end for
|
| 289 |
+
13: return Final reward function $R _ { W } ( \pi , P )$ and policy $F ( P ; \pi , \theta )$
|
| 290 |
+
14: end procedure
|
| 291 |
+
|
| 292 |
+
Algorithm 2 Actor-critic algorithm for MFG
|
| 293 |
+
|
| 294 |
+
Input: Generative model $F ( P ; \pi , \theta )$ , value function $\hat { V } ( \pi ; w )$ , training data $\{ \pi ^ { 0 } \} _ { \mathrm { M d a y s } }$
|
| 295 |
+
Output: Policy parameter $\theta$ , value function parameter $w$
|
| 296 |
+
1: procedure ACTOR-CRITIC- $\mathbf { M F G } ( F , \hat { V } , \bar { \left\{ \pi ^ { 0 } \right\} } _ { \mathrm { M d a y s } } , \beta , \xi , R _ { W } )$
|
| 297 |
+
2: initialize $\theta$ and $w$
|
| 298 |
+
3: for episodes $s = 1 , \ldots , S$ do
|
| 299 |
+
4: Sample initial distribution $\pi ^ { 0 }$ from $\{ \pi ^ { 0 } \} _ { \mathrm { { M } } }$ days
|
| 300 |
+
5: for time step $n = 0 , \ldots , N - 1$ do
|
| 301 |
+
6: Sample action $P ^ { n } \sim F ( P ; \pi ^ { n } , \theta )$
|
| 302 |
+
7: Generate $\pi ^ { n + 1 }$ using Eq 3
|
| 303 |
+
8: Receive reward $R _ { W } ( \pi ^ { n } , P ^ { n } )$
|
| 304 |
+
9: $\delta R + \hat { V } ( \pi ^ { n + 1 } ; w ) - \hat { V } ( \pi ^ { n } ; w )$
|
| 305 |
+
10: $w w + \xi \delta \nabla _ { w } \hat { V } ( \pi ^ { n } ; w )$
|
| 306 |
+
11: $\theta \gets \theta + \beta \delta \nabla _ { \theta } \log ( F ( P ; \pi ^ { n } , \theta ) )$
|
| 307 |
+
12: end for
|
| 308 |
+
13: end for
|
| 309 |
+
14: end procedure
|
| 310 |
+
|
| 311 |
+
# C REWARD NETWORK
|
| 312 |
+
|
| 313 |
+
Our reward network uses two convolutional layers to process the $1 5 \times 1 5$ action matrix $P$ , which is then flattened and concatenated with the state vector $\pi$ and processed by two fully-connected layers regularized with L1 and L2 penalties and dropout (probability 0.6). The first convolutional layer zero-pads the input into a $1 9 \times 1 9$ matrix and convolves one filter of kernel size $5 \times 5$ with stride 1 and applies a rectifier nonlinearity. The second convolutional layer zero-pads its input into a $1 7 \times 1 7$ matrix and convolves 2 filters of kernel size $3 \times 3$ with stride 1 and applies a rectifier nonlinearity. The fully connected layers have 8 and 4 hidden rectifier units respectively, and the output is a single fully connected tanh unit. All layers were initialized using the Xavier normal initializer in Tensorflow.
|
| 314 |
+
|
| 315 |
+
# D EXPERIMENT DETAILS
|
| 316 |
+
|
| 317 |
+
By default, Twitter users in a certain geographical region primarily see the trending topics specific to that region (Twitter, 2017). This experiment focused on the population and trending topics in the city of Atlanta in the U.S. state of Georgia. First, a set of 406 active users were collected to form the fixed population. This was done by collecting a set of high-visibility accounts in Atlanta (e.g. the Atlanta Falcons team), gathering all Twitter users who follow these accounts, filtering for those whose location was set to Atlanta, and filtering for those who responded to least two trending topics within four days.
|
| 318 |
+
|
| 319 |
+
Data collection proceeded as follows for 27 days: at 9am of each day, a list of the top 14 trending topics on Twitter in Atlanta was recorded; for each hour until midnight, for each topic, the number of users who responded to the topic and the transition counts among topics within the past hour was recorded. Whether or not a user responded to a topic was determined by checking for posts by the user containing unique words for that topic; the “hashtag” convention of trending topics on Twitter reduces the likelihood of false positives. The hourly count of people who did not respond to any topic was recorded as the count for a “null topic”. Although some users may respond to more than one topic within each hour, the data shows that this is negligible, and a shorter time interval can be used to reduce this effect. The result of data collection is a set of trajectories, one trajectory per day, where each trajectory consists of hourly measurements of the population distribution over $d = 1 5$ topics and their transition matrix over $N = 1 6$ hours.
|
| 320 |
+
|
| 321 |
+
The training set consists of trajectories $\{ \pi ^ { 0 , m } , { \cal P } ^ { 0 , m } , \ldots , { \cal P } ^ { N - 2 , m } , \pi ^ { N - 1 , m } \} _ { m = 1 , \ldots , M }$ over the first $M = 2 1$ days. MFG uses the initial distribution $\pi ^ { 0 }$ of each day, along with the transition equation of the constructed MDP and the policy $F ( P ; \pi ^ { n } , \theta )$ , to produce complete trajectories for training $( { \mathrm { A l g } } 2$ lines 4,6,7). In contrast, VAR and RNN are supervised learning methods and they use all measured distributions. RNN employs a simple recurrent unit with ReLU as nonlinear activation and weight matrix of dimension $d \times d$ . VAR was implemented using the Statsmodels module in Python, with order 18 selected via random sub-sampling validation with validation set size 5 (Seabold & Perktold, 2010). For prediction accuracy, all three methods were evaluated against data from 6 held-out test days. Table 1 shows parameters of $\mathrm { A l g } 2$ and 1.
|
| 322 |
+
|
| 323 |
+
Table 1: Parameters
|
| 324 |
+
|
| 325 |
+
<table><tr><td>Parameter</td><td>Use</td><td>Value</td></tr><tr><td>S</td><td>max actor-critic episodes</td><td>4000</td></tr><tr><td>β</td><td>critic learning rate</td><td>0(1/s)</td></tr><tr><td>m</td><td>actor learning rate</td><td>O(1/s ln ln s)</td></tr><tr><td>C</td><td>α scaling factor</td><td>1e4</td></tr><tr><td>E</td><td>Adam optimizer learning rate for reward</td><td>1e-4</td></tr><tr><td>dR</td><td>convergence threshold for reward iteration</td><td>1e-4</td></tr><tr><td>Ofinal</td><td>learned policy parameter</td><td>8.64</td></tr></table>
|
| 326 |
+
|
| 327 |
+
# E MAXIMUM ENTROPY DISTRIBUTION
|
| 328 |
+
|
| 329 |
+
Given a finite set of trajectories $\{ \tau _ { i } \} _ { i }$ , where each trajectory is a sequence of state-action pairs $\tau _ { i } = ( s _ { i 1 } , a _ { i 1 } , \dots , )$ . Suppose each trajectory $\tau _ { i }$ has an unknown probability $p _ { i }$ . The entropy of the probability distribution is $\begin{array} { r } { H = - \sum _ { i } p _ { i } \operatorname { l n } ( p _ { i } ) } \end{array}$ . In the continuous case, we write the differential entropy:
|
| 330 |
+
|
| 331 |
+
$$
|
| 332 |
+
H = - \int p ( \tau ) \ln ( p ( \tau ) ) d \tau
|
| 333 |
+
$$
|
| 334 |
+
|
| 335 |
+
where $p ( \cdot )$ is the probability density we want to derive. The constraints are:
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\begin{array} { c } { { \displaystyle { \int r ( \tau ) p ( \tau ) d \tau = \mathbb { E } [ r ( \tau ) ] = \mu _ { r } } } } \\ { { { } } } \\ { { { \displaystyle { \int p ( \tau ) d \tau = 1 } } } } \end{array}
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
The first constraint says: the expected reward over all trajectories is equal to an empirical measurement $\mu _ { r }$ . We write the Lagrangian $\mathcal { L }$ :
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\mathcal { L } = - \int p ( \tau ) \ln ( p ( \tau ) ) d \tau - \lambda _ { 1 } \left( \int p ( \tau ) d \tau - 1 \right) - \lambda _ { 2 } \left( \int r ( \tau ) p ( \tau ) d \tau - \mu _ { r } \right)
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
For $\mathcal { L }$ to be stationary, the Euler-Lagrange equation with integrand denoted by $L$ says
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
\frac { \partial L } { \partial p } = 0
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
$L$ does not depend on $\textstyle { \frac { d p } { d \tau } }$ . Hence
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\begin{array} { l } { { \lambda _ { 1 } = \displaystyle \ln \left( \int e ^ { - \lambda _ { 2 } r ( \tau ) } d \tau \right) - 1 } } \\ { { \displaystyle p ( \tau ) = \exp \left( - \ln \left( \int e ^ { - \lambda _ { 2 } r ( \tau ) } d \tau \right) - \lambda _ { 2 } r ( \tau ) \right) = \frac { 1 } { Z ( \lambda _ { 2 } ) } e ^ { - \lambda _ { 2 } r ( \tau ) } } } \end{array}
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
where $\begin{array} { r } { Z : = \int e ^ { - \lambda _ { 2 } r ( \tau ) } d \tau } \end{array}$ . Then the constant $\lambda _ { 2 }$ is determined by:
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\begin{array} { l } { \displaystyle \mu _ { r } = \int p ( \tau ) r ( \tau ) d \tau = \frac { 1 } { Z ( \lambda _ { 2 } ) } \int e ^ { - \lambda _ { 2 } r ( \tau ) } r ( \tau ) d \tau } \\ { \displaystyle = - \frac { \partial } { \partial \lambda _ { 2 } } \ln ( Z ( \lambda _ { 2 } ) ) } \end{array}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
# F MULTIPLE IMPORTANCE SAMPLING
|
| 366 |
+
|
| 367 |
+
We show how multiple importance sampling (Owen & Zhou, 2000) can be used to estimate the partition function in the maximum entropy IRL framework. The problem is to estimate $\textstyle Z : = \int f ( x ) { \dot { d x } }$ . Let $p _ { 1 } , \ldots , p _ { m }$ be $m$ proposal distributions, with $n _ { j }$ samples from the $j$ -th proposal distribution, so that samples can be denoted $X _ { i j }$ for $i = 1 , \dotsc , n _ { j }$ and $j = 1 , \ldots , m$ . Let $w _ { j } ( x )$ for $j = 1 , \ldots , m$ satisfy
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
0 \leq w _ { j } ( x ) \leq \sum _ { j = 1 } ^ { m } w _ { j } ( x ) = 1
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
Then define the estimator
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\hat { Z } = \sum _ { j = 1 } ^ { m } \frac { 1 } { n _ { j } } \sum _ { i = 1 } ^ { n _ { j } } w _ { j } ( X _ { i j } ) \frac { f ( X _ { i j } ) } { p _ { j } ( X _ { i j } ) }
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
Let $S ( p _ { j } ) = \{ x \mid p _ { j } ( x ) > 0 \}$ be the support of $p _ { j }$ and $S ( w _ { j } ) = \{ x \mid w _ { j } ( x ) > 0 \}$ be the support of $w _ { j }$ , and let them satisfy $S ( w _ { j } ) \subset S ( p _ { j } )$ . Under these assumptions:
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\mathbb { E } [ \hat { Z } ] = \int f ( x ) d x = Z
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
In particular, choose
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
w _ { j } ( x ) : = \frac { n _ { j } p _ { j } ( x ) } { \sum _ { k = 1 } ^ { m } n _ { k } p _ { k } ( x ) }
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
Then the estimate becomes
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\begin{array} { c } { { \hat { Z } = \displaystyle \sum _ { j = 1 } ^ { m } \sum _ { i = 1 } ^ { n _ { j } } \frac { f ( X _ { j i } ) } { \sum _ { k = 1 } ^ { m } n _ { k } p _ { k } ( x ) } } } \\ { { = \displaystyle \frac { 1 } { n } \sum _ { j = 1 } ^ { m } \sum _ { i = 1 } ^ { n _ { j } } \frac { f ( X _ { j i } ) } { \sum _ { k = 1 } ^ { m } \frac { n _ { k } } { n } p _ { k } ( x ) } } } \end{array}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
where $\begin{array} { r } { n = \sum _ { j = 1 } ^ { m } n _ { j } } \end{array}$ is the total count of samples. Further assuming that samples are drawn uniformly from all proposal distributions, so that $n _ { j } = n _ { k } = n / m$ for all $j , k \in \{ 1 , \ldots , m \}$ , the expression for $\hat { Z }$ reduces to the form used in Eq 13:
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
{ \hat { Z } } = { \frac { 1 } { n } } \sum _ { { \mathrm { a l l ~ s a m p l e s } } } { \frac { f ( x ) } { { \frac { 1 } { m } } \sum _ { k = 1 } ^ { m } p _ { k } ( x ) } }
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
# G A COMPARISON OF MEAN FIELD GAMES AND MULTI-AGENT MDPS
|
| 404 |
+
|
| 405 |
+
In this section, we discuss the reason that the general MFG, whose reward function $r _ { i j } ( \pi ^ { n } , P ^ { n } )$ depends on the full Nash maximizer matrix $P ^ { n }$ , is neither reducible to a collection of distinct singleagent MDPs nor equivalent to a multi-agent MDP. Let a state in the discete space MFG be called a “topic”, to avoid confounding with an MDP state.
|
| 406 |
+
|
| 407 |
+
# G.1 COLLECTION OF SINGLE-AGENT MDPS
|
| 408 |
+
|
| 409 |
+
Consider each topic $i$ as a separate entity associated with a value, rather than subsuming it into an average (as is the case in Section 4). In order to assign a value to each topic, each tuple $( i , \pi ^ { n } )$ must be defined as a state, which leads to the problem: since a state requires specification of $\pi ^ { n }$ , and state transitions depend on the actions for all other topics, the action at each topic is not sufficient for fully specifying the next state. More formally, consider a value function on the state:
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
V ( i , \pi ^ { n } ) = \operatorname* { m a x } _ { q \in \mathbb { S } _ { i } ( \mathcal { G } ) } \biggl \{ \sum _ { j } q _ { j } r _ { i j } ( \pi ^ { n } , \mathcal { P } ( P ^ { n } , i , q ) ) + \sum _ { j } q _ { j } V ( j , ( P ^ { n } ) ^ { T } \pi ^ { n } ) \biggr \}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
Superficially, this resembles the Bellman optimality equation for the value function in a single-agent stochastic MDP, where $s$ is a state, $a$ is an action, $R$ is an immediate reward, and $P ( s ^ { \prime } | s , \bar { a } )$ is the probability of transition to state $s ^ { \prime }$ from state $s$ , given action $a$ :
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
V ^ { * } ( s ) = \operatorname* { m a x } _ { a } \{ R ( s , a ) + \sum _ { s ^ { \prime } } P ( s ^ { \prime } | s , a ) V ^ { * } ( s ^ { \prime } ) \}
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
In equation 23, $q _ { j }$ can be interpreted as a transition probability, conditioned on the fact that the current topic is $i$ . The action $q$ selected in the state $( i , \pi ^ { n } )$ induces a stochastic transition to a next topic $j$ , but the next distribution $\pi ^ { n + 1 }$ is given by the deterministic forward equation $\pi ^ { n + 1 } =$ $( P ^ { n } ) ^ { T } \pi ^ { n }$ , where $P ^ { n }$ is the true Nash maximizer matrix. This means that $q _ { j }$ does not completely specify the next state $( j , \pi ^ { n + 1 } )$ , and there is a formal difference between $P ( s ^ { \prime } | s , a ) V ^ { * } ( s ^ { \prime } )$ and $\mathring { q _ { j } } V ( \bar { j } , ( P ^ { n } ) ^ { T } \pi ^ { n } )$ . Also notice that the Bellman equation sums over all possible next states $s ^ { \prime }$ , but equation 23 only sums over topics $j$ rather than full states $( j , \pi )$ .
|
| 422 |
+
|
| 423 |
+
# G.2 MULTI-AGENT MDP
|
| 424 |
+
|
| 425 |
+
Short of modeling every single agent in the MFG, an exact reduction from the MFG to a multi-agent MDP (i.e. Markov game) is not possible. A discrete state space discrete action space multi-agent MDP is defined by $d$ agents moving within a set $S$ of environment states; a collection $\{ A _ { 1 } , \dotsc , \bar { A } _ { d } \}$ of action spaces; a transition function $P ( s ^ { \prime } | s , a _ { 1 } , \ldots , a _ { d } )$ giving the probability of the environment transitioning from current state $s$ to next state $s ^ { \prime }$ , given that agents choose actions $\bar { a } : = ( a _ { 1 } , \ldots , a _ { d } )$ ; a collection of reward functions $\{ R _ { i } ( s , a _ { 1 } , \ldots , a _ { d } ) \} _ { i }$ ; and a discount factor $\gamma$ .
|
| 426 |
+
|
| 427 |
+
Let the set of $\pi ^ { n }$ (with appropriate discretization) be the state space and limit the set of actions to some discretization of the simplex. The alternative to modeling individual MFG agents is to consider each topic as a single “agent”. Now, the agent representing topic $i$ is no longer identified with the set of people who selected topic $i$ : topics have fixed labels for all time, so an agent can only accumulate reward for a single topic, whereas people in the MFG can move among topics. Therefore, the value function for agent $i$ in a Markov game is defined only in terms of itself, never depending on the value function of agents $j \neq i$ :
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
V _ { i } ^ { \mu } ( s ) = \sum _ { \bar { a } } \prod _ { j } \mu _ { j } ( \bar { a } _ { j } | s ) \left( R _ { i } ( s , \bar { a } ) + \gamma \sum _ { s ^ { \prime } } P ( s ^ { \prime } | s , \bar { a } ) V _ { i } ^ { \mu } ( s ^ { \prime } ) \right)
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
where $\boldsymbol { \mu } : = \left( \mu _ { 1 } , \ldots , \mu _ { d } \right)$ is a set of stationary policies of all agents. However, recall that the MFG equation for $V _ { i } ^ { n }$ explicitly depends on $V _ { j } ^ { n + 1 }$ of all topics $j$ , which would require a different form such as the following:
|
| 434 |
+
|
| 435 |
+
$$
|
| 436 |
+
V _ { i } ^ { \mu } ( \pi ^ { n } ) = \sum _ { P \in \mathbb { S } ( \mathcal { G } ) } \prod _ { j = 1 } ^ { d } \mu _ { j } ( P _ { j } | \pi ^ { n } ) \left( \sum _ { k } P _ { i k } r _ { i k } ( \pi ^ { n } , P ) + \sum _ { k } P _ { i k } V _ { k } ^ { \mu } \big ( P ^ { T } \pi ^ { n } \big ) \right)
|
| 437 |
+
$$
|
| 438 |
+
|
| 439 |
+
where the last terms sums over value functions $V _ { k } ^ { \mu }$ for all topics $k$ . This mixing between value functions prevents a reduction from the MFG to a standard Markov game.
|
md/train/Hy_o3x-0b/Hy_o3x-0b.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FEATURE MAP VARIATIONAL AUTO-ENCODERS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
There have been multiple attempts with variational auto-encoders (VAE) to learn powerful global representations of complex data using a combination of latent stochastic variables and an autoregressive model over the dimensions of the data. However, for the most challenging natural image tasks the purely autoregressive model with stochastic variables still outperform the combined stochasticautoregressive models. In this paper, we present simple additions to the VAE framework that generalize to natural images by embedding spatial information in the stochastic layers. We significantly improve the state-of-the-art results on MNIST, OMNIGLOT, CIFAR10 and ImageNet when the feature map parameterization of the stochastic variables are combined with the autoregressive PixelCNN approach. Interestingly, we also observe close to state-of-the-art results without the autoregressive part. This opens the possibility for high quality image generation with only one forward-pass.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
In representation learning the goal is to learn a posterior latent distribution that explains the observed data well (Bengio et al., 2013). Learning good representations from data can be used for various tasks such as generative modelling and semi-supervised learning (Kingma, 2013; Rezende et al., 2014; Kingma et al., 2014; Rasmus et al., 2015; Maaløe et al., 2016). The decomposition of variational auto-encoders (VAE) (Kingma, 2013; Rezende et al., 2014) provides the potential to disentangle the internal representation of the input data from local to global features through a hierarchy of stochastic latent variables. This makes the VAE an obvious candidate for learning good representations. However, in order to make inference tractable VAEs contain simplifying assumptions. This limits their ability to learn a good posterior latent representation.
|
| 12 |
+
|
| 13 |
+
In complex data distributions with temporal dependencies (e.g. text, images and audio), the VAE assumption on conditional independence in the input distribution limits the ability to learn local structures. This has a significant impact on its generative performance, and thereby also the learned representations. Additionally, the one-layered VAE model with a $\mathcal { N } ( 0 , I )$ latent prior poses serious constraints on the posterior complexity that the model is able to learn. A deep hierarchy of stochastic latent variables should endow the model with more expressiveness, but the VAE has a tendency to skip the learning of the higher representations since they pose a direct cost in its optimization term.
|
| 14 |
+
|
| 15 |
+
There have been several attempts to eliminate the limitations of the VAE. Some concern formulating a more expressive variational distribution (Burda et al., 2015b; Rezende & Mohamed, 2015; Tran et al., 2016; Maaløe et al., 2016) where other concerns learning a deeper hierarchy of latent variables (Sønderby et al., 2016). These contributions have resulted in better performance, but are still limited when modelling complex data distributions where a conditional independence does not apply. When parameterizing the VAE decoder with recurrent neural networks (Krishnan et al., 2015; Bowman et al., 2015; Fraccaro et al., 2016), the decoding architecture gets too powerful which results in unused latent stochastic variables (Chen et al., 2017).
|
| 16 |
+
|
| 17 |
+
The limitations of the VAE have spawned interest towards other generative models such as Generative Adversarial Networks (GAN) (Goodfellow et al., 2014) and the autoregressive PixelCNN/PixelRNN models (van den Oord et al., 2016b). These methods have proven powerful in learning good generative models, but the lack of stochastic latent variables makes them less suitable for representation learning purposes (Chen et al., 2017). Lately, we have seen several successful attempts to combine VAEs with PixelCNNs (Gulrajani et al., 2016; Chen et al., 2017). This results in a model where the global structure of the data is learned in the stochastic latent variables of the VAE and the local structure is learned in the PixelCNN. However, despite the additional complexity and potential extra expressiveness, these models do not outperform a simple autoregressive model (van den Oord et al., 2016a; Salimans et al., 2017).
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: A visualization of FAME where the solid lines denote the variational approximation (inference/encoder/recognition) network and dashed lines denote the generative model (decoder) network for training. When performing reconstructions during training, the input image is concatenated with the output of the generative model (blue) and when generating the model follows a normal autoregressive sampling flow (red) while also using the stochastic latent variables $\mathbf { z } = z _ { 1 } , . . . , z _ { L }$ . Both the variational approximation and the generative model follow a top-down hierarchical structure which enables precision weighted stochastic variables in the variational approximation.
|
| 21 |
+
|
| 22 |
+
In this paper we present the Feature Map Variational Auto-Encoder (FAME) that combines the top-down variational approximation presented in the Ladder Variational Auto-Encoder (LVAE) (Sønderby et al., 2016) with a spatial (feature map) representation of the stochastic latent variables and an autoregressive decoder. We show that (i) FAME outperforms previously state-of-the-art loglikelihood on MNIST, OMNIGLOT, CIFAR10 and ImageNet, (ii) FAME learns a deep hierarchy of stochastic latent variables without inactivated latent units, (iii) by removing the autoregressive decoder FAME performs close to previous state-of-the-art log-likelihood suggesting that it is possible to get good quality generation with just one forward pass.
|
| 23 |
+
|
| 24 |
+
# 2 FEATURE MAP VARIATIONAL AUTO-ENCODER
|
| 25 |
+
|
| 26 |
+
The VAE (Rezende et al., 2014; Kingma, 2013) is a generative model with a hierarchy of stochastic latent variables:
|
| 27 |
+
|
| 28 |
+
$$
|
| 29 |
+
\displaystyle p _ { \theta } ( x , \mathbf { z } ) = p _ { \theta } ( x | z _ { 1 } ) p _ { \theta } ( z _ { L } ) \prod _ { i = 1 } ^ { L - 1 } p _ { \theta } ( z _ { i } | z _ { i + 1 } ) ~ ,
|
| 30 |
+
$$
|
| 31 |
+
|
| 32 |
+
where $\mathbf { z } ~ = ~ z _ { 1 } , . . . , z _ { L }$ , $\theta$ denotes the parameters, and $L$ denotes the number of stochastic latent variable layers. The stochastic latent variables are usually modelled as conditionally independent Gaussian distributions with a diagonal covariance:
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
p _ { \theta } ( z _ { i } | z _ { i + 1 } ) = \mathcal { N } \Big ( z _ { i } ; \mu _ { \theta , i } ( z _ { i + 1 } ) , \mathrm { d i a g } ( \sigma _ { \theta , i } ^ { 2 } ( z _ { i + 1 } ) ) \Big ) , \qquad p _ { \theta } ( z _ { L } ) = \mathcal { N } \Big ( z _ { L } ; 0 , I \Big ) .
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
Since the posterior $p ( \mathbf { z } | x )$ often is intractable we introduce a variational approximation $q _ { \phi } ( \mathbf { z } | x )$ with parameters $\phi$ . In the original VAE formulation $q _ { \phi } ( \mathbf { z } | x )$ is decomposed as a bottom-up inference path through the hierarchy of the stochastic layers:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\begin{array} { l } { { \displaystyle q _ { \phi } ( { \bf z } | x ) = q _ { \phi } ( z _ { 1 } | x ) \prod _ { i = 2 } ^ { L } q _ { \phi } ( z _ { i } | z _ { i - 1 } ) ~ , } } \\ { { \displaystyle q _ { \phi } ( z _ { 1 } | x ) = \mathcal { N } \Big ( z _ { 1 } ; \mu _ { \phi , 1 } ( x ) , \mathrm { d i a g } ( \sigma _ { \phi , 1 } ^ { 2 } ( x ) ) \Big ) ~ , } } \\ { { \displaystyle q _ { \phi } ( z _ { i } | z _ { i - 1 } ) = \mathcal { N } \Big ( z _ { i } ; \mu _ { \phi , i } ( z _ { i - 1 } ) , \mathrm { d i a g } ( \sigma _ { \phi , i } ^ { 2 } ( z _ { i - 1 } ) ) \Big ) ~ . } } \end{array}
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
We optimize an evidence lower-bound (ELBO) to the log-likelihood $\begin{array} { r } { \log p _ { \theta } ( x ) = \log \int _ { \mathbf { z } } p _ { \theta } ( x , \mathbf { z } ) d \mathbf { z } } \end{array}$ . Burda et al. (2015a) introduced the importance weighted bound:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\log p ( x ) \ge \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { 1 } | x ) } , . . . , \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { K } | x ) } \left[ \log \sum _ { k = 1 } ^ { K } \frac { p _ { \theta } ( x , \mathbf { z } ^ { k } ) } { q _ { \phi } ( \mathbf { z } ^ { k } | x ) } \right] \equiv \mathcal { L } _ { K } ( \theta , \phi ; x )
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
and proved that $\mathcal L _ { K } ( \theta , \phi ; x ) \ge \mathcal L _ { L } ( \theta , \phi ; x )$ for $K > L$ . For $K = 1$ the bound co-incides with the standard ELBO: $\mathcal { L } ( \theta , \phi ; x ) = \mathcal { L } _ { 1 } ( \theta , \phi ; x )$ . The hierarchical structure of both the variational approximation and generative model give the VAE the expressiveness to learn different representations of the data throughout its stochastic variables, going from local (e.g. edges in images) to global features (e.g. class specific information). However, we can apply as recursive argument Maaløe et al. (2017) to show that when optimizing with respect to the parameters $\theta$ and $\phi$ the VAE is regularized towards $q _ { \phi } ( z _ { L } | z _ { L - 1 } ) = p _ { \theta } ( z _ { L } ) = \bar { \mathcal { N } } ( z _ { L } ; 0 , \bar { I _ { ) } }$ . This is evident if we rewrite Equation 6 for $K = 1$ :
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\mathcal { L } ( \theta , \phi ; x ) = \mathbb { E } _ { q _ { \phi } ( z _ { 1 : L - 1 } | x ) } \left[ \frac { p _ { \theta } ( x , z _ { 1 : L - 1 } | z _ { L } ) } { q _ { \phi } ( z _ { 1 : L - 1 } | x ) } \right] - \mathbb { E } _ { q _ { \phi } ( z _ { 1 : L - 1 } | x ) } \left[ K L \big ( q _ { \phi } ( z _ { L } | z _ { L - 1 } ) | | p _ { \theta } ( z _ { L } ) \big ) \right] .
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
$K L \big ( q _ { \phi } ( z _ { L } | z _ { L - 1 } ) | | p _ { \theta } ( z _ { L } ) \big ) = 0$ is a local maxima and learning a useful representation in $z _ { L }$ can therefore be disregarded throughout the remainder of the training. The same argumentation can be used for all subsequent layers $z _ { 2 : L }$ , hence the VAE has a tendency to collapse towards not using the full hierarchy of latent variables. There are different ways to get around this tendency, where the simplest is to down-weight the $K L$ -divergence with a temperature term (Bowman et al., 2015; Sønderby et al., 2016). This term is applied during the initial phase of optimization and thereby downscales the regularizing effect. However, this only works for a limited number of hierarchically stacked latent variables (Sønderby et al., 2016).
|
| 57 |
+
|
| 58 |
+
Formulating a deep hierarchical VAE is not the only cause of inactive latent variables, it also occurs when the parameterization of the decoder gets too powerful (Krishnan et al., 2015; Fraccaro et al., 2016; Chen et al., 2017). This can be caused by using autoregressive models such as $p ( x , \mathbf { z } ) =$ $\begin{array} { r } { \prod _ { j } p ( x ^ { j } | x ^ { < j } , \mathbf { z } ) p ( \mathbf { z } ) } \end{array}$ . Chen et al. (2017) circumvent this by introducing the Variational Lossy AutoEncoder (VLAE) where they define the architecture for the VAE and autoregressive model such that they capture global and local structures. They also utilize the power of more expressive posterior approximations using inverse autoregressive flows (Rezende & Mohamed, 2015; Kingma et al., 2016). In the PixelVAE, Gulrajani et al. (2016) takes a similar approach to defining the generative model but makes a simpler factorizing decomposition in the variational approximation ${ \bar { q } } _ { \phi } ( \mathbf { z } | x ) =$ $\textstyle \prod _ { i } ^ { L } q _ { \phi } ( z _ { i } | x )$ , where the terms have some degree of parameter sharing. This formulation results in a less flexible model.
|
| 59 |
+
|
| 60 |
+
In Kingma et al. (2016); Gulrajani et al. (2016); Chen et al. (2017) we have seen that VAEs with simple decompositions of the stochastic latent variables and a powerful autoregressive decoder can result in good generative performance and representation learning. However, despite the additional cost of learning a VAE we only see improvement in the log-likelihood over the PixelCNN for small gray-scale image datasets (Salimans et al., 2017). We propose FAME that extends the VAE with a top-down variational approximation similar to the LVAE (Sønderby et al., 2016) combined with spatial stochastic latent layers and an autoregressive decoder, so that we ensure expressive latent stochastic variables learned in a deep hierarchy (cf. Figure 1).
|
| 61 |
+
|
| 62 |
+
# 2.1 TOP-DOWN VARIATIONAL APPROXIMATION
|
| 63 |
+
|
| 64 |
+
The LVAE (Sønderby et al., 2016) does not change the generative model but changes the variational distribution to be top-down like the generative model. Furthermore the variational distribution shares parameters with the generative model which can be viewed as a precision-weighted (inverse variance) combination of information from the prior and data distribution. The variational approximation is defined as:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
q _ { \phi } ( { \bf z } | x ) = q _ { \phi } ( z _ { L } | x ) \prod _ { i = 1 } ^ { L - 1 } q _ { \phi } ( z _ { i } | z _ { i + 1 } , x ) .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
The stochastic latent variables are all fully factorized Gaussian distributions and are therefore modelled by $q _ { \phi } ( z _ { i } | z _ { i + 1 } , x ) = \mathcal { N } ( z _ { i } | \mu _ { i } , \mathrm { d i a g } ( \bar { \sigma } _ { i } ^ { 2 } ) )$ for layers $i = 1 , . . . , L$ . Instead of letting $q$ and $p$ have
|
| 71 |
+
|
| 72 |
+
separate parameters (as in the VAE), the LVAE let the mean and variance be defined in terms of a function of $x$ (the bottom-up data part) and the generative model (the top-down prior):
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array} { l } { \displaystyle \mu _ { i } = \frac { \mu _ { \phi , i } \sigma _ { \phi , i } ^ { - 2 } + \mu _ { \theta , i } \sigma _ { \theta , i } ^ { - 2 } } { \sigma _ { \phi , i } ^ { - 2 } + \sigma _ { \theta , i } ^ { - 2 } } } \\ { \displaystyle \sigma _ { i } = \frac { 1 } { \sigma _ { \phi , i } ^ { - 2 } + \sigma _ { \theta , i } ^ { - 2 } } , } \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $\mu _ { \phi , i } = \mu _ { \phi , i } ( x )$ and $\mu _ { \theta , i } = \mu _ { \theta , i } ( z _ { i + 1 } )$ and like-wise for the variance functions. This precision weighted parameterization has previously yielded excellent results for densely connected networks (Sønderby et al., 2016).
|
| 79 |
+
|
| 80 |
+
# 2.2 CONVOLUTIONAL STOCHASTIC LAYERS
|
| 81 |
+
|
| 82 |
+
We have seen multiple contributions (e.g. Gulrajani et al. (2016)) where VAEs (and similar models) have been parameterized with convolutions in the deterministic layers $h _ { j } ^ { i }$ , for $j = 1 , . . . , M$ , and $M$ is the number of layers connecting the stochastic latent variables $z _ { i }$ . The size of the spatial feature maps decreases towards higher latent representations and transposed convolutions are used in the generative model. In FAME we propose to extend this notion, so that each of the stochastic latent layers $z _ { i } , . . . , z _ { L - 1 }$ are also convolutional. This gives the model more expressiveness in the latent layers, since it will keep track of the spatial composition of the data (and thereby learn better representations). The top stochastic layer $z _ { L }$ in FAME is a fully-connected dense layer, which makes it simpler to condition on a non-informative $\mathcal { N } ( 0 , I )$ prior and sample from a learned generative model $p _ { \boldsymbol { \theta } } ( \boldsymbol { x } , \mathbf { z } )$ . For the $i = 1 , . . . , L - 1$ stochastic latent variables, the architecture is as follows:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r l } & { \quad h _ { M , i } = \mathrm { C N N } ( h _ { < M , i } ) } \\ & { \quad \mu _ { \phi \vee \theta , i } = \mathrm { L i n e a r } ( \mathrm { C O N V } ( h _ { M , i } ) ) } \\ & { \sigma _ { \phi \vee \theta , i } = \mathrm { S o f t p l u s } \left( \mathrm { C O N V } ( h _ { M , i } ) \right) , } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where CNN and CONV denote a convolutional neural network and convolutional layer respectively. The top-most latent stochastic layer $z _ { L }$ is computed by:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\begin{array} { r l } & { \quad h _ { M , L } = \mathrm { F l a t t e n } \big ( \mathrm { C N N } \big ( h _ { < M , L } \big ) \big ) } \\ & { \quad \mu _ { \phi \vee \theta , L } = \mathrm { L i n e a r } \big ( \mathrm { D e n s e } \big ( h _ { M , L } \big ) \big ) } \\ & { \sigma _ { \phi \vee \theta , L } = { \mathrm { S o f t p l u s } } \big ( \mathrm { D e n s e } \big ( h _ { M , L } \big ) \big ) \ . } \end{array}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
This new feature map parameterization of the stochastic layers should be viewed as a step towards a better variational model where the test ELBO and the amount of activated stochastic units are direct meaures hereof.
|
| 95 |
+
|
| 96 |
+
# 2.3 AUTOREGRESSIVE DECODING
|
| 97 |
+
|
| 98 |
+
From van den Oord et al. (2016b;a); Salimans et al. (2017) we have seen that the PixelCNN architecture is very powerful in modelling a conditional distribution between pixels. In FAME we introduce a PixelCNN in the input dimension of the generative model $p _ { \boldsymbol { \theta } } ( \boldsymbol { x } | \mathbf { z } )$ (cf. Figure 1). During training we concatenate the input with the reconstruction data in the channel dimension and propagate it through the PixelCNN, similarly to what is done in Gulrajani et al. (2016). When generating samples we fix a sample from the stochastic latent variables and generate the image pixel by pixel autoregressively.
|
| 99 |
+
|
| 100 |
+
# 3 EXPERIMENTS
|
| 101 |
+
|
| 102 |
+
We test FAME on images from which we can compare with a wide range of generative models. First we evaluate on gray-scaled image datasets: statically and dynamically binarized MNIST (LeCun et al., 1998) and OMNIGLOT (Lake et al., 2013). The OMNIGLOT dataset is of particular interest due to the large variance amongst samples. Secondly we evaluate our models on natural image datasets: CIFAR10 (Krizhevsky, 2009) and 32x32 ImageNet1 (van den Oord et al., 2016b). When modelling the gray-scaled images we assume a Bernoulli $\boldsymbol { B }$ distribution using a Sigmoid activation function as the output and for the natural images we assume a Categorical distribution $\pi$ by applying the 256-way Softmax approach introduced in van den Oord et al. (2016b). We evaluate the grayscaled images with $\mathcal { L } _ { 5 0 0 0 }$ (cf. Equation 6) and due to runtime and space complexity we evaluate the natural images with $\mathcal { L } _ { 1 0 0 0 }$ .
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 2: 10 randomly picked CIFAR10 images (left) and 200 random samples drawn from a $\bar { \mathcal { N } ( 0 , I ) }$ distribution and propagated through the generative model (right).
|
| 106 |
+
|
| 107 |
+
Table 2: Negative log-likelihood performance on dynamically (left) and statically (right) binarized MNIST in nats. For the dynamically binarized MNIST results show the results for the FAME No Concatenation that has no dependency on the input image. The evidence lower-bound is computed with 5000 importance weighted samples $\mathcal { L } _ { 5 0 0 0 } ( \bar { \theta } , \phi ; x )$ .
|
| 108 |
+
|
| 109 |
+
<table><tr><td></td><td>NLL</td><td></td><td></td></tr><tr><td>IWAE(BURDA ET AL., 2015A)</td><td>82.90</td><td></td><td>NLL</td></tr><tr><td>LVAE(SONDERBY ET AL.,2016)</td><td>81.74</td><td>DRAW (GREGOR ET AL., 2015)</td><td>80.97</td></tr><tr><td>CAGEM(MAALOE ET AL.,2017)</td><td>81.60</td><td>DVAE (ROLFE,2017)</td><td>81.01</td></tr><tr><td>DVAE(ROLFE,2017)</td><td>80.04</td><td>IAF VAE (KINGMA ET AL., 2016)</td><td>79.88</td></tr><tr><td>VGP (TRAN ET AL., 2016)</td><td>79.88</td><td>PIXELRNN(VAN DEN OORD ET AL., 2016B)</td><td>79.20</td></tr><tr><td>IAF VAE KINGMA ET AL. (2016) VLAE CHEN ET AL. (2017)</td><td>79.10</td><td>VLAE (CHEN ET AL.,2017)</td><td>79.03</td></tr><tr><td>FAMENO CONCATENATION</td><td>78.53 78.73</td><td>PIXELVAE (GULRAJANI ET AL., 2016)</td><td>79.02</td></tr><tr><td>FAME</td><td colspan="2">FAME 77.82</td><td>79.30</td></tr></table>
|
| 110 |
+
|
| 111 |
+
We use a hierarchy of 5 stochastic latent variables. In case of gray-scaled images the stochastic latent layers are dense with sizes 64, 32, 16, 8, 4 (equivalent to Sønderby et al. (2016)) and for the natural images they are spatial (cf. Table 1). There was no significant difference when using feature maps (as compared to dense layers) for modelling gray-scaled images. We apply batchnormalization (Ioffe & Szegedy, 2015) and ReLU activation functions as the non-linearity between all hidden layers $h _ { i , j }$ and use a simple PixelCNN as in van den Oord et al. (2016b) with 4 residual blocks.
|
| 112 |
+
|
| 113 |
+
Because of the concatenation in the autoregressive decoder (cf. Figure 1), generation is a cumbersome process that scales linearly with the amount of pixels in the input image. Therefore we have defined a slightly changed parameterization denoted FAME No Concatenation, where the concatenation with the input is omitted. The generation has no dependency on the input data distribution and can therefore be performed in one forward-pass through the generative model.
|
| 114 |
+
|
| 115 |
+
For optimization we apply the Adam optimizer (Kingma & Ba, 2014) with a constant learning rate of 0.0003. We use 1 importance weighted sample and temperature (Sønderby et al., 2016) scaling from .3 to 1. during the initial 200 epochs for gray-scaled images and .01 to 1. during the first 400 epochs for natural images. All models are trained using the same optimization scheme.
|
| 116 |
+
|
| 117 |
+
# 3.1 GENERATIVE PERFORMANCE ON GRAY-SCALED IMAGES
|
| 118 |
+
|
| 119 |
+
The MNIST dataset serves as a good sanity check and has a myriad of previously published generative modelling benchmarks. We experienced much faster convergence rate on FAME compared to training a regular LVAE. On the dynamically binarized MNIST dataset we see a significant improvement (cf. Table 2). However, on the statically binarized MNIST, the parameterization and current optimization strategy was unsuccessful in achieving state-of-the-art results (cf. Table 1). In Figure 4a we see random samples drawn from a $\mathcal { N } ( 0 , \bar { I } )$ distribution and propagated through the decoder parameters $\theta$ . We also trained the FAME No Concatenation which performs nearly on par with the previously state-of-the-art VLAE model (Chen et al., 2017) that in comparison utilizes a skip-connection from the input distribution to the generative decoder: $\begin{array} { r } { p _ { \mathrm { l o c a l } } ( x \bar { \vert } z ) = \prod _ { i } p ( x _ { i } \vert z , x _ { \mathrm { W i n d o w A r o u n d } ( i ) } ) } \end{array}$ . This proves that a better parameterization of the VAE improves the performance without the need of tedious autoregressive generation. There was no significant difference in the $K L { \big ( } q ( \mathbf { z } | x ) | | p ( \mathbf { z } ) { \big ) }$ between FAME and FAME No Concatenation. FAME use 10.85 nats in average to encode images, whereas FAME No Concatenation use 12.29 nats.
|
| 120 |
+
|
| 121 |
+
Table 1: The convolutional layer (Conv), filter size (F), depth (K), stride (S), dense layer (Dense) and dimensionality (D) used in defining FAME for gray-scaled and natural images. The architecture is defined such that we ensure dimensionality reduction throughout the hierarchical stochastic layers. The autoregressive decoder is a PixelCNN (van den Oord et al., 2016b) with a mask $A$ convolution $\mathrm { F } { = } 7 \mathrm { x } 7$ , ${ \mathrm { K } } { = } 6 4$ , ${ \bf S } { = } 1$ followed by 4 residual blocks of convolutions with mask $B$ , $\mathrm { F } { = } 3 \mathrm { x } 3 $ , ${ \mathrm { K } } { = } 6 4$ , ${ \bf S } { = } 1$ . Finally there are three non-residual layers of convolutions with mask $B$ where the last is the output layer with a Sigmoid activation for gray-scaled images and a 256-way Softmax for natural images.
|
| 122 |
+
|
| 123 |
+
<table><tr><td colspan="2">GRAY-SCALED IMAGES 28X28</td><td>NATURAL IMAGES 32X32</td></tr><tr><td rowspan="2">h:,1</td><td>1x CONVF=5x5,K=32,S=2</td><td>2 XCONVF=3x3,K=96,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 XCONVF=3x3,K=96,S=2</td></tr><tr><td rowspan="2">21</td><td>1xDENSED=64</td><td>1xCONVF=3x3,K=8,S=1</td></tr><tr><td>64FEATUREVECTOR</td><td>16X16X8FEATUREMAPS</td></tr><tr><td rowspan="2">h.,2</td><td>1 X CONVF=3x3,K=64,S=2</td><td>2 X CONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan="2">22</td><td>1XDENSED=32</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>32FEATUREVECTOR</td><td>8X8X16FEATUREMAPS</td></tr><tr><td rowspan="2">h:3</td><td>1 XCONVF=3x3,K=64,S=2</td><td>2 X CONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan="2">23</td><td>1XDENSE D=16</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>16FEATUREVECTOR</td><td>4X4X16FEATURE MAPS</td></tr><tr><td rowspan="2">h:4</td><td>1xCONVF=3x3,K=64,S=2</td><td>2 XCONVF=3x3,K=192,S=1</td></tr><tr><td>1 X CONV F=3x3,K=64,S=1</td><td>1 X CONV F=3x3,K=192,S=2</td></tr><tr><td rowspan="2">24</td><td>1XDENSE D=8</td><td>1xCONVF=3x3,K=16,S=1</td></tr><tr><td>8 FEATURE VECTOR</td><td>2 X2X16FEATURE MAPS</td></tr><tr><td rowspan="2">h:5</td><td>1xCONVF=3x3,K=64,S=2</td><td>2 x CoNV F=3x3,K=192,S=1</td></tr><tr><td>1 X CONVF=3x3,K=64,S=1</td><td>1 X CONVF=3x3,K=192,S=2</td></tr><tr><td rowspan="2">25</td><td>1XDENSE D=4</td><td>1XDENSE D=64</td></tr><tr><td>4FEATUREVECTOR</td><td>64FEATUREVECTOR</td></tr></table>
|
| 124 |
+
|
| 125 |
+
OMNIGLOT consists of 50 alphabets of handwritten characters, where each character has a limited amount of samples. Each character has high variance which makes it harder to fit a good generative model compared to MNIST. Table 3 presents the negative log-likelihood of FAME for OMNIGLOT and demonstrates significant improvement over previously published state-of-the-art. Figure 4b shows generated samples from the learned $\theta$ parameter space.
|
| 126 |
+
|
| 127 |
+
From Sønderby et al. (2016) we have seen that the LVAE is able to learn a much tighter $\mathcal { L } _ { 1 }$ ELBO compared to the VAE. For the MNIST experiments, the $\mathcal { L } _ { 1 }$ ELBO is at 80.11 nats
|
| 128 |
+
|
| 129 |
+
NLL
|
| 130 |
+
Figure 3: Negative log-likelihood performance on OMNIGLOT in nats. The evidence lower-bound is computed with 5000 importance weighted samples $\mathcal { L } _ { 5 0 0 0 } ( \theta , \phi ; x )$ .
|
| 131 |
+
|
| 132 |
+
<table><tr><td></td><td>INLL</td></tr><tr><td>IWAE(BURDA ETAL.,2015A) LVAE (SONDERBY ET AL., 2016)</td><td>103.38 102.11</td></tr><tr><td>RBM(BURDA ET AL.,2015B)</td><td>100.46</td></tr><tr><td>DVAE (ROLFE,2017)</td><td>97.43</td></tr><tr><td>DRAW(GREGOR ET AL., 2015)</td><td>96.50</td></tr><tr><td>CONV DRAW (GREGOR ET AL., 2016)</td><td>91.00</td></tr><tr><td>VLAE CHEN ET AL.(2017)</td><td>89.83</td></tr><tr><td>FAME</td><td>82.54</td></tr></table>
|
| 133 |
+
|
| 134 |
+
compared to the $\mathcal { L } _ { 5 0 0 0 } \ 7 7 . 8 2$ nats. Similarly the OMNIGLOT $\mathcal { L } _ { 1 }$ ELBO is 86.62 nats compared to 82.54 nats. This shows significant improvements when using importance weighted samples and indicates that the parameterization of the FAME can be done in a way so that the bound is even tighter. We also find that the top-most latent stochastic layer is not collapsing into its prior, since the $\check { K L } \big ( q ( z _ { 5 } | x ) | | p ( z _ { 5 } ) \big )$ is 5.04 nats for MNIST and 3.67 nats for OMNIGLOT.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 4: Random samples drawn from a $\mathcal { N } ( 0 , I )$ distribution and propagated through the generative model of FAME for the dynamically binarized MNIST (a) and OMNIGLOT (b) dataset.
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
Figure 5: MNIST reconstructions when masking the output from the FAME stochastic variables (a) and the concatenated input image (b) prior to feeding them to the autoregressive PixelCNN. It is interesting to see how the edge information comes from the autoregressive dependency on the input image.
|
| 141 |
+
|
| 142 |
+
In order to analyze the contribution from the autoregressive decoder we experimented on masking the contribution from either the concatenated image or the output of the FAME decoder before feeding it into the PixelCNN layers (cf. Figure 1). In Figure 5a we see the results of reconstructing MNIST images when masking out the contribution from the stochastic variables and in Figure 5b we mask out the contribution from the concatenated input image.
|
| 143 |
+
|
| 144 |
+
# 3.2 GENERATIVE PERFORMANCE ON NATURAL IMAGES
|
| 145 |
+
|
| 146 |
+
We investigate the performance of FAME on two natural image datasets: CIFAR10 and ImageNet. Learning a generative model on natural images is more challenging, which is also why there are many tricks that can be done in regards to the autoregressive decoding (van den Oord et al., 2016a; Salimans et al., 2017; Chen et al., 2017). However, since we are interested in the additional expressiveness of a LVAE parameterization with convolutional stochastic latent variables, we have chosen a suboptimal architecture for the autoregressive decoding (cf. Table 1) (van den Oord et al., 2016b). An obvious improvement to the decoder would be to incorporate the PixelCNN $^ { + + }$ (Salimans et al., 2017), but by using the simpler architecture we ensure that the improvements in log-likelihood is not a result of a strong autoregressive model.
|
| 147 |
+
|
| 148 |
+
From Table 3 we see the performance from FAME and FAME No Concatenation on the CIFAR10 dataset. Similarly to the gray-scaled images, FAME outperforms current state-of-the-art results significantly. It is also interesting to see how FAME No Concatenation performs close to the previously published state-of-the-art results. Especially in the image space, this could prove interesting, since the FAME No Concatenation has no additional autoregressive runtime complexity. We only investigated the $3 2 \mathrm { x } 3 2 $ ImageNet dataset, since the training time is significant and it outperformed the $6 4 \mathrm { x } 6 4$ models (cf. Table 4), whereas the previously published 64x64 ImageNet models consistently outperform their 32x32 counterpart. In Figure 2 we show samples from FAME on the CIFAR10 dataset. Similarly to previously published results it is difficult to analyze the performance from the samples. However, we can conclude that FAME is able to capture spatial correlations in the images for generating sharp samples. It is also interesting to see how it captures the contours of objects in the images.
|
| 149 |
+
|
| 150 |
+
BITS/DIM
|
| 151 |
+
Table 3: Negative log-likelihood performance on CIFAR10 in bits/dim. The evidence lower-bound is computed with 1000 importance weighted samples $\mathcal { L } _ { 1 0 0 0 } ( \theta , \phi ; x )$ .
|
| 152 |
+
|
| 153 |
+
<table><tr><td>UNIFORMDISTRIBUTION(VANDEN OORD ET AL.,2016B) DEEP DIFFUSION (SOHL-DICKSTEIN ET AL.,2015) MULTIVARIATE GAUSSIAN(VAN DEN OORD ET AL.,2016B) NICE(DINH ET AL., 2014) DEEP GMMS(VAN DEN OORD& SCHRAUWEN,2014) CONV DRAW (GREGOR ET AL.,2016) REAL NVP (DINH ET AL., 2016) PIXELCNN(VAN DEN OORD ET AL.,2016B) IAF VAE KINGMA ET AL. (2016) GATED PIXELCNN(VAN DEN OORD ET AL.,2016A) PIXELRNN(VAN DEN OORD ET AL.,2016B) VLAE(CHEN ET AL., 2017) 2.95 PIXELCNN++ (SALIMANS ET AL., 2017) 2.92 FAMENO CONCATENATION 2.98 FAME 2.75</td><td>8.00 5.40 4.70 4.48 4.00 3.58 3.49 3.14 3.11 3.03 3.00</td></tr></table>
|
| 154 |
+
|
| 155 |
+
Table 4: Negative log-likelihood performance on ImageNet in bits/dim. The evidence lower-bound is computed with 1000 importance weighted samples $\mathcal { \bar { L } } _ { 1 0 0 0 } ( \theta , \phi ; x )$ .
|
| 156 |
+
|
| 157 |
+
<table><tr><td></td><td>BITS/DIM</td></tr><tr><td>CONVDRAW 32X32(GREGOR ET AL.,2016)</td><td>4.40</td></tr><tr><td>CONV DRAW 64X64(GREGOR ET AL., 2016)</td><td>4.10</td></tr><tr><td>REAL NVP 32X32 (DINH ET AL.,2016)</td><td>4.28</td></tr><tr><td>REAL NVP 64X64 (DINH ET AL.,2016)</td><td>4.01</td></tr><tr><td>PIXELVAE 64X64(GULRAJANI ET AL.,2016)</td><td>3.66</td></tr><tr><td>PIXELRNN 32X32(VAN DEN OORD ET AL., 2016B)</td><td>3.86</td></tr><tr><td>PIXELRNN 64X64(VAN DEN OORD ET AL., 2016B)</td><td>3.63</td></tr><tr><td>GATED PIXELCNN 32X32(VAN DEN OORD ET AL., 2016A)</td><td>3.83</td></tr><tr><td>GATED PIXELCNN 64X64(VAN DEN OORD ET AL.,2016A)</td><td>3.57</td></tr><tr><td>FAME32x32</td><td>3.23</td></tr></table>
|
| 158 |
+
|
| 159 |
+
# 4 CONCLUSION
|
| 160 |
+
|
| 161 |
+
We have presented FAME, an extension to the VAE that significantly improve state-of-the-art performance on standard benchmark datasets. By introducing feature map representations in the latent stochastic variables in addition to top-down inference we have shown that the model is able to capture representations of complex image distributions while utilizing a powerful autoregressive architecture as a decoder.
|
| 162 |
+
|
| 163 |
+
In order to analyze the contribution from the VAE as opposed to the autoregressive model, we have presented results without concatenating the input image when reconstructing and generating. This parameterization shows on par results with the previously state-of-the-art results without depending on the time consuming autoregressive generation.
|
| 164 |
+
|
| 165 |
+
Further directions for FAME is to (i) test it on larger image datasets with images of a higher resolution, (ii) expand the model to capture other data modalities such as audio and text, (iii) combine the model in a semi-supervised framework.
|
| 166 |
+
|
| 167 |
+
# REFERENCES
|
| 168 |
+
|
| 169 |
+
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 2013.
|
| 170 |
+
|
| 171 |
+
S.R. Bowman, L. Vilnis, O. Vinyals, A.M. Dai, R. Jozefowicz, and S. Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
|
| 172 |
+
|
| 173 |
+
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance Weighted Autoencoders. arXiv preprint arXiv:1509.00519, 2015a.
|
| 174 |
+
|
| 175 |
+
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Accurate and conservative estimates of mrf log-likelihood using reverse annealing. In Proceedings of the International Conference on Artificial Intelligence and Statistics, 2015b.
|
| 176 |
+
|
| 177 |
+
Xi Chen, Diederik P. Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational Lossy Autoencoder. In International Conference on Learning Representations, 2017.
|
| 178 |
+
|
| 179 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 180 |
+
|
| 181 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
|
| 182 |
+
|
| 183 |
+
Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential neural models with stochastic layers. In Advances in Neural Information Processing Systems. 2016.
|
| 184 |
+
|
| 185 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems. 2014.
|
| 186 |
+
|
| 187 |
+
Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015.
|
| 188 |
+
|
| 189 |
+
Karol Gregor, Rezende Danilo Jimenez Besse, Fredric, Ivo Danihelka, and Daan Wierstra. Towards conceptual compression. arXiv preprint arXiv:1604.08772, 2016.
|
| 190 |
+
|
| 191 |
+
Ishaan Gulrajani, Kundan Kumar, Faruk Ahmed, Adrien Ali Taiga, Francesco Visin, David Vazquez, and Aaron Courville. PixelVAE: A latent variable model for natural images. arXiv e-prints, 1611.05013, November 2016.
|
| 192 |
+
|
| 193 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of International Conference on Machine Learning, 2015.
|
| 194 |
+
|
| 195 |
+
Diederik Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. arXiv preprint arXiv:1412.6980, 12 2014.
|
| 196 |
+
|
| 197 |
+
Diederik P. Kingma, Danilo Jimenez Rezende, Shakir Mohamed, and Max Welling. SemiSupervised Learning with Deep Generative Models. In Proceedings of the International Conference on Machine Learning, 2014.
|
| 198 |
+
|
| 199 |
+
Diederik P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in Neural Information Processing Systems. 2016.
|
| 200 |
+
|
| 201 |
+
Max Kingma, Diederik P; Welling. Auto-Encoding Variational Bayes. arXiv preprint arXiv:1312.6114, 12 2013.
|
| 202 |
+
|
| 203 |
+
Rahul G Krishnan, Uri Shalit, and David Sontag. Deep Kalman filters. arXiv:1511.05121, 2015.
|
| 204 |
+
|
| 205 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 206 |
+
|
| 207 |
+
Brenden M Lake, Ruslan R Salakhutdinov, and Josh Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in Neural Information Processing Systems. 2013.
|
| 208 |
+
|
| 209 |
+
Yann LeCun, Lon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 2278–2324, 1998.
|
| 210 |
+
|
| 211 |
+
Lars Maaløe, Casper K. Sønderby, Søren K. Sønderby, and Ole Winther. Auxiliary Deep Generative Models. In Proceedings of the International Conference on Machine Learning, 2016.
|
| 212 |
+
|
| 213 |
+
Lars Maaløe, Marco Fraccaro, and Ole Winther. Semi-supervised generation with cluster-aware generative models. arXiv preprint arXiv:1704.00637, 2017.
|
| 214 |
+
|
| 215 |
+
Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semisupervised learning with ladder networks. In Advances in Neural Information Processing Systems, 2015.
|
| 216 |
+
|
| 217 |
+
Danilo J. Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. arXiv preprint arXiv:1401.4082, 04 2014.
|
| 218 |
+
|
| 219 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational Inference with Normalizing Flows. In Proceedings of the International Conference on Machine Learning, 2015.
|
| 220 |
+
|
| 221 |
+
Jason Tyler Rolfe. Discrete variational autoencoders. In Proceedings of the International Conference on Learning Representations, 2017.
|
| 222 |
+
|
| 223 |
+
Tim Salimans, Andrej Karparthy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint:1701.05517, 2017, 2017.
|
| 224 |
+
|
| 225 |
+
Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. arXiv preprint arXiv:1503.03585, 2015.
|
| 226 |
+
|
| 227 |
+
Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. In Advances in Neural Information Processing Systems 29. 2016.
|
| 228 |
+
|
| 229 |
+
Dustin Tran, Rajesh Ranganath, and David M Blei. Variational Gaussian process. In Proceedings of the International Conference on Learning Representations, 2016.
|
| 230 |
+
|
| 231 |
+
Aaron van den Oord and Benjamin Schrauwen. Factoring variations in natural images with deep gaussian mixture models. In Advances in Neural Information Processing Systems, 2014.
|
| 232 |
+
|
| 233 |
+
Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders. arXiv preprint arXiv:1606.05328, 2016a.
|
| 234 |
+
|
| 235 |
+
Aaron van den Oord, Kalchbrenner Nal, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 01 2016b.
|
md/train/IOqr2ZyXHz1/IOqr2ZyXHz1.md
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CONTINUAL LIFELONG CAUSAL EFFECT INFERENCEWITH REAL WORLD EVIDENCE
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The era of real world evidence has witnessed an increasing availability of observational data, which much facilitates the development of causal effect inference. Although significant advances have been made to overcome the challenges in causal effect estimation, such as missing counterfactual outcomes and selection bias, they only focus on source-specific and stationary observational data. In this paper, we investigate a new research problem of causal effect inference from incrementally available observational data, and present three new evaluation criteria accordingly, including extensibility, adaptability, and accessibility. We propose a Continual Causal Effect Representation Learning method for estimating causal effect with observational data, which are incrementally available from non-stationary data distributions. Instead of having access to all seen observational data, our method only stores a limited subset of feature representations learned from previous data. Combining the selective and balanced representation learning, feature representation distillation, and feature transformation, our method achieves the continual causal effect estimation for new data without compromising the estimation capability for original data. Extensive experiments demonstrate the significance of continual causal effect inference and the effectiveness of our method.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Causal effect inference is a critical research topic across many domains, such as statistics, computer science, public policy, and economics. Randomized controlled trials (RCT) are usually considered as the gold-standard for causal effect inference, which randomly assigns participants into a treatment or control group. As the RCT is conducted, the only expected difference between the treatment and control groups is the outcome variable being studied. However, in reality, randomized controlled trials are always time-consuming and expensive, and thus the study cannot involve many subjects, which may be not representative of the real-world population the intervention would eventually target. Nowadays, estimating causal effects from observational data has become an appealing research direction owing to a large amount of available data and low budget requirements, compared with RCT (Yao et al., 2020). Researchers have developed various strategies for causal effect inference with observational data, such as tree-based methods (Chipman et al., 2010; Wager & Athey, 2018), representation learning methods (Johansson et al., 2016; Li & Fu, 2017; Shalit et al., 2017; Chu et al., 2020), adapting Bayesian algorithms (Alaa & van der Schaar, 2017), generative adversarial nets (Yoon et al., 2018), variational autoencoders (Louizos et al., 2017) and so on.
|
| 12 |
+
|
| 13 |
+
Although significant advances have been made to overcome the challenges in causal effect estimation with observational data, such as missing counterfactual outcomes and selection bias between treatment and control groups, the existing methods only focus on source-specific and stationary observational data. Such learning strategies assume that all observational data are already available during the training phase and from the only one source. This assumption is unsubstantial in practice due to two reasons. The first one is based on the characteristics of observational data, which are incrementally available from non-stationary data distributions. For instance, the number of electronic medical records in one hospital is growing every day, or the electronic medical records for one disease may be from different hospitals or even different countries. This characteristic implies that one cannot have access to all observational data at one time point and from one single source. The second reason is based on the realistic consideration of accessibility. For example, when the new observational are available, if we want to refine the model previously trained by original data, maybe the original training data are no longer accessible due to a variety of reasons, e.g., legacy data may be unrecorded, proprietary, too large to store, or subject to privacy constraint (Zhang et al., 2020). This practical concern of accessibility is ubiquitous in various academic and industrial applications. That’s what it boiled down to: in the era of big data, we face the new challenges in causal inference with observational data: the extensibility for incrementally available observational data, the adaptability for extra domain adaptation problem except for the imbalance between treatment and control groups in one source, and the accessibility for a huge amount of data.
|
| 14 |
+
|
| 15 |
+
Existing causal effect inference methods, however, are unable to deal with the aforementioned new challenges, i.e., extensibility, adaptability, and accessibility. Although it is possible to adapt existing causal inference methods to address the new challenges, these adapted methods still have inevitable defects. Three straightforward adaptation strategies are described as follows. (1) If we directly apply the model previously trained based on original data to new observational data, the performance on new task will be very poor due to the domain shift issues among different data sources; (2) If we utilize newly available data to re-train the previously learned model, adapting changes in the data distribution, old knowledge will be completely or partially overwritten by the new one, which can result in severe performance degradation on old tasks. This is the well-known catastrophic forgetting problem (McCloskey & Cohen, 1989; French, 1999); (3) To overcome the catastrophic forgetting problem, we may rely on the storage of old data and combine the old and new data together, and then re-train the model from scratch. However, this strategy is memory inefficient and time-consuming, and it brings practical concerns such as copyright or privacy issues when storing data for a long time (Samet et al., 2013). Our empirical evaluations in Section 4 demonstrate that any of these three strategies in combination with the existing causal effect inference methods is deficient.
|
| 16 |
+
|
| 17 |
+
To address the above issues, we propose a Continual Causal Effect Representation Learning method (CERL) for estimating causal effect with incrementally available observational data. Instead of having access to all previous observational data, we only store a limited subset of feature representations learned from previous data. Combining the selective and balanced representation learning, feature representation distillation, and feature transformation, our method preserves the knowledge learned from previous data and update the knowledge by leveraging new data, so that it can achieve the continual causal effect estimation for new data without compromising the estimation capability for previous data. To summarize, our main contributions include:
|
| 18 |
+
|
| 19 |
+
• Our work is the first to introduce the continual lifelong causal effect inference problem for the incrementally available observational data and three corresponding evaluation criteria, i.e., extensibility, adaptability, and accessibility.
|
| 20 |
+
• We propose a new framework for continual lifelong causal effect inference based on deep representation learning and continual learning.
|
| 21 |
+
• Extensive experiments demonstrate the deficiency of existing methods when facing the incrementally available observational data and our model’s outstanding performance.
|
| 22 |
+
|
| 23 |
+
# 2 BACKGROUND AND PROBLEM STATEMENT
|
| 24 |
+
|
| 25 |
+
Suppose that the observational data contain $\cdot$ units collected from $\cdot$ different domains and the $\cdot$ -th dataset $D _ { d }$ contains the data $-$ collected from $d$ -th domain, which contains $\cdot$ units. Let $X$ denote all observed variables, $Y$ denote the outcomes in the observational data, and $\cdot$ is a binary variable. Let $D _ { 1 : d } = \{ D _ { 1 } , D _ { 2 } , . . . , D _ { d } \}$ be the set of combination of $\cdot$ dataset, separately collected from $d$ different domains. For $d$ datasets $\_$ , they have the common observed variables but due to the fact that they are collected from different domains, they have different distributions with respect to $X$ , $\cdot$ , and $T$ in each dataset. Each unit in the observational data received one of two treatments. Let $\cdot$ denote the treatment assignment for unit $\cdot$ ; $\cdot$ . For binary treatments, $t _ { i } = 1$ is for the treatment group, and $\cdot$ for the control group. The outcome for unit $i$ is denoted by $y _ { t } ^ { \ i }$ when treatment $t$ is applied to unit $i$ ; that is, $\cdot$ is the potential outcome of unit $\cdot$ in the treatment group and $\cdot$ is the potential outcome of unit $i$ in the control group. For observational data, only one of the potential outcomes is observed. The observed outcome is called the factual outcome and the remaining unobserved potential outcomes are called counterfactual outcomes.
|
| 26 |
+
|
| 27 |
+
In this paper, we follow the potential outcome framework for estimating treatment effects (Rubin, 1974; Splawa-Neyman et al., 1990). The individual treatment effect (ITE) for unit $i$ is the difference between the potential treated and control outcomes, and is defined as $\mathrm { I T E } _ { i } = y _ { 1 } ^ { i } - y _ { 0 } ^ { i }$ . The average treatment effect (ATE) is the difference between the mean potential treated and control outcomes, which is defined as $\begin{array} { r } { \mathrm { A } \dot { \mathrm { T E } } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } ( y _ { 1 } ^ { i } - y _ { 0 } ^ { i } ) } \end{array}$ .
|
| 28 |
+
|
| 29 |
+
The success of the potential outcome framework is based on the following assumptions (Imbens & Rubin, 2015), which ensure that the treatment effect can be identified. Stable Unit Treatment Value Assumption (SUTVA): The potential outcomes for any units do not vary with the treatments assigned to other units, and, for each unit, there are no different forms or versions of each treatment level, which lead to different potential outcomes. Consistency: The potential outcome of treatment $t$ is equal to the observed outcome if the actual treatment received is $t$ . Positivity: For any value of $x$ , treatment assignment is not deterministic, i.e., $P ( T = t | X = x ) > 0$ , for all $t$ and $x$ . Ignorability: Given covariates, treatment assignment is independent to the potential outcomes, i.e., $( y _ { 1 } , y _ { 0 } ) \perp t | x$ .
|
| 30 |
+
|
| 31 |
+
The goal of our work is to develop a novel continual causal inference framework, given new available observational data $D _ { d }$ , to estimate the causal effect for newly available data $D _ { d }$ as well as the previous data $D _ { 1 : ( d - 1 ) }$ without having access to previous training data in $D _ { 1 : ( d - 1 ) }$ .
|
| 32 |
+
|
| 33 |
+
# 3 THE PROPOSED FRAMEWORK
|
| 34 |
+
|
| 35 |
+
The availability of “real world evidence” is expected to facilitate the development of causal effect inference models for various academic and industrial applications. How to achieve continual learning from incrementally available observational data from non-stationary data domains is a new direction in causal effect inference. Rather than only focusing on handling the selection bias problem, we also need to take into comprehensive consideration three aspects of the model, i.e., the extensibility for incrementally available observational data, the adaptability for various data sources, and the accessibility for a huge amount of data.
|
| 36 |
+
|
| 37 |
+
We propose the Continual Causal Effect Representation Learning method (CERL) for estimating causal effect with incrementally available observational data. Based on selective and balanced representation learning for treatment effect estimation, CERL incorporates feature representation distillation to preserve the knowledge learned from previous observational data. Besides, aiming at adapting the updated model to original and new data without having access to the original data, and solving the selection bias between treatment and control groups, we propose one representation transformation function, which maps partial original feature representations into new feature representation space and makes the global feature representation space balanced with respect to treatment and control groups. Therefore, CERL can achieve the continual causal effect estimation for new data and meanwhile preserve the estimation capability for previous data, without the aid of original data.
|
| 38 |
+
|
| 39 |
+
# 3.1 MODEL ARCHITECTURE
|
| 40 |
+
|
| 41 |
+
To estimate the incrementally available observational data, the framework of CERL is mainly composed of two components: (1) the baseline causal effect learning model is only for the first available observational data, and thus we don’t need to consider the domain shift issue among different data sources. This component is equivalent to the traditional causal effect estimation problem; (2) the continual causal effect learning model is for the sequentially available observational data, where we need to handle more complex issues, such as knowledge transfer, catastrophic forgetting, global representation balance, and memory constraint. We present the details of each component as follows.
|
| 42 |
+
|
| 43 |
+
# 3.1.1 THE BASELINE CAUSAL EFFECT LEARNING MODEL
|
| 44 |
+
|
| 45 |
+
We first describe the baseline causal effect learning model for the initial observational dataset and then bring in subsequent datasets. For causal effect estimation in the initial dataset, it can be transformed into the traditional causal effect estimation problem. Motivated by the empirical success of deep representation learning for counterfactual inference (Shalit et al., 2017; Chu et al., 2020), we propose to learn the selective and balanced feature representations for treated and control units, and then infer the potential outcomes based on learned representation space.
|
| 46 |
+
|
| 47 |
+
Learning Selective and Balanced Representation. Firstly, we adopt a deep feature selection model that enables variable selection in one deep neural network, i.e., $g _ { w _ { 1 } } : X \to R$ , where $X$ denotes the original covariate space, $R$ denotes the representation space, and $w _ { 1 }$ are the learnable parameters in function $g$ . The elastic net regularization term (Zou & Hastie, 2005) is adopted in our model, i.e., $L _ { w _ { 1 } } = \| \dot { w } _ { 1 } \| _ { 2 } ^ { 2 } + \| w _ { 1 } \| _ { 1 }$ . Elastic net throughout the fully connected representation layers assigns larger weights to important features. This strategy can effectively filter out the irrelevant variables and highlight the important variables.
|
| 48 |
+
|
| 49 |
+
Due to the selection bias between treatment and control groups and among the sequential different data sources, the magnitudes of confounders may be significantly different. To effectively eliminate the imbalance caused by the significant difference in magnitudes between treatment and control groups and among different data sources, we propose to use cosine normalization in the last representation layer. In the multi-layer neural networks, we traditionally use dot products between the output vector of the previous layer and the incoming weight vector, and then input the products to the activation function. The result of dot product is unbounded. Cosine normalization uses cosine similarity instead of simple dot products in neural networks, which can bound the pre-activation between $- 1$ and 1. The result could be even smaller when the dimension is high. As a result, the fined as variance can be controlled within a very narrow range (Luo et al., 2018). Cosine normalization is de- $\begin{array} { r } { r = \sigma ( r _ { n o r m } ) = \sigma \big ( \cos ( w , x ) \big ) = \sigma ( \frac { w \cdot x } { | w | | x | } ) } \end{array}$ , where $r _ { n o r m }$ is the normalized pre-activation, $w$ is the incoming weight vector, $x$ is the input vector, and $\sigma$ is nonlinear activation function.
|
| 50 |
+
|
| 51 |
+
Motivated by Shalit et al. (2017), we adopt integral probability metrics (IPM) when learning the representation space to balance the treatment and control groups. The IPM measures the divergence between the representation distributions of treatment and control groups, so we want to minimize the IPM to make two distributions more similar. Let $P ( g ( x ) | t = \bar { 1 } )$ ) and $Q ( g ( x ) | t = 0 )$ ) denote the empirical distributions of the representation vectors for the treatment and control groups, respectively. We adopt the IPM defined in the family of 1-Lipschitz functions, which leads to IPM being the Wasserstein distance (Sriperumbudur et al., 2012; Shalit et al., 2017). In particular, the IPM term with Wasserstein distance is defined as $\begin{array} { r } { { \bf W } { \ a s s } ( P , Q ) = \operatorname* { i n f } _ { k \in { \mathcal K } } \int _ { g ( x ) } \| k \bar { ( g ( x ) ) } - } \end{array}$ $g ( x ) \| P ( g ( x ) ) d ( g ( x ) )$ , where $\gamma$ denotes the hyper-parameter controlling the trade-off between $\mathrm { W a s s } ( P , Q )$ and other terms in the final objective function. $\begin{array} { r } { \mathcal { K } = \{ k | Q ( k ( g ( x ) ) ) = P ( g ( x ) ) \} } \end{array}$ defines the set of push-forward functions that transform the representation distribution of the treatment distribution $P$ to that of the control $Q$ and $g ( x ) \in \{ g ( x ) _ { i } \} _ { i : t _ { i } = 1 }$ .
|
| 52 |
+
|
| 53 |
+
Inferring Potential Outcomes. We aim to learn a function $h _ { \theta _ { 1 } } : R \times T Y$ that maps the representation vectors and treatment assignment to the corresponding observed outcomes, and it can be parameterized by deep neural networks. To overcome the risk of losing the influence of $T$ on $R$ ${ \bf \xi } , h _ { \theta _ { 1 } } ( g _ { w _ { 1 } } ( x ) , t )$ is partitioned into two separate tasks for treatment and control groups, respectively. Each unit is only updated in the task corresponding to its observed treatment. Let $\hat { y } _ { i } =$ $h _ { \theta _ { 1 } } ( g _ { w _ { 1 } } ( x ) , t )$ denote the inferred observed outcome of unit he mean squared error in predicting factual ou $i$ correspcomes: t . $t _ { i }$ . $\begin{array} { r } { L _ { Y } = \frac { 1 } { n _ { 1 } } \sum _ { i = 1 } ^ { n _ { 1 } } ( \hat { y } _ { i } - y _ { i } ) ^ { 2 } } \end{array}$
|
| 54 |
+
|
| 55 |
+
Putting all the above together, the objective function of our baseline causal effect learning model is: $L \doteq L _ { Y } + \alpha W a s s ( \bar { P } , Q ) + \lambda L _ { w _ { 1 } }$ , where $\alpha$ and $\lambda$ denote the hyper-parameters controlling the trade-off among $W a s s ( P , Q )$ , $L _ { w }$ , and $L _ { Y }$ in the objective function.
|
| 56 |
+
|
| 57 |
+
# 3.1.2 THE SUSTAINABILITY OF MODEL LEARNING
|
| 58 |
+
|
| 59 |
+
By far, we have built the baseline model for causal effect estimation with observational data from a single source. To avoid catastrophic forgetting when learning new data, we propose to preserve a subset of lower-dimensional feature representations rather than all original covariates. We also can adjust the number of preserved feature representations according to the memory constraint.
|
| 60 |
+
|
| 61 |
+
After the completion of baseline model training, we store a subset of feature representations $R _ { 1 } = \{ g _ { w _ { 1 } } ( x ) \bar { | } x \in D _ { 1 } \}$ and the corresponding $\{ Y , T \} \in D _ { 1 }$ as memory $M _ { 1 }$ . The size of stored representation vectors can be reduced to satisfy the pre-specified memory constraint by a herding algorithm (Welling, 2009; Rebuffi et al., 2017). The herding algorithm can create a representative set of samples from distribution and requires fewer samples to achieve a high approximation quality than random subsampling. We run the herding algorithm separately for treatment and control groups to store the same number of feature representations from treatment and control groups. At this point, we only store the memory set $M _ { 1 }$ and model $g _ { w 1 }$ , without the original data $( D _ { 1 } )$ .
|
| 62 |
+
|
| 63 |
+
# 3.1.3 THE CONTINUAL CAUSAL EFFECT LEARNING MODEL
|
| 64 |
+
|
| 65 |
+
For now, we have stored memory $M _ { 1 }$ and baseline model. To continually estimate the causal effect for incrementally available observational data, we incorporate feature representation distillation and feature representation transformation to estimate causal effect for all seen data based on balanced global feature representation space. The framework of CERL is shown in Fig. 1.
|
| 66 |
+
|
| 67 |
+
Feature Representation Distillation. For next available dataset $D _ { 2 } \ = \ \{ ( x , y , t ) | x \ \in \ X , y \ \in$ $Y , t \in T \}$ collected from second domain, we adopt the same selective representation learning $g _ { w _ { 2 } } : X \to R _ { 2 }$ with elastic net regularization $( L _ { w _ { 2 } } )$ on new parameters $w _ { 2 }$ . Because we expect our model can estimate causal effect for both previous and new data, we want the new model to inherit some knowledge from previous model. In continual learning, knowledge distillation (Hinton et al., 2015; Li & Hoiem, 2017) is commonly adopted to alleviate the catastrophic forgetting, where knowledge is transferred from one network to another network by encouraging the outputs of the original and new network to be similar. However, for the continual causal effect estimation problem, we focus more on the feature representations, which are required to be balanced between treatment and control, and among different data domains. Inspired by Hou et al. (2019); Dhar et al. (2019); Iscen et al. (2020), we propose feature representation distillation to encourage the representation vector $\{ g _ { w _ { 1 } } ( x ) | x \in D _ { 2 } \}$ based on baseline model to be similar to the representation vector $\{ g _ { w _ { 2 } } ( x ) | \dot { x } \in D _ { 2 } \}$ based on new model by Euclidean distance. This feature distillation can help prevent the learned representations from drifting too much in the new feature representation space. Because we apply the cosine normalization to feature representations and $\| { \dot { A } } - B \| ^ { 2 } = ( { \dot { A } } - B ) ^ { \tau } ( A - B ) { \stackrel { \sim } { = } } \| A \| ^ { 2 } + \| B \| ^ { 2 } - 2 A ^ { \tau } B = 2 { \bigl ( } 1 - c o s ( { \dot { A , } } B ) { \bigr ) }$ , the feature representation distillation is defined as $L _ { F D } ( x ) = 1 - c o s \bigl ( g _ { w _ { 1 } } ( x ) , g _ { w _ { 2 } } ( x ) \bigr ) ,$ , where $x \in D _ { 2 }$ .
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 1: The blue part is baseline causal effect learning model for the first observational data. After baseline model training, store a subset of feature representations $R _ { 1 }$ into $M _ { 1 }$ by herding algorithm. The green part helps to map $R _ { 1 }$ to transformed feature representations $\tilde { R } _ { 1 }$ compatible with new feature representations space $R _ { 2 }$ . Then the red part is used for continual causal effect estimation based on feature distillation and balanced global feature representation learning for $\tilde { R } _ { 1 }$ and $R _ { 2 }$ .
|
| 71 |
+
|
| 72 |
+
Feature Representation Transformation. We have previous feature representations $R _ { 1 }$ stored in $M _ { 1 }$ and new feature representations $R _ { 2 }$ extracted from newly available data. $R _ { 1 }$ and $R _ { 2 }$ lie in different feature representation space and they are not compatible with each other because they are learned from different models. In addition, we cannot learn the feature representations of previous data from the new model $g _ { w _ { 2 } }$ , as we no longer have access to previous data. Therefore, to balance the global feature representation space including previous and new representations between treatment and control groups, a feature transformation function is needed from previous feature representations $R _ { 1 }$ to transformed feature representations $\tilde { R } _ { 1 }$ compatible with new feature representations space $R _ { 2 }$ . We define a feature transformation function as $\phi _ { 1 \to 2 } : R _ { 1 } \to \tilde { R } _ { 1 }$ . We also input the feature representations of new data $D _ { 2 }$ learned from old model, i.e., $g _ { w _ { 1 } } ( x )$ , to get the transformed feature representations of new data, i.e., $\phi _ { 1 2 } ( g _ { w _ { 1 } } ( x ) )$ . To keep the transformed space compatible with the new feature representation space, we train the transformation function $\phi _ { 1 2 }$ by making the $\phi _ { 1 2 } ( g _ { w _ { 1 } } ( x ) )$ and $g _ { w _ { 2 } } ( x )$ similar, where $x \ \in \ D _ { 2 }$ . The loss function is defined as $L _ { F T } ( x ) \stackrel { } { = }$ $1 - c o s \bigl ( \phi _ { 1 \to 2 } ( g _ { w _ { 1 } } ( x ) ) , g _ { w _ { 2 } } ( x ) \bigr )$ , which is used to train the function $\phi _ { 1 2 }$ to transform feature representations between different feature spaces. Then, we can attain the transformed old feature representations $\tilde { R } _ { 1 } = \phi _ { 1 2 } ( R _ { 1 } )$ , which is in the same space as $R _ { 2 }$ .
|
| 73 |
+
|
| 74 |
+
Balancing Global Feature Representation Space. We have obtained a global feature representation space including the transformed representations of stored old data and new representations of new available data. We adopt the same integral probability metrics as baseline model to make sure that the representation distributions are balanced for treatment and control groups in the global feature representation space. In addition, we define a potential outcome function $h _ { \theta _ { 2 } } : ( \tilde { R } _ { 1 } , R _ { 2 } ) \times T $ $Y$ . Let $\hat { y } _ { i } ^ { M } = h _ { \theta _ { 2 } } ( \phi _ { 1 2 } ( r _ { i } ) , t )$ , where $r _ { i } \in M _ { 1 }$ , and $\hat { y } _ { j } ^ { D } = h _ { \theta _ { 2 } } \big ( g _ { w _ { 2 } } ( x _ { j } ) , t \big )$ , where $x _ { j } \in D _ { 2 }$ denote the inferred observed outcomes. We aim to minimize the mean squared error in predicting factual outcomes for global feature representations including transformed old feature representations and new feature representations: $\begin{array} { r } { L _ { G } = \frac { 1 } { \tilde { n } _ { 1 } } \sum _ { i = 1 } ^ { \tilde { n } _ { 1 } } ( \hat { y } _ { i } ^ { M } - y _ { i } ^ { M } ) ^ { 2 } + \frac { 1 } { n _ { 2 } } \sum _ { j = 1 } ^ { n _ { 2 } } ( \hat { y } _ { j } ^ { D } - y _ { j } ^ { D } ) ^ { 2 } } \end{array}$ , where $\tilde { n } _ { 1 }$ is the number of units stored in $M _ { 1 }$ by herding algorithm, $y _ { i } ^ { M } \in M _ { 1 }$ , and $y _ { j } ^ { D } \in D _ { 2 }$ .
|
| 75 |
+
|
| 76 |
+
In summary, the objective function of our continual causal effect learning model is $L = L _ { G } +$ $\alpha W a s s ( P , Q ) + \lambda L _ { w _ { 2 } } + \beta L _ { F D } + \delta L _ { F T }$ , where $\alpha , \lambda , \beta$ , and $\delta$ denote the hyper-parameters controlling the trade-off among $W a s s ( P , Q ) , L _ { w _ { 2 } } , L _ { F D } , L _ { F T }$ , and $L _ { G }$ in the final objective function.
|
| 77 |
+
|
| 78 |
+
# 3.2 OVERVIEW OF CERL
|
| 79 |
+
|
| 80 |
+
In the above sections, we have provided the baseline and continual causal effect learning models. When the continual causal effect learning model for the second data is trained, we can extract the $R _ { 2 } = \{ g _ { w _ { 2 } } ( x ) | x \in D _ { 2 } \}$ and $\tilde { R } _ { 1 } = \{ \stackrel { - } { \phi _ { 1 2 } } ( r ) | r \in M _ { 1 } \}$ . We define a new memory set as $M _ { 2 } =$ $\{ R _ { 2 } , Y _ { 2 } , T _ { 2 } \} \cup \phi _ { 1 2 } ( M _ { 1 } )$ , where $\phi _ { 1 2 } ( M _ { 1 } )$ includes $\bar { \tilde { R } } _ { 1 }$ and the corresponding $\{ Y , T \}$ stored in $M _ { 1 }$ . Similarly, to satisfy the pre-specified memory constraint, $M _ { 2 }$ can be reduced by conducting the herding algorithm to store the same number of feature representations from treatment and control groups. We only store the new memory set $M _ { 2 }$ and new model $g _ { w _ { 2 } }$ , which are used to train the following model and balance the global feature representation space. It is unnecessary to store the original data $D _ { 1 }$ and $D _ { 2 }$ ) any longer.
|
| 81 |
+
|
| 82 |
+
We follow the same procedure for the subsequently available observational data. When we obtain the new observational data $D _ { d }$ , we can train $h _ { \theta _ { d } } ( g _ { w _ { d } } )$ and $\phi _ { d - 1 \to d } : R _ { d - 1 } \to \tilde { R } _ { d - 1 }$ based on the continual causal effect learning model. Besides, the new memory set is defined as: $M _ { d } =$ $\{ R _ { d } , Y _ { d } , T _ { d } \} \cup \phi _ { d - 1 d } ( M _ { d - 1 } )$ . So far, our model $h _ { \theta _ { d } } ( g _ { w _ { d } } )$ can estimate causal effect for all seen observational data regardless of the data source and it doesn’t require access to previous data. The detailed procedures of our CERL method are summarized in Algorithm 1 in Section B of Appendix.
|
| 83 |
+
|
| 84 |
+
# 4 EXPERIMENTS
|
| 85 |
+
|
| 86 |
+
We adapt the traditional benchmarks, i.e., News (Johansson et al., 2016; Schwab et al., 2018) and BlogCatalog (Guo et al., 2020) to continual causal effect estimation. Specifically, we consider three scenarios to represent the different degrees of domain shifts among the incrementally available observational data, including the substantial shift, moderate shift, and no shift. Besides, we generate a series of synthetic datasets and also conduct ablation studies to demonstrate the effectiveness of our model on multiple sequential datasets. The model performance with different numbers of preserved feature representations, and the robustness to hyperparameters are also evaluated.
|
| 87 |
+
|
| 88 |
+
# 4.1 DATASET DESCRIPTION
|
| 89 |
+
|
| 90 |
+
We utilize two semi-synthetic benchmarks for the task of continual causal effect estimation, which are based on real-world features, synthesized treatments and outcomes.
|
| 91 |
+
|
| 92 |
+
News. The News dataset consists of 5000 randomly sampled news articles from the NY Times corpus1. It simulates the opinions of media consumers on news items. The units are different news items represented by word counts $\cdot$ and outcome $\cdot$ is the news item. The intervention $\cdot$ represents the viewing device, desktop $t = 0$ ) or mobile $\cdot$ ). We extend the original dataset specification in Johansson et al. (2016); Schwab et al. (2018) to enable the simulation of incrementally available observational data with different degrees of domain shifts. Assuming consumers prefer to read certain media items on specific viewing devices, we train a topic model on a large set of documents and define $\cdot$ as the topic distribution of news item $x$ . We define one topic distribution of a randomly sampled document as centroid $\cdot$ for mobile and the average topic representation of all document as centroid $\cdot$ for desktop. Therefore, the reader’s opinion of news item $x$ on device $t$ is determined by the similarity between $\cdot$ and $\cdot$ , i.e., $-$ , where $\cdot$ is a scaling factor and $\epsilon \sim N ( 0 , 1 )$ .
|
| 93 |
+
|
| 94 |
+
Table 1: Performance on two sequential data and $\cdot$ . We present the mean value of $\cdot$ and $\epsilon _ { \mathrm { A T E } }$ on test sets from two datasets. The standard deviations are tiny. Lower is better. Under no domain shift scenario, the three strategies and CERL have the similar performance, because the previous and new data are from the same distribution. Under substantial shift and moderate shift scenarios, CFR-A performs well on previous data, but significantly declines on new dataset; straxtegy CFR-B shows the catastrophic forgetting problem; CERL has a similar performance to strategy CFR-C, while CERL does not require access to previous data. Besides, the larger domain shift leads to worse performance of CFR-A and CFR-B. CERL has remained stable against shift.
|
| 95 |
+
|
| 96 |
+
<table><tr><td rowspan="2" colspan="2"></td><td colspan="6">News</td><td colspan="6">BlogCatalog</td></tr><tr><td colspan="2">Previous data</td><td colspan="2"></td><td colspan="2">New data</td><td colspan="2">Previous data</td><td colspan="2"></td><td colspan="2">New data</td></tr><tr><td></td><td>Strategy</td><td>VEPEHE</td><td>EATE</td><td></td><td>VEPEHE</td><td>EATE</td><td></td><td>VePEHE</td><td>EATE</td><td></td><td>√EPEHE</td><td>EATE</td><td></td></tr><tr><td rowspan="4">Substantial shift</td><td>CFR-A</td><td>2.49</td><td>0.80</td><td></td><td>3.62</td><td>1.18</td><td>个</td><td>9.92</td><td>4.25</td><td></td><td>13.65</td><td>6.21</td><td>个</td></tr><tr><td>CFR-B</td><td>3.23</td><td>1.06</td><td>个</td><td>2.71</td><td>0.91</td><td></td><td>14.21</td><td>6.98</td><td>个</td><td>9.77</td><td>4.11</td><td></td></tr><tr><td>CFR-C</td><td>2.51</td><td>0.82</td><td></td><td>2.70</td><td>0.92</td><td></td><td>9.93</td><td>4.24</td><td></td><td>9.77</td><td>4.12</td><td></td></tr><tr><td>CERL</td><td>2.55</td><td>0.84</td><td></td><td>2.71</td><td>0.91</td><td></td><td>9.96</td><td>4.25</td><td></td><td>9.78</td><td>4.12</td><td></td></tr><tr><td rowspan="4">Moderate shift</td><td>CFR-A</td><td>2.58</td><td>0.85</td><td></td><td>3.06</td><td>1.02</td><td>个</td><td>9.89</td><td>4.22</td><td></td><td>11.26</td><td>5.03</td><td>个</td></tr><tr><td>CFR-B</td><td>2.98</td><td>0.99</td><td>个</td><td>2.65</td><td>0.92</td><td></td><td>12.35</td><td>5.67</td><td>个</td><td>9.83</td><td>4.18</td><td></td></tr><tr><td>CFR-C</td><td>2.56</td><td>0.85</td><td></td><td>2.63</td><td>0.90</td><td></td><td>9.88</td><td>4.21</td><td></td><td>9.81</td><td>4.16</td><td></td></tr><tr><td>CERL</td><td>2.59</td><td>0.86</td><td></td><td>2.66</td><td>0.92</td><td></td><td>9.90</td><td>4.24</td><td></td><td>9.82</td><td>4.17</td><td></td></tr><tr><td rowspan="4">No shift</td><td>CFR-A</td><td>2.58</td><td>0.87</td><td></td><td>2.62</td><td>0.88</td><td></td><td>9.86</td><td>4.20</td><td></td><td>9.85</td><td>4.19</td><td></td></tr><tr><td>CFR-B</td><td>2.60</td><td>0.88</td><td></td><td>2.60</td><td>0.87</td><td></td><td>9.85</td><td>4.18</td><td></td><td>9.83</td><td>4.18</td><td></td></tr><tr><td>CFR-C</td><td>2.58</td><td>0.87</td><td></td><td>2.59</td><td>0.87</td><td></td><td>9.84</td><td>4.18 4.19</td><td></td><td>9.83</td><td>4.18</td><td></td></tr><tr><td>CERL</td><td>2.59</td><td>0.87</td><td></td><td>2.60</td><td>0.87</td><td></td><td>9.85</td><td></td><td></td><td>9.83</td><td>4.18</td><td></td></tr></table>
|
| 97 |
+
|
| 98 |
+
Besides, the intervention $\cdot$ is defined by $\begin{array} { r } { p ( t = 1 | x ) = \frac { e ^ { k \cdot z ( x ) \Psi { z } _ { 1 } ^ { c } } } { e ^ { k \cdot z ( x ) \Psi { z } _ { 0 } ^ { c } } + e ^ { k \cdot z ( x ) \Psi z _ { 1 } ^ { c } } } } \end{array}$ e 1ek·z(x)|zc0 +ek·z(x)|zc1 , where k = 10 indicates an expected selection bias. In the experiments, 50 LDA topics are learned from the training corpus and 3477 bag-of-words features are in the dataset. To generate two sequential datasets with different domain shifts, we combine the news items belonging to LDA topics from 1 to 25 into first dataset and the news items belonging to LDA topics from 26 to 50 into second dataset. There is no overlap of the LDA topics between the first dataset and second dataset, which is considered as substantial domain shift. In addition, the news items belonging to LDA topics from 1 to 35 and items belonging to from 16 to 50 are used to construct the first dataset and second dataset, respectively, which is regarded as moderate domain shift. Finally, randomly sampled items from 50 LDA topics compose the first and second dataset, resulting in no domain shift, because they are from the same distribution. Under each domain shift scenario and each dataset, we randomly sample $6 0 \%$ and $2 0 \%$ of the units as the training set and validation set and let the remaining be the test set.
|
| 99 |
+
|
| 100 |
+
BlogCatalog. BlogCatalog (Guo et al., 2020) is a blog directory that manages the bloggers and their blogs. In this semi-synthetic dataset, each unit is a blogger and the features are bag-of-words representations of keywords in bloggers’ descriptions collected from real-world source. We adopt the same settings and assumptions to simulate the treatment options and outcomes as we do for the News dataset. 50 LDA topics are learned from the training corpus. 5196 units and 2160 bag-ofwords features are in the dataset. Similar to the generation procedure of News datasets with domain shifts, we create two datasets for each of the three domain shift scenarios. Under each domain shift scenario and each dataset, we randomly sample $\cdot$ and $\cdot$ of the units as the training set and validation set and let the remaining be the test set.
|
| 101 |
+
|
| 102 |
+
# 4.2 RESULTS AND ANALYSIS
|
| 103 |
+
|
| 104 |
+
Evaluation Metrics. We adopt two commonly used evaluation metrics. The first one is the error of ATE estimation, which is defined as $\_$ , where ATE is the true value and $\cdot$ is an estimated ATE. The second one is the error of expected precision in estimation of heterogeneous effect (PEHE) Hill (2011), which is defined as $-$ , where $\cdot$ is the true ITE for unit $i$ and $\cdot$ is an estimated ITE for unit $\cdot$ .
|
| 105 |
+
|
| 106 |
+
We employ three strategies to adapt traditional causal effect estimation models to incrementally available observational data: (A) directly apply the model previously trained based on original data to new observational data; (B) utilize newly available data to fine-tune the previously learned model;
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 2: The types of variables.
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 3: The work flow of task.
|
| 113 |
+
|
| 114 |
+
Table 2: Performance on two sequential data and $M = 1 0 0 0 0$ . We present the mean value of $\sqrt { \epsilon _ { \mathrm { P E H E } } }$ and $\epsilon _ { \mathrm { A T E } }$ on test sets from two datasets. The standard deviations are tiny. Lower is better.
|
| 115 |
+
|
| 116 |
+
<table><tr><td></td><td colspan="2">Previous data</td><td colspan="2">New data</td></tr><tr><td>Strategy</td><td>VPEHE</td><td>EATE</td><td>VPEHE</td><td>EATE</td></tr><tr><td>CFR-A</td><td>1.47</td><td>0.35</td><td>2.51</td><td>0.73</td></tr><tr><td>CFR-B</td><td>1.82</td><td>0.47</td><td>1.63</td><td>0.45</td></tr><tr><td>CFR-C</td><td>1.49</td><td>0.36</td><td>1.62</td><td>0.44</td></tr><tr><td>CERL</td><td>1.49</td><td>0.37</td><td>1.63</td><td>0.44</td></tr><tr><td>CERL (w/o FRT)</td><td>1.71</td><td>0.43</td><td>1.63</td><td>0.44</td></tr><tr><td>CERL (w/o herding)</td><td>1.57</td><td>0.40</td><td>1.63</td><td>0.44</td></tr><tr><td>CERL (w/o cosine norm)</td><td>1.51</td><td>0.38</td><td>1.65</td><td>0.44</td></tr></table>
|
| 117 |
+
|
| 118 |
+
(C) store all previous data and combine with new data to re-train the model from scratch. Among these three strategies, (C) is expected to be the best performer and get the ideal performance with respect to ATE and PEHE, although it needs to take up the most resources (all the data from previous and new dataset). We implement the three strategies based on the counterfactual regression model (CFR) (Shalit et al., 2017), which is a representative causal effect estimation method.
|
| 119 |
+
|
| 120 |
+
As shown in Table 1, under no domain shift scenario, the three strategies and our model have the similar performance on the News and BlogCatalog datasets, because the previous and new data are from the same distribution. CFR-A, CFR-B, and CERL need less resources than CFR-C. Under substantial shift and moderate shift scenarios, we find strategy CFR-A performs well on previous data, but significantly declines on new dataset; strategy CFR-B shows the catastrophic forgetting problem where the performance on previous dataset is poor; strategy CFR-C performs well on both previous and new data, but it re-trains the whole model using both previous and new data. However, if there is a memory constraint or a barrier to accessing previous data, the strategy CFR-C cannot be conducted. Our CERL has a similar performance to strategy CFR-C, while CERL does not require access to previous data. Besides, by comparing the performance under substantial and moderate shift scenarios, the larger domain shift leads to worse performance of CFR-A and CFR-B. However, no matter what the domain shift is, the performance of our model CERL is consistent with the ideal strategy CFR-C.
|
| 121 |
+
|
| 122 |
+
# 4.3 MODEL EVALUATION
|
| 123 |
+
|
| 124 |
+
Synthetic Dataset. Our synthetic data include confounders, instrumental, adjustment, and irrelevant variables. The interrelations among these variables, treatments, and outcomes are illustrated in Figure 2. We totally simulate five different data sources with five different multivariate normal distributions to represent the incrementally available observational data. In each data source, we randomly draw 10000 samples including treatment units and control units. Therefore, for five datasets, they have different selection bias, magnitude of covariates, covariance matrices for variables, and number of treatment and control units. To ensure a robust estimation of model performance, for each data source, we repeat the simulation procedure 10 times and obtain 10 synthetic datasets. The details of data simulation are provided in Section A of Appendix.
|
| 125 |
+
|
| 126 |
+
Results. Similar to the experiments for News and BlogCatalog benchmarks, we still utilize two sequential datasets to compare our model with CFR under three strategies on the more complex synthetic data. As shown in Table 2, the result is consistent with the conclusions on News and BlogCatalog. Our model’s performance demonstrates its superiority over CFR-A and CFR-B. CERL is comparable with CFR-C, while it does not need to have access to the raw data from previous dataset. Besides, we also conduct three ablation studies to test the effectiveness of the important components in CERL, i.e., CERL (w/o FRT), CERL (w/o herding), and CERL (w/o cosine norm). CERL (w/o FRT) is the simplified CERL without the feature representation transformation, which is based on traditional continual learning with knowledge distillation and integral probability metrics. In CERL (w/o FRT), we do not store and transform the previous feature representation into new feature space, and only utilize the knowledge distillation to realize the continual learning task and balance the bias between treatment and control groups with each new data. CERL (w/o herding) adopts random subsampling strategy to select samples into memory, instead of herding algorithm. CERL (w/o cosine norm) removes the cosine normalization in the last representation layer. Table 2 shows that the performance becomes poor after removing anyone in the feature representation transformation, herding, or cosine normalization modules compared to the original CERL. More specifically, after removing the feature representation transformation, $\cdot$ and $\cdot$ increase dramatically, which demonstrates that the knowledge distillation always used in continual learning task is not enough for the continual causal effect estimation. Also, using herding to select a representative set of samples from treatment and control distributions is crucial for the feature representation transformation.
|
| 127 |
+
|
| 128 |
+
CERL Performance Evaluation. As illustrated in Figure 3, the five observational data are incrementally available in sequence, and the model will continue to estimate the causal effect without having access to previous data. We further evaluate the performance of CERL from three perspectives, i.e., the impact of memory constraint, effeteness of cosine normalization, and its robustness to hyper-parameters. As shown in Figure 4 (a) and (b), as the model continually learns a new√ dataset, every time when finishing training one new dataset, we report the $\sqrt { \epsilon _ { \mathrm { P E H E } } }$ and $\epsilon _ { \mathrm { A T E } }$ on test sets composed of previous data and new data. Our model with memory constraints has a similar performance to the ideal situation, where all data are available to train the model from scratch. However, our model can effectively save memory space, e.g., when facing the fifth dataset, our model only stores 1000, 5000, or 10000 feature representations, but the ideal situation needs to store $5 \times 1 0 0 0 0 = 5 0 0 0 0$ observations with all covariates. For the cosine normalization, we perform an ablation study of CERL $( \mathrm { M } { = } 5 0 0 0$ , 5 datasets), where we remove cosine normalization in the representation learning procedure. We find the $\sqrt { \epsilon _ { \mathrm { P E H E } } }$ increases from 1.80 and 1.92 and $\epsilon _ { \mathrm { A T E } }$ from 0.55 to 0.61. Next, we explore the model’s sensitivity to the most important parameter $\alpha$ and $\delta$ , which controls the representation balance and representation transformation. From Fig. 4 (c) and (d), we observe that the performance is stable over a large parameter range. In addition, the parameter $\beta$ for feature representation distillation is set to 1 (Rebuffi et al., 2017; Iscen et al., 2020).
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 4: Performance of CERL under different settings.
|
| 132 |
+
|
| 133 |
+
# 5 CONCLUSION
|
| 134 |
+
|
| 135 |
+
It is the first time to propose the continual lifelong causal effect inference problem and the corresponding evaluation criteria. As the real world evidence is becoming more prominent, how to integrate and utilize these powerful data for causal effect estimation becomes a new research challenge. To address this challenge, we propose the Continual Causal Effect Representation Learning method for estimating causal effect with observational data, which are incrementally available from non-stationary data distributions. Extensive experiments demonstrate the superiority of our method over baselines for continual causal effect estimation.
|
| 136 |
+
|
| 137 |
+
# REFERENCES
|
| 138 |
+
|
| 139 |
+
Ahmed M Alaa and Mihaela van der Schaar. Bayesian inference of individualized treatment effects using multi-task gaussian processes. In Advances in Neural Information Processing Systems, pp. 3424–3432, 2017.
|
| 140 |
+
|
| 141 |
+
Hugh A Chipman, Edward I George, and Robert E McCulloch. Bart: Bayesian additive regression trees. The Annals of Applied Statistics, 4(1):266–298, 2010.
|
| 142 |
+
|
| 143 |
+
Zhixuan Chu, Stephen L Rathbun, and Sheng Li. Matching in selective and balanced representation space for treatment effects estimation. arXiv preprint arXiv:2009.06828, 2020.
|
| 144 |
+
|
| 145 |
+
Prithviraj Dhar, Rajat Vikram Singh, Kuan-Chuan Peng, Ziyan Wu, and Rama Chellappa. Learning without memorizing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5138–5146, 2019.
|
| 146 |
+
|
| 147 |
+
Robert M French. Catastrophic forgetting in connectionist networks. Trends in cognitive sciences, 3(4):128–135, 1999.
|
| 148 |
+
|
| 149 |
+
Ruocheng Guo, Jundong Li, and Huan Liu. Learning individual causal effects from networked observational data. In Proceedings of the 13th International Conference on Web Search and Data Mining, pp. 232–240, 2020.
|
| 150 |
+
|
| 151 |
+
Johanna Hardin, Stephan Ramon Garcia, and David Golan. A method for generating realistic correlation matrices. The Annals of Applied Statistics, pp. 1733–1762, 2013.
|
| 152 |
+
|
| 153 |
+
Jennifer L Hill. Bayesian nonparametric modeling for causal inference. Journal of Computational and Graphical Statistics, 20(1):217–240, 2011.
|
| 154 |
+
|
| 155 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 156 |
+
|
| 157 |
+
Saihui Hou, Xinyu Pan, Chen Change Loy, Zilei Wang, and Dahua Lin. Learning a unified classifier incrementally via rebalancing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 831–839, 2019.
|
| 158 |
+
|
| 159 |
+
Guido W Imbens and Donald B Rubin. Causal inference in statistics, social, and biomedical sciences. Cambridge University Press, 2015.
|
| 160 |
+
|
| 161 |
+
Ahmet Iscen, Jeffrey Zhang, Svetlana Lazebnik, and Cordelia Schmid. Memory-efficient incremental learning through feature adaptation. arXiv preprint arXiv:2004.00713, 2020.
|
| 162 |
+
|
| 163 |
+
Daniel Jacob, Wolfgang Karl Hardle, and Stefan Lessmann. Group average treatment effects for ¨ observational studies. arXiv preprint arXiv:1911.02688, 2019.
|
| 164 |
+
|
| 165 |
+
Fredrik Johansson, Uri Shalit, and David Sontag. Learning representations for counterfactual inference. In International conference on machine learning, pp. 3020–3029, 2016.
|
| 166 |
+
|
| 167 |
+
Peter Langfelder, Bin Zhang, and Steve Horvath. Defining clusters from a hierarchical cluster tree: the dynamic tree cut package for r. Bioinformatics, 24(5):719–720, 2008.
|
| 168 |
+
|
| 169 |
+
Sheng Li and Yun Fu. Matching on balanced nonlinear representations for treatment effects estimation. In Advances in Neural Information Processing Systems, pp. 929–939, 2017.
|
| 170 |
+
|
| 171 |
+
Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017.
|
| 172 |
+
|
| 173 |
+
Christos Louizos, Uri Shalit, Joris M Mooij, David Sontag, Richard Zemel, and Max Welling. Causal effect inference with deep latent-variable models. In Advances in Neural Information Processing Systems, pp. 6446–6456, 2017.
|
| 174 |
+
|
| 175 |
+
Chunjie Luo, Jianfeng Zhan, Xiaohe Xue, Lei Wang, Rui Ren, and Qiang Yang. Cosine normalization: Using cosine similarity instead of dot product in neural networks. In International Conference on Artificial Neural Networks, pp. 382–391. Springer, 2018.
|
| 176 |
+
|
| 177 |
+
Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989.
|
| 178 |
+
|
| 179 |
+
Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pp. 2001–2010, 2017.
|
| 180 |
+
|
| 181 |
+
Peter M Robinson. Root-n-consistent semiparametric regression. Econometrica: Journal of the Econometric Society, pp. 931–954, 1988.
|
| 182 |
+
|
| 183 |
+
Donald B Rubin. Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of educational Psychology, 66(5):688, 1974.
|
| 184 |
+
|
| 185 |
+
Saeed Samet, Ali Miri, and Eric Granger. Incremental learning of privacy-preserving bayesian networks. Applied Soft Computing, 13(8):3657–3667, 2013.
|
| 186 |
+
|
| 187 |
+
Patrick Schwab, Lorenz Linhardt, and Walter Karlen. Perfect match: A simple method for learning representations for counterfactual inference with neural networks. arXiv preprint arXiv:1810.00656, 2018.
|
| 188 |
+
|
| 189 |
+
Uri Shalit, Fredrik D Johansson, and David Sontag. Estimating individual treatment effect: generalization bounds and algorithms. In International Conference on Machine Learning, pp. 3076– 3085. PMLR, 2017.
|
| 190 |
+
|
| 191 |
+
Jerzy Splawa-Neyman, Dorota M Dabrowska, and TP Speed. On the application of probability theory to agricultural experiments. essay on principles. section 9. Statistical Science, pp. 465– 472, 1990.
|
| 192 |
+
|
| 193 |
+
Bharath K Sriperumbudur, Kenji Fukumizu, Arthur Gretton, Bernhard Scholkopf, Gert RG Lanck- ¨ riet, et al. On the empirical estimation of integral probability metrics. Electronic Journal of Statistics, 6:1550–1599, 2012.
|
| 194 |
+
|
| 195 |
+
Stefan Wager and Susan Athey. Estimation and inference of heterogeneous treatment effects using random forests. Journal of the American Statistical Association, 113(523):1228–1242, 2018. doi: 10.1080/01621459.2017.1319839. URL https://doi.org/10.1080/01621459. 2017.1319839.
|
| 196 |
+
|
| 197 |
+
Max Welling. Herding dynamical weights to learn. In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 1121–1128, 2009.
|
| 198 |
+
|
| 199 |
+
Liuyi Yao, Zhixuan Chu, Sheng Li, Yaliang Li, Jing Gao, and Aidong Zhang. A survey on causal inference. arXiv preprint arXiv:2002.02770, 2020.
|
| 200 |
+
|
| 201 |
+
Jinsung Yoon, James Jordon, and Mihaela van der Schaar. Ganite: Estimation of individualized treatment effects using generative adversarial nets. In International Conference on Learning Representations, 2018.
|
| 202 |
+
|
| 203 |
+
Bin Zhang and Steve Horvath. A general framework for weighted gene co-expression network analysis. Statistical applications in genetics and molecular biology, 4(1), 2005.
|
| 204 |
+
|
| 205 |
+
Junting Zhang, Jie Zhang, Shalini Ghosh, Dawei Li, Serafettin Tasci, Larry Heck, Heming Zhang, and C-C Jay Kuo. Class-incremental learning via deep model consolidation. In The IEEE Winter Conference on Applications of Computer Vision, pp. 1131–1140, 2020.
|
| 206 |
+
|
| 207 |
+
Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. Journal of the royal statistical society: series B (statistical methodology), 67(2):301–320, 2005.
|
| 208 |
+
|
| 209 |
+
# A SIMULATION PROCEDURE
|
| 210 |
+
|
| 211 |
+
Our synthetic data include confounders, instrumental, adjustment, and irrelevant variables. The interrelations among these variables, treatments, and outcomes are illustrated in Figure 2. The number of observed variables in the vector $X = ( C ^ { \mathsf { \tau } } , Z ^ { \mathsf { \tau } } , I ^ { \mathsf { \tau } } , A ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } }$ is set to 100, including 35 confounders in $C$ , 35 adjustment variables in $A$ , 10 instrumental variables in $Z$ , and 20 irrelevant variables in $I$ . The model used to generate the continuous outcome variable $Y$ in this simulation is the partially linear regression model, extending the ideas described in Robinson (1988); Jacob et al. (2019); Chu et al. (2020):
|
| 212 |
+
|
| 213 |
+
$$
|
| 214 |
+
Y = \tau ( ( C ^ { \mathsf { \tau } } , A ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } } ) T + g ( ( C ^ { \mathsf { \tau } } , A ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } } ) + \epsilon ,
|
| 215 |
+
$$
|
| 216 |
+
|
| 217 |
+
where $\epsilon$ are unobserved covariates, which follow a standard normal distribution $N ( 0 , 1 )$ and $E [ \epsilon | C , A , T ] = 0$ . $T \stackrel { i n d . } { \sim }$ . Bernoulli $( e _ { 0 } ( ( C ^ { \boldsymbol { \mathsf { T } } } , Z ^ { \boldsymbol { \mathsf { T } } } ) ^ { \boldsymbol { \mathsf { T } } } ) ) ,$ ) and $e _ { 0 } { \big ( } ( C ^ { \tau } , Z ^ { \tau } ) ^ { \tau } { \big ) }$ is the propensity score, which represents the treatment selection bias based on their own confounders $C$ and instrumental variables $Z$ . Because we aim to simulate multiple data sources $\{ D _ { d } ; d = 1 , . . . , D \}$ , the vector of all observed covariates $X = ( C ^ { \mathsf { \tau } } , Z ^ { \mathsf { \tau } } , I ^ { \mathsf { \tau } } , A ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } }$ is sampled from different multivariate normal distribution with mean vector $\mu _ { C } ^ { d } , \mu _ { Z } ^ { d } , \mu _ { I } ^ { d }$ , and $\mu _ { A } ^ { d }$ and different random positive definite covariance matrices $\Sigma ^ { d }$ .
|
| 218 |
+
|
| 219 |
+
For each data source, except for the different magnitude of mean vector and structure of covariance matrix, the simulation procedure is the same. Let $D$ be the diagonal matrix with the square roots of the diagonal entries of $\Sigma$ on its diagonal, i.e., $D = { \sqrt { d i a g ( \sigma ) } }$ , then the correlation matrix is given as:
|
| 220 |
+
|
| 221 |
+
$$
|
| 222 |
+
R = D ^ { - 1 } \Sigma D ^ { - 1 } .
|
| 223 |
+
$$
|
| 224 |
+
|
| 225 |
+
We use algorithm 3 in Hardin et al. (2013) to simulate positive definite correlation matrices consisting of different types of variables. Our correlation matrices are based on the hub correlation structure which has a known correlation between a hub variable and each of the remaining variables (Zhang & Horvath, 2005; Langfelder et al., 2008). Each variable in one type of variables is correlated to the hub-variable with decreasing strength from specified maximum correlation to minimum correlation, and different types of variables are generated independently or with weaker correlation among variable types. Defining the first variable as the hub, for the ith variable $( i = 2 , 3 , . . . , n )$ ), the correlation between it and the hub-variable in one type of variables is given as:
|
| 226 |
+
|
| 227 |
+
$$
|
| 228 |
+
R _ { i , 1 } = \rho _ { \mathrm { { m a x } } } - \left( \frac { i - 2 } { d - 2 } \right) ^ { \gamma } ( \rho _ { \mathrm { { m a x } } } - \rho _ { \mathrm { { m i n } } } ) ,
|
| 229 |
+
$$
|
| 230 |
+
|
| 231 |
+
where $\rho _ { \mathrm { m a x } }$ and $\rho _ { \mathrm { m i n } }$ are specified maximum and minimum correlations, and the rate $\gamma$ controls rate at which correlations decay.
|
| 232 |
+
|
| 233 |
+
After specifying the relationship between the hub variable and the remaining variables in the same type of variables, we use Toeplitz structure to fill out the remainder of the hub correlation matrix and get the hub-Toeplitz correlation matrix $R _ { t y p e }$ for other type of variables. Here, $R$ is the $n \times n$ matrix having the blocks $R _ { Z } , R _ { C } , R _ { A }$ , and $R _ { I }$ along the diagonal and zeros at off-diagonal elements. This yields a correlation matrix with nonzero correlations within the same type and zero correlation among other types. The amount of correlations among types which can be added to the positivedefinite correlation matrix $R$ is determined by its smallest eigenvalue.
|
| 234 |
+
|
| 235 |
+
The function $\tau ( ( C ^ { \tau } , A ^ { \tau } ) ^ { \tau } )$ describes the true treatment effect as a function of the values of adjustment variables $A$ and confounders $C$ ; namely $\tau ( ( C ^ { \mathsf { \tau } } , A ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } } ) = ( \sin { ( ( C ^ { \mathsf { \tau } } , A ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } } \times b _ { \tau } ) } ) ^ { 2 } .$ where $b _ { \tau }$ represents weights for every covariate in the function, which is generated by uniform $( 0 , 1 )$ . The variable treatment effect implies that its strength differs among the units and is therefore conditioned on $C$ and $A$ . The function $g ( ( C ^ { \mathsf { T } } , A ^ { \mathsf { T } } ) ^ { \mathsf { T } } )$ can have an influence on outcome regardless of treatment assignment. It is calculated via a trigonometric function to make the covariates nonlinear, which is defined as $g ( ( C ^ { \mathsf { T } } , A ^ { \mathsf { T } } ) ^ { \mathsf { T } } ) = ( \cos { ( ( C ^ { \mathsf { T } } , A ^ { \mathsf { T } } ) ^ { \mathsf { T } } \times b _ { g } ) } ) ^ { 2 }$ . Here, $b _ { g }$ represents a weight for each covariate in this function, which is generated by uniform $( 0 , 1 )$ . The bias is attributed to unobserved covariates which follow a random normal distribution $N ( 0 , 1 )$ . The treatment assignment $T$ follows the Bernoulli distribution, i.e., $T \stackrel { i n d . } { \sim }$ . Bernoulli $( e _ { 0 } ( ( C ^ { \boldsymbol { \mathsf { T } } } , Z ^ { \boldsymbol { \mathsf { T } } } ) ^ { \boldsymbol { \mathsf { T } } } ) $ ) with probability $\begin{array} { r } { e _ { 0 } \bigl ( ( C ^ { \mathsf { T } } , Z ^ { \mathsf { T } } ) ^ { \mathsf { T } } \bigr ) = \Phi ( \frac { a - \mu ( a ) } { \sigma ( a ) } ) } \end{array}$ , where $e _ { 0 } { \big ( } ( C ^ { \tau } , Z ^ { \tau } ) ^ { \tau } { \big ) }$ represents the propensity score, which is the cumulative distribution function for a standard normal random variable based on confounders $C$ and instrumental variables $Z$ , i.e., $a = \sin \left( ( C ^ { \mathsf { \tau } } , Z ^ { \mathsf { \tau } } ) ^ { \mathsf { \tau } } \times b _ { a } \right)$ , where $b _ { a }$ is generated by uniform $( 0 , 1 )$ .
|
| 236 |
+
|
| 237 |
+
We totally simulate five different data sources with five different multivariate normal distributions to represent the incrementally available observational data. In each data source, we randomly draw 10000 samples including treatment units and control units. Therefore, for five datasets, they have different selection bias, magnitude of covariates, covariance matrices for variables, and number of treatment and control units. To ensure a robust estimation of model performance, for each data source, we repeat the simulation procedure 10 times and obtain 10 synthetic datasets.
|
| 238 |
+
|
| 239 |
+
# B ALGORITHM 1
|
| 240 |
+
|
| 241 |
+
# Algorithm 1 Continual Causal Effect Representation Learning
|
| 242 |
+
|
| 243 |
+
Data: Given $d$ incrementally available observational data from $D _ { 1 }$ to $D _ { d }$
|
| 244 |
+
if $\{ x , y , t \} \in D _ { 1 }$ then $^ { \ast \ast \ast }$ Train baseline causal effect model $h _ { \theta _ { 1 } } ( g _ { w _ { 1 } } )$ \*\*\* $w _ { 1 } , \theta _ { 1 } = \mathrm { O P T I M I Z E } ( L _ { Y } + \alpha W a s s ( P , Q ) + \lambda L _ { w _ { 1 } } )$ $R _ { 1 } = \{ g _ { w _ { 1 } } ( x ) | x \in D _ { 1 } \}$ $M _ { 1 } = { \mathrm { H E R D I N G } } \{ R _ { 1 } , Y _ { 1 } , T _ { 1 } \}$
|
| 245 |
+
else for $\{ x , y , t \} \in D _ { 2 } , . . . , D _ { d }$ do $^ { \ast } { ^ { \ast } } \ast \ast$ Train continual causal effect model $h _ { \theta _ { d } } ( g _ { w _ { d } } )$ \*\*\* $w _ { d } , \theta _ { d } , \phi _ { d - 1 d } = 0 \mathrm { P T I M I Z E } ( L _ { G } + \alpha \bar { W } a s s ( P , Q ) + \lambda L _ { w _ { 2 } } + \beta L _ { F D } + \delta L _ { F T } )$ $\tilde { R } _ { d - 1 } = \phi _ { d - 1 \to d } ( R _ { d - 1 } )$ $R _ { d } = \{ g _ { w _ { d } } ( x ) | x \in D _ { d } \}$ $M _ { d } = \overset { \sim } { \operatorname { H E R D I N G } } \big ( \{ R _ { d } , Y _ { d } , T _ { d } \} \cup \{ \tilde { R } _ { d - 1 } , Y _ { d - 1 } \in M _ { d - 1 } , T _ { d - 1 } \in M _ { d - 1 } \} \big )$ end
|
| 246 |
+
end
|
md/train/MSXDyfli9vy/MSXDyfli9vy.md
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Universal Graph Convolutional Networks
|
| 2 |
+
|
| 3 |
+
Di $\mathbf { J i n ^ { 1 \dagger } }$ , Zhizhi $\mathbf { V } \mathbf { u } ^ { \mathbf { 1 } \dagger }$ , Cuiying $\mathbf { H u o ^ { 1 } }$ , Rui Wang1, Xiao Wang2\*, Dongxiao $\mathbf { H e ^ { 1 } }$ , and Jiawei $\mathbf { H a n } ^ { 3 }$
|
| 4 |
+
|
| 5 |
+
1College of Intelligence and Computing, Tianjin University, Tianjin, China 2School of Computer Science (National Pilot Software Engineering School), Beijing University of Posts and Telecommunications, Beijing, China 3Department of Computer Science, University of Illinois at Urbana-Champaign, Champaign, IL, USA {jindi, yuzhizhi, huocuiying, wr1895, hedongxiao}@tju.edu.cn xiaowang@bupt.edu.cn, hanj@illinois.edu
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Graph Convolutional Networks (GCNs), aiming to obtain the representation of a node by aggregating its neighbors, have demonstrated great power in tackling various analytics tasks on graph (network) data. The remarkable performance of GCNs typically relies on the homophily assumption of networks, while such assumption cannot always be satisfied, since the heterophily or randomness are also widespread in real-world. This gives rise to one fundamental question: whether networks with different structural properties should adopt different propagation mechanisms? In this paper, we first conduct an experimental investigation. Surprisingly, we discover that there are actually segmentation rules for the propagation mechanism, i.e., 1-hop, 2-hop and $k$ -nearest neighbor $( k \mathsf { N N } )$ neighbors are more suitable as neighborhoods of network with complete homophily, complete heterophily and randomness, respectively. However, the real-world networks are complex, and may present diverse structural properties, e.g., the network dominated by homophily may contain a small amount of randomness. So can we reasonably utilize these segmentation rules to design a universal propagation mechanism independent of the network structural assumption? To tackle this challenge, we develop a new universal GCN framework, namely U-GCN. It first introduces a multi-type convolution to extract information from 1-hop, 2-hop and $k \mathbf { N N }$ networks simultaneously, and then designs a discriminative aggregation to sufficiently fuse them aiming to given learning objectives. Extensive experiments demonstrate the superiority of U-GCN over state-of-the-arts. The code and data are available at https://github.com/jindi-tju.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Real-world complex systems can often be viewed as networks, such as social networks, biological networks and citation networks. Recently, research of analyzing networks with deep learning has received widespread attention both in academia and industry. In particular, Graph Convolutional Networks (GCNs) [14], which obtain the meaningful representation of nodes in the network by integrating the neighborhood information, have achieved great success and been widely applied in tackling network analytics tasks, such as node classification [23, 28], link prediction [33] and recommendation [30, 17].
|
| 14 |
+
|
| 15 |
+
While the success of GCNs and their variants [1, 6], a key weakness is the homophily assumption of networks, which restricts their performance on general network data. To be specific, most GCNs seem to be tailor-made to work on homophily networks [18], where nodes within the same class tend to connect with each other. In fact, heterophily [20] networks, where nodes of different classes tend to link together, are also widespread in real-world. For example, different types of amino acids are more likely to be connected in protein structure [35], and fraudsters tend to connect to accomplices than to other fraudsters in transaction networks [21]. Furthermore, the random networks also often exist in real-world, such as railway networks, where the edges between nodes are more likely to be randomly generated.
|
| 16 |
+
|
| 17 |
+
Most popular GCNs typically obtain node embeddings of these networks using 1-hop network neighbors as neighborhoods for information propagation [12, 29]. However, considering the different structural properties of networks (e.g., homophily or heterophily), whether different networks should adopt a unified or different propagation mechanisms? This is a very important question for GCNs since they mainly gain better performance through the propagation of information. A well informed answer can help us better understand the essence of GCNs, such as how different types of nodes affect the propagation, and what type of nodes are really required to achieve a certain level of predictive accuracy aiming to different networks.
|
| 18 |
+
|
| 19 |
+
Several recent works have studied the networks with different structural properties. For example, Pei et al. [22] consider the heterophlily property of networks, and propose a geometric aggregation scheme to overcome neighborhood structural information losing and long-range dependencies lacking. Zhu et al. [35] design an effective model which improves the representation power of GCNs under heterophily through theoretical and empirical analysis. Chien et al. [4] introduce a new generalized pageRank (GPR) architecture to jointly optimize node feature and topological information extraction. Bo et al. [2] assess the roles of low-frequency and high-frequency signals, and propose an efficient method that can adaptively integrate different signals in the process of message passing. However, there is still a lack of insightful understanding from the perspective of propagation mechanism.
|
| 20 |
+
|
| 21 |
+
As the first contribution of this study, we conduct experiments analysing the propagation mechanism of GCNs in networks with different structural properties. Surprisingly, our experiments clearly illustrate that for networks with complete homophily, complete heterophily and randomness, 1-hop, 2-hop and $k$ -nearest neighbor $( k \mathrm { N N } )$ neighbors are more suitable as neighborhoods for information propagation, respectively. This means that the depicting ability of the current propagation mechanism of GCNs is limited, and networks with different structural properties may need to adopt different propagation mechanisms.
|
| 22 |
+
|
| 23 |
+
In fact, while these segmentation rules seem to be able to select appropriate nodes as neighborhoods in an ideal way, the real-world networks are complex, and may present diverse properties, e.g., the network dominated by homophily may contain a small amount of randomness or heterophily. A natural question is, “Can we reasonably utilize these segmentation rules to design a universal propagation mechanism independent of the network structural assumption?"
|
| 24 |
+
|
| 25 |
+
To tackle this challenge, we propose a novel and universal GCN model, i.e., U-GCN, for general network data. The central idea is that we learn node embeddings by making full use of the information from 1-hop, 2-hop and $k \mathbf { N N }$ neighbors, and fuse them adaptively to derive deeper correlation information for the given learning objectives. To be specific, we first introduce a multi-type convolution mechanism. It uses 1-hop network (i.e., original input network), 2-hop network and $k \mathbf { N N }$ network that constructed by 1-hop, 2-hop and $k \mathbf { N N }$ neighbors for direct information propagation separately, and utilizes a node-level attention mechanism for each network, to extract three specific embeddings. We then make a discriminative aggregation to learn out the importance of these three embeddings, thereby extracting the most correlated information aiming to the ground truth such as node classification. Extensive experiments on a series of benchmark datasets demonstrate the superiority of U-GCN over some state-of-the-arts.
|
| 26 |
+
|
| 27 |
+
# 2 Notations and Preliminaries
|
| 28 |
+
|
| 29 |
+
Let $G = ( A , X )$ be an undirected attributed network, where $A \in \mathbb { R } ^ { n \times n }$ represents the symmetric adjacency matrix with $n$ nodes, and $\ b X \in \mathbb R ^ { n \times p }$ is the attribute (content) matrix of $p$ attributes per node. Concretely, $a _ { i j } = 1$ denotes there is an edge between nodes $v _ { i }$ and $v _ { j }$ , or 0 otherwise; and $x _ { i }$ represents the attribute vectors of node $v _ { i }$ .
|
| 30 |
+
|
| 31 |
+
Given an attribute network $G$ , and a labeled node set $V _ { L }$ containing $u \ll | V |$ nodes, where each node $v _ { i } \in V _ { L }$ contains a unique class label $y _ { i } \in Y$ . The goal of semi-supervised node classification is to infer the labels of nodes in $V \backslash V _ { L }$ by learning a classification function $\mathcal { F }$ .
|
| 32 |
+
|
| 33 |
+
Homophily. In this work, the level of homophily ratio of edges [35] is used to define networks with strong homophily/heterophily. Specifically, the level of homophily ratio of edges is the fraction of edges in a network which connect nodes that have the same class label (i.e., intra-class edges), described by:
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\alpha = \frac { | ( v _ { i } , v _ { j } ) : a _ { i j } = 1 \land y _ { i } = y _ { j } | } { | m | } ,
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
where $m$ is the number of edges. Networks with $\alpha$ closer to 1 tend to have more edges connecting nodes within the same class, or stronger homophily; whereas networks with $\alpha$ closer to 0 have more edges connecting nodes in different classes, or stronger heterophily.
|
| 40 |
+
|
| 41 |
+
Graph Convolutional Network. Graph Convolutional Network (GCN) [14] is a variant of multilayer convolutional neural networks that operates directly on networks. It learns embedding of each node by iteratively aggregating the information from its neighbors. Mathematically, let $H ^ { ( l ) }$ be the feature representation of the $l$ -th layer, and $H ^ { ( 0 ) }$ be the node attribute matrix, the forward propagation can be defined as:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
H ^ { ( l ) } = \sigma ( \tilde { D } ^ { - \frac { 1 } { 2 } } \tilde { A } \tilde { D } ^ { - \frac { 1 } { 2 } } H ^ { ( l - 1 ) } W ^ { ( l ) } ) ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where ${ \tilde { A } } = A + I$ stands for the adjacency matrix with self-loops, $\tilde { D }$ the node degree matrix of $\tilde { A }$ , i.e., $\begin{array} { r } { \tilde { D } _ { i i } = \sum _ { j } \tilde { A } _ { i j } } \end{array}$ , $W ^ { ( l ) }$ a trainable weight matrix and $\sigma$ the non-linear activation function. While GCN works well on several network analysis tasks such as node classification [10, 15], it still has a fundamental problem, that is, homophily assumption of networks, which leads to the main contribution in this work, i.e., analyse what type of nodes are more suitable as neighborhoods for direct information propagation independent of the network structural assumption.
|
| 48 |
+
|
| 49 |
+
# 3 Motivating Observations
|
| 50 |
+
|
| 51 |
+
Here, we present a simple yet intuitive case study to illustrate and analyze the performance of GCN changes with different propagation mechanisms. The main idea is that we will apply GCN to networks with different structural properties utilizing three types of nodes: 1-hop, 2-hop and $k$ -nearest neighbor $( k \mathrm { N N } )$ neighbors, which are often believed to be the effective neighborhoods for node classification in networks [28, 35], to realize the information propagation, respectively. Then, we will check the performance of GCN on these cases. A universal propagation mechanism should provide a good result in general network data. However, if the performance drops sharply in comparison with the other two situations, this will demonstrate that networks with different structural properties may need to use different propagation mechanisms.
|
| 52 |
+
|
| 53 |
+
Setup. We conduct experiments on the Newman artificial networks [7] with different properties. The network consists 128 nodes divided into 4 classes, where each node has on average $z _ { i n }$ edges (i.e., intra-class edges) connecting to nodes of the same class and $z _ { o u t }$ edges (i.e., inter-class edges) to nodes of other classes, and $z _ { i n } + z _ { o u t } = 1 6$ . Note that here we utilize two indicators: $\rho _ { i n } = z _ { i n } / 3 2$ and $\rho _ { o u t } ~ = ~ z _ { o u t } / 9 6$ , to determine the network property, i.e., $\rho _ { i n } > \rho _ { o u t }$ , $\rho _ { i n } = \rho _ { o u t }$ and $\rho _ { i n } <$ $\rho _ { o u t }$ means the network with homophily, randomness and heterophily, respectively.
|
| 54 |
+
|
| 55 |
+
For node attributes, we generate a $4 h$ -dimensional binary attributes (i.e., $x _ { i }$ ) for each node to form 4 attribute clusters, corresponding to the 4 classes [9]. To be specific, for every node in the $m$ -th class, we use a binomial distribution with mean $p _ { i n } = h _ { i n } / h$ to generate a $h$ -dimensional binary vector as its $( ( m - 1 ) \times h + 1 )$ -th to $( m \times h )$ -th attributes, and generated the rest attributes using a binomial distribution with mean $p _ { o u t } = h _ { o u t } / ( 3 h )$ . In our experiments, we set $4 h = 2 0 0$ and $h _ { o u t } = 4 ( h _ { i n } + h _ { o u t } = 1 6 )$ , so that $p _ { i n } > p _ { o u t }$ , the $h$ -dimensional attributes are associated with the $m$ -th class with a higher probability, whereas the rest $_ { 3 h }$ attributes are irrelevant.
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Figure 1: The performance of GCN of using different propagation mechanisms: 1-hop, 2-hop and $k \mathbf { N N }$ neighbors as neighborhoods respectively on Newman networks.
|
| 59 |
+
|
| 60 |
+
As shown in Figure 1, for networks with strong homophily (e.g., $\rho _ { o u t } = 0 . 0 7 5 )$ , it is easy to obtain high accuracy using 1-hop network neighbors. However, as the inter-class edges increase, the accuracy is rapidly reduced. This mainly due to the homophily assumption, preventing GCN from effectively fusing information. On the other hand, for networks with strong heterophily (e.g., $\rho _ { o u t } = 0 . 1 6 5 )$ , it is surprising that, the accuracy of GCN of using 2-hop neighbors as neighborhoods (i.e., $8 3 . 1 5 \%$ ) is much higher than that of using 1-hop network neighbors (i.e., $3 2 . 8 5 \%$ ). Since the homophily ratio of 2-hop neighbors may rise with the increase of inter-class edges, GCN of using 2-hop neighbors is more effective to some extent. Interestingly, we can find that GCN of utilizing $k \mathbf { N N }$ is easy to get the staple accuracy, i.e., $7 1 . 4 6 \%$ . In particular, it is much higher than those of using 1-hop and 2-hop neighbors on complete random network (i.e., $\rho _ { o u t } = 0 . 1 2 5 )$ ).
|
| 61 |
+
|
| 62 |
+
Summary. This case study shows that the current propagation mechanism of GCN is not universal for general network data, but we can find that there are rules in several special situations (i.e., complete random network). This motivates us that networks with different structural properties may need adopt different propagation mechanisms.
|
| 63 |
+
|
| 64 |
+
We conduct extra experiments on Newman networks [7] with complete homophily, randomness and complete heterophily utilizing GCN, so as to discover more appropriate propagation mechanism to select valuable nodes as neighborhoods, and thus improving the performance of GCNs for different networks. One straightforward strategy is to learn network embeddings with different GCNs using different types of nodes (i.e., 1-hop, 2-hop and $k \mathbf { N N }$ neighbors), and concatenate the embeddings into a single vector, so as to use the discriminative aggregation mechanism (which will be introduced in Section 4.2 below) to learn their importance for node classification. We show the attention values as a function of the number of training iterations in Figure 2.
|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
Figure 2: An example illustrating that the importance of three different types of neighbors (i.e., 1-hop, 2-hop and $k \mathbf { N N }$ neighbors) changes with network properties. The upper part of A-C represents networks with complete homophily, randomness and complete heterophily, respectively; while the lower part denotes the attention values as a function of the number of training iterations in corresponding networks.
|
| 68 |
+
|
| 69 |
+
Observation 1: Network with complete homophily tends to obtain better performance utilizing 1-hop network neighbors for direct information propagation. For the network in Figure 2A, the edges exist only in nodes within the same class, or complete homophily. As shown, 1-hop network neighbors show great importance as the increase of training iterations. This partly validates that under the setting of complete homophily, 1-hop neighbors are more effective for direct information propagation compared to 2-hop and $k \mathbf { N N }$ neighbors.
|
| 70 |
+
|
| 71 |
+
Observation 2: Network with randomness tends to get better performance utilizing kNN for direct information propagation. The network in Figure 2B exhibits more randomness than Figure 2A, that is, complete random network. Obviously, with the increase of training iterations, the attention value of $k \mathbf { N N }$ is much higher than those of 1-hop and 2-hop neighbors. Since $k \mathbf { N N }$ typically constructed according to the similarity of node attributes, it can still realize the information fusion effectively, compared with the other two types of neighbors, in case that the network topology contains noise.
|
| 72 |
+
|
| 73 |
+
Observation 3: Network with complete heterophily tends to obtain better performance utilizing 2-hop neighbors for direct information propagation. For the network in Figure 2C, the edges exist only in nodes within different classes, or complete heterophily. While the learned attention values of these three types of neighbors differ slightly, the importance of 2-hop neighbors is relatively higher. This is mainly due to the fact that the homophily ratio of 2-hop neighbors becomes higher with the increase of inter-class edges (which is often the real life in many network analysis tasks).
|
| 74 |
+
|
| 75 |
+
While networks with different structural properties provide better performance utilize different propagation mechanisms, the real-world networks are complex, and may show diverse properties, e.g., the network dominated by homophily may contain a small amount of heterophily. Therefore, it is imperative to explore a universal propagation mechanism for GCNs independent of the network structural assumption.
|
| 76 |
+
|
| 77 |
+
Theorem 1. The real-world networks can be approximately decomposed into a mixture of three kinds of simple networks, namely complete homophily, complete random and complete heterophily, in different proportions.
|
| 78 |
+
|
| 79 |
+
Proof. Given a network $G$ , where $n$ and $m$ denote the number of nodes and edges, respectively. Assuming that $r$ edges $0 \leq r \leq m _ { , }$ ) are generated randomly, i.e., the probability of nodes connecting nodes within the same class or different classes is the same, which form a complete random network (with $n$ nodes and $r$ edges). The remaining edges connecting two nodes within the same class can then be regarded as composing a complete homophily network, or a complete heterophily network.
|
| 80 |
+
|
| 81 |
+
Summary. Now, we can conclude that a universal GCN model may not only consider the 1-hop (Observation 1), but also the 2-hop (Observation 2) and $k \mathbf { N N }$ neighbors (Observation 3) for direct information propagation. More importantly, considering different network properties can be more correlated with one of them or even their combinations, the model itself should adaptively learn their corresponding importance, so as to achieve feature fusion more effectively. This case study, although leveraging specific artificial networks, is representative because real-world networks can often be considered as the combination of these three simple network cases.
|
| 82 |
+
|
| 83 |
+
# 4 Our Proposed Approach
|
| 84 |
+
|
| 85 |
+
To address the homophily assumption of GCNs, our basic idea is to design a universal GCN framework which is suitable for general networks with any structural properties. It can not only make full use of the information from 1-hop, 2-hop and $k \mathbf { N N }$ neighbors, but also fuse them sufficiently aiming to given learning objectives. In this section, we start by proposing a new simple multi-type convolution mechanism over three kinds of neighbors, and then introduce a discriminative aggregation to learn the importance of each part: 1-hop, 2-hop and $k \mathbf { N N }$ neighbors, automatically.
|
| 86 |
+
|
| 87 |
+
# 4.1 Multi-type Convolution Mechanism
|
| 88 |
+
|
| 89 |
+
To capture the information from 2-hop and $k \mathbf { N N }$ neighbors, we construct a 2-hop network $G _ { R } =$ $( A _ { R } , X )$ based on original input network $G _ { D } = ( A _ { D } , X )$ , and a $k \mathbf { N N }$ network $G _ { F } = ( A _ { F } , X )$ based on node feature matrix $X$ .
|
| 90 |
+
|
| 91 |
+
2-hop Network. For adjacency matrix $A _ { R }$ , considering that the number of neighbors at exactly 2 hops away may raise exponentially with the increase of network scale, we introduce a constraint, i.e., select node pairs connected by at least two different paths for each node to set edges. Simultaneously, we adopt the classic two-layers GCN to perform message passing on this 2-hop network $( A _ { R } , X )$ , and the $l$ -th layer embedding matrix $H _ { R } ^ { ( l ) }$ can be denoted as:
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
H _ { R } ^ { ( l ) } = \sigma ( \tilde { D } _ { R } ^ { - \frac { 1 } { 2 } } \tilde { A } _ { R } \tilde { D } _ { R } ^ { - \frac { 1 } { 2 } } H _ { R } ^ { ( l - 1 ) } W _ { R } ^ { ( l ) } ) ,
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
where $\tilde { A } _ { R } = A _ { R } + I$ , $I$ is the identity matrix, $\tilde { D } _ { R }$ the diagonal degree matrix of ${ \tilde { A } } _ { R }$ , $W _ { R } ^ { ( l ) }$ the weight matrix and $\sigma$ the non-linear activation function such as ReLU or Sigmoid. In this way, we can learn the node embeddings that capture the specific information from 2-hop neighbors.
|
| 98 |
+
|
| 99 |
+
kNN Network. There are many ways to obtain $k \mathbf { N N }$ for each node, such as Jaccard similarity, Cosine similarity and Gauss kernel. In what follows, we calculate the similarity matrix $S \in \mathbb { R } ^ { n \times n }$ among $n$ nodes utilizing Cosine similarity, which adopts the cosine value of the angle between two vectors to measure the similarity. Mathematically, let $x _ { i }$ be the feature vectors of node $v _ { i }$ , the similarity $s _ { i j }$ between nodes $v _ { i }$ and $v _ { j }$ is defined as:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
s _ { i j } = { \frac { x _ { i } \cdot x _ { j } } { | x _ { i } | | x _ { j } | } } .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Then, the adjacency matrix $A _ { F }$ can be obtained by choosing top $k$ similar node pairs for each node to set edges. Accordingly, the $l .$ -th layer embedding matrix $H _ { F } ^ { ( l ) }$ that gains the information from $k \mathbf { N N }$ can be calculated in the same way as in 2-hop network. Also of note, we use a linear algorithm Ball-tree [16] for the calculation of $k \mathbf { N N }$ network which will not increase the complexity of GCN.
|
| 106 |
+
|
| 107 |
+
As for 1-hop network neighbors, we acquire the $l$ -th layer embedding matrix $H _ { D } ^ { ( l ) }$ performing direct information propagation on original input network $G _ { D } = ( A _ { D } , X )$ . Therefore, the specific information encoded in 1-hop network neighbors can be extracted.
|
| 108 |
+
|
| 109 |
+
Node-level Attention. Before aggregating the information from original input network, 2-hop network and $k \mathbf { N N }$ network, we should note that the network-based neighbors of each node contribute to the embedding of the target node in different degrees. Here we adopt node-level attention [26] to learn the importance of network-based neighbors for each node. To be specific, given a node pair $\boldsymbol { v } _ { i }$ , $v _ { j }$ ) and a specified network type $t$ (where $t \in \{ G _ { D } , G _ { R } , G _ { F } \} )$ , the importance coefficient between nodes $v _ { i }$ and $v _ { j }$ can be formulated as:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
e _ { i j } ^ { t } = \mathrm { L e a k y R e L U } ( \mu _ { t } ^ { T } [ W h _ { i } | | W h _ { j } ] ) , \ \alpha _ { i j } ^ { t } = \mathrm { s o f t m a x } _ { j } ( e _ { i j } ^ { t } ) = \frac { \exp ( e _ { i j } ^ { t } ) } { \sum _ { r \in N _ { i } ^ { t } } \exp ( e _ { i r } ^ { t } ) } ,
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $\mu _ { t }$ is the parameterized attention vector for network type $t$ , and $W$ the mapping matrix applied to each node. Then, the embedding of node $v _ { i }$ for network type $t$ can be aggregated by the neighbor’s embeddings with its corresponding weight coefficients as:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
h _ { i } ^ { t } = \sigma ( \sum _ { j \in N _ { i } ^ { t } } \alpha _ { i j } ^ { t } W h _ { j } ) .
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
# 4.2 Discriminative Aggregation
|
| 122 |
+
|
| 123 |
+
After the multi-type convolution above, we then perform a discriminative aggregation utilizing the attention mechanism, so as to learn the contributions of 1-hop, 2-hop and $k \mathbf { N N }$ neighbors automatically based on the given learning objectives. To be specific, for each node $v _ { i }$ , let $h _ { i } ^ { t }$ denote its embedding in $H _ { t }$ , the attention value $\beta _ { i } ^ { t }$ can then be represented as:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\beta _ { i } ^ { t } = q ^ { T } \cdot \operatorname { t a n h } ( W _ { t } \cdot ( h _ { i } ^ { t } ) ^ { T } + b _ { t } ) ,
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $q$ denotes the parameterized attention vector, $W _ { t }$ the weight matrix and $b _ { t }$ the bias vector.
|
| 130 |
+
|
| 131 |
+
After obtaining the attention value of each network, i.e., $\beta _ { i } ^ { D } , \beta _ { i } ^ { R } , \beta _ { i } ^ { F }$ , we normalize them via softmax function to get the final weight:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\gamma _ { i } ^ { t } = \mathrm { s o f t m a x } ( \beta _ { i } ^ { t } ) = \frac { \exp ( \beta _ { i } ^ { t } ) } { \sum _ { t } \exp ( \beta _ { i } ^ { t } ) } .
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
Obviously, a larger $\gamma _ { i } ^ { t }$ value means that the corresponding embedding is more important. The ouput embedding $H$ can then be aggregated by these network-specific embeddings with its corresponding weight coefficients as:
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
H = \sum _ { t } \gamma _ { i } ^ { t } \cdot H ^ { t } .
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
Following GCN, we define the loss function by using cross entropy as:
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\mathcal { L } = - \sum _ { i \in \mathcal { V } _ { L } } \sum _ { f = 1 } ^ { F } Y _ { i f } \ln H _ { i f } ,
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
where $\mathcal { { V } } _ { L }$ is the set of node indices that have labels, $Y$ the label indicator matrix, and $F$ the dimension of the output embedding, which is equal to the number of classes.
|
| 150 |
+
|
| 151 |
+
# 5 Experiments
|
| 152 |
+
|
| 153 |
+
We first give the experimental setup, and then compare our U-GCN with some state-of-the-arts on node classification. We finally give an in-depth analysis of different components of our new approach.
|
| 154 |
+
|
| 155 |
+
# 5.1 Experimental Settings
|
| 156 |
+
|
| 157 |
+
Datasets. We adopt eight public network datasets with edge homophily ratio $\alpha$ ranging from strong homophily to strong heterophily, as shown in Table 1, to evaluate the performance of different methods. We use three citation networks Cora, CiteSeer and PubMed [19, 25], two Wikipedia networks Chameleon and Squirrel [24], and three webpage networks1 Cornell, Wisconsin and Texas.
|
| 158 |
+
|
| 159 |
+
Baselines. We compare our U-GCN with eight baselines: (1) the methods utilizing both topological and attribute information: GCN [14], GAT [26], GraphSAGE [8], JK-Net [29], SSP [11], Geom-GCN [22] and GCN-LPA [27], and (2) the method using node attribute: MLP. Especially, GCN is the base of our U-GCN.
|
| 160 |
+
|
| 161 |
+
Parameter Settings. For all methods, we set the dropout rate to 0.6 and use the same splits for training, validation and testing sets. We run 5 times with the same partition and report the average results. We employ the Adam optimizer with the learning rate setting to 0.005 and apply early stopping with a patience of 20. In addition, we set the number of attention heads to 8, weight decay $\in \{ \bar { 5 } e - 3 , 5 e - 4 \}$ , and $k \in \{ 3 . . . 7 \}$ for $k$ -nearest neighbor network.
|
| 162 |
+
|
| 163 |
+
Table 1: Dataset Statistics.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Datasets</td><td>Cora</td><td>Pubm.</td><td>Cite.</td><td>Corn.</td><td>Cham.</td><td>Squi.</td><td>Wisc.</td><td>Texa.</td></tr><tr><td>#Nodes</td><td>2708</td><td>19717</td><td>3327</td><td>183</td><td>2277</td><td>5201</td><td>251</td><td>183</td></tr><tr><td>#Edges</td><td>5429</td><td>44338</td><td>4732</td><td>298</td><td>36101</td><td>217073</td><td>515</td><td>325</td></tr><tr><td>#Features</td><td>1433</td><td>500</td><td>3703</td><td>1703</td><td>2325</td><td>2089</td><td>1703</td><td>1703</td></tr><tr><td>#Classes</td><td>7</td><td>3</td><td>6</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td></tr><tr><td>a</td><td>0.83</td><td>0.79</td><td>0.71</td><td>0.30</td><td>0.25</td><td>0.22</td><td>0.16</td><td>0.06</td></tr></table>
|
| 166 |
+
|
| 167 |
+
# 5.2 Node Classfication
|
| 168 |
+
|
| 169 |
+
On the node classification task, we use accuracy as the evaluation metric, and the relevant results are summarized in Table 2. As shown, we observe that the U-GCN has consistently strong performance across the full spectrum of high-middle-low homophily. To be specific, on the dataset with strong homophily, e.g., Cora and Citeseer, U-GCN is comparable with the best baseline GAT that based on homophily assumption. On the dataset with middle homophily, e.g., Cornell and Chameleon, U-GCN is $3 . 8 8 \%$ and $1 . 3 8 \%$ more accurate than the best baselines MLP and GCN-LPA, respectively. Above all, on the dataset with strong heterophily, e.g., Wisconsin and Texas, our model U-GCN outperforms the best baseline MLP by a very large margin, i.e., $5 . 6 9 \%$ and $5 . 8 3 \%$ , which has been proved to be superior to a number of existing GNNs at the low level of homophily [35]. These results not only demonstrate the superiority of the new multi-type convolution mechanism that makes full use of the information from 1-hop, 2-hop and $k \mathbf { N N }$ neighbors, but also validate the effectiveness for distinguishing importance of information from different propagation mechanisms. In addition, the performance of U-GCN is much better than that of GCN, which further demonstrates the effectiveness of designing a universal propagation mechanism independent of network structural assumption.
|
| 170 |
+
|
| 171 |
+
Table 2: Comparisons on node classification (Percent).
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Methods</td><td>Cora</td><td>Pubm.</td><td>Cite.</td><td>Corn.</td><td>Cham.</td><td>Squi.</td><td>Wisc.</td><td>Texa.</td></tr><tr><td>GCN</td><td>82.93</td><td>83.29</td><td>73.12</td><td>46.51</td><td>52.32</td><td>33.10</td><td>47.73</td><td>52.71</td></tr><tr><td>GAT</td><td>83.13</td><td>84.42</td><td>72.04</td><td>48.06</td><td>51.38</td><td>32.27</td><td>46.59</td><td>49.61</td></tr><tr><td>SSP</td><td>81.08</td><td>79.50</td><td>71.13</td><td>55.04</td><td>21.87</td><td>19.72</td><td>49.37</td><td>55.04</td></tr><tr><td>JK-Net</td><td>81.27</td><td>86.15</td><td>71.74</td><td>52.71</td><td>53.95</td><td>33.51</td><td>48.30</td><td>51.94</td></tr><tr><td>GraphSage</td><td>82.20</td><td>83.03</td><td>71.41</td><td>53.49</td><td>42.29</td><td>26.89</td><td>56.82</td><td>53.49</td></tr><tr><td>Geom-GCN</td><td>74.27</td><td>83.49</td><td>73.79</td><td>54.26</td><td>38.66</td><td>32.22</td><td>53.41</td><td>64.34</td></tr><tr><td>GCN-LPA</td><td>82.33</td><td>85.83</td><td>72.29</td><td>49.61</td><td>52.69</td><td>33.48</td><td>50.57</td><td>48.84</td></tr><tr><td>MLP</td><td>63.33</td><td>83.08</td><td>67.74</td><td>65.89</td><td>41.35</td><td>29.44</td><td>64.20</td><td>65.89</td></tr><tr><td>U-GCN</td><td>84.00</td><td>85.22</td><td>74.08</td><td>69.77</td><td>54.07</td><td>34.39</td><td>69.89</td><td>71.72</td></tr></table>
|
| 174 |
+
|
| 175 |
+
# 5.3 Ablation Study
|
| 176 |
+
|
| 177 |
+
Similar to most deep learning models, U-GCN also contains some important components that may have significant impact on the performance. To gain deeper insight into the contributions of different components involved in our approach, we conduct experiments on comparing U-GCN with four variations. The variants are as follows: 1) GCN which serves as the base framework of U-GCN of using 1-hop network neighbors for propagation, 2) GCN of employing 2-hop neighbors for direct propagation, named as U-GCN-1, 3) GCN of utilizing $k \mathbf { N N }$ for direct propagation, named as U-GCN2, and 4) U-GCN of removing 2-hop neighbors, named as U-GCN-3. We take their comparison on node classification as an example.
|
| 178 |
+
|
| 179 |
+
As shown in Table 3, compared to GCN, U-GCN-1 (and U-GCN-2) of utilizing 2-hop neighbors (and $k \mathrm { N N } ,$ ) is on average $3 . 3 7 \%$ (and $3 . 1 2 \%$ ) more accurate on eight datasets. This validates that 2-hop neighbors (and $k \mathrm { N N }$ ) play an important role during information propagation, especially on the networks dominated by heterophily. Furthermore, by introducing $k \mathbf { N N }$ , the derived U-GCN-3 improves performance of GCN (and U-GCN-2), i.e., on average $6 . 6 4 \%$ (and $3 . 3 2 \%$ ) more accurate on eight datasets. This demonstrates that the performance of 1-hop and $k \mathbf { N N }$ neighbors can be mutually enhanced to a certain extent. In addition, U-GCN is on average $2 . 4 9 \%$ more accurate than U-GCN-3, which further validates the soundness of our new universal GCN framework that makes full use of different propagation mechanisms aiming to the network with diverse properties.
|
| 180 |
+
|
| 181 |
+
Table 3: Comparisons of our U-GCN with four variants on node classification (Percent).
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Methods</td><td>Cora</td><td>Pubm.</td><td>Cite.</td><td>Corn.</td><td>Cham.</td><td>Squi.</td><td>Wisc.</td><td>Texa.</td><td>AVG</td></tr><tr><td>GCN</td><td>82.93</td><td>83.29</td><td>73.12</td><td>46.51</td><td>52.32</td><td>33.10</td><td>47.73</td><td>52.71</td><td>58.96</td></tr><tr><td>U-GCN-1</td><td>74.40</td><td>83.92</td><td>68.66</td><td>56.59</td><td>48.81</td><td>33.84</td><td>64.20</td><td>68.22</td><td>62.33</td></tr><tr><td>U-GCN-2</td><td>70.27</td><td>80.86</td><td>68.74</td><td>70.54</td><td>38.60</td><td>29.11</td><td>68.75</td><td>69.77</td><td>62.08</td></tr><tr><td>U-GCN-3</td><td>83.67</td><td>81.33</td><td>72.79</td><td>65.12</td><td>53.51</td><td>34.06</td><td>69.89</td><td>62.79</td><td>65.40</td></tr><tr><td>U-GCN</td><td>84.00</td><td>85.22</td><td>74.08</td><td>69.77</td><td>54.07</td><td>34.39</td><td>69.89</td><td>71.72</td><td>67.89</td></tr></table>
|
| 184 |
+
|
| 185 |
+
# 6 Related Work
|
| 186 |
+
|
| 187 |
+
In line with the focus of our work, we briefly review the most related work on graph neural networks (GNNs) and homophily assumption.
|
| 188 |
+
|
| 189 |
+
GNNs. In recent years, GNNs have become popular for graph-based machine learning problems increasingly [13, 31]. Defferrard et al. [5] propose the first version of GNN by generalizing convolutional neural networks (CNNs) from regular grids (e.g., images) to irregular grids (e.g., graphs). After that comes GCN [14], a popular GNN model which obtains node embeddings by integrating high-order neighborhood information through stacked graph convolutional layers. Further, GraphSAGE [8] generalizes the aggregation beyond averaging, and models the ego-features distinctly from the neighbor-features in its subsampled neighborhood. GAT [26] introduces a node-level multi-head attention mechanisms to specify the weights from different neighborhoods.
|
| 190 |
+
|
| 191 |
+
Homophily Assumption. Several efforts have been made to relieve the limitation of homophily assumption, so as to improve GCNs. Geom-GCN [22] proposes a novel geometric aggregation scheme to overcome neighborhood structural information losing and long-range dependencies lacking. GPR-GNN [4] proposes a new architecture that adaptively learns the generalized pageRank (GPR) weights, to jointly optimize node feature and topological information extraction. CPGNN [34] designs a GNN framework that incorporates an interpretable compatibility matrix $H$ for modeling the homophily level. Moreover, H2GCN [35] incorporates three key designs: ego- and neighborembedding separation, higher-order neighborhoods and combination of intermediate, to capture information under the low level of homophily. More Recently, GGCN [32] proposes a robust and generalized model that addresses the discrepancy in features and degrees between neighbors by incorporating signed messages and learned degree corrections, so as to alleviate the homophily assumption of GCNs.
|
| 192 |
+
|
| 193 |
+
These existing methods have achieved reasonable results on handling the homophily assumption of GCNs. However, there is still a lack of insightful understanding of the key factors of a universal propagation mechanism independent of the network structural assumption, which is of great significant while often ignored by the existing GCN methods.
|
| 194 |
+
|
| 195 |
+
# 7 Discussion
|
| 196 |
+
|
| 197 |
+
In this section, we discuss what are the universal propagation mechanism in networks. Take the global spread of epidemics as an example, it is a complex, network-driven dynamic process. The combined multi-scale nature and intrinsic heterogeneity of the epidemic network make it difficult to develop an intuitive understanding of this process, to predict its time course and to locate its origin. However, Brockmann et al. [3] show that if we use a probabilistically motivated effective distance, rather than conventional geographic distance, to analyse propagation process, the complex spatiotemporal patterns can be simplified into simple, homogeneous wave propagation patterns. Motivated by this idea, it is of great necessary to find a universal propagation mechanism for GCNs, where universality refers to independence on homophily, heterophily or randomness network structural assumptions, so as to select the valuable nodes as neighborhoods, and meanwhile relieve the limitation of homophily assumption of GCNs. More importantly, even if there are assumptions (e.g., homophily), a universal propagation mechanism may still be able to find better and more valuable nodes as neighborhoods, rather than directly using the 1-hop network neighbors the same as the existing methods.
|
| 198 |
+
|
| 199 |
+
# 8 Conclusion
|
| 200 |
+
|
| 201 |
+
We rethink the propagation mechanism of networks with different structural properties, and surprisingly discover the segmentation rules that 1-hop, $k \mathbf { N N }$ and 2-hop neighbors are more suitable as neighborhoods in network with complete homophily, randomness and complete heterophily, respectively. However, real-world networks are complex, and may present diverse properties. We accordingly design a universal model U-GCN, which is able to select more valuable nodes as neighborhoods automatically for information propagation without relying on network structural assumptions. Empirical results on networks with different edge homophily ratio demonstrate the superiority of our new approach over some state-of-the-art methods.
|
| 202 |
+
|
| 203 |
+
Last but not least, the methods that satisfy the basic idea, that is, consider the information from nodes of 1-hop, 2-hop and $k \mathbf { N N }$ neighbors simultaneously, and at the same time, make reasonable use of these information, and fuse them effectively for the learning objectives, can be considered as general models, where our U-GCN is one of the most simple and effective methods.
|
| 204 |
+
|
| 205 |
+
# Broader Impact
|
| 206 |
+
|
| 207 |
+
In this work, we propose to analyse whether networks with different structural properties should adopt different propagation mechanisms. One interesting finding is that there are segmentation rules for the universal propagation phenomenon. Considering real-world networks are complex and may present diverse properties, a universal propagation mechanism independent of the network structural assumption have been presented. Obviously, the results of the work will have an immediate impact on improving the performance of most GCN models based on homophily assumption. Not only that, this work will also significantly benefit applications involving network-structured data, including bioinformatics, computer vision and recommendation system.
|
| 208 |
+
|
| 209 |
+
While our research focuses on performance by designing a universal propagation mechanism on general networks with any structural properties, like many other GCNs, it provides limited explanation to its prediction. We advocate peer researchers to look into this to enhance the interpretability of modern GCNs, and make GCNs applicable in more risk-sensitive applications.
|
| 210 |
+
|
| 211 |
+
# Acknowledgements
|
| 212 |
+
|
| 213 |
+
This work is supported in by the Natural Science Foundation of China under grants 61772361, 61876128 and 62172052.
|
| 214 |
+
|
| 215 |
+
# References
|
| 216 |
+
|
| 217 |
+
[1] Gregor Bachmann, Gary Bécigneul, and Octavian Ganea. Constant curvature graph convolutional networks. In Proceedings of ICML, pages 486–496, 2020.
|
| 218 |
+
[2] Deyu Bo, Xiao Wang, Chuan Shi, and Huawei Shen. Beyond low-frequency information in graph convolutional networks. In Proceedings of AAAI, 2021.
|
| 219 |
+
[3] Dirk Brockmann and Dirk Helbing. The hidden geometry of complex, network-driven contagion phenomena. Science, 342(6164):1337–1342, 2013.
|
| 220 |
+
[4] Eli Chien, Jianhao Peng, Pan Li, and Olgica Milenkovic. Adaptive universal generalized pagerank graph neural network. In Proceedings of ICLR, 2021.
|
| 221 |
+
[5] Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In Proceedings of NeurIPS, pages 3837–3845, 2016.
|
| 222 |
+
[6] Hongyang Gao, Zhengyang Wang, and Shuiwang Ji. Large-scale learnable graph convolutional networks. In Proceedings of KDD, pages 1416–1424, 2018.
|
| 223 |
+
[7] Michelle Girvan and M. E. J. Newman. Community structure in social and biological networks. Proceedings of the National Academy of Sciences, 99(12):7821–7826, 2002.
|
| 224 |
+
[8] William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Proceedings of NeurIPS, pages 1024–1034, 2017.
|
| 225 |
+
[9] Dongxiao He, Zhiyong Feng, Di Jin, Xiaobao Wang, and Weixiong Zhang. Joint identification of network communities and semantics via integrative modeling of network topologies and node contents. In Proceedings of AAAI, pages 116–124, 2017.
|
| 226 |
+
[10] Fenyu Hu, Yanqiao Zhu, Shu Wu, Liang Wang, and Tieniu Tan. Hierarchical graph convolutional networks for semi-supervised node classification. In Proceedings of IJCAI, pages 4532–4539, 2019.
|
| 227 |
+
[11] Mohammad Rasool Izadi, Yihao Fang, Robert Stevenson, and Lizhen Lin. Optimization of graph neural networks with natural gradient descent. In IEEE International Conference on Big Data, pages 171–179, 2020.
|
| 228 |
+
[12] Di Jin, Cuiying Huo, Chundong Liang, and Liang Yang. Heterogeneous graph neural network via attribute completion. In Proceedings of WWW, pages 391–400, 2021.
|
| 229 |
+
[13] Di Jin, Zhizhi Yu, Pengfei Jiao, Shirui Pan, Philip S. Yu, and Weixiong Zhang. A survey of community detection approaches: From statistical modeling to deep learning. TKDE, 2021.
|
| 230 |
+
[14] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In Proceedings of ICLR, 2017.
|
| 231 |
+
[15] Ruoyu Li, Sheng Wang, Feiyun Zhu, and Junzhou Huang. Adaptive graph convolutional neural networks. In Proceedings of AAAI, pages 3546–3553, 2018.
|
| 232 |
+
|
| 233 |
+
[16] Ting Liu, Andrew W. Moore, and Alexander G. Gray. New algorithms for efficient highdimensional nonparametric classification. Journal of Machine Learning Research, 7:1135–1158, 2006.
|
| 234 |
+
|
| 235 |
+
[17] Zhiwei Liu, Mengting Wan, Stephen Guo, Kannan Achan, and Philip S. Yu. Basconv: Aggregating heterogeneous interactions for basket recommendation with graph convolutional neural network. In Proceedings of SDM, pages 64–72, 2020.
|
| 236 |
+
|
| 237 |
+
[18] Miller McPherson, Lynn Smith-Lovin, and James M Cook. Birds of father: Homophily in social networks. Annual Review of Sociology, 27(1):415–444, 2001.
|
| 238 |
+
|
| 239 |
+
[19] Galileo Namata, Ben London, Lise Getoor, and Bert Huang. Query-driven active surveying for collective classification. In Proceedings of the International Workshop on MLG.
|
| 240 |
+
|
| 241 |
+
[20] M. E. J. Newman. Assortative mixing in networks. Physical Review Letters, 89(20):208701, 2002.
|
| 242 |
+
|
| 243 |
+
[21] Shashank Pandit, Duen Horng Chau, Samuel Wang, and Christos Faloutsos. Netprobe: a fast and scalable system for fraud detection in online auction networks. In Proceedings of WWW, pages 201–210, 2007.
|
| 244 |
+
|
| 245 |
+
[22] Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. Geom-gcn: Geometric graph convolutional networks. In Processings of ICLR, 2020.
|
| 246 |
+
|
| 247 |
+
[23] Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Dropedge: Towards deep graph convolutional networks on node classification. In Proceedings of ICLR, 2020.
|
| 248 |
+
|
| 249 |
+
[24] Benedek Rozemberczki, Carl Allen, and Rik Sarkar. Multi-scale attributed node embedding. Journal of Complex Networks, 9(2), 2021.
|
| 250 |
+
|
| 251 |
+
[25] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Gallagher, and Tina EliassiRad. Collective classification in network data. AI Magazine, 29(3):93–106, 2008.
|
| 252 |
+
|
| 253 |
+
[26] Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. Graph attention networks. In Proceedings of ICLR, 2018.
|
| 254 |
+
|
| 255 |
+
[27] Hongwei Wang and Jure Leskovec. Unifying graph convolutional neural networks and label propagation. arXiv preprint arXiv:2002.06755, 2020.
|
| 256 |
+
|
| 257 |
+
[28] Xiao Wang, Meiqi Zhu, Deyu Bo, Peng Cui, Chuan Shi, and Jian Pei. AM-GCN: adaptive multi-channel graph convolutional networks. In Proceedings of KDD, pages 1243–1253, 2020.
|
| 258 |
+
|
| 259 |
+
[29] Keyulu Xu, Chengtao Li, Yonglong Tian, Tomohiro Sonobe, Ken-ichi Kawarabayashi, and Stefanie Jegelka. Representation learning on graphs with jumping knowledge networks. In Proceedings of ICML, volume 80, pages 5449–5458, 2018.
|
| 260 |
+
|
| 261 |
+
[30] Qianqian Xu, Jiechao Xiong, Xiaochun Cao, Qingming Huang, and Yuan Yao. From social to individuals: A parsimonious path of multi-level models for crowdsourced preference aggregation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(4):844–856, 2019.
|
| 262 |
+
|
| 263 |
+
[31] Qianqian Xu, Zhiyong Yang, Zuyao Chen, Yangbangyan Jiang, Xiaochun Cao, Yuan Yao, and Qingming Huang. Deep partial rank aggregation for personalized attributes. In Proceedings of AAAI, pages 678–688, 2021.
|
| 264 |
+
|
| 265 |
+
[32] Yujun Yan, Milad Hashemi, Kevin Swersky, Yaoqing Yang, and Danai Koutra. Two sides of the same coin: Heterophily and oversmoothing in graph convolutional neural networks. arXiv preprint arXiv:2102.06462, 2021.
|
| 266 |
+
|
| 267 |
+
[33] Jiaxuan You, Rex Ying, and Jure Leskovec. Position-aware graph neural networks. In Proceedings of ICML, pages 7134–7143, 2019.
|
| 268 |
+
|
| 269 |
+
[34] Jiong Zhu, Ryan A. Rossi, Anup B. Rao, Tung Mai, Nedim Lipka, Nesreen K. Ahmed, and Danai Koutra. Graph neural networks with heterophily. In Proceedings of AAAI, 2021.
|
| 270 |
+
|
| 271 |
+
[35] Jiong Zhu, Yujun Yan, Lingxiao Zhao, Mark Heimann, Leman Akoglu, and Danai Koutra. Beyond homophily in graph neural networks: Current limitations and effective designs. In Proceedings of NeurIPS, 2020.
|
md/train/NsMLjcFaO8O/NsMLjcFaO8O.md
ADDED
|
@@ -0,0 +1,429 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WAVEGRAD: ESTIMATING GRADIENTS FOR WAVEFORM GENERATION
|
| 2 |
+
|
| 3 |
+
Nanxin Chen∗
|
| 4 |
+
Johns Hopkins University, Center for Language and Speech Processing
|
| 5 |
+
bobchennan@jhu.edu
|
| 6 |
+
|
| 7 |
+
Yu Zhang†, Heiga Zen, Ron J. Weiss, Mohammad Norouzi, William Chan† Google Research, Brain Team {ngyuzh,heigazen,ronw,mnorouzi,williamchan}@google.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
This paper introduces WaveGrad, a conditional model for waveform generation which estimates gradients of the data density. The model is built on prior work on score matching and diffusion probabilistic models. It starts from a Gaussian white noise signal and iteratively refines the signal via a gradient-based sampler conditioned on the mel-spectrogram. WaveGrad offers a natural way to trade inference speed for sample quality by adjusting the number of refinement steps, and bridges the gap between non-autoregressive and autoregressive models in terms of audio quality. We find that it can generate high fidelity audio samples using as few as six iterations. Experiments reveal WaveGrad to generate high fidelity audio, outperforming adversarial non-autoregressive baselines and matching a strong likelihood-based autoregressive baseline using fewer sequential operations. Audio samples are available at https://wavegrad.github.io/.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Deep generative models have revolutionized speech synthesis (Oord et al., 2016; Sotelo et al., 2017; Wang et al., 2017; Biadsy et al., 2019; Jia et al., 2019; Vasquez & Lewis, 2019). Autoregressive models, in particular, have been popular for raw audio generation thanks to their tractable likelihoods, simple inference procedures, and high fidelity samples (Oord et al., 2016; Mehri et al., 2017; Kalchbrenner et al., 2018; Song et al., 2019; Valin & Skoglund, 2019). However, autoregressive models require a large number of sequential computations to generate an audio sample. This makes it challenging to deploy them in real-world applications where faster than real time generation is essential, such as digital voice assistants on smart speakers, even using specialized hardware.
|
| 16 |
+
|
| 17 |
+
There has been a plethora of research into non-autoregressive models for audio generation, including normalizing flows such as inverse autoregressive flows (Oord et al., 2018; Ping et al., 2019), generative flows (Prenger et al., 2019; Kim et al., 2019), and continuous normalizing flows (Kim et al., 2020; Wu & Ling, 2020), implicit generative models such as generative adversarial networks (GAN) (Donahue et al., 2018; Engel et al., 2019; Kumar et al., 2019; Yamamoto et al., 2020; Binkowski ´ et al., 2020; Yang et al., 2020a;b; McCarthy & Ahmed, 2020) and energy score (Gritsenko et al., 2020), variational auto-encoder models (Peng et al., 2020), as well as models inspired by digital signal processing (Ai & Ling, 2020; Engel et al., 2020), and the speech production mechanism (Juvela et al., 2019; Wang et al., 2020). Although such models improve inference speed by requiring fewer sequential operations, they often yield lower quality samples than autoregressive models.
|
| 18 |
+
|
| 19 |
+
This paper introduces WaveGrad, a conditional generative model of waveform samples that estimates the gradients of the data log-density as opposed to the density itself. WaveGrad is simple to train, and implicitly optimizes for the weighted variational lower-bound of the log-likelihood.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: A visualization of the WaveGrad inference process. Starting from Gaussian noise $( n = 0$ ), gradient-based sampling is applied using as few as 6 iterations to achieve high fidelity audio $( n = 6$ ). Left: signal after each step of a gradient-based sampler. Right: zoomed view of a $5 0 \mathrm { m s }$ segment.
|
| 23 |
+
|
| 24 |
+
WaveGrad is non-autoregressive, and requires only a constant number of generation steps during inference. Figure 1 visualizes the inference process of WaveGrad.
|
| 25 |
+
|
| 26 |
+
WaveGrad builds on a class of generative models that emerges through learning the gradient of the data log-density, also known as the Stein score function (Hyvarinen ¨ , 2005; Vincent, 2011). During inference, one can rely on the gradient estimate of the data log-density and use gradient-based samplers (e.g., Langevin dynamics) to sample from the model (Song & Ermon, 2019). Promising results have been achieved on image synthesis (Song & Ermon, 2019; 2020) and shape generation (Cai et al., 2020). Closely related are diffusion probabilistic models (Sohl-Dickstein et al., 2015), which capture the output distribution through a Markov chain of latent variables. Although these models do not offer tractable likelihoods, one can optimize a (weighted) variational lower-bound on the log-likelihood. The training objective can be reparameterized to resemble deonising score matching (Vincent, 2011), and can be interpreted as estimating the data log-density gradients. The model is non-autoregressive during inference, requiring only a constant number of generation steps, using a Langevin dynamics-like sampler to generate the output beginning from Gaussian noise.
|
| 27 |
+
|
| 28 |
+
The key contributions of this paper are summarized as follows:
|
| 29 |
+
|
| 30 |
+
• WaveGrad combines recent techniques from score matching (Song et al., 2020; Song & Ermon, 2020) and diffusion probabilistic models (Sohl-Dickstein et al., 2015; Ho et al., 2020) to address conditional speech synthesis.
|
| 31 |
+
• We build and compare two variants of the WaveGrad model: (1) WaveGrad conditioned on a discrete refinement step index following Ho et al. (2020), (2) WaveGrad conditioned on a continuous scalar indicating the noise level. We find this novel continuous variant is more effective, especially because once the model is trained, different number of refinement steps can be used for inference. The proposed continuous noise schedule enables our model to use fewer inference iterations while maintaining the same quality (e.g., 6 vs. 50). We demonstrate that WaveGrad is capable of generating high fidelity audio samples, outperforming adversarial non-autoregressive models (Yamamoto et al., 2020; Kumar et al., 2019; Yang et al., 2020a; Binkowski et al. ´ , 2020) and matching one of the best autoregressive models (Kalchbrenner et al., 2018) in terms of subjective naturalness. WaveGrad is capable of generating high fidelity samples using as few as six refinement steps.
|
| 32 |
+
|
| 33 |
+
# 2 ESTIMATING GRADIENTS FOR WAVEFORM GENERATION
|
| 34 |
+
|
| 35 |
+
We begin with a brief review of the Stein score function, Langevin dynamics, and score matching. The Stein score function (Hyvarinen ¨ , 2005) is the gradient of the data log-density $\log p ( y )$ with respect to the datapoint $y$ :
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
s ( y ) = \nabla _ { y } \log p ( y ) .
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 2: WaveGrad directed graphical model for training, conditioned on iteration index. $q ( y _ { n + 1 } | y _ { n } )$ iteratively adds Gaussian noise to the signal starting from the waveform $y _ { 0 }$ . $q ( y _ { n + 1 } | y _ { 0 } )$ is the noise distribution used for training. The inference denoising process progressively removes noise, starting from Gaussian noise $y _ { N }$ , akin to Langevin dynamics. Adapted from Ho et al. (2020).
|
| 43 |
+
|
| 44 |
+
Given the Stein score function $s ( \cdot )$ , one can draw samples from the corresponding density, $\tilde { y } \sim p ( y )$ , via Langevin dynamics, which can be interpreted as stochastic gradient ascent in the data space:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\tilde { y } _ { i + 1 } = \tilde { y } _ { i } + \frac { \eta } { 2 } s ( \tilde { y } _ { i } ) + \sqrt { \eta } z _ { i } ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $\eta > 0$ is the step size, $z _ { i } \sim \mathcal { N } ( 0 , I )$ , and $I$ denotes an identity matrix. A variant (Ho et al., 2020) is used as our inference procedure.
|
| 51 |
+
|
| 52 |
+
A generative model can be built by training a neural network to learn the Stein score function directly, using Langevin dynamics for inference. This approach, known as score matching (Hyvarinen ¨ , 2005; Vincent, 2011), has seen success in image (Song & Ermon, 2019; 2020) and shape (Cai et al., 2020) generation. The denoising score matching objective (Vincent, 2011) takes the form:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\begin{array} { r } { \mathbb { E } _ { y \sim p ( y ) } \mathbb { E } _ { \tilde { y } \sim q ( \tilde { y } | y ) } \left[ \left\| s _ { \theta } ( \tilde { y } ) - \nabla _ { \tilde { y } } \log q ( \tilde { y } \mid y ) \right\| _ { 2 } ^ { 2 } \right] , } \end{array}
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where $p ( \cdot )$ is the data distribution, and $q ( \cdot )$ is a noise distribution.
|
| 59 |
+
|
| 60 |
+
Recently, Song & Ermon (2019) proposed a weighted denoising score matching objective, in which data is perturbed with different levels of Gaussian noise, and the score function $s _ { \theta } ( \tilde { y } , \sigma )$ is conditioned on $\sigma$ , the standard deviation of the noise used:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { l } { \displaystyle \sum _ { \sigma \in S } \lambda ( \sigma ) \mathbb { E } _ { y \sim p ( y ) } \mathbb { E } _ { \widetilde { y } \sim \mathcal { N } ( y , \sigma ) } \left[ \left\| s _ { \theta } ( \widetilde { y } , \sigma ) + \frac { \widetilde { y } - y } { \sigma ^ { 2 } } \right\| _ { 2 } ^ { 2 } \right] , } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $S$ is a set of standard deviation values that are used to perturb the data, and $\lambda ( \sigma )$ is a weighting function for different $\sigma$ . WaveGrad is a variant of this approach applied to learning conditional generative models of the form $p ( y \mid x )$ . WaveGrad adopts a similar objective which combines the idea of Vincent (2011); Ho et al. (2020); Song & Ermon (2019). WaveGrad learns the gradient of the data density, and uses a sampler similar to Langevin dynamics for inference.
|
| 67 |
+
|
| 68 |
+
The denoising score matching framework relies on a noise distribution to provide support for learning the gradient of the data log density (i.e., $q$ in Equation 3, and $\mathcal { N } ( \cdot , \sigma )$ in Equation 4). The choice of the noise distribution is critical for achieving high quality samples (Song & Ermon, 2020). As shown in Figure 2, WaveGrad relies on the diffusion model framework (Sohl-Dickstein et al., 2015; Ho et al., 2020) to generate the noise distribution used to learn the score function.
|
| 69 |
+
|
| 70 |
+
# 2.1 WAVEGRAD AS A DIFFUSION PROBABILISTIC MODEL
|
| 71 |
+
|
| 72 |
+
Ho et al. (2020) observed that diffusion probabilistic models (Sohl-Dickstein et al., 2015) and score matching objectives (Song & Ermon, 2019; Vincent, 2011; Song & Ermon, 2020) are closely related. As such, we will first introduce WaveGrad as a diffusion probabilistic model.
|
| 73 |
+
|
| 74 |
+
We adapt the diffusion model setup in Ho et al. (2020), from unconditional image generation to conditional raw audio waveform generation. WaveGrad models the conditional distribution $p _ { \theta } ( y _ { 0 } \mid$
|
| 75 |
+
|
| 76 |
+
<table><tr><td colspan="2">Algorithm1 Training. WaveGrad directly condi- tions on the continuous noise level√.lis from a predefined noise schedule.</td></tr><tr><td>1: repeat 2: yo~_q(yo) 3: s ~ Uniform({1,...,S}) 4: √~Uniform(𝑙s-1,𝑙s)</td><td></td></tr><tr><td>5: ∈ ~ N(0,I) 6: Take gradient descent step on 7:until converged</td><td>Vθlle-∈(vayo+√1-∈,x,√@)ll</td></tr></table>
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { r l r l } & { \mathbf { p e a t } } & & { 1 \colon \ y _ { N } \sim \mathcal { N } ( 0 , I ) } \\ & { y _ { 0 } \sim q ( y _ { 0 } ) } & { 2 \colon \mathbf { f o r } n = N , \ldots , 1 \ \mathbf { d o } } \\ & { s \sim \mathrm { U n i f o r m } ( \{ 1 , \ldots , S \} ) } & { 3 \colon } & { z \sim \mathcal { N } ( 0 , I ) } \\ & { \sqrt { \underline { { \alpha } } } \sim \mathrm { U n i f o r m } ( l _ { s - 1 } , l _ { s } ) } & { 4 \colon } & { y _ { n - 1 } = \frac { \big ( y _ { n } - \frac { 1 - \alpha _ { n } } { \sqrt { 1 - \bar { \alpha } _ { n } } } \epsilon _ { \theta } ( y _ { n } , x , \sqrt { \bar { \alpha } _ { n } } ) \big ) } { \sqrt { \alpha _ { n } } } } \\ & { \epsilon \sim \mathcal { N } ( 0 , I ) } & { 4 \colon } & { y _ { n - 1 } = \frac { \big ( y _ { n - 1 } - \frac { 1 - \alpha _ { n } } { \sqrt { 1 - \bar { \alpha } _ { n } } } \epsilon _ { \theta } ( y _ { n } , x , \sqrt { \bar { \alpha } _ { n } } ) \big ) } { \sqrt { \alpha _ { n } } } } \\ & { \mathrm { T a k e ~ g r a d i e n t ~ d e s c e n t ~ s t e p ~ o n ~ } } & { 5 \colon } & { \mathrm { i f ~ } n > 1 , y _ { n - 1 } = y _ { n - 1 } + \sigma _ { n } z } \\ & { \hat { \mathbf { V } } _ { \theta } \big \| \epsilon - \epsilon _ { \theta } ( \sqrt { \bar { \alpha } } y _ { 0 } + \sqrt { 1 - \bar { \alpha } } \epsilon , x , \sqrt { \bar { \alpha } } ) \big \| _ { 1 } } & { 6 \colon \mathbf { e n d ~ f o r ~ } } & \\ & { \mathbf { t i l ~ c o n v e r g e d } } & & { 7 \colon \mathbf { r e t u r n ~ } y _ { 0 } } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
<table><tr><td>Algorithm 2 Sampling. WaveGrad generates sam- ples following a gradient-based sampler similar to Langevin dynamics.</td></tr><tr><td>1: yn ~ N(0,I) 2: for n= N,...,1 do</td></tr><tr><td>3: z ~ N(0,I) 1-αn (yn- Eθ(yn,x,√n)) 4: √1-αn</td></tr><tr><td>yn-1= √an</td></tr><tr><td>5: if n>1,yn-1 = yn-1+δnz 6: end for</td></tr></table>
|
| 83 |
+
|
| 84 |
+
$x$ ) where $y _ { 0 }$ is the waveform and $x$ contains the conditioning features corresponding to $y _ { 0 }$ , such as linguistic features derived from the corresponding text, mel-spectrogram features extracted from $y _ { 0 }$ , or acoustic features predicted by a Tacotron-style text-to-speech synthesis model (Shen et al., 2018):
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
p _ { \theta } ( y _ { 0 } \mid x ) : = \int p _ { \theta } ( y _ { 0 : N } \mid x ) \mathrm { d } y _ { 1 : N } ,
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $y _ { 1 } , \ldots , y _ { N }$ is a series of latent variables, each of which are of the same dimension as the data $y _ { 0 }$ , and $N$ is the number of latent variables (iterations). The posterior $q \big ( y _ { 1 : N } \ \mid \ y _ { 0 } \big )$ is called the diffusion process (or forward process), and is defined through the Markov chain:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
q ( y _ { 1 : N } \mid y _ { 0 } ) : = \prod _ { n = 1 } ^ { N } q ( y _ { n } \mid y _ { n - 1 } ) ,
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where each iteration adds Gaussian noise:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
q ( y _ { n } \mid y _ { n - 1 } ) : = \mathcal { N } \left( y _ { n } ; \sqrt { \left( 1 - \beta _ { n } \right) } y _ { n - 1 } , \beta _ { n } I \right) ,
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
under some (fixed constant) noise schedule $\beta _ { 1 } , \ldots , \beta _ { N }$ . We emphasize the property observed by Ho et al. (2020), the diffusion process can be computed for any step $n$ in a closed form:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
y _ { n } = \sqrt { \bar { \alpha } _ { n } } y _ { 0 } + \sqrt { \left( 1 - \bar { \alpha } _ { n } \right) } \epsilon
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where $\epsilon \sim \mathcal { N } ( 0 , I )$ , $\alpha _ { n } : = 1 - \beta _ { n }$ and $\textstyle { \bar { \alpha } } _ { n } : = \prod _ { s = 1 } ^ { n } \alpha _ { s }$ . The gradient of this noise distribution is
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\nabla _ { y _ { n } } \log { q ( y _ { n } \mid y _ { 0 } ) } = - \frac { \epsilon } { \sqrt { 1 - \bar { \alpha } _ { n } } } .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Ho et al. (2020) proposed to train on pairs $( y _ { 0 } , y _ { n } )$ , and to reparameterize the neural network to model $\epsilon _ { \theta }$ . This objective resembles denoising score matching as in Equation 3 (Vincent, 2011):
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
{ \mathbb E } _ { n , \epsilon } \left[ C _ { n } \left. \epsilon _ { \theta } \left( \sqrt { \bar { \alpha } _ { n } } y _ { 0 } + \sqrt { 1 - \bar { \alpha } _ { n } } \epsilon , x , n \right) - \epsilon \right. _ { 2 } ^ { 2 } \right] ,
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $C _ { n }$ is a constant related to $\beta _ { n }$ . In practice Ho et al. (2020) found it beneficial to drop the $C _ { n }$ term, resulting in a weighted variational lower bound of the log-likelihood. Additionally in Ho et al. (2020), $\epsilon _ { \theta }$ conditions on the discrete index $n$ , as we will discuss further below. We also found that substituting the original $L _ { 2 }$ distance metric with $L _ { 1 }$ offers better training stability.
|
| 121 |
+
|
| 122 |
+
# 2.2 NOISE SCHEDULE AND CONDITIONING ON NOISE LEVEL
|
| 123 |
+
|
| 124 |
+
In the score matching setup, Song & Ermon (2019; 2020) noted the importance of the choice of noise distribution used during training, since it provides support for modelling the gradient distribution. The diffusion framework can be viewed as a specific approach to providing support to score matching, where the noise schedule is parameterized by $\beta _ { 1 } , \ldots , \beta _ { N }$ , as described in the previous section. This is typically determined via some hyperparameter heuristic, e.g., a linear decay schedule (Ho et al., 2020). We found the choice of the noise schedule to be critical towards achieving high fidelity audio in our experiments, especially when trying to minimize the number of inference iterations $N$ to make inference efficient. A schedule with superfluous noise may result in a model unable to recover the low amplitude detail of the waveform, while a schedule with too little noise may result in a model that converges poorly during inference. Song & Ermon (2020) provide some insights around tuning the noise schedule under the score matching framework. We will connect some of these insights and apply them to WaveGrad under the diffusion framework.
|
| 125 |
+
|
| 126 |
+
Another closely related problem is determining $N$ , the number of diffusion/denoising steps. A large $N$ equips the model with more computational capacity, and may improve sample quality. However using a small $N$ results in faster inference and lower computational costs. Song & Ermon (2019) used $N = 1 0$ to generate $3 2 \times 3 2$ images, while Ho et al. (2020) used 1,000 iterations to generate high resolution $2 5 6 \times 2 5 6$ images. In our case, WaveGrad generates audio sampled at $2 4 \mathrm { k H z }$ .
|
| 127 |
+
|
| 128 |
+
We found that tuning both the noise schedule and $N$ in conjunction was critical to attaining high fidelity audio, especially when $N$ is small. If these hyperparameters are poorly tuned, the training sampling procedure may provide deficient support for the distribution. Consequently, during inference, the sampler may converge poorly when the sampling trajectory encounters regions that deviate from the conditions seen during training. However, tuning these hyperparameters can be costly due to the large search space, as a large number of models need to be trained and evaluated. We make empirical observations and discuss this in more details in Section 4.4.
|
| 129 |
+
|
| 130 |
+
We address some of the issues above in our WaveGrad implementation. First, compared to the diffusion probabilistic model from Ho et al. (2020), we reparameterize the model to condition on the continuous noise level $\bar { \alpha }$ instead of the discrete iteration index $n$ . The loss becomes
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
{ \mathbb E } _ { \bar { \alpha } , \epsilon } \left[ \left\| \epsilon _ { \theta } \left( \sqrt { \bar { \alpha } } y _ { 0 } + \sqrt { 1 - \bar { \alpha } } \epsilon , x , \sqrt { \bar { \alpha } } \right) - \epsilon \right\| _ { 1 } \right] ,
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
A similar approach was also used in the score matching framework (Song & Ermon, 2019; 2020), wherein they conditioned on the noise variance.
|
| 137 |
+
|
| 138 |
+
There is one minor technical issue we must resolve in this approach. In the diffusion probabilistic model training procedure conditioned on the discrete iteration index (Equation 10), we would sample $n \sim \operatorname { U n i f o r m } ( \{ 1 , \dots , N \} )$ , and then compute its corresponding $\alpha _ { n }$ . When directly conditioning on the continuous noise level, we need to define a sampling procedure that can directly sample $\bar { \alpha }$ . Recall that $\begin{array} { r } { \bar { \alpha } _ { n } : = \prod _ { s } ^ { n } ( 1 - \beta _ { s } ) \in [ 0 , 1 ] } \end{array}$ . While we could simply sample from the uniform distribution $\bar { \alpha } \sim \mathrm { U n i f o r m } ( 0 , 1 )$ , we found this to give poor empirical results. Instead, we use a simple hierarchical sampling method that mimics the discrete sampling strategy. We first define a√ noise schedule with $S$ iterations and compute all of its corresponding $\sqrt { \bar { \alpha } _ { s } }$ :
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
l _ { 0 } = 1 , \qquad l _ { s } = \sqrt { \prod _ { i = 1 } ^ { s } ( 1 - \beta _ { i } ) } .
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
We first sample a segment $s \sim U ( \{ 1 , \dots , S \} )$ , which provides a segment $\left( l _ { s - 1 } , l _ { s } \right)$ , and then sample from this segment uniformly to give $\sqrt { \bar { \alpha } }$ . The full WaveGrad training algorithm using this sampling procedure is illustrated in Algorithm 1.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 3: WaveGrad network architecture. The inputs consists of the mel-spectrogram conditioning signal $x$ , the noisy waveform generated from the previous iteration yn, and the noise level α¯. The5 model produces $\epsilon _ { n }$ at each iteration, which can be interpreted as the direction to update $y _ { n }$ .
|
| 148 |
+
|
| 149 |
+
One benefit of this variant is that the model needs to be trained only once, yet inference can be run over a large space of trajectories without the need to be retrained. To be specific, once we train a model, we can use a different number of iterations $N$ during inference, making it possible to explicitly trade off between inference computation and output quality in one model. This also makes fast hyperparameter search possible, as we will illustrate in Section 4.4. The full inference algorithm is explained in Algorithm 2. The full WaveGrad architecture is visualized in Figure 3. Details are included in Appendix A.
|
| 150 |
+
|
| 151 |
+
# 3 RELATED WORK
|
| 152 |
+
|
| 153 |
+
This work is inspired in part by Sohl-Dickstein et al. (2015), which applies diffusion probabilistic models to unconditional image synthesis, whereas we apply diffusion probabilistic models to conditional generation of waveform. The objective we use also resembles the Noise Conditional Score Networks (NCSN) objective of Song & Ermon (2019). Similar to Song & Ermon (2019; 2020), our models condition on
|
| 154 |
+
|
| 155 |
+
a continuous scalar indicating the noise level. Denoising score matching (Vincent, 2011) and sliced score matching Song et al. (2020) also use similar objective functions, however they do not condition on the noise level. Work of Saremi et al. (2018) on score matching is also related, in that their objective accounts for a noise hyperparameter. Finally, Cai et al. (2020) applied NCSN to model conditional distributions for shape generation, while our focus is waveform generation.
|
| 156 |
+
|
| 157 |
+
WaveGrad also closely relates to masked-based generative models (Devlin et al., 2019; Lee et al., 2018; Ghazvininejad et al., 2019; Chan et al., 2020; Saharia et al., 2020), insertion-based generative models (Stern et al., 2019; Chan et al., 2019b;a;c; Li & Chan, 2019) and edit-based generative models (Sabour et al., 2019; Gu et al., 2019; Ruis et al., 2019) found in the semi-autoregressive sequence generation literature. These approaches model discrete tokens and use edit operations (e.g., insertion, substitution, deletion), whereas in our work, we model the (continuous) gradients in a continuous output space. Edit-based models can also iteratively refine the outputs during inference (Lee et al., 2018; Ghazvininejad et al., 2019; Chan et al., 2020), while they do not rely on a (continuous) gradient-based sampler, they rely on a (discrete) edit-based sampler. The noise distribution play a key role, token masking based on Bernoulli (Devlin et al., 2019), uniform (Saharia et al., 2020), or hand-crafted (Chan et al., 2020) distributions have been used to enable learning the edit distribution. We rely on a Markov chain from the diffusion framework (Ho et al., 2020) to sample perturbations.
|
| 158 |
+
|
| 159 |
+
We note that the concurrent work of Kong et al. (2020) also applies the diffusion framework of Ho et al. (2020) to waveform generation. Their model conditions on a discrete iteration index whereas we find that conditioning on a continuous noise level offers improved flexibility and enables generating high fidelity audio as few as six refinement steps. By contrast, Kong et al. (2020) report performance using 20 refinement steps and evaluate their models when conditioned on ground truth mel-spectrogram. We evaluate WaveGrad when conditioned on Tacotron 2 mel-spectrogram predictions, which corresponds to a more realistic TTS setting.
|
| 160 |
+
|
| 161 |
+
The neural network architecture of WaveGrad is heavily inspired by GAN-TTS (Binkowski et al. ´ , 2020). The upsampling block (UBlock) of WaveGrad follows the GAN-TTS generator, with a minor difference that no BatchNorm is used.
|
| 162 |
+
|
| 163 |
+
# 4 EXPERIMENTS
|
| 164 |
+
|
| 165 |
+
We compare WaveGrad with other neural vocoders and carry out ablations using different noise schedules. We find that WaveGrad achieves the same sample quality as the fully autoregressive state-of-the-art model of Kalchbrenner et al. (2018) (WaveRNN) on both internal datasets (Table 1) and LJ Speech (Ito & Johnson, 2017) (Table C.1) with less sequential operations.
|
| 166 |
+
|
| 167 |
+
# 4.1 MODEL AND TRAINING SETUP
|
| 168 |
+
|
| 169 |
+
We trained models using a proprietary speech dataset consisted of 385 hours of high quality English speech from 84 professional voice talents. For evaluation, we chose a female speaker in the training dataset. Speech signals were downsampled to $2 4 \mathrm { k H z }$ then 128-dimensional mel-spectrogram features $\mathrm { 5 0 ~ m s }$ Hanning window, $1 2 . 5 ~ \mathrm { m s }$ frame shift, 2048-point FFT, $2 0 \ : \mathrm { H z }$ & $1 2 \ \mathrm { k H z }$ lower & upper frequency cutoffs) were extracted. During training, mel-spectrograms computed from ground truth audio were used as the conditioning features $x$ . However, during inference, we used predicted mel-spectrograms generated by a Tacotron 2 model (Shen et al., 2018) as the conditioning signal. Although there was a mismatch in the conditioning signals between training and inference, unlike Shen et al. (2018), preliminary experiments demonstrated that training using ground truth mel-spectrograms as conditioning had no regression compared to training using predicted features. This property is highly beneficial as it significantly simplifies the training process of text-to-speech models: the WaveGrad vocoder model can be trained separately on a large corpus without relying on a pretrained text-to-spectrogram model.
|
| 170 |
+
|
| 171 |
+
Model Size: Two network size variations were compared: Base and Large. The WaveGrad Base model took 24 frames corresponding to 0.3 seconds of audio (7,200 samples) as input during training. We set the batch size to 256. Models were trained on using 32 Tensor Processing Unit (TPU) v2 cores. The WaveGrad Base model contained 15M parameters. For the WaveGrad Large model, we repeated each UBlock/DBlock twice, one with upsampling/downsampling and another without. Each training sample included 60 frames corresponding to a 0.75 second of audio (18,000 samples). We used the same batch size and trained the model using 128 TPU v3 cores. The WaveGrad Large model contained 23M parameters. Both Base and Large models were trained for about 1M steps. The network architecture is fully convolutional and non-autoregressive thus it is highly parallelizable at both training and inference.
|
| 172 |
+
|
| 173 |
+
Noise Schedule: All noise schedules we used can be found in Appendix B.
|
| 174 |
+
|
| 175 |
+
# 4.2 EVALUATION
|
| 176 |
+
|
| 177 |
+
The following models were used as baselines in this experiment: (1) WaveRNN (Kalchbrenner et al., 2018) conditioned on mel-spectrograms predicted by a Tacotron 2 model in teacher-forcing mode following Shen et al. (2018); The model used a single long short-term memory (LSTM) layer with 1,024 hidden units, 5 convolutional layers with 512 channels as the conditioning stack to process the mel-spectrogram features, and a 10-component mixture of logistic distributions (Salimans et al., 2017) as its output layer, generating 16-bit samples at $2 4 ~ \mathrm { k H z }$ . It had 18M parameters and was trained for 1M steps. Preliminary experiments indicated that further reducing the number of units in the LSTM layer hurts performance. (2) Parallel WaveGAN (Yamamoto et al., 2020) with 1.57M parameters, trained for 1M steps. (3) MelGAN (Kumar et al., 2019) with 3.22M parameters, trained for 4M steps. (4) Multi-band MelGAN (Yang et al., 2020a) with 2.27M parameters, trained for 1M steps. (5) GAN-TTS (Binkowski et al. ´ , 2020) with 21.4M parameters, trained for 1M steps.
|
| 178 |
+
|
| 179 |
+
All models were trained using the same training set as the WaveGrad models. Following the original papers, Parallel WaveGAN, MelGAN, and Multi-band MelGAN were conditioned on the melspectrograms computed from ground truth audio during training. They were trained using a publicly available implementation at https://github.com/kan-bayashi/ParallelWaveGAN. Note that hyper-parameters of these baseline models were not fully optimized for this dataset.
|
| 180 |
+
|
| 181 |
+
To compare these models, we report subjective listening test results rating speech naturalness on a 5-point Mean Opinion Score (MOS) scale, following the protocol described in Appendix D. Conditioning mel-spectrograms for the test set were predicted using a Tacotron 2 model, which were passed to these models to synthesize audio signals. Note that the Tacotron 2 model was identical to the one used to predict mel-spectrograms for training WaveRNN and GAN-TTS models.
|
| 182 |
+
|
| 183 |
+
# 4.3 RESULTS
|
| 184 |
+
|
| 185 |
+
Subjective evaluation results are summarized in Table 1. Models conditioned on discrete indices followed the formulation from Section 2.1, and models conditioned on continuous noise level followed the formulation from Section 2.2. WaveGrad models matched the performance of the autoregressive WaveRNN baseline and outperformed the non-autoregressive baselines. Although increasing the model size slightly improved naturalness, the difference was not statistically significant. The WaveGrad Base model using six iterations achieved a real time factor (RTF) of 0.2 on an NVIDIA V100 GPU, while still achieving an MOS above 4.4. As a comparison, the WaveRNN model achieved a RTF of 20.1 on the same GPU, 100 times slower. More detailed discussion is in Section 4.4. Appendix C contains results on a public dataset using the same model architecture and noise schedule.
|
| 186 |
+
|
| 187 |
+
# 4.4 DISCUSSION
|
| 188 |
+
|
| 189 |
+
To understand the impact of different noise schedules and to reduce the number of iterations in the noise schedule from 1,000, we explored different noise schedules using fewer iterations. We found that a well-behaved inference schedule should satisfy two conditions:
|
| 190 |
+
|
| 191 |
+
Table 1: Mean opinion scores (MOS) of various models and their confidence intervals. All models except WaveRNN are non-autoregressive. WaveGrad, Parallel WaveGAN, MelGAN, and Multiband MelGAN were conditioned on the mel-spectrograms computed from ground truth audio during training. WaveRNN and GAN-TTS used predicted features for training.
|
| 192 |
+
|
| 193 |
+
<table><tr><td>Model</td><td>MOS (↑)</td></tr><tr><td>WaveRNN</td><td>4.49 ± 0.04</td></tr><tr><td>Parallel WaveGAN</td><td>3.92 ± 0.05</td></tr><tr><td>MelGAN</td><td>3.95 ± 0.06</td></tr><tr><td>Multi-band MelGAN</td><td>4.10 ± 0.05</td></tr><tr><td>GAN-TTS</td><td>4.34 ± 0.04</td></tr><tr><td>WaveGrad</td><td></td></tr><tr><td>Base (6 iterations,continuous noise levels)</td><td>4.41 ± 0.03</td></tr><tr><td>Base(1,Ooo iterations,discrete indices)</td><td>4.47 ± 0.04</td></tr><tr><td>Large (1,0O0 iterations, discrete indices)</td><td>4.51 ± 0.04</td></tr><tr><td>Ground Truth</td><td>4.58 ± 0.05</td></tr></table>
|
| 194 |
+
|
| 195 |
+
1. The KL-divergence $D _ { \mathrm { K L } } \left( q ( y _ { N } \mid y _ { 0 } ) \parallel \mathcal { N } ( 0 , I ) \right)$ between $y _ { N }$ and standard normal distribution $\mathcal { N } ( 0 , I )$ needs to be small. Large KL-divergence introduces mismatches between training and inference. To make the KL-divergence small, some $\beta \mathrm { { s } }$ need to be large enough.
|
| 196 |
+
|
| 197 |
+
2. $\beta$ should start with small values. This provides the model training with fine granularity details, which we found crucial for reducing background static noise.
|
| 198 |
+
|
| 199 |
+
In this section, all the experiments were conducted with the WaveGrad Base model. Both objective and subjective evaluation results are reported. The objective evaluation metrics include
|
| 200 |
+
|
| 201 |
+
1. Log-mel spectrogram mean squared error metrics (LS-MSE), computed using 50 ms window length and 6.25 ms frame shift;
|
| 202 |
+
2. Mel cepstral distance (MCD) (Kubichek, 1993), a similar MSE metric computed using 13- dimensional mel frequency cepstral coefficient features;
|
| 203 |
+
3. $F _ { 0 }$ Frame Error (FFE) (Chu & Alwan, 2009), combining Gross Pitch Error and Voicing Decision metrics to measure the signal proportion whose estimated pitch differs from ground truth.
|
| 204 |
+
|
| 205 |
+
Since the ground truth waveform is required to compute objective evaluation metrics, we report results using ground truth mel-spectrograms as conditioning features. We used a validation set of 50 utterances for objective evaluation, including audio samples from multiple speakers. Note that for MOS evaluation, we used the same subjective evaluation protocol described in Appendix D. We experimented with different noise schedules and number of iterations. These models were trained with conditioning on the discrete index. Subjective and quantitative evaluation results are in Table 2.
|
| 206 |
+
|
| 207 |
+
We also performed a detailed study on the the WaveGrad model conditioned on the continuous noise level in the bottom part of Table 2. Compared to the model conditioned on the discrete index with a fixed training schedule (top of Table 2), conditioning on the continuous noise level generalized better, especially if the number of iterations was small. It can be seen from Table 2 that degradation with the model with six iterations was not significant. The model with six iterations achieved real time factor $( \mathrm { R T F } ) = 0 . 2$ on an NVIDIA V100 GPU and $\mathrm { R T F } = 1 . 5$ on an Intel Xeon CPU (16 cores, 2.3GHz). As we did not optimize the inference code, further speed ups are likely possible.
|
| 208 |
+
|
| 209 |
+
# 5 CONCLUSION
|
| 210 |
+
|
| 211 |
+
In this paper, we presented WaveGrad, a novel conditional model for waveform generation which estimates the gradients of the data density, following the diffusion probabilistic model (Ho et al., 2020) and score matching framework (Song et al., 2020; Song & Ermon, 2020). WaveGrad starts from Gaussian white noise and iteratively updates the signal via a gradient-based sampler conditioned on the mel-spectrogram. WaveGrad is non-autoregressive, and requires only a constant number of generation steps during inference. We find that the model can generate high fidelity audio samples using as few as six iterations. WaveGrad is simple to train, and implicitly optimizes for the weighted variational lower-bound of the log-likelihood. The empirical experiments demonstrated WaveGrad to generate high fidelity audio samples matching a strong autoregressive baseline.
|
| 212 |
+
|
| 213 |
+
Table 2: Objective and subjective metrics of the WaveGrad Base models. When conditioning on the discrete index, a separate model needs to be trained for each noise schedule. In contrast, a single model can be used with different noise schedules when conditioning on the noise level directly. This variant yields high fidelity samples using as few as six iterations.
|
| 214 |
+
|
| 215 |
+
<table><tr><td>Iterations (schedule)</td><td>LS-MSE (↓)</td><td>MCD (↓)</td><td>FFE (↓)</td><td>MOS (↑)</td></tr><tr><td colspan="5">WaveGrad conditioned on discrete index</td></tr><tr><td>25 (Fibonacci)</td><td>283</td><td>3.93</td><td>3.3%</td><td>3.86 ± 0.05</td></tr><tr><td>50 (Linear (1 × 10-4,0.05))</td><td>181</td><td>3.13</td><td>3.1%</td><td>4.42 ± 0.04</td></tr><tr><td>1,000 (Linear(1 × 10-4,0.005))</td><td>116</td><td>2.85</td><td>3.2%</td><td>4.47 ± 0.04</td></tr><tr><td colspan="5">WaveGrad conditioned on continuous noise level</td></tr><tr><td>6 (Manual)</td><td>217</td><td>3.38</td><td>2.8%</td><td>4.41 ± 0.04</td></tr><tr><td>25 (Fibonacci)</td><td>185</td><td>3.33</td><td>2.8%</td><td>4.44 ± 0.04</td></tr><tr><td>50 (Linear (1 × 10-4,0.05))</td><td>177</td><td>3.23</td><td>2.7%</td><td>4.43 ± 0.04</td></tr><tr><td>1,000 (Linear (1 × 10-4,0.005))</td><td>106</td><td>2.85</td><td>3.0%</td><td>4.46 ± 0.03</td></tr></table>
|
| 216 |
+
|
| 217 |
+
# AUTHOR CONTRIBUTIONS
|
| 218 |
+
|
| 219 |
+
Nanxin Chen wrote code, proposed the idea, ran all experiments and wrote the paper. Yu Zhang recruited collaborators, co-managed/advised the project, conducted evaluation, debugging model and editing paper. Heiga Zen helped conducting text-to-speech experiments and advised the project. Ron Weiss implemented the objective evaluation metrics and advised the project. Mohammad Norouzi suggested the use of denoising diffusion models for audio generation and helped with writing and advising the project. William Chan conceived the project, wrote code, wrote paper, and co-managed/advised the project.
|
| 220 |
+
|
| 221 |
+
# ACKNOWLEDGMENTS
|
| 222 |
+
|
| 223 |
+
The authors would like to thank Durk Kingma, Yang Song, Kevin Swersky and Yonghui Wu for providing insightful research discussions and feedback. We also would like to thank Norman Casagrande for helping us to include the GAN-TTS baseline.
|
| 224 |
+
|
| 225 |
+
# REFERENCES
|
| 226 |
+
|
| 227 |
+
Yang Ai and Zhen-Hua Ling. Knowledge-and-Data-Driven Amplitude Spectrum Prediction for Hierarchical Neural Vocoders. arXiv preprint arXiv:2004.07832, 2020.
|
| 228 |
+
|
| 229 |
+
Eric Battenberg, RJ Skerry-Ryan, Soroosh Mariooryad, Daisy Stanton, David Kao, Matt Shannon, and Tom Bagby. Location-relative Attention Mechanisms for Robust Long-form Speech Synthesis. In ICASSP, 2020.
|
| 230 |
+
|
| 231 |
+
Fadi Biadsy, Ron J. Weiss, Pedro J. Moreno, Dimitri Kanevsky, and Ye Jia. Parrotron: An End-toEnd Speech-to-Speech Conversion Model and its Applications to Hearing-Impaired Speech and Speech Separation. In INTERSPEECH, 2019.
|
| 232 |
+
|
| 233 |
+
Mikołaj Binkowski, Jeff Donahue, Sander Dieleman, Aidan Clark, Erich Elsen, Norman ´ Casagrande, Luis C. Cobo, and Karen Simonyan. High Fidelity Speech Synthesis with Adversarial Networks. In ICLR, 2020.
|
| 234 |
+
|
| 235 |
+
Ruojin Cai, Guandao Yang, Hadar Averbuch-Elor, Zekun Hao, Serge Belongie, Noah Snavely, and Bharath Hariharan. Learning Gradient Fields for Shape Generation. In ECCV, 2020.
|
| 236 |
+
|
| 237 |
+
Harris Chan, Jamie Kiros, and William Chan. Multilingual KERMIT: It’s Not Easy Being Generative. In NeurIPS: Workshop on Perception as Generative Reasoning, 2019a.
|
| 238 |
+
|
| 239 |
+
William Chan, Nikita Kitaev, Kelvin Guu, Mitchell Stern, and Jakob Uszkoreit. KERMIT: Generative Insertion-Based Modeling for Sequences. arXiv preprint arXiv:1906.01604, 2019b.
|
| 240 |
+
|
| 241 |
+
William Chan, Mitchell Stern, Jamie Kiros, and Jakob Uszkoreit. An Empirical Study of Generation Order for Machine Translation. arXiv preprint arXiv:1910.13437, 2019c.
|
| 242 |
+
|
| 243 |
+
William Chan, Chitwan Saharia, Geoffrey Hinton, Mohammad Norouzi, and Navdeep Jaitly. Imputer: Sequence Modelling via Imputation and Dynamic Programming. In ICML, 2020.
|
| 244 |
+
|
| 245 |
+
Wei Chu and Abeer Alwan. Reducing F0 Frame Error of F0 Tracking Algorithms under Noisy Conditions with an Unvoiced/Voiced Classification Frontend. In ICASSP, 2009.
|
| 246 |
+
|
| 247 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In NAACL, 2019.
|
| 248 |
+
|
| 249 |
+
Chris Donahue, Julian McAuley, and Miller Puckette. Adversarial Audio Synthesis. arXiv preprint arXiv:1802.04208, 2018.
|
| 250 |
+
|
| 251 |
+
Vincent Dumoulin, Ethan Perez, Nathan Schucher, Florian Strub, Harm de Vries, Aaron Courville, and Yoshua Bengio. Feature-wise Transformations. Distill, 2018. doi: 10.23915/distill.00011. https://distill.pub/2018/feature-wise-transformations.
|
| 252 |
+
|
| 253 |
+
Jesse Engel, Kumar Krishna Agrawal, Shuo Chen, Ishaan Gulrajani, Chris Donahue, and Adam Roberts. GANSynth: Adversarial Neural Audio Synthesis. In ICLR, 2019.
|
| 254 |
+
|
| 255 |
+
Jesse Engel, Lamtharn Hantrakul, Chenjie Gu, and Adam Roberts. DDSP: Differentiable Digital Signal Processing. In ICLR, 2020.
|
| 256 |
+
|
| 257 |
+
Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and Luke Zettlemoyer. Mask-Predict: Parallel Decoding of Conditional Masked Language Models. In EMNLP, 2019.
|
| 258 |
+
|
| 259 |
+
Alexey A. Gritsenko, Tim Salimans, Rianne van den Berg, Jasper Snoek, and Nal Kalchbrenner. A Spectral Energy Distance for Parallel Speech Synthesis. arXiv preprint arXiv:2008.01160, 2020.
|
| 260 |
+
|
| 261 |
+
Jiatao Gu, Changhan Wang, and Jake Zhao. Levenshtein Transformer. In NeurIPS, 2019.
|
| 262 |
+
|
| 263 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016.
|
| 264 |
+
|
| 265 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising Diffusion Probabilistic Models. arXiv preprint arXiv:2006.11239, 2020.
|
| 266 |
+
|
| 267 |
+
Aapo Hyvarinen. Estimation of Non-Normalized Statistical Models by Score Matching. ¨ Journal of Machine Learning Research, 6, April 2005.
|
| 268 |
+
|
| 269 |
+
Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In ICML, 2015.
|
| 270 |
+
|
| 271 |
+
Keith Ito and Linda Johnson. The LJ Speech Dataset, 2017. https://keithito.com/ LJ-Speech-Dataset/.
|
| 272 |
+
|
| 273 |
+
Ye Jia, Ron J. Weiss, Fadi Biadsy, Wolfgang Macherey, Melvin Johnson, Zhifeng Chen, and Yonghui Wu. Direct Speech-to-Speech Translation with a Sequence-to-Sequence Model. In INTERSPEECH, 2019.
|
| 274 |
+
|
| 275 |
+
Lauri Juvela, Bajibabu Bollepalli, Vassilis Tsiaras, and Paavo Alku. GlotNet—A Raw Waveform Model for the Glottal Excitation in Statistical Parametric Speech Synthesis. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 27(6):1019–1030, 2019.
|
| 276 |
+
|
| 277 |
+
Nal Kalchbrenner, Erich Elsen, Karen Simonyan, Seb Noury, Norman Casagrande, Edward Lockhart, Florian Stimberg, Aaron van den Oord, Sander Dieleman, and Koray Kavukcuoglu. Efficient ¨ Neural Audio Synthesis. In ICML, 2018.
|
| 278 |
+
|
| 279 |
+
Hyeongju Kim, Hyeonseung Lee, Woo Hyun Kang, Sung Jun Cheon, Byoung Jin Choi, and Nam Soo Kim. WaveNODE: A Continuous Normalizing Flow for Speech Synthesis. In ICML: Workshop on Invertible Neural Networks, Normalizing Flows, and Explicit Likelihood Models, 2020.
|
| 280 |
+
|
| 281 |
+
Sungwon Kim, Sang-Gil Lee, Jongyoon Song, Jaehyeon Kim, and Sungroh Yoon. FloWaveNet: A Generative Flow for Raw Audio. In ICML, 2019.
|
| 282 |
+
|
| 283 |
+
Zhifeng Kong, Wei Ping, Jiaji Huang, Kexin Zhao, and Bryan Catanzaro. DiffWave: A Versatile Diffusion Model for Audio Synthesis. arXiv preprint arXiv:2009.09761, 2020.
|
| 284 |
+
|
| 285 |
+
Robert Kubichek. Mel-Cepstral Distance Measure for Objective Speech Quality Assessment. In IEEE PACRIM, 1993.
|
| 286 |
+
|
| 287 |
+
Kundan Kumar, Rithesh Kumar, Thibault de Boissiere, Lucas Gestin, Wei Zhen Teoh, Jose Sotelo, Alexandre de Brebisson, Yoshua Bengio, and Aaron Courville. MelGAN: Generative Adversarial Networks for Conditional Waveform Synthesis. In NeurIPS, 2019.
|
| 288 |
+
|
| 289 |
+
Jason Lee, Elman Mansimov, and Kyunghyun Cho. Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinement. In EMNLP, 2018.
|
| 290 |
+
|
| 291 |
+
Lala Li and William Chan. Big Bidirectional Insertion Representations for Documents. In EMNLP: Workshop of Neural Generation and Translation, 2019.
|
| 292 |
+
|
| 293 |
+
Ollie McCarthy and Zohaib Ahmed. HooliGAN: Robust, High Quality Neural Vocoding. arXiv preprint arXiv:2008.02493, 2020.
|
| 294 |
+
|
| 295 |
+
Soroush Mehri, Kundan Kumar, Ishaan Gulrajani, Rithesh Kumar, Shubham Jain, Jose Sotelo, Aaron Courville, and Yoshua Bengio. SampleRNN: An Unconditional End-to-End Neural Audio Generation Model. In ICLR, 2017.
|
| 296 |
+
|
| 297 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, ¨ Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. WaveNet: A Generative Model for Raw Audio. arXiv preprint arXiv:1609.03499, 2016.
|
| 298 |
+
|
| 299 |
+
Aaron van den Oord, Yazhe Li, Igor Babuschkin, Karen Simonyan, Oriol Vinyals, Koray ¨ Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis C. Cobo, Florian Stimberg, Norman Casagrande, Dominik Grewe, Seb Noury, Sander Dieleman, Erich Elsen, Nal Kalchbrenner, Heiga Zen, Alex Graves, Helen King, Tom Walters, Dan Belov, and Demis Hassabis. Parallel WaveNet: Fast High-Fidelity Speech Synthesis. In ICML, 2018.
|
| 300 |
+
|
| 301 |
+
Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic Image Synthesis with Spatially-Adaptive Normalization. In CVPR, 2019.
|
| 302 |
+
|
| 303 |
+
Kainan Peng, Wei Ping, Zhao Song, and Kexin Zhao. Non-Autoregressive Neural Text-to-Speech. In ICML, 2020.
|
| 304 |
+
|
| 305 |
+
Wei Ping, Kainan Peng, and Jitong Chen. ClariNet: Parallel Wave Generation in End-to-End Textto-Speech. In ICLR, 2019.
|
| 306 |
+
|
| 307 |
+
Ryan Prenger, Rafael Valle, and Bryan Catanzaro. WaveGlow: A Flow-based Generative Network for Speech Synthesis. In ICASSP, 2019.
|
| 308 |
+
|
| 309 |
+
Laura Ruis, Mitchell Stern, Julia Proskurnia, and William Chan. Insertion-Deletion Transformer. In EMNLP: Workshop of Neural Generation and Translation, 2019.
|
| 310 |
+
|
| 311 |
+
Sara Sabour, William Chan, and Mohammad Norouzi. Optimal Completion Distillation for Sequence Learning. In ICLR, 2019.
|
| 312 |
+
|
| 313 |
+
Chitwan Saharia, William Chan, Saurabh Saxena, and Mohammad Norouzi. Non-Autoregressive Machine Translation with Latent Alignments. arXiv preprint arXiv:2004.07437, 2020.
|
| 314 |
+
|
| 315 |
+
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. PixelCNN $^ { + + }$ : Improving the PixelCNN with Discretized Logistic Mixture Likelihood and Other Modifications. In ICLR, 2017.
|
| 316 |
+
|
| 317 |
+
Saeed Saremi, Arash Mehrjou, Bernhard Scholkopf, and Aapo Hyv ¨ arinen. Deep Energy Estimator ¨ Networks. arXiv preprint arXiv:1805.08306, 2018.
|
| 318 |
+
|
| 319 |
+
Andrew M. Saxe, James L. McClelland, and Surya Ganguli. Exact Solutions to the Nonlinear Dynamics of Learning in Deep Linear Neural Networks. In ICLR, 2014.
|
| 320 |
+
|
| 321 |
+
Jonathan Shen, Ruoming Pang, Ron J. Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, RJ Skerrv-Ryan, Rif A. Saurous, Yannis Agiomyrgiannakis, and Yonghui Wu. Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions. In ICASSP, 2018.
|
| 322 |
+
|
| 323 |
+
Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. In ICML, 2015.
|
| 324 |
+
|
| 325 |
+
Eunwoo Song, Kyungguen Byun, and Hong-Goo Kang. ExcitNet Vocoder: A Neural Excitation Model for Parametric Speech Synthesis Systems. In EUSIPCO, 2019.
|
| 326 |
+
|
| 327 |
+
Yang Song and Stefano Ermon. Generative Modeling by Estimating Gradients of the Data Distribution. In NeurIPS, 2019.
|
| 328 |
+
|
| 329 |
+
Yang Song and Stefano Ermon. Improved Techniques for Training Score-Based Generative Models. arXiv preprint arXiv:2006.09011, 2020.
|
| 330 |
+
|
| 331 |
+
Yang Song, Sahaj Garg, Jiaxin Shi, and Stefano Ermon. Sliced Score Matching: A Scalable Approach to Density and Score Estimation. In Uncertainty in Artificial Intelligence, pp. 574–584, 2020.
|
| 332 |
+
|
| 333 |
+
Jose Sotelo, Soroush Mehri, Kundan Kumar, Joao Felipe Santos, Kyle Kastner, Aaron C. Courville, and Yoshua Bengio. Char2Wav: End-to-End Speech Synthesis. In ICLR, 2017.
|
| 334 |
+
|
| 335 |
+
Mitchell Stern, William Chan, Jamie Kiros, and Jakob Uszkoreit. Insertion Transformer: Flexible Sequence Generation via Insertion Operations. In ICML, 2019.
|
| 336 |
+
|
| 337 |
+
Jean-Marc Valin and Jan Skoglund. LPCNet: Improving Neural Speech Synthesis through Linear Prediction. In ICASSP, 2019.
|
| 338 |
+
|
| 339 |
+
Sean Vasquez and Mike Lewis. MelNet: A Generative Model for Audio in the Frequency Domain. arXiv preprint arXiv:1906.01083, 2019.
|
| 340 |
+
|
| 341 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. In NIPS, 2017.
|
| 342 |
+
|
| 343 |
+
Pascal Vincent. A Connection Between Score Matching and Denoising Autoencoders. Neural Computation, 2011.
|
| 344 |
+
|
| 345 |
+
Xin Wang, Shinji Takaki, and Junichi Yamagishi. Neural Source-Filter Waveform Models for Statistical Parametric Speech Synthesis. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28:402–415, 2020.
|
| 346 |
+
|
| 347 |
+
Yuxuan Wang, RJ Skerry-Ryan, Daisy Stanton, Yonghui Wu, Ron J. Weiss, Navdeep Jaitly, Zongheng Yang, Ying Xiao, Zhifeng Chen, Samy Bengio, Quoc Le, Yannis Agiomyrgiannakis, Rob Clark, and Rif A. Saurous. Tacotron: Towards End-to-End Speech Synthesis. In INTERSPEECH, 2017.
|
| 348 |
+
|
| 349 |
+
Ning-Qian Wu and Zhen-Hua Ling. WaveFFJORD: FFJORD-Based Vocoder for Statistical Parametric Speech Synthesis. In ICASSP, 2020.
|
| 350 |
+
|
| 351 |
+
Ryuichi Yamamoto, Eunwoo Song, and Jae-Min Kim. Parallel WaveGAN: A Fast Waveform Generation Model Based on Generative Adversarial Networks with Multi-Resolution Spectrogram. In ICASSP, 2020.
|
| 352 |
+
|
| 353 |
+
Geng Yang, Shan Yang, Kai Liu, Peng Fang, Wei Chen, and Lei Xie. Multi-band MelGAN: Faster Waveform Generation for High-Quality Text-to-Speech. arXiv preprint arXiv:2005.05106, 2020a.
|
| 354 |
+
|
| 355 |
+
Jinhyeok Yang, Junmo Lee, Youngik Kim, Hoonyoung Cho, and Injung Kim. VocGAN: A HighFidelity Real-time Vocoder with a Hierarchically-nested Adversarial Network. arXiv preprint arXiv:2007.15256, 2020b.
|
| 356 |
+
|
| 357 |
+

|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
of the Upsampling Block (UBlock). We upsample the signal modulated with information from the FiLM module.
|
| 361 |
+
Figure 5: A block diagram of the downsampling block (DBlock).
|
| 362 |
+
Figure 6: A block diagram of feature-wise linear modulation (FiLM) module. We condition on the noise level $\sqrt { \bar { \alpha } }$ of diffusion/denoising process, and pass it to a positional encoding function.
|
| 363 |
+
|
| 364 |
+
# A NEURAL NETWORK ARCHITECTURE
|
| 365 |
+
|
| 366 |
+
To convert the mel-spectrogram signal $( 8 0 ~ \mathrm { H z } )$ into raw audio $( 2 4 ~ \mathrm { k H z } )$ , five upsampling blocks (UBlock) are applied to gradually upsample the temporal dimension by factors of 5, 5, 3, 2, 2, with the number of channels of 512, 512, 256, 128, 128 respectively. Additionally, one convolutional layer is added before and after these blocks.
|
| 367 |
+
|
| 368 |
+
The UBlock is illustrated in Figure 4. Each UBlock includes two residual blocks (He et al., 2016). Neural audio generation models often use large receptive field (Oord et al., 2016; Binkowski et al. ´ , 2020; Yamamoto et al., 2020). The dilation factors of four convolutional layers are 1, 2, 4, 8 for the first three UBlocks and 1, 2, 1, 2 for the rest. Upsampling is carried out by repeating the nearest input. For the large model, we use 1, 2, 4, 8 for all UBlocks.
|
| 369 |
+
|
| 370 |
+
As an iterative approach, the network prediction is also conditioned on noisy waveform √ $\sqrt { \bar { \alpha } _ { n } } y _ { 0 } +$ $\sqrt { 1 - \bar { \alpha } _ { n } } \epsilon$ . Downsampling blocks (DBlock), illustrated in Figure 5, are introduced to downsample the temporal dimension of the noisy waveform. The DBlock is similar to UBlock except that only one residual block is included. The dilation factors are 1, 2, 4 in the main branch. Downsampling is carried out by convolution with strides. Orthogonal initialization (Saxe et al., 2014) is used for all UBlocks and DBlocks.
|
| 371 |
+
|
| 372 |
+
The feature-wise linear modulation (FiLM) (Dumoulin et al., 2018) module combines information from both noisy waveform and input mel-spectrogram. We also represent the iteration index $n$ , which indicates the noise level of the input waveform, using Transformer-style sinusoidal positional embeddings (Vaswani et al., 2017). To condition on the noise level directly, we also utilize the√ sinusoidal embeddings where $5 0 0 0 \sqrt { \bar { \alpha } }$ instead of $n$ is used. The FiLM module produces both scale and bias vectors given inputs, which are used in a UBlock for feature-wise affine transformation as
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
\gamma ( D , \sqrt { \bar { \alpha } } ) \odot U + \xi ( D , \sqrt { \bar { \alpha } } ) ,
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
where $\gamma$ and $\xi$ correspond to the scaling and shift vectors from the FiLM module, $D$ is the output from corresponding DBlock, $U$ is an intermediate output in the UBlock, and $\odot$ denotes the Hadamard product.
|
| 379 |
+
|
| 380 |
+
An overview of the FiLM module is illustrated in Figure 6. The structure is inspired by spatiallyadaptive denormalization (Park et al., 2019). However batch normalization (Ioffe & Szegedy, 2015) is not applied in our work since each minibatch contains samples with different levels of noise. Batch statistics are not accurate since they are heavily dependent on sampled noise level. Experiment
|
| 381 |
+
|
| 382 |
+
$\sqrt { \bar { \alpha } _ { n } }$ with various noise schedules.
|
| 383 |
+
|
| 384 |
+

|
| 385 |
+
Figure 7: Plot of different noise schedules.
|
| 386 |
+
|
| 387 |
+
results also verified our assumption that models trained with batch normalization generate lowquality audio.
|
| 388 |
+
|
| 389 |
+
# B NOISE SCHEDULE
|
| 390 |
+
|
| 391 |
+
For the WaveGrad Base model, we tested different noise schedules during training. For 1000 and 50 iterations, we set the forward process variances to constants increasing linearly from $\beta _ { 1 }$ to $\beta _ { N }$ , defined as Linear( $\beta _ { 1 }$ , $\beta _ { N } , ~ N )$ . We used Linear $( 1 \times 1 0 ^ { - 4 }$ , 0.005, 1000) for 1000 iterations and Linear $\mathrm { 1 \times 1 0 ^ { - 4 } }$ , 0.05, 50) for 50 iterations. For 25 iteration, a different Fibonacci-based schedule was adopted (referred to as Fibonacci $( N ) _ { , }$ :
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\begin{array} { r } { \beta _ { 0 } = 1 \times 1 0 ^ { - 6 } \quad \beta _ { 1 } = 2 \times 1 0 ^ { - 6 } \quad } \\ { \beta _ { n } = \beta _ { n - 1 } + \beta _ { n - 2 } \quad \forall n \ge 2 . } \end{array}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
When a fixed schedule was used during training, the same schedule was used during inference. We found that a mismatch in the noise schedule degraded performance.
|
| 398 |
+
|
| 399 |
+
To sample the noise level $\sqrt { \bar { \alpha } }$ , we set the maximal iteration $S$ to 1000 and precompute $l _ { 1 }$ to $l _ { S }$ from Linear $\bar { ( 1 \times 1 0 ^ { - 6 } }$ , 0.01, 1000). Unlike the base fixed schedule, WaveGrad support using a different schedule during inference thus “Manual” schedule was also explored to demonstrate the possibilities with WaveGrad. For example, the 6-iteration inference schedule was explored by sweeping the $\beta$ s over following possibilities:
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\{ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 \} \times 1 0 ^ { - 6 } , 1 0 ^ { - 5 } , 1 0 ^ { - 4 } , 1 0 ^ { - 3 } , 1 0 ^ { - 2 } , 1 0 ^ { - 1 }
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
Again, we did not need to train individual models for such hyper-parameter tuning. Here we used LS-MSE as a metric for tuning.
|
| 406 |
+
|
| 407 |
+
All noise schedules and corresponding $\sqrt { \bar { \alpha } }$ are plotted in Figure 7.
|
| 408 |
+
|
| 409 |
+
# C RESULTS FOR LJ SPEECH
|
| 410 |
+
|
| 411 |
+
We ran experiments using the LJ Speech dataset (Ito & Johnson, 2017), a publicly available dataset consisting of audiobook recordings that were segmented into utterances of up to 10 seconds. We trained on a 12,764-utterance subset (23 hours) and evaluated on a held-out 130-utterance subset, following Battenberg et al. (2020). During training, mel-spectrograms computed from ground truth audio was used as the conditioning features. We used the held-out subset for evaluating synthesized speech with ground truth features. Results are presented in Table C.1. For this dataset, larger network size is beneficial and WaveGrad also matches the performance of the autoregressive baseline.
|
| 412 |
+
|
| 413 |
+
# D SUBJECTIVE LISTENING TEST PROTOCOL
|
| 414 |
+
|
| 415 |
+
The test set included 1,000 sentences. Subjects were asked to rate the naturalness of each stimulus after listening to it. Following previous studies, a five-point Likert scale score (1: Bad, 2: Poor, 3:
|
| 416 |
+
|
| 417 |
+
Table C.1: Mean opinion scores (MOS) for LJ speech datasets.
|
| 418 |
+
|
| 419 |
+
<table><tr><td>Model</td><td>MOS (↑)</td></tr><tr><td>WaveRNN</td><td>4.49 ± 0.05</td></tr><tr><td>WaveGrad</td><td></td></tr><tr><td>Large (6 iterations, continuous noise levels)</td><td>4.47 ± 0.04</td></tr><tr><td>Large (1ooo iterations,continuous noise levels)</td><td>4.55 ± 0.05</td></tr><tr><td>Base (6 iterations,continuous noise levels)</td><td>4.35 ± 0.05</td></tr><tr><td>Base (1ooo iterations,continuous noise levels)</td><td>4.40 ± 0.05</td></tr><tr><td>Ground Truth</td><td>4.55 ± 0.04</td></tr></table>
|
| 420 |
+
|
| 421 |
+
Table E.2: Reported mean opinion scores (MOS) of various models and their confidence intervals. “Linguistic” and “Mel” in the “Features” column indicate that linguistic features and melspectrogram were used as conditioning, respectively.
|
| 422 |
+
|
| 423 |
+
<table><tr><td>Model</td><td>Features</td><td>Sample Rate</td><td>MOS</td></tr><tr><td>Autoregressive</td><td></td><td></td><td></td></tr><tr><td>WaveNet (Oord et al., 2016)</td><td>Linguistic</td><td>16 kHz</td><td>4.21 ± 0.08</td></tr><tr><td>WaveNet (Oord et al., 2018)</td><td>Linguistic</td><td>24 kHz</td><td>4.41 ± 0.07</td></tr><tr><td>WaveNet (Shen et al., 2018)</td><td>Mel</td><td>24 kHz</td><td>4.53 ± 0.07</td></tr><tr><td>WaveRNN (Kalchbrenner et al., 2018)</td><td>Linguistic</td><td>24 kHz</td><td>4.46 ± 0.07</td></tr><tr><td>Non-autoregressive</td><td></td><td></td><td></td></tr><tr><td>Parallel WaveNet (Oord et al., 2018)</td><td>Linguistic</td><td>24 kHz</td><td>4.41 ± 0.08</td></tr><tr><td>GAN-TTS (Binkowski et al., 2020)</td><td>Linguistic</td><td>24 kHz</td><td>4.21 ± 0.05</td></tr><tr><td>GED (Gritsenko et al., 2020)</td><td>Linguistic</td><td>24 kHz</td><td>4.25 ± 0.06</td></tr></table>
|
| 424 |
+
|
| 425 |
+
Fair, 4: Good, 5: Excellent) was adopted with rating increments of 0.5. Each subject was allowed evaluate up to six stimuli. Test stimuli were randomly chosen and presented for each subject. Each stimulus was presented to a subject in isolation and was evaluated by one subject. The subjects were paid and native speakers of English living in United States. They were requested to use headphones in a quiet room.
|
| 426 |
+
|
| 427 |
+
# E SUBJECTIVE SCORES REPORTED IN THE PRIOR WORK
|
| 428 |
+
|
| 429 |
+
Table E.2 shows the reported mean opinion scores of the prior work which used the same speaker. Although different papers listed here used the same female speaker, their results are not directly comparable due to differences in the training dataset, sampling rates, conditioning features, and sentences used for evaluation.
|
md/train/OqtLIabPTit/OqtLIabPTit.md
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EXPLORING BALANCED FEATURE SPACES FOR REPRESENTATION LEARNING
|
| 2 |
+
|
| 3 |
+
Bingyi Kang1, Yu Li 2, Zehuan Yuan3, Jiashi Feng1 1National University of Singapore, 2Institute of Computing Technology, CAS, 3ByteDance AI Lab kang@u.nus.edu,liyu@ict.ac.cn,yuanzehuan@bytedance.com,elefjia@nus.edu.sg
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Existing self-supervised learning (SSL) methods are mostly applied for training representation models from artificially balanced datasets (e.g. ImageNet). It is unclear how well they will perform in the practical scenarios where datasets are often imbalanced w.r.t. the classes. Motivated by this question, we conduct a series of studies on the performance of self-supervised contrastive learning and supervised learning methods over multiple datasets where training instance distributions vary from a balanced one to a long-tailed one. Our findings are quite intriguing. Different from supervised methods with large performance drop, the self-supervised contrastive learning methods perform stably well even when the datasets are heavily imbalanced. This motivates us to explore the balanced feature spaces learned by contrastive learning, where the feature representations present similar linear separability w.r.t. all the classes. Our further experiments reveal that a representation model generating a balanced feature space can generalize better than that yielding an imbalanced one across multiple settings. Inspired by these insights, we develop a novel representation learning method, called $k$ -positive contrastive learning. It effectively combines strengths of the supervised method and the contrastive learning method to learn representations that are both discriminative and balanced. Extensive experiments demonstrate its superiority on multiple recognition tasks, including both long-tailed ones and normal balanced ones. Code is available at https://github.com/bingykang/BalFeat.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Self-supervised learning (SSL) has been popularly explored as it can learn data representations without requiring manual annotations and offer attractive potential of leveraging the vast amount of unlabeled data in the wild to obtain strong representation models (Gidaris et al., 2018; Noroozi & Favaro, 2016; He et al., 2020; Chen et al., 2020a; Wu et al., 2018). For instance, some recent SSL methods (Henaff et al. ´ , 2019; Oord et al., 2018; Hjelm et al., 2018; He et al., 2020) use the unsupervised contrastive loss (Hadsell et al., 2006) to train the representation models by maximizing the instance discriminativeness, which are shown to generalize well across various downstream tasks, and even surpass the supervised learning counterparts in some cases (He et al., 2020; Chen et al., 2020a).
|
| 12 |
+
|
| 13 |
+
Despite the great success, existing SSL methods focus on learning data representations from the artificially balanced datasets (e.g. ImageNet (Deng et al., 2009)) where all the classes have similar numbers of training instances. However in reality, since the classes in natural images follow the Zipfian distribution, the datasets are usually imbalanced and show a long-tailed distribution (Zipf, 1999; Spain & Perona, 2007), i.e., some classes involving significantly fewer training instances than others. Such imbalanced datasets are very challenging for supervised learning methods to model, leading to noticeable performance drop (Wang et al., 2017; Mahajan et al., 2018; Zhong et al., 2019). Thus several interesting questions arise: How well will SSL methods perform on imbalanced datasets? Will the quality of their learned representations deteriorate as the supervised learning methods? Or can they perform stably well? Answering these questions is important for understanding the behavior of SSL in practice. But these questions remain open as no research investigations have been conducted along this direction so far.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Feature spaces learned with different losses given an imbalanced dataset. The supervised crossentropy (CE) learns a space biased to the dominant class. The space learned by unsupervised contrastive loss is balanced but less semantically discriminative. Our proposed $k$ -positive contrastive loss learns a balanced and discriminative feature space. The shadow area ( ) indicates the decision boundary of each class.
|
| 17 |
+
|
| 18 |
+
Our work is motivated by the above questions to study the properties of data representations learned with supervised/self-supervised methods in a practical scenario. We start with two representative losses used by these methods, i.e., the supervised cross-entropy and the unsupervised contrastive losses (Hadsell et al., 2006; Oord et al., 2018), and investigate the classification performance of their trained representation models from multiple training datasets where the instance distribution gradually varies from a balanced one to a long-tailed one. We surprisingly observe that, different from the ones learned from supervised cross-entropy loss where performance drops quickly, the representation models learned from the unsupervised contrastive loss perform stably well, no matter how much the training instance distribution is skewed to be imbalanced. Such a stark difference between the two representation learning methods drives us to explore why SSL performs so stably. We find that using the contrastive loss can obtain representation models generating a balanced feature space that has similar separability (and classification performance) for all the classes, as illustrated in Figure 1.
|
| 19 |
+
|
| 20 |
+
Such a balanced property of the feature spaces from SSL is intriguing and provides a new perspective to understand the behavior of SSL methods. We dig deeper into its benefits via a systematic study. In particular, since a pre-trained representation model is often used as initialization for downstream tasks (He et al., 2020; Newell & Deng, 2020; Henaff et al. ´ , 2019), we evaluate and compare the generalization ability of the models that produce feature spaces of different balanced levels (or ‘balancedness’). We find that a more balanced model tends to generalize better across a variety of settings, including the out-of-distribution recognition as well as the cross-domain and cross-task applications. These studies imply that feature space balancedness is an important but often neglected factor for learning high-quality representations.
|
| 21 |
+
|
| 22 |
+
Inspired by the above insights, we propose a new representation learning method, the $k$ -positive constrastive learning, which inherits the strength of constrastive learning in learning balanced feature spaces and meanwhile improves the feature spaces’ discriminative capability. Specifically, different from the contrastive learning methods lacking semantic discriminativeness, the proposed $k$ -positive constrastive method leverages the available instance semantic labels by taking $k$ instances of the same label with the anchor instance to embed semantics into the contrastive loss. As such, it can learn representations with desirable balancedness and discriminativeness (Figure 1). Extensive experiments and analyses clearly demonstrate its superiority over the supervised learning and latest contrastive learning methods (He et al., 2020) for various recognition tasks, including visual recognition in both long-tailed setting (e.g., ImageNet-LT, iNaturalist) and balanced setting.
|
| 23 |
+
|
| 24 |
+
This work makes the following important observations and contributions. (1) We present the first systematic studies on the performance of self-supervised contrastive learning on imbalanced datasets which are helpful to understanding the merits and limitations of SSL in practice. (2) Our studies reveal an intriguing property of the model trained by contrastive learning—the model can robustly learn balanced feature spaces—that has never been discussed before. (3) Our empirical analysis demonstrates that learning balanced feature spaces benefits the generalization of representation models and offer a new perspective for understanding deep model generalizability. (4) We develop a new method to explicitly pursue balanced feature spaces for representation learning and it outperforms the popular cross-entropy and contrastive losses based methods. We believe our findings and the novel $k$ -positive contrastive method are inspiring for future research on representation learning.
|
| 25 |
+
|
| 26 |
+
# 2 RELATED WORKS
|
| 27 |
+
|
| 28 |
+
Self-supervised learning is a form of unsupervised learning. Recently there has been a surge of self-supervised data representation learning methods developed to alleviate the demand for manual annotations by mining free supervision information through specifically designed loss functions and pretext tasks. The contrastive loss measures the similarities of sample pairs in a feature space and is at the core of several recent SSL methods (Chen et al., 2020a;b; He et al., 2020; Chen et al., 2020c). Adversarial losses that measure the distribution difference are also exploited for self-supervised representation learning (Donahue et al., 2016; Doersch & Zisserman, 2017). A wide range of pretext tasks have been developed including image inpainting (Jenni & Favaro, 2018; Pathak et al., 2016), image colorization (Larsson et al., 2016; 2017), context prediction (Doersch et al., 2015), jigsaw puzzles (Carlucci et al., 2019; Noroozi & Favaro, 2016; Wei et al., 2019), rotation prediction (Gidaris et al., 2018). Though very successful, the behavior of SSL largely remains a mystery. Recently Wang & Isola (2020) analyze contrastive learning from the perspective of uniformity and alignment of learned representations. However investigations on the behavior of contrastive learning on imbalanced datasets are still absent. We present the first study on this problem and our investigation methodology is also applicable to other SSL methods.
|
| 29 |
+
|
| 30 |
+
In practice, the visual data usually follow a long-tailed distribution (Zipf, 1999; Spain & Perona, 2007), challenging supervised learning methods. Due to the imbalance in the number of training instances for different classes, conventional methods tend to perform much more poorly on instancerare classes than on instance-rich ones. To alleviate this performance bias, existing approaches either re-balance the data distribution through sampling (Chawla et al., 2002; Han et al., 2005; Shen et al., 2016; Mahajan et al., 2018) or the loss for each class (Cui et al., 2019; Khan et al., 2017; Cao et al., 2019; Khan et al., 2019) by reweighting. Kang et al. (2020) first propose to decouple representation learning from classifier learning to boost performance, and demonstrate that learning good feature spaces is crucial for long-tailed recognition. Along this direction, SSP (Yang & Xu, 2020) is among the first methods that introduce SSL pretraining into learning the long-tailed recognition models. More specifically, instead of directly training a randomly initialized model from scratch as conventional supervised learning methods, SSP uses a model pretrained with SSL on the same dataset for initialization, which is observed to be able to to alleviate the label bias issue in imbalanced datasets and boost long-tailed recognition performance.
|
| 31 |
+
|
| 32 |
+
In contrast, we conduct a series of systematic studies to directly compare SSL with supervised learning on representation learning. We show that SSL can learn stably well feature spaces robust to the underlying distribution of a dataset. Moreover, inspired by our findings on the benefits of a balanced feature space for generalization, we introduce the $k$ -positive contrastive learning method to explicitly pursue balancedness and discriminativeness for representation learning, which has been shown through experiments to benefit not only long-tailed recognition but also normal recognition tasks.
|
| 33 |
+
|
| 34 |
+
# 3 BALANCED FEATURE SPACES FROM CONTRASTIVE LEARNING
|
| 35 |
+
|
| 36 |
+
In this section, we systematically study the performance of representation models trained by SSL from a collection of training datasets with varying instance number distributions, in contrast with the models learned by supervised learning methods, to explore how SSL performs when the training datasets are not artificially balanced. Furthermore, we investigate the generalization performance of these learned representation models under multiple settings, in order to explore the relationship between the representation model’s generalizability and the property of its learned feature space.
|
| 37 |
+
|
| 38 |
+
Notations We define the notations used in this paper. Representation learning aims to obtain a representation model $f _ { \theta }$ that maps a sample $x _ { i }$ into a feature space $V$ such that its corresponding representation $v _ { i } \in V$ encapsulates desired features for target applications. Let ${ \mathcal { D } } _ { \mathrm { r e p - t r a i n } } = { \bar { \{ } x _ { i } , y _ { i } \} } { \bar { } }$ , $i = 1 , \ldots , N$ be the dataset for training the representation model, where $y _ { i }$ is the class label for sample $x _ { i }$ . Let $C$ denote the number of total classes and $n _ { j }$ denote the number of instances within class $j$ . We use $\{ q _ { 1 } , \dots , q _ { C } \}$ with $q _ { j } = n _ { j } / N$ to denote the discrete instance distribution over the $C$ classes. An imbalanced dataset has significant difference in the class instance numbers, e.g., $q _ { 1 } \gg q _ { C }$ . We use a multi-layer convolutional neural network $f _ { \theta } ( \cdot ) ~ : ~ x _ { i } \mapsto v _ { i }$ to implement the representation model. The final classification prediction $\hat { y }$ is given by a linear classifier $\hat { y } =$ arg max $[ W ^ { \top } { \boldsymbol { v } } + b ]$ , where $W$ denotes the classifier weight matrix and $b$ denotes the bias term.
|
| 39 |
+
|
| 40 |
+
# 3.1 METHODOLOGY OF OUR STUDY
|
| 41 |
+
|
| 42 |
+
Representation learning methods Various loss functions have been developed for learning the representation model $f _ { \theta }$ on the training dataset. Among them, the most popular one is the supervised cross-entropy (CE) loss:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\mathcal { L } _ { \mathrm { C E } } = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } - \log p _ { y _ { i } } ,
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
where $p _ { y _ { i } } = \mathrm { s o f t m a x } ( W _ { y _ { i } } ^ { \top } v _ { i } + b )$ is the normalized probability prediction of sample $i$ belonging to its ground truth class $y _ { i }$ . Using the semantic labels directly as supervision signal $y _ { i }$ in Equation 1), the representation model trained by the CE loss can have strong semantic discrimination ability but its generated feature space is easily biased by the imbalance of the training instance distribution—if some classes have significantly more training instances than the others, their data representations will occupy dominant portion of the feature space (Figure 1) and get higher classification accuracy than the instance-rare classes (Kang et al., 2020; Wang et al., 2017).
|
| 49 |
+
|
| 50 |
+
Different from the supervised learning ones, self-supervised learning methods adopt semantic-free loss functions to learn representations from unlabeled data (He et al., 2020; Gidaris et al., 2018). For example, the contrastive loss1 (CL) (Oord et al., 2018) learns representations via maximizing the instance-wise discriminativeness:
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\mathcal { L } _ { \mathrm { C L } } = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } - \log \frac { \exp ( v _ { i } \cdot v _ { i } ^ { + } / \tau ) } { \exp ( v _ { i } \cdot v _ { i } ^ { + } / \tau ) + \sum _ { v _ { i } ^ { - } \in V ^ { - } } \exp ( v _ { i } \cdot v _ { i } ^ { - } / \tau ) } ,
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
where $\tau$ is a temperature hyper-parameter, $v _ { i } ^ { + }$ is a positive sample for the anchor instance $i$ (typically produced by data augmentation), $v _ { i } ^ { - } \in V ^ { - }$ is the negative sample randomly drawn from the training samples excluding instance $i$ . This contrastive loss encourages the feature representations from positive pairs to be similar, while pushing features from the sampled negative pairs apart.
|
| 57 |
+
|
| 58 |
+
We take the two loss functions $\mathcal { L } _ { \mathrm { C E } }$ and ${ \mathcal { L } } _ { \mathrm { C L } }$ ) as representatives to study how the representation models (and the corresponding feature spaces) trained with supervised/self-supervised methods are affected by the training instance distribution $\{ q _ { 1 } , \dots , q _ { C } \}$ .
|
| 59 |
+
|
| 60 |
+
Balancedness of feature spaces Since semantic labels are not involved in the contrastive loss (Equation 2), we hypothesize it may lead to representation models yielding feature spaces that are less biased by the imbalance of the training dataset, compared with the ones from the supervised loss (Equation 1). To verify this, we introduce a metric to characterize such an “unbiased” or “balanced” property of a feature space at first. A feature space $V$ is balanced if the representations $\{ v _ { i } \}$ from different classes within it have similar degrees of linear separability. As the linear separability degree of the representations is usually evaluated by the accuracy of a linear classifier over them (Vapnik, 2013), we follow this criterion to develop the balancedness metric. Specifically, let $a _ { 1 } , \dots , a _ { C }$ denote the classification accuracy of a linear classifier $( W , b )$ over the representations $\{ v _ { i } \} \subset V$ from $C$ classes. We take the following uniformity of these accuracies as the balancedness of the feature space $V$ :
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\beta ( V ) \triangleq \frac { 1 } { C ^ { 2 } } \sum _ { i , j } ^ { C } \exp \left( - \frac { | a _ { i } - a _ { j } | ^ { 2 } } { \sigma } \right) , \mathrm { ~ w h e r e ~ } a _ { j } = \frac { \# \{ v _ { i } | \hat { y } _ { i } = j , y _ { i } = j , v _ { i } \in V \} } { \# \{ v _ { i } | y _ { i } = j , v _ { i } \in V \} } .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
Here $\sigma$ is a fixed scaling parameter. This metric achieves its maximum when all the class-wise accuracies are equal, i.e., there being no separability bias of the learned representations to any class. Note that this metric is developed to provide a quantitative measure of the balancedness of a feature space, but it has certain limitations such as it can be easily hacked. We leave developing more rigorous metric that can better characterize balanced feature spaces as future work.
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 2: Classification accuracy (left) and balancedness (right) of the representations learned from cross-entropy (CE) loss and contrastive loss (CL) on datasets (LT0 to LT) with increasing imbalance.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 3: Out-of-distribution generalization on ImageNet. Top 1 and Top 5 testing accuracy of the model are learned from datasets LT0 to LT that are increasingly more imbalanced.
|
| 73 |
+
|
| 74 |
+
Experimental protocol We adopt a multi-stage protocol for learning and evaluating the feature spaces. (1) Representation learning: pre-train the representation model $f _ { \theta }$ on the provided training set ${ \mathcal { D } } _ { \mathrm { r e p - t r a i n } }$ using the above training losses $\mathcal { L } _ { \mathrm { C E } }$ and ${ \mathcal { L } } _ { \mathrm { C L } }$ ; (2) Classifier learning: train a linear classifier $( W , b )$ on top of $f _ { \theta }$ with $\theta$ fixed using another training dataset $\mathcal { D } _ { \mathrm { t r a i n } } { } ^ { 2 }$ and the supervised CE loss; (3) Representation evaluation: evaluate the classification accuracy of the learned classifier on the test dataset $\mathcal { D } _ { \mathrm { t e s t } }$ with the representations from $f _ { \theta }$ and compute the above balancedness $\beta ( V )$ .
|
| 75 |
+
|
| 76 |
+
To thoroughly investigate sensitiveness of different representation learning methods to the imbalance level of training datasets, we construct six datasets from the long-tailed benchmark ImageNetLT (Liu et al., 2019) $( \mathcal { D } _ { \mathrm { L T } } )$ by varying its instance distribution $\{ q _ { 1 } , \dots , q _ { C } \}$ from a long-tailed one to a uniform one gradually, while keeping the total instance number similar. The generated datasets, denoted as $\mathcal { D } _ { \mathrm { L T 0 } } , \dots , \mathcal { D } _ { \mathrm { L T 8 } } , \mathcal { D } _ { \mathrm { L T } }$ (which are increasingly more imbalanced), are used as $\mathscr { D } _ { \mathrm { r e p - t r a i n } }$ for representation learning in the following experiments. See appendix for their details.
|
| 77 |
+
|
| 78 |
+
# 3.2 CONTRASTIVE LOSS HELPS LEARN BALANCED FEATURE SPACES
|
| 79 |
+
|
| 80 |
+
We first investigate classification performance of the representation models trained with the CE and CL losses on the above six datasets $\mathcal { D } _ { \mathrm { L T 0 } } , \dots , \mathcal { D } _ { \mathrm { L T 8 } } , \mathcal { D } _ { \mathrm { L T } }$ that are increasingly more imbalanced. Since linear classifiers are easily biased by skewed training dataset distribution (Kang et al., 2020), it is necessary to eliminate the imblancedness of the evaluation datasets for reliable representation evaluation. Thus, we use the (balanced) training and test sets of ImageNet as $\mathcal { D } _ { \mathrm { t r a i n } }$ and $\mathcal { D } _ { \mathrm { t e s t } }$ to learn classifiers and evaluate their classification accuracy, following the above protocol.
|
| 81 |
+
|
| 82 |
+
The results are summarized in Figure 2, from which we make an important observation: compared with the supervised cross-entropy loss, the model trained with the unsupervised contrastive loss generates a more balanced feature space, even in presence of highly imbalanced training instance distribution. As shown in Figure 2 (left), the classification accuracy of representation models learned with the CE loss drops quickly when the dataset becomes more imbalanced—the quality of representations from these models is very sensitive to the imbalance of training datasets. In contrast, the classification accuracy of CL-trained models remains stable even when the training dataset transits to a heavily long-tailed one. Such surprising performance robustness to imbalance of the training datasets implies that using contrastive learning can consistently learn balanced feature spaces. To see this, we also visualize the balancedness scores (Equation 3) of the learned feature spaces from CE and CL in Figure 2 (right). Even when the training set is heavily long-tailed, the feature spaces learned with CL loss are as highly balanced as the ones learned from a uniform training distribution, while the blancedness score of the feature spaces from CE loss is lower and drops quickly. Such a balanced feature space offered by CL loss is much desired for the representation learning in practice, where the training instance distribution is usually long-tailed. Certainly, using an unsupervised loss will sacrifice semantic discriminativeness of the representations, leading to the accuracy gap between the CE and CL-trained models.
|
| 83 |
+
|
| 84 |
+
# 3.3 MORE BALANCED REPRESENTATION MODELS GENERALIZE BETTER
|
| 85 |
+
|
| 86 |
+
The above studies reveal that the representation models trained with the contrastive loss can produce more balanced feature spaces. A natural question is what are the benefits from a balanced model for recognition? Since a pre-trained representation model is often used to facilitate downstream tasks (He et al., 2020; Newell & Deng, 2020; Henaff et al. ´ , 2019), we here conduct extensive experiments to study its potential benefits on model generalization performance under the following settings.
|
| 87 |
+
|
| 88 |
+
Table 1: Results on Places365, VOC and COCO. $\mathrm { A P } _ { 5 0 }$ is the default metric for VOC, while $\mathsf { A P } ^ { \mathrm { b b } }$ and $\mathbf { A P } ^ { \mathrm { m k } }$ denote the bounding-box and mask AP for COCO respectively. Black / gray numbers correspond to results of the representation models trained on ImageNet-LT / ImageNet respectively. See appendix for complete results.
|
| 89 |
+
|
| 90 |
+
<table><tr><td></td><td>cross-domain</td><td colspan="3">cross-task</td></tr><tr><td></td><td>Places365 (Top1)</td><td>VOC (AP50)</td><td>COCO (APbb)</td><td>COCO (APmk)</td></tr><tr><td>CE</td><td>38.50 /46.06</td><td>76.45 / 81.26</td><td>38.13 /40.08</td><td>33.29 /34.85</td></tr><tr><td>CL</td><td>41.24 /46.16</td><td>78.19 /82.28</td><td>39.67 /40.41</td><td>34.73 /35.14</td></tr><tr><td>△CL.CE</td><td>+2.74 / +0.10</td><td>+1.64 / +0.02</td><td>+1.54 / +0.33</td><td>+1.44 / +0.29</td></tr></table>
|
| 91 |
+
|
| 92 |
+
Out-of-distribution generalization We first study the relationship between the balancedness of representation models and their generalizability for recognizing new classes. To thoroughly evaluate performance of representation models with different balancedness, we evenly divide the 1,000 classes into two splits (500 vs. 500 classes) on ImageNet, referred to as the source and target split respectively. We use the subsets (corresponding to the source class split) of the above $\mathcal { D } _ { \mathrm { L T 0 } } , \dots , \mathcal { D } _ { \mathrm { L T 8 } } , \mathcal { D } _ { \mathrm { L T } }$ datasets to construct six different $\mathscr { D } _ { \mathrm { r e p - t r a i n } }$ for training the representation model $f _ { \theta }$ . To obtain models with different balancedness, we use the CE loss for training, since the above studies reveal using the CL loss will always produce models with similar balancedness (Figure 2). We use the subsets (corresponding to the target class split) of the training and test sets of ImageNet as $\mathcal { D } _ { \mathrm { t r a i n } }$ and $\mathcal { D } _ { \mathrm { t e s t } }$ for classifier learning and evaluation, with the representation model fixed.
|
| 93 |
+
|
| 94 |
+
The testing performance of the models with different balancedness on the target classes is presented in Figure 3. It is observed that as the source dataset becomes increasingly more imbalanced (from $\mathcal { D } _ { \mathrm { { L T 0 } } }$ to $\mathcal { D } _ { \mathrm { { L T } } } ,$ ) and the corresponding models become more imbalanced, their generalization performance degrades correspondingly. Such a positive correlation between balancedness of the models and testing accuracy on the target classes clearly demonstrate that more balanced representation models tend to generalize better for recognizing unseen classes. More details and results about the out-of-distribution generalization studies are deferred to the appendix.
|
| 95 |
+
|
| 96 |
+
Cross-domain and cross-task generalization We then explore whether learning balanced representation models is able to benefit model’s generalizability to new domains and tasks. We use the ImageNet-LT as $\mathscr { D } _ { \mathrm { r e p - t r a i n } }$ to train the models with the CE and CL losses, obtaining imbalanced and balanced representation models respectively. For the cross-domain setting, we train a linear classifier on the Places365 dataset (Zhou et al., 2017) with the representation model fixed. From the results in Table 1, it can be clearly observed that the balanced representation model (from CL) surpasses the less balanced one (from CE) significantly, in terms of the top-1 accuracy (by $2 . 7 4 \%$ ). For the crosstask setting, we take train/test splits of the PASCAL VOC (Everingham et al., 2010) and COCO (Lin et al., 2014) datasets as $\mathcal { D } _ { \mathrm { t r a i n } } / \mathcal { D } _ { \mathrm { t e s t } }$ for evaluating detection performance. The results are given in Table 1. Again, the balanced model (from the CL loss) outperforms the less balanced one (from the CE loss) significantly (up to $1 . 6 4 \%$ ). In comparison, the improvement from the CL-trained model over the CE-trained model is moderate (around $0 . 3 \%$ ) when using the full ImageNet for training, as CE can learn a relatively balanced feature space from a balanced dataset. This clearly shows that the generalization performance boost for the cross-domain and cross-task settings brought from CL-trained models does not simply stem from using self-supervised pre-training, but indeed come from learning more balanced feature spaces.
|
| 97 |
+
|
| 98 |
+
# 4 LEARNING BALANCED FEATURE SPACES FOR RECOGNITION
|
| 99 |
+
|
| 100 |
+
The above studies demonstrate the representation models trained with the contrastive loss can generate balanced feature spaces showing strong generalizability. Here we explore how to effectively leverage these findings in practice. We introduce a new method that inherits the strength of the contrastive loss in learning balanced feature spaces and enhances the feature spaces’ semantic discrimination capability simultaneously. We thoroughly study its superiority via two application cases, i.e., the long-tailed recognition and pre-training representation models for downstream tasks.
|
| 101 |
+
|
| 102 |
+
# 4.1 K-POSITIVE CONSTRASTIVE LOSS
|
| 103 |
+
|
| 104 |
+
Though balanced, the feature spaces from contrastive learning have limited capability of semantic discrimination, as shown in Figure 2 (left). This is because the contrastive loss blindly encourages instance-level discrimiantiveness. Every two instances, even if they are from the same class, are forced to be apart from each other in the learned feature space. To embed semantic discriminativeness into the representations while maintaining desired balancedness, we develop a new method to leverage the provided semantic labels to adaptively compute the instance contrastive loss.
|
| 105 |
+
|
| 106 |
+
Concretely, given an anchor training instance $x _ { i }$ with its semantic label $y _ { i }$ , our proposed method draws $k$ instances from the same class to form the positive sample set $V _ { i , k } ^ { + }$ , instead of only using its augmentation as in Equation 2. Thus, it gives a new loss called $k$ -positive contrastive loss (KCL):
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathcal { L } _ { \mathrm { K C L } } = \frac { 1 } { N ( k + 1 ) } \sum _ { i = 1 } ^ { N } \sum _ { \substack { v _ { i } ^ { + } \in \{ \tilde { v } _ { i } \} \cup V _ { i , k } ^ { + } } } - \log \frac { \exp ( v _ { i } \cdot v _ { j } ^ { + } / \tau ) } { \exp ( v _ { i } \cdot \tilde { v } _ { i } / \tau ) + \sum _ { v _ { j } \in V _ { i } } \exp ( v _ { i } \cdot v _ { j } / \tau ) } ,
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\tilde { v } _ { i }$ is generated by augmenting $v _ { i }$ , $V _ { i }$ is the current batch of examples excluding $v _ { i }$ , and $V _ { i , k } ^ { + } \subset V _ { i }$ is a positive set containing $k$ instances randomly drawn from the same class as $v _ { i }$ . The proposed KCL loss purposely keeps the number of positive instances equal, which is crucial for balancing the learned feature spaces. It brings two benefits. First, it helps learn representations with stronger discriminative ability as it leverages the label information as supervised learning. Secondly, it uses the same number of instances $( i . e . , k )$ for all the classes in positive pair construction which further balances the learned feature space. Note our proposed KCL is different from the supervised contrastive learning (Khosla et al., 2020) that leverages all the instances from the same class to construct the positive pairs, which cannot avoid the dominance of instance-rich classes in the representation learning. This is also evidenced by our following experiments on long-tailed recognition. In the following experiments, we choose $k = 6$ via validation and use ResNet50 as the backbone. Other hyper-parameter choices and implementation details are given in the appendix.
|
| 113 |
+
|
| 114 |
+
# 4.2 LONG-TAILED RECOGNITION
|
| 115 |
+
|
| 116 |
+
KCL provides feature spaces with desirable balancedness and semantic discriminativeness, which makes it naturally fit for addressing the challenges of long-tailed recognition, i.e., severe performance bias to the instance-rich classes and poor generalization to the instance-rare classes (Mahajan et al., 2018; Zhong et al., 2019). Here we implement and evaluate KCL for long-tailed recognition, following the two-stage training strategy from Kang et al. (2020): 1) train the representation model with the KCL loss; 2) learn a linear classifier with cross-entropy loss and class-balanced sampling.
|
| 117 |
+
|
| 118 |
+
Baselines Besides well established state-of-the-arts, we consider following three kinds of baselines for justifying the advantages of KCL. (1) Classifier balancing methods, i.e., $\tau { \cdot }$ -norm and cRT (Kang et al., 2020), that re-train classifiers with class-balanced sampling as KCL but learn the representation models by supervised cross-entropy loss. Comparison with them helps understand the effectiveness of learning balanced features in long-tailed recognition. (2) Methods that train the representation model and classifier jointly with cross-entropy loss (SL) and various data re-sampling strategies, including instance-balanced (SL-i), class-balanced (SL-c), progressively-balanced (SL-p) and square-root re-sampling (SL-s) (Kang et al., 2020). Comparison with them will show advantages of KCL over these data-enriching strategies in feature space balancing. (3) A full-positive variant of $K C L$ , named full-positive contrastive learning (FCL), that uses all the available same-class samples in the current batch to construct positive pairs for computing the contrastive loss, which is similar to the supervised contrastive learning (Khosla et al., 2020). Comparing KCL with FCL will show the benefits of keeping the number of positive samples equal for all the anchor instances in KCL.
|
| 119 |
+
|
| 120 |
+
Results We evaluate KCL and compare it with the above strong baselines on two large-scale benchmark datasets, ImageNet-LT (Liu et al., 2019) and iNaturalist 2018 (iNatrualist, 2018). For comprehensive evaluation, following (Liu et al., 2019), we split the classes of ImageNet-LT into many-shot $\mathord { \left. \begin{array} { r l } \end{array} \right. } > 1 0 0$ images), medium-shot $2 0 \mathrm { \sim } 1 0 0$ images) and few-shot ${ < } 2 0$ images) groups. The results are summarized in Tables 2 and 3 respectively, along with the balancedness of these methods on ImageNet-LT in Figure 4. We make the following observations.
|
| 121 |
+
|
| 122 |
+
More balanced feature spaces give better performance. We first compare KCL with cRT and $\tau$ norm, the latest state-of-the-arts with feature spaces learned by supervised cross-entropy loss and
|
| 123 |
+
|
| 124 |
+
Table 2: ImageNet-LT results
|
| 125 |
+
|
| 126 |
+
<table><tr><td>Method</td><td>Many</td><td>Medium</td><td>Few</td><td>All</td></tr><tr><td>OLTR (Liu et al., 2019)a</td><td>35.8</td><td>32.3</td><td>21.5</td><td>32.2</td></tr><tr><td>Joint (SL-i) (Kang et al., 2020)</td><td>64.9</td><td>35.2</td><td>6.8</td><td>42.5</td></tr><tr><td>T-norm (Kang et al.,2020)</td><td>56.6</td><td>44.2</td><td>27.4</td><td>46.7</td></tr><tr><td>cRT (Kang et al.,2020)</td><td>58.8</td><td>44.0</td><td>26.1</td><td>47.3</td></tr><tr><td>FCL</td><td>61.4</td><td>47.0</td><td>28.2</td><td>49.8</td></tr><tr><td>KCL</td><td>61.8</td><td>49.4</td><td>30.9</td><td>51.5</td></tr></table>
|
| 127 |
+
|
| 128 |
+
aReproduced by re-running their code with ResNet50.
|
| 129 |
+
|
| 130 |
+
Table 3: iNaturalist 2018 results
|
| 131 |
+
|
| 132 |
+
<table><tr><td>Method</td><td>Top1</td></tr><tr><td>CB-Focal (Cui et al.,2019)</td><td>61.1</td></tr><tr><td>LDAM (Cao et al., 2019) LDAM+DRW (Cao et al., 2019)</td><td>64.6</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>68.0</td></tr><tr><td>T-norm 1 (Kang et al.,2020)</td><td>65.2</td></tr><tr><td>BBN (Zhou et al., 2020)</td><td>65.6 66.3</td></tr><tr><td>FCL</td><td>66.4</td></tr><tr><td>KCL</td><td>68.6</td></tr></table>
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 4: Comparison of different methods on their feature space balancedness (left) and class-wise accuracy (right). Here the linear classifier is fine-tuned on the full ImageNet for representation evaluation (see Sec. 3.2).
|
| 136 |
+
|
| 137 |
+
thus less balanced as demonstrated in Sec. 3. Compared with them, KCL improves the overall accuracy by a large margin $4 . 2 \%$ on ImageNet-LT and $3 \%$ on iNaturalist), demonstrating the importance of learning more balanced feature spaces for long-tailed recognition.
|
| 138 |
+
|
| 139 |
+
KCL is more effective at learning balanced and discriminative feature spaces. Data re-sampling is widely used as a straightforward approach to alleviate performance bias for long-tailed recognition (Kang et al., 2020). We compare the feature space balancedness of KCL and SL methods with different data re-sampling strategies on ImageNet-LT in Figure 4. Clearly, data re-sampling cannot effectively improve balancedness of the feature space as KCL. Besides data re-sampling, Figure 4 also shows the balancedness of the feature spaces learned by the latest contrastive learning method MoCo (He et al., 2020) on ImageNet-LT. MoCo can balance the feature space but has lower accuracy, due to the lack of semantic discriminativeness in the learned feature space. KCL performs the best, demonstrating its effectiveness at learning both balanced and discriminative feature spaces.
|
| 140 |
+
|
| 141 |
+
Equalizing the number of positive instances in KCL is important. To further justify the design of KCL loss in keeping the number of positive instances to be equal, we compare it with its variant FCL. From Tables 2, 3 and Figure 4, though FCL outperforms other baselines, its performance is inferior to KCL, in terms of both the overall accuracy and the balancedness of the learned feature spaces. Equalizing the number of positive instances as KCL is crucial for learning balanced feature spaces and improving recognition performance.
|
| 142 |
+
|
| 143 |
+
# 4.3 PRE-TRAINING REPRESENTATION MODELS FOR DOWNSTREAM TASKS
|
| 144 |
+
|
| 145 |
+
The effectiveness of KCL is not limited to the cases where training datasets are imbalanced. In this section, we study KCL as a general representation learning method, i.e., we apply KCL for pretraining a representation model on balanced datasets which is later fine-tuned for downstream tasks, including the out-of-distribution (OOD) recognition and detection.
|
| 146 |
+
|
| 147 |
+
Out-of-distribution Generalization Similar to Sec.3.3, we evenly divide the 1000 classes in ImageNet into two splits, use one split to learning representation backbone and the thoer one to learn a linear classifier with the backbone fixed. We adopt two different splitting strategies. Split-overlap (split with semantic overlap) allows the classes within the two splits to share the same super class (e.g., dog and wolf from canidae are put into different splits) in the ImageNet ontology. As such, though the target classes are all novel to the representation model, some of their attributes have been seen by the model before from the source classes. In contrast, Split-independent (split without semantic overlap) strictly avoids classes from the same super classes to be distributed into different splits. Split-independent presents a more challenging case for model’s generalization ability as all the target classes (and attributes) to recognize are novel.
|
| 148 |
+
|
| 149 |
+
Table 4: OOD generalization results (top-1 accuracy) on balanced datasets. We use the source classes of origninal ImageNet to learn representation network (ResNet50), and use the target classes and all classes respectively to learn linear classifiers for evaluation.
|
| 150 |
+
|
| 151 |
+
<table><tr><td></td><td colspan="3">Split-overlap</td><td colspan="3">Split-independent</td></tr><tr><td></td><td>source</td><td>target</td><td>all</td><td>source</td><td>target</td><td>all</td></tr><tr><td>CE</td><td>81.2</td><td>70.7</td><td>67.2</td><td>82.8</td><td>50.3</td><td>62.4</td></tr><tr><td>CL</td><td>67.0</td><td>60.1</td><td>58.3</td><td>68.2</td><td>54.8</td><td>58.2</td></tr><tr><td>KCL</td><td>81.4</td><td>74.8 (+4.1)</td><td>70.8 (+3.6)</td><td>83.2</td><td>58.1 (+3.3)</td><td>67.2 (+4.8)</td></tr></table>
|
| 152 |
+
|
| 153 |
+
The generalization performance comparsion of the representation models with different methods is given in Table 4. When the source classes and target classes share similar semantics (on splitoverlap), the CE-trained model surpasses the CL-trained model on both the source and target classes. But when looking into the generalization gap (i.e., the difference between the source and target accuracy), the CL-trained model suffers larger generalization gap than the CL-trained model (10.5 vs. 1.8). When there is not semantic overlap between source and target (on split-independent), the CL-model outperforms CE-model on the target classes by $4 . 3 \%$ with much smaller generalization gap (13.4 v.s. 32.5). By comparing the “full” performance from split-overlap to split-independent, one can observe that CL loss performs consistently well (58.3 and 58.2), but CE drops as large as $5 \%$ . This implies that CL is robust to imbalanced training distribution used for representation learning, while CE is extremely sensitive to it. These results clearly demonstrate the consistent superiority of balanced representation learning in terms of generalization for various training dataset distribution. Notably, our proposed KCL loss surpasses both CE and CL loss on all the four different settings by a large margin (more than 3 points). These results clearly demonstrate that KCL is able to learn a balanced and discriminative feature space, and balancedness is a general property that benefits both balanced and imbalanced datasets.
|
| 154 |
+
|
| 155 |
+
Table 5: Comparison of different representation learning methods for the downstream tasks.
|
| 156 |
+
|
| 157 |
+
<table><tr><td></td><td>repr</td><td>VOC (AP50)</td><td>COCO (APbb)</td><td>COCO (APmk)</td></tr><tr><td>SL</td><td>76.6</td><td>81.26</td><td>40.08</td><td>34.85</td></tr><tr><td>MoCo</td><td>60.6</td><td>81.28</td><td>40.41</td><td>35.15</td></tr><tr><td>KCL</td><td>76.8</td><td>82.32</td><td>40.79</td><td>35.45</td></tr></table>
|
| 158 |
+
|
| 159 |
+
Cross-domain and cross-task generalization In this part, we first pretrain a model on ImageNet then further finetune it for downstream object detaction tasks (including PASCAL VOC and COCO). Note we aim to study the generalizability of KCL as a representation learning method, rather than aiming at state-of-the-art performance. Hence we compare it with the vanilla supervised crossentropy loss (SL) and MoCo (which the KCL is built on) (He et al., 2020). The results are summarized in Table 5. We also evaluate the discrminativeness of the learned representations (the “repr” in the table) from their classification accuracy by learning a linear classifier on the pretraining datasets. Clearly, KCL outperforms SL and MoCo for both downstream tasks. This is because KCL learns more balanced feature spaces than SL with similar discriminativeness, and learns more discriminative features than MoCo. For more results, Please refer to the appendix .
|
| 160 |
+
|
| 161 |
+
# 5 CONCLUSIONS
|
| 162 |
+
|
| 163 |
+
This work piloted studies on performance of the self-supervised learning methods for imbalanced datasets, and made several intriguing findings. At the heart of these findings is the balanced feature space, which is identified to be an inherent property of the representations learned by the contrastive learning and bring stronger generalizability. It provides a new perspective for understanding the behavior of the contrastive learning. This work further developed a new representation learning method to leverage the benefits of balanced feature spaces. We believe the findings and method developed here are inspiring for the future research on representation learning. However, theoretical understandings on balanced feature spaces are not mature yet and worthy of future exploration.
|
| 164 |
+
|
| 165 |
+
# ACKNOWLEDGEMENT
|
| 166 |
+
|
| 167 |
+
We would like to express our deepest gratitude to Saining Xie for his comments and suggestions throughout this project and the writing of the paper, to Yu Sun for his insightful discussion at the begining of this project.
|
| 168 |
+
|
| 169 |
+
# REFERENCES
|
| 170 |
+
|
| 171 |
+
Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. In Advances in Neural Information Processing Systems, 2019.
|
| 172 |
+
|
| 173 |
+
Fabio M Carlucci, Antonio D’Innocente, Silvia Bucci, Barbara Caputo, and Tatiana Tommasi. Domain generalization by solving jigsaw puzzles. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2229–2238, 2019.
|
| 174 |
+
|
| 175 |
+
Nitesh V Chawla, Kevin W Bowyer, Lawrence O Hall, and W Philip Kegelmeyer. Smote: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16:321–357, 2002.
|
| 176 |
+
|
| 177 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a.
|
| 178 |
+
|
| 179 |
+
Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big selfsupervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020b.
|
| 180 |
+
|
| 181 |
+
Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020c.
|
| 182 |
+
|
| 183 |
+
Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9268–9277, 2019.
|
| 184 |
+
|
| 185 |
+
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, pp. 248–255. Ieee, 2009.
|
| 186 |
+
|
| 187 |
+
Carl Doersch and Andrew Zisserman. Multi-task self-supervised visual learning. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2051–2060, 2017.
|
| 188 |
+
|
| 189 |
+
Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE international conference on computer vision, pp. 1422–1430, 2015.
|
| 190 |
+
|
| 191 |
+
Jeff Donahue, Philipp Krahenb ¨ uhl, and Trevor Darrell. Adversarial feature learning. ¨ arXiv preprint arXiv:1605.09782, 2016.
|
| 192 |
+
|
| 193 |
+
Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. International journal of computer vision, 88(2): 303–338, 2010.
|
| 194 |
+
|
| 195 |
+
Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018.
|
| 196 |
+
|
| 197 |
+
Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006.
|
| 198 |
+
|
| 199 |
+
Hui Han, Wen-Yuan Wang, and Bing-Huan Mao. Borderline-smote: a new over-sampling method in imbalanced data sets learning. In International conference on intelligent computing, pp. 878–887. Springer, 2005.
|
| 200 |
+
|
| 201 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. In ´ Proceedings of the IEEE international conference on computer vision, pp. 2961–2969, 2017.
|
| 202 |
+
|
| 203 |
+
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9729–9738, 2020.
|
| 204 |
+
|
| 205 |
+
Olivier J Henaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, SM Eslami, and ´ Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv preprint arXiv:1905.09272, 2019.
|
| 206 |
+
|
| 207 |
+
R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. arXiv preprint arXiv:1808.06670, 2018.
|
| 208 |
+
|
| 209 |
+
iNatrualist. The inaturalist 2018 competition dataset. https://github.com/visipedia/inat comp/tree/master/2018, 2018.
|
| 210 |
+
|
| 211 |
+
Simon Jenni and Paolo Favaro. Self-supervised feature learning by learning to spot artifacts. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2733– 2742, 2018.
|
| 212 |
+
|
| 213 |
+
Bingyi Kang, Saining Xie, Marcus Rohrbach, Zhicheng Yan, Albert Gordo, Jiashi Feng, and Yannis Kalantidis. Decoupling representation and classifier for long-tailed recognition. In International Conference on Learning Representations, 2020.
|
| 214 |
+
|
| 215 |
+
Salman Khan, Munawar Hayat, Syed Waqas Zamir, Jianbing Shen, and Ling Shao. Striking the right balance with uncertainty. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019.
|
| 216 |
+
|
| 217 |
+
Salman H Khan, Munawar Hayat, Mohammed Bennamoun, Ferdous A Sohel, and Roberto Togneri. Cost-sensitive learning of deep feature representations from imbalanced data. IEEE transactions on neural networks and learning systems, 29(8):3573–3587, 2017.
|
| 218 |
+
|
| 219 |
+
Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. arXiv preprint arXiv:2004.11362, 2020.
|
| 220 |
+
|
| 221 |
+
Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In European conference on computer vision, pp. 577–593. Springer, 2016.
|
| 222 |
+
|
| 223 |
+
Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Colorization as a proxy task for visual understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6874–6883, 2017.
|
| 224 |
+
|
| 225 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ European conference on computer vision, pp. 740–755. Springer, 2014.
|
| 226 |
+
|
| 227 |
+
Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing Gong, and Stella X Yu. Large-scale long-tailed recognition in an open world. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2537–2546, 2019.
|
| 228 |
+
|
| 229 |
+
Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 181– 196, 2018.
|
| 230 |
+
|
| 231 |
+
Alejandro Newell and Jia Deng. How useful is self-supervised pretraining for visual tasks? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7345– 7354, 2020.
|
| 232 |
+
|
| 233 |
+
Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European Conference on Computer Vision, pp. 69–84. Springer, 2016.
|
| 234 |
+
|
| 235 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 236 |
+
|
| 237 |
+
Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2536–2544, 2016.
|
| 238 |
+
|
| 239 |
+
Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pp. 91–99, 2015.
|
| 240 |
+
|
| 241 |
+
Li Shen, Zhouchen Lin, and Qingming Huang. Relay backpropagation for effective learning of deep convolutional neural networks. In European conference on computer vision, pp. 467–482. Springer, 2016.
|
| 242 |
+
|
| 243 |
+
Merrielle Spain and Pietro Perona. Measuring and predicting importance of objects in our visual world. 2007.
|
| 244 |
+
|
| 245 |
+
Vladimir Vapnik. The nature of statistical learning theory. Springer science & business media, 2013.
|
| 246 |
+
|
| 247 |
+
Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. arXiv preprint arXiv:2005.10242, 2020.
|
| 248 |
+
|
| 249 |
+
Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Learning to model the tail. In Advances in Neural Information Processing Systems, pp. 7029–7039, 2017.
|
| 250 |
+
|
| 251 |
+
Chen Wei, Lingxi Xie, Xutong Ren, Yingda Xia, Chi Su, Jiaying Liu, Qi Tian, and Alan L Yuille. Iterative reorganization with weak spatial constraints: Solving arbitrary jigsaw puzzles for unsupervised representation learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1910–1919, 2019.
|
| 252 |
+
|
| 253 |
+
Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018.
|
| 254 |
+
|
| 255 |
+
Yuzhe Yang and Zhi Xu. Rethinking the value of labels for improving class-imbalanced learning. In Conference on Neural Information Processing Systems (NeurIPS), 2020.
|
| 256 |
+
|
| 257 |
+
Yaoyao Zhong, Weihong Deng, Mei Wang, Jiani Hu, Jianteng Peng, Xunqiang Tao, and Yaohai Huang. Unequal-training for deep face recognition with long-tailed noisy data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, June 2019.
|
| 258 |
+
|
| 259 |
+
Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6):1452–1464, 2017.
|
| 260 |
+
|
| 261 |
+
Boyan Zhou, Quan Cui, Xiu-Shen Wei, and Zhao-Min Chen. Bbn: Bilateral-branch network with cumulative learning for long-tailed visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9719–9728, 2020.
|
| 262 |
+
|
| 263 |
+
George Kingsley Zipf. The psycho-biology of language: An introduction to dynamic philology, volume 21. Psychology Press, 1999.
|
| 264 |
+
|
| 265 |
+
# A IMPLEMENTATION DETAILS
|
| 266 |
+
|
| 267 |
+
Representation Learning For supervised cross-entropy (CE) loss, we adopt the standard PyTorch distributed training implementation3. For unsupervised contrastive loss (CL), we use the official implementation4 of MoCo (He et al., 2020) with default hyper-parameters. Our $k$ -positive contrastive loss is implemented based on MoCo by randomly selecting $k$ positive examples from the key memory for each of the query example. When KCL is applied for a long-tailed dataset, there might be less than $k$ positive examples in the memory for some of the classes. In such cases, we use all the positive examples. Besides, we keep all the hyper-parameters (e.g., data augmentation, learning rate and batch size) the same as supervised learning. We only carefully tune the number of training epochs for KCL to make it achieve similar performance as supervised learning on a balanced dataset (full Imagenet) for fair comparison (see Table 6). As a result, throughout the paper our KCL is trained for 200 epochs while its supervised counterpart is trained for 90 epochs. This is reasonable as contrastive learning usually takes much longer to converge (He et al., 2020). We are using $k = 6$ for KCL throughout the paper, which is carefully tuned on the validation set of ImageNet-LT, as shown in Fig. 5. The detailed hyper-parameters of different loss functions are given in Table 7.
|
| 268 |
+
|
| 269 |
+
Table 6: Results on full ImageNet.
|
| 270 |
+
Accuracies on ImageNet-LT (val)
|
| 271 |
+
|
| 272 |
+
<table><tr><td></td><td>Top1</td><td>Top5</td></tr><tr><td>CE (90 epochs)</td><td>76.616</td><td>93.090</td></tr><tr><td>SCL (200 epochs)</td><td>76.976</td><td>92.972</td></tr><tr><td>KCL (200 epochs)</td><td>76.814</td><td>92.936</td></tr></table>
|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
Figure 5: Validation accuracies of KCL on ImageNet-LT as the value of $k$ varies.
|
| 276 |
+
|
| 277 |
+
Table 7: Hyper-parameters used by different loss functions. “default” means the standard data augmentation strategies used by supervised learning.
|
| 278 |
+
|
| 279 |
+
<table><tr><td>hps</td><td>CE</td><td>CL</td><td>KCL</td></tr><tr><td>epochs</td><td>90</td><td>200</td><td>200</td></tr><tr><td>batch size</td><td>256</td><td>256</td><td>256</td></tr><tr><td>learning rate</td><td>0.1</td><td>0.03</td><td>0.1</td></tr><tr><td>learning rate schedule</td><td>cosine</td><td>step</td><td>cosine</td></tr><tr><td>data augmentation</td><td>default</td><td>moco v1</td><td>default</td></tr><tr><td>memory size</td><td>1</td><td>65536</td><td>65536</td></tr><tr><td>encoder momentum</td><td>=</td><td>0.999</td><td>0.999</td></tr><tr><td>feature dimension</td><td></td><td>128</td><td>128</td></tr><tr><td>softmax temperature</td><td></td><td>0.07</td><td>0.07</td></tr><tr><td>k</td><td></td><td>1</td><td>6</td></tr></table>
|
| 280 |
+
|
| 281 |
+
Classifier Learning We need to train linear classifiers in two cases. 1) representation evalauation (Sec. 3 and Figure 4). For CE-learned representations, we train a linear classifier using the same parameters as representation learning in Table 7 with a smaller number of epochs (10). For CL and KCL, we adopt the classifier training protocol introduced by MoCo (He et al., 2020) with default hyper-parameters (i.e., learning rate 30 and weight decay 0). 2) Long-tailed recognition (Sec. 4.2). We obtain a re-balanced classifier for CE representations following Kang et al. (2020), and adopt the MoCo classifier learning strategy with class-balanced sampling by setting the learning rate to 10 on ImageNet-LT and 30 on iNaturalist 2018.
|
| 282 |
+
|
| 283 |
+
Detection model training We use exactly the same setting and evaluation metrics as He et al. (2020). R50-C4 backbone is used with BN tuned. The image is rescaled to [640, 800] during training and 800 at inference. All layers are fine-tuned end-to-end with batch size $= 1 6$ . For Pascal VOC, we train Faster R-CNN (Ren et al., 2015) on trainva $. 0 7 + 1 2$ set with $2 4 \mathrm { k }$ schedule and evaluate on test07 set. For COCO, we train Mask R-CNN (He et al., 2017) on train2017 set with $\times 2$ schedule and evaluate on val2017 set.
|
| 284 |
+
|
| 285 |
+
# B DATASET CONSTRUCTION
|
| 286 |
+
|
| 287 |
+
Datasets for studying balancedness of feature spaces We here explain the details on the construction of the series of datasets used in our study in Sec. 3.
|
| 288 |
+
|
| 289 |
+
In particular, we take the standard long-tailed training set from ImageNet-LT (Liu et al., 2019) whose instances follow the Pareto distribution as the base dataset, denoted as $\mathcal { D } _ { \mathrm { { L T } } }$ . We vary its training instance distribution $\{ q _ { 1 } , \dots , q _ { C } \}$ gradually to obtain different datasets as follows,
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
n _ { j } = \left\lfloor N _ { \mathcal { D } } \times \frac { q _ { j } ^ { \alpha } } { \sum _ { k } q _ { k } ^ { \alpha } } + \frac { 1 } { 2 } \right\rfloor ,
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
where $N _ { \mathcal { D } }$ is the total number of training instances in $\mathcal { D } _ { \mathrm { { L T } } }$ , $\alpha \in [ 0 , 1 ]$ controls the dataset balancedness. When $\alpha = 0$ , it corresponds to a fully balanced dataset; when $\alpha = 1$ , it becomes a heavy long-tailed ones. In total, we generated 6 datasets with $\alpha \in \{ 0 , 0 . 2 , 0 . 4 , 0 . 6 , 0 . 8 , 1 . 0 \}$ , denoted as $\mathcal { D } _ { \mathrm { L T 0 } } , \dots , \mathcal { D } _ { \mathrm { L T 8 } } , \mathcal { D } _ { \mathrm { L } }$ respectively, as different examples of $\mathscr { D } _ { \mathrm { r e p - t r a i n } }$ for representation learning. The detailed statistics and visualization of the datasets $\mathcal { D } _ { \mathrm { L T 0 } } , \dots , \mathcal { D } _ { \mathrm { L T 8 } } , \mathcal { D } _ { \mathrm { L T } }$ are summarized in Table 8 and Fig. 6.
|
| 296 |
+
|
| 297 |
+

|
| 298 |
+
Figure 6: Training instance number distributions of the datasets we use in our empirical studies.
|
| 299 |
+
|
| 300 |
+
Table 8: Dataset statistics on training instance numbers, including the maximal and minimal instance number per class and the total number.
|
| 301 |
+
|
| 302 |
+
<table><tr><td>Dataset</td><td>Max</td><td>Min</td><td>Total</td></tr><tr><td>DLTO</td><td>115</td><td>115</td><td>115,000</td></tr><tr><td>DLT2</td><td>204</td><td>67</td><td>115,885</td></tr><tr><td>DLT4</td><td>343</td><td>37</td><td>115,801</td></tr><tr><td>DLT6</td><td>553</td><td>20</td><td>115,836</td></tr><tr><td>DLT8</td><td>857</td><td>10</td><td>115,852</td></tr><tr><td>DLT</td><td>1,280</td><td>5</td><td>115,846</td></tr></table>
|
| 303 |
+
|
| 304 |
+
Datasets for generalizability studies We carefully choose the proper datasets to construct the $\mathcal { D } _ { \mathrm { t r a i n } }$ and $\mathcal { D } _ { \mathrm { t e s t } }$ for evaluating generalizability of the representation models under multiple settings. The choices are summarized in Table 9.
|
| 305 |
+
|
| 306 |
+
Table 9: Summary on used datasets for representation model pre-training and evaluation in our studies.
|
| 307 |
+
|
| 308 |
+
<table><tr><td>study</td><td>Drep-train</td><td>Dtrain</td><td>Dtest</td></tr><tr><td>Balancedness (Sec.3.2)</td><td>DLTO,...,DLT8,DLT</td><td>ImageNet (train)</td><td>ImageNet (val)</td></tr><tr><td>Out-of-distribution (Sec.3.3)</td><td>source split of above</td><td colspan="2">target split of above</td></tr><tr><td>Cross-domain (Sec. 3.3)</td><td>ImageNet-LT</td><td>Places 365 (train)</td><td>Places 365 (test)</td></tr><tr><td>Cross-task (Sec. 3.3)</td><td>ImageNet-LT</td><td>VOC/MSCOCO (train)</td><td>VOC/MSCOCO (test)</td></tr></table>
|
| 309 |
+
|
| 310 |
+
# C ADDITIONAL RESULTS ON MODEL GENERALIZATION PERFORMANCE
|
| 311 |
+
|
| 312 |
+
Cross-domain and Cross-task Generalization We evaluate the generalization ability of the representation models trained on the balanced full ImageNet datasets, for cross-domain and cross-task applications. The results are given in Table 10 (cross-domain) and Tables 11 and 12 (for detection) respectively. From Table 10, when the training datasets are balanced, the models trained with CL and CE achieve comparable performance. While when the training datasets are not balanced, the CL model significantly outperforms the CE model (Table 1). This demonstrates that the CL loss can consistently produce balanced representation models and the model generalization performance can indeed benefit from being balanced.
|
| 313 |
+
|
| 314 |
+
Similar conclusion can be drawn for the cross-task generalization. From Tables 11 and 12, when training the model on the full ImageNet dataset, using self-supervised CL loss can produce the model performing slightly better than using the supervised CE loss. On PASCAL VOC, the performance advantage is as marginal as $0 . 0 2 \%$ in $\mathsf { A P } _ { 5 0 }$ . In contrast, when training the model on the ImageNetLT dataset, using CL loss can boost the model performance over using the CE loss much more significantly. The improvement is as large as $1 . 6 4 \%$ in $\mathsf { A P } _ { 5 0 }$ . Thus the performance benefit on the generalization to detection brought by CL does not simple stem from using self-supervised pretraining, but indeed come from learning more balanced feature spaces.
|
| 315 |
+
|
| 316 |
+
Similar to OOD generalization, the model learned with KCL gives better downstream performance on both VOC and COCO, which mean enforcing feature space balancedness with KCL is indeed able to help learning better representation.
|
| 317 |
+
|
| 318 |
+
Table 10: Results on Places 365. The encoder is trained on ImageNet.
|
| 319 |
+
|
| 320 |
+
<table><tr><td></td><td>Top1</td><td>Top5</td></tr><tr><td>CE</td><td>46.06</td><td>77.11</td></tr><tr><td>CL</td><td>46.16 (+0.1)</td><td>76.27 (-0.84)</td></tr></table>
|
| 321 |
+
|
| 322 |
+
Table 11: Object detection Results on PASCAL VOC. The representation model is trained on ImageNet and ImageNet-LT. We report results in $\mathrm { A P } _ { 5 0 }$ : VOC metric; AP: COCO-style metric.
|
| 323 |
+
|
| 324 |
+
<table><tr><td rowspan="2"></td><td colspan="3">ImageNet</td><td colspan="3">ImageNet-LT</td></tr><tr><td>AP50</td><td>AP</td><td>AP75</td><td>AP50</td><td>AP</td><td>AP75</td></tr><tr><td>CE</td><td>81.26</td><td>53.66</td><td>59.19</td><td>76.45</td><td>48.53</td><td>51.01</td></tr><tr><td>CL</td><td>81.28 (+0.02)</td><td>56.10 (+2.44)</td><td>62.71 (+3.52)</td><td>78.19 (+1.64)</td><td>51.52 (+2.99)</td><td>56.48 (+5.47)</td></tr><tr><td>KCL</td><td>82.32 (+1.06)</td><td>55.51 (+1.85)</td><td>62.05 (+2.86)</td><td>79.70 (+3.25)</td><td>52.63 (+4.10)</td><td>57.89 (+6.88)</td></tr></table>
|
| 325 |
+
|
| 326 |
+
Table 12: Object detection Results on COCO. The representation model is trained on ImageNet and ImageNetLT. We report results in bounding-box AP $( \mathsf { A P } ^ { \mathsf { b b } } )$ ) and mask AP $( \mathbf { A P } ^ { \mathrm { m k } } )$ .
|
| 327 |
+
|
| 328 |
+
<table><tr><td rowspan="2" colspan="2"></td><td colspan="3">ImageNet</td><td colspan="3">ImageNet-LT</td></tr><tr><td>AP</td><td>AP50</td><td>AP75</td><td>AP</td><td>AP50</td><td>AP75</td></tr><tr><td rowspan="3">Apbb</td><td>CE</td><td>40.08</td><td>59.76</td><td>43.29</td><td>38.13</td><td>57.38</td><td>41.15</td></tr><tr><td>CL</td><td>40.41 (+0.33)</td><td>60.05 (+0.29)</td><td>44.09 (+0.80)</td><td>39.67 (+1.54)</td><td>59.40 (+2.02)</td><td>42.73 (+1.58)</td></tr><tr><td>KCL</td><td>40.79 (+0.78)</td><td>60.63 (+0.87)</td><td>43.99 ( (+0.70)</td><td>39.43 (+1.30)</td><td>59.08 (+1.70)</td><td>42.56 (+1.41)</td></tr><tr><td rowspan="3">Apmk</td><td>CE</td><td>34.85</td><td>56.60</td><td>37.02</td><td>33.29</td><td>54.24</td><td>35.38</td></tr><tr><td>CL</td><td>35.14 (+0.29)</td><td>56.88 (+0.28)</td><td>37.56 (+0.54)</td><td>34.73 (+1.44)</td><td>56.07 (+1.83)</td><td>37.13 (+1.75)</td></tr><tr><td>KCL</td><td>35.45 (+0.60)</td><td>57.40 (+0.80)</td><td>37.80 (+0.78)</td><td>34.38 (+1.09)</td><td>55.81 (+1.57)</td><td>36.39 (+1.01)</td></tr></table>
|
md/train/QWIvzSQaX5/QWIvzSQaX5.md
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Why Generalization in RL is Difficult: Epistemic POMDPs and Implicit Partial Observability
|
| 2 |
+
|
| 3 |
+
Dibya Ghosh∗,1 Jad Rahme∗,2 Aviral Kumar1 Amy Zhang1,3
|
| 4 |
+
|
| 5 |
+
Ryan P. Adams2
|
| 6 |
+
|
| 7 |
+
Sergey Levine1
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Generalization is a central challenge for the deployment of reinforcement learning (RL) systems in the real world. In this paper, we show that the sequential structure of the RL problem necessitates new approaches to generalization beyond the well-studied techniques used in supervised learning. While supervised learning methods can generalize effectively without explicitly accounting for epistemic uncertainty, we show that, perhaps surprisingly, this is not the case in RL. We show that generalization to unseen test conditions from a limited number of training conditions induces implicit partial observability, effectively turning even fullyobserved MDPs into POMDPs. Informed by this observation, we recast the problem of generalization in RL as solving the induced partially observed Markov decision process, which we call the epistemic POMDP. We demonstrate the failure modes of algorithms that do not appropriately handle this partial observability, and suggest a simple ensemble-based technique for approximately solving the partially observed problem. Empirically, we demonstrate that our simple algorithm derived from the epistemic POMDP achieves significant gains in generalization over current methods on the Procgen benchmark suite.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Generalization is a central challenge in machine learning. However, much of the research on reinforcement learning (RL) has been concerned with the problem of optimization: how to master a specific task through online or logged interaction. Generalization to new test-time contexts has received comparatively less attention, although several works have observed empirically [1, 2, 3, 4] that generalization to new situations poses a significant challenge to RL policies learned from a fixed training set of situations. In standard supervised learning, it is known that in the absence of distribution shift and with appropriate inductive biases, optimizing for performance on the training set (i.e., empirical risk minimization) translates into good generalization performance. It is tempting to suppose that the generalization challenges in RL can be solved in the same manner as empirical risk minimization in supervised learning: when provided a training set of contexts, learn the optimal policy within these contexts and then use that policy in new contexts at test-time.
|
| 16 |
+
|
| 17 |
+
Perhaps surprisingly, we show that such “empirical risk minimization” approaches can be sub-optimal for generalizing to new contexts in RL, even when these new contexts are drawn from the same distribution as the training contexts. As an anecdotal example of why this sub-optimality arises, imagine a robotic zookeeper for feeding otters that must be trained on some set of zoos. When placed in a new zoo, the robot must find and enter the otter enclosure. It can use one of two strategies: either peek through all the habitat windows looking for otters, which succeeds with $9 5 \%$ probability in all zoos, or to follow an image of a hand-drawn map of the zoo that unambiguously identifies the otter enclosure, which will succeed as long as the agent is able to successfully parse the image. In every training zoo, the otters can be found more reliably using the image of the map, and so an agent trained to seek the optimal policy in the training zoos would learn a classifier to predict the identity of the otter enclosure from the map, and enter the predicted enclosure. This classification strategy is optimal on the training environments because the agent can learn to perfectly classify the training zoo maps, but it is sub-optimal for generalization, because the learned classifier will never be able to perfectly classify every new zoo map at test-time. Note that this task is not partially observed, because the map provides full state information even for a memoryless policy. However, if the learned map classifier succeeds on anything less than $9 5 \%$ of new zoos at test-time, the strategy of peeking through the windows, although always sub-optimal in the training environments, turns out to be a more reliable strategy for finding the otter habitat in a new zoo, and results in higher expected returns at test-time.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Visualization of the robotic zookeeper example. Standard RL algorithms learn the classifier strategy, since it is optimal in every training zoo, but this strategy is sub-optimal for generalization because peeking generalizes better than the classifier at test-time. This failure occurs due to the following disconnect: while the task is fully-observed since the image uniquely specifies the location of the otter habitat, to an agent that has limited training data, the location is implicitly partially observed at test-time because of the agent’s epistemic uncertainty about the parameters of the image classifier.
|
| 21 |
+
|
| 22 |
+
Although with enough training zoos, the zookeeper can learn a policy by solving the map classification problem, to generalize optimally when given a limited number of zoos requires a more intricate policy that is not learned by standard RL methods. How can we more generally describe the set of behaviors needed for a policy to generalize from a finite number of training contexts in the RL setting? We make the observation that, even in fully-observable domains, the agent’s epistemic uncertainty renders the environment implicitly partially observed at test-time. In the zookeeper example, although the hand-drawn map provides the exact location of the otter enclosure (and so the enclosure’s location is technically fully observed), the agent cannot identify the true parameters of the map classifier from the small set of maps seen at training time, and so the location of the otters is implicitly obfuscated from the agent. We formalize this observation, and show that generalizing optimally at test-time corresponds to solving a partially-observed Markov decision process that we call an epistemic POMDP, induced by the agent’s epistemic uncertainty about the test environment.
|
| 23 |
+
|
| 24 |
+
That uncertainty about MDP parameters can be modelled as a POMDP is well-studied in Bayesian RL when training and testing on a single task in an online setting, primarily in the context of exploration [5, 6, 7, 8]. However, as we will discuss, this POMDP interpretation has significant consequences for the generalization problem in RL, where an agent cannot collect more data online, and must instead learn a policy from a fixed set of training contexts that generalizes to new contexts at test-time. We show that standard RL methods that do not explicitly account for this implicit partial observability can be arbitrarily sub-optimal for test-time generalization in theory and in practice. The epistemic POMDP underscores the difficulty of the generalization problem in RL, as compared to supervised learning, and provides an avenue for understanding how we should approach generalization under the sequential nature and non-uniform reward structure of the RL setting. Maximizing expected return in an approximation of the epistemic POMDP emerges as a principled approach to learning policies that generalize well, and we propose LEEP, an algorithm that uses an ensemble of policies to approximately learn the Bayes-optimal policy for maximizing test-time performance.
|
| 25 |
+
|
| 26 |
+
The primary contribution of this paper is to use Bayesian RL techniques to reframe generalization in RL as the problem of solving a partially observed Markov decision process, which we call the epistemic POMDP. The epistemic POMDP highlights the difficulty of generalizing well in RL, as compared to supervised learning. We demonstrate the practical failure modes of standard RL methods, which do not reason about this partial observability, and show that maximizing test-time performance may require algorithms to explicitly consider the agent’s epistemic uncertainty during training. Our work highlights the importance of not only finding ways to help neural networks in RL generalize better, but also on learning policies that degrade gracefully when the underlying neural network eventually does fail to generalize. Empirically, we demonstrate that LEEP, which maximizes return in an approximation to the epistemic POMDP, achieves significant gains in test-time performance over standard RL methods on several ProcGen benchmark tasks.
|
| 27 |
+
|
| 28 |
+
# 2 Related Work
|
| 29 |
+
|
| 30 |
+
Many empirical studies have demonstrated the tendency of RL algorithms to overfit significantly to their training environments [1, 2, 3, 4], and the more general increased difficulty of learning policies that generalize in RL as compared to seemingly similar supervised learning problems [9, 10, 11, 12]. These empirical observations have led to a newfound interest in algorithms for generalization in RL, and the development of benchmark RL environments that focus on generalization to new contexts from a limited set of training contexts sharing a similar structure (state and action spaces) but possibly different dynamics and rewards [13, 14, 15, 16, 17].
|
| 31 |
+
|
| 32 |
+
Generalization in RL. Approaches for improving generalization in RL have fallen into two main categories: improving the ability of function approximators to generalize better with inductive biases, and incentivizing behaviors that are easier to generalize to unseen contexts. To improve the representations learned in RL, prior work has considered imitating environment dynamics [18, 19], seeking bisimulation relations [20, 21], and more generally, addressing representational challenges in the RL optimization process [22, 23]. In image-based domains, inductive biases imposed via neural network design have also been proposed to improve robustness to certain factors of variation in the state [24, 25, 26]. The challenges with generalization in RL that we will describe in this paper stem from the deficiencies of MDP objectives, and cannot be fully solved by choice of representations or functional inductive biases. In the latter category, one approach is domain randomization, varying environment parameters such as coefficients of friction or textures, to obtain behaviors that are effective across many candidate parameter settings [27, 28, 29, 30, 31]. Domain randomization sits within a class of methods that seek robust policies by injecting noise into the agent-environment loop, whether in the state [32], the action (e.g., via max-entropy RL) [14], or intermediary layers of a neural network policy (e.g., through information bottlenecks) [22, 33]. In doing so, these methods effectively introduce partial observability into the problem; while not necessarily equivalent to that of the epistemic POMDP, it may indicate why these methods generalize well empirically.
|
| 33 |
+
|
| 34 |
+
Bayesian RL: Our work recasts generalization in RL within the Bayesian RL framework, the problem of acting optimally under a belief distribution over MDPs (see Ghavamzadeh et al. [8] for a survey). Bayesian uncertainty has been studied in many sub-fields of RL [34, 35, 36, 37], the most prominent being for exploration and learning efficiently in the online RL setting. Bayes-optimal behavior in RL is often reduced to acting optimally in a POMDP, or equivalently, a belief-state MDP [6], of which our epistemic POMDP is a specific instantiation. Learning the Bayes-optimal policy exactly is intractable in all but the simplest problems [38, 39], and many works in Bayesian RL have studied relaxations that remain asymptotically optimal for learning, for example with value of perfect information [5, 40] or Thompson sampling [7, 41, 42]. Our main contribution is to revisit these classic ideas in the context of generalization for RL. We find that the POMDP interpretation of Bayesian RL [5, 6, 43] provides new insights on inadequacies of current algorithms used in practice, and explains why generalization in RL can be more challenging than in supervised learning. Being Bayesian in the generalization setting also requires new tools and algorithms beyond those classically studied in Bayesian RL, since test-time generalization is measured using regret over a single evaluation episode, instead of throughout an online training process. As a result, algorithms and policies that minimize short-term regret (i.e., are more exploitative) are preferred over traditional algorithms like Thompson sampling that explore thoroughly to ensure asymptotic optimality at the cost of short-term regret.
|
| 35 |
+
|
| 36 |
+
# 3 Problem Setup
|
| 37 |
+
|
| 38 |
+
We consider the problem of learning RL policies given a set of training contexts that generalize well to new unseen contexts. This problem can be formalized in a Markov decision process (MDP) where the agent does not have full access to the MDP at training time, but only particular initial states or conditions. Before we describe what this means, we must describe the MDP $\mathcal { M }$ , which is given by a tuple $( S , { \mathcal { A } } , r , T , \rho , \gamma )$ , with state space $s$ , action space $\mathcal { A }$ , Markovian transition function $T ( s _ { t + 1 } | s _ { t } , a _ { t } )$ , bounded reward function $r ( s _ { t } , a _ { t } )$ , and initial state distribution $\rho ( s _ { 0 } )$ . A policy $\pi$ induces a discounted state distribution $\begin{array} { r } { d ^ { \pi } ( s ) \doteq ( 1 - \gamma ) \mathbb { E } _ { \pi } [ \sum _ { t \ge 0 } \gamma ^ { t } 1 ( s _ { t } = s ) ] } \end{array}$ , and achieves return $\begin{array} { r } { J _ { \mathcal { M } } ( \pi ) = \mathbb { E } _ { \pi } [ \sum _ { t \geq 0 } \gamma ^ { t } r ( s _ { t } , a _ { t } ) ] } \end{array}$ in the MDP. Classical results establish that a deterministic Markovian (memoryless) policy $\pi ^ { * }$ maximizes this objective amongst all history-dependent policies.
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 2: Sequential Classification RL Problem. In this task, an agent must keep guessing the label for an image until it gets it correct. To avoid low test return, policies should change actions if the label guessed was incorrect, but standard RL methods fail to do so, instead guessing the same incorrect label repeatedly.
|
| 42 |
+
|
| 43 |
+
We focus on generalization in contextual MDPs where the agent is only trained on a training set of contexts, and seeks to generalize well to new contexts. A contextual MDP is an MDP in which the state can be decomposed as $s _ { t } = \left( c , s _ { t } ^ { \prime } \right)$ , a context vector $c \in { \mathcal { C } }$ that remains constant throughout an episode, and a sub-state $s ^ { \prime } \in S ^ { \prime }$ that may vary: $\boldsymbol { S } : = \boldsymbol { \mathcal { C } } \times \boldsymbol { \mathcal { S } } ^ { \prime }$ . Each context vector corresponds to a different situation that the agent might be in, each with slightly different dynamics and rewards, but some shared structure across which an agent can generalize. During training, the agent is allowed to interact only within a sampled subset of contexts $\mathcal { C } _ { \mathrm { t r a i n } } \subset \mathcal { C }$ . The generalization performance of the agent is measured by the return of the agent’s policy in the full contextual MDP $J ( \pi )$ , corresponding to expected performance when placed in potentially new contexts. While our examples and experiments will be in contextual MDPs, our theoretical results also apply to other RL generalization settings where the full MDP cannot be inferred unambiguously from the data available during training, for example in offline reinforcement learning [44].
|
| 44 |
+
|
| 45 |
+
# 4 Warmup: A Sequential Classification RL Problem
|
| 46 |
+
|
| 47 |
+
We begin our study of generalization in RL with an example problem that is set up to be close to a supervised learning task where generalization is relatively well understood: image classification on the FashionMNIST dataset [45]. In this environment (visualized in Figure 2), an image from the dataset is sampled (the context) at the beginning of an episode and held fixed; the agent must identify the label of the image to complete the episode. If the agent guesses correctly, it receives a reward of 0 and the episode ends; if incorrect, it receives a reward of $- 1$ and the episode continues, so it must attempt another guess for the same image at the next time step. This RL problem is near identical to supervised classification, the core distinction being that an agent may interact with the same image over several timesteps in an episode instead of only one attempt as in supervised learning. Note that since episodes may last longer than a single timestep, this problem is not a contextual bandit.
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 3: DQN on RL FashionMNIST. DQN achieves lower test performance than simple variants that leverage the structure of the RL problem.
|
| 51 |
+
|
| 52 |
+
The optimal policy in both the one-step and sequential RL version of the problem deterministically outputs the correct label for the image, because the image fully determines the label (in other words, it is a fully observed MDP). However, this optimal strategy generally cannot be learned from a finite training set, since some generalization error is unavoidable. With a fixed training set, the strategy for generalizing in classification remains the same: deterministically choose the label the agent is most confident about. However, the RL setting introduces two new factors: the agent gets multiple tries at classifying the same image, and it knows if an attempted label is incorrect. To generalize best to new test images, an RL policy must leverage this additional structure, for example by trying many possible labels, or by changing actions if the previous guess was incorrect.
|
| 53 |
+
|
| 54 |
+
A standard RL algorithm, which estimates the optimal policy on the empirical MDP defined by the dataset of training images does not learn to leverage these factors, and instead learns behavior highly sub-optimal for generalization. We obtained a policy by running DQN [46] (experimental details in Appendix A.1), whose policy deterministically chooses the same label for the image at every timestep. Determinism is not specific to DQN, and is inevitable in any RL method that models the problem as an MDP because the optimal policy in the MDP is always deterministic and Markovian. The learned deterministic policy either guesses the correct label immediately, or guesses incorrectly and proceeds to make the same incorrect guess on every subsequent time-step. We compare performance in Figure 3 with a version of the agent that starts to guess randomly if incorrect on the first timestep, and a different agent that acts by process of elimination: first choosing the action it is most confident about, if incorrect, then the second, and so forth. Although all three versions have the same training performance, the learned RL policy generalizes more poorly than these alternative variants that exploit the sequential nature of the problem. In Section 5.2, we will see that this process-of-elimination is, in some sense, the optimal way to generalize for this task. This experiment reveals a tension: learning policies for generalization that rely on an MDP model fail, even though the underlying environment is an MDP. This failure holds in any MDP model with limited data, whether the empirical MDP or more sophisticated MDPs that use uncertainty estimates in their construction.
|
| 55 |
+
|
| 56 |
+
# 5 Modeling Generalization in RL as an Epistemic POMDP
|
| 57 |
+
|
| 58 |
+
To better understand test-time generalization in RL, we study the problem under a Bayesian perspective. We show that training on limited training contexts leads to an implicit partial observability at test-time that we describe using a formalism called the epistemic POMDP.
|
| 59 |
+
|
| 60 |
+
# 5.1 The Epistemic POMDP
|
| 61 |
+
|
| 62 |
+
In the Bayesian framework, when learning given a limited amount of evidence $\mathcal { D }$ from an MDP $\mathcal { M }$ , we can use a prior $\mathcal { P } ( \mathcal { M } )$ to construct a posterior belief distribution $\mathcal { P } ( \mathcal { M } | \mathcal { D } )$ over the identity of the MDP. For learning in a contextual MDP, $\mathcal { D }$ corresponds to the environment dynamics and reward in training contexts $\mathcal { C } _ { \mathrm { t r a i n } }$ that the agent can interact with, and the posterior belief distribution $\mathcal { P } ( \mathcal { M } | \mathcal { D } )$ models the agent’s uncertainty about the behavior of the environment in contexts that it has not seen before (e.g. uncertainty about the label for a test-set image in the example from Section 4).
|
| 63 |
+
|
| 64 |
+
Since the agent only has partial access to the MDP $\mathcal { M }$ during training, the agent does not know which MDP from the posterior distribution is the true environment, and must act at test-time under this uncertainty. Following a reduction common in Bayesian RL [6, 8], we model this test-time uncertainty using a partially observed MDP that we will call the epistemic POMDP. The epistemic POMDP is structured as follows: each new episode in the POMDP begins by sampling a single MDP $\mathcal { M } \sim \mathcal { P } ( \mathcal { M } | \mathcal { D } )$ from the posterior, and then the agent interacts with $\mathcal { M }$ until the episode ends in this MDP. The agent does not observe which MDP was sampled, and since the MDP remains fixed for the duration of the episode, this induces implicit partial observability. Effectively, each episode in the epistemic POMDP corresponds to acting in one of the possible environments that is consistent with the evidence that the agent is allowed access to at training time.
|
| 65 |
+
|
| 66 |
+
The epistemic POMDP is formally defined as the tuple $\mathcal { M } ^ { \mathrm { p o } } = ( S ^ { \mathrm { p o } } , \mathcal { O } ^ { \mathrm { p o } } , \mathcal { A } , T ^ { \mathrm { p o } } , r ^ { \mathrm { p o } } , \rho ^ { \mathrm { p o } } , \gamma )$ . A state in this POMDP $s _ { t } ^ { \mathrm { p o } } = ( \mathcal { M } , \dot { s _ { t } } )$ contains the identity of the current MDP being acted in $\mathcal { M }$ , and the current state in this MDP $s _ { t }$ ; we write the state space as $S ^ { \mathrm { p o } } = \mathbf { M } \times S$ , where $\mathbf { M }$ is the space of MDPs with support under the prior. The agent only observes $o _ { t } ^ { \mathrm { p o } } = s _ { t }$ , the state in the MDP ${ \mathcal { O } } ^ { \mathrm { p o } } = S$ ), but not the identity of the MDP, $\mathcal { M }$ . The initial state distribution is defined by the posterior distribution: $\rho ^ { \mathrm { p o } } ( ( \mathcal { M } , s _ { 0 } ) ) = \mathcal { P } ( \mathcal { M } | \mathcal { D } ) \rho _ { \mathcal { M } } ( s _ { 0 } )$ , and the transition and reward functions in the POMDP reflect the dynamics in the current MDP:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
T ^ { \mathrm { p o } } ( ( { \mathcal M } ^ { \prime } , s ^ { \prime } ) \mid ( { \mathcal M } , s ) , a ) = \delta ( { \mathcal M } ^ { \prime } = { \mathcal M } ) T _ { { \mathcal M } } ( s ^ { \prime } | s , a ) \quad \quad r ^ { \mathrm { p o } } ( ( { \mathcal M } , s ) , a ) = r _ { { \mathcal M } } ( s , a ) .
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
Example (Sequential Image Classification). We begin by explicitly describing the induced epistemic POMDP for the task from Section 4. The agent’s uncertainty concerns how images are mapped to labels, and each MDP $\mathcal { M }$ in the posterior distribution corresponds to a different potential labelling function $Y _ { \mathcal { M } } : x \mapsto y$ that is consistent with the training dataset. Each episode in the epistemic POMDP, a different MDP $\mathcal { M }$ and corresponding labeller $Y _ { \mathcal { M } }$ is sampled from the posterior distribution, alongside an image $x \sim p ( x )$ . The agent must guess the label assigned by this labelling function $y : = Y _ { \mathcal { M } } ( x )$ , but is only provided the image $x$ and not the identity of the labeller $Y _ { \mathcal { M } }$ . We emphasize that the context remains fully observed in the epistemic POMDP (the image $x$ is provided to the agent); what is partially observed is how the environment dynamics will behave for the context (what label the image corresponds to).
|
| 73 |
+
|
| 74 |
+
What makes the epistemic POMDP a useful tool for understanding generalization in RL is that performance in the epistemic POMDP ${ \mathcal { M } } ^ { { \mathfrak { p o } } }$ corresponds exactly to the expected return of the agent at test-time when the prior is well-specified.
|
| 75 |
+
|
| 76 |
+
Proposition 5.1. If the true MDP $\mathcal { M }$ is sampled from $\mathcal { P } ( \mathcal { M } )$ , and evidence $\mathcal { D }$ from $\mathcal { M }$ is provided to an algorithm during training, then the expected test-time return of $\pi$ is equal to its performance in the epistemic POMDP $\mathcal { M } ^ { p o }$ .
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
J _ { \mathcal { M } ^ { p o } } ( \pi ) = \mathbb { E } _ { \mathcal { M } \sim \mathcal { P } ( \mathcal { M } ) } [ J _ { \mathcal { M } } ( \pi ) \mid \mathcal { D } ] .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
In particular, the optimal policy in $\mathcal { M } ^ { p o }$ is Bayes-optimal for generalization to the unknown MDP $\mathcal { M }$ : it receives the highest expected test-time return amongst all possible policies.
|
| 83 |
+
|
| 84 |
+
The epistemic POMDP is based on well-understood concepts in Bayesian reinforcement learning, and Bayesian modeling more generally. However, in contrast to prior works on Bayesian RL, we are specifically concerned with settings where there is a training-test split, and performance is measured by a single test episode. While using Bayesian RL to accelerate exploration or minimize regret has been well-explored [8], we rather use the Bayesian lens specifically to understand generalization – a perspective that is distinct from prior work on Bayesian RL. Towards this goal, the equivalence between test-time return and expected return in the epistemic POMDP allows us to use performance in the POMDP as a proxy for understanding how well current RL methods can generalize.
|
| 85 |
+
|
| 86 |
+
# 5.2 Understanding Optimality in the Epistemic POMDP
|
| 87 |
+
|
| 88 |
+
We now study the structure of the epistemic POMDP, and use it to characterize properties of Bayesoptimal test-time behavior and the sub-optimality of alternative policy learning approaches. The majority of our results follow from well-known results about POMDPs, so we present them here informally, with formal statements and proofs in Appendix B.
|
| 89 |
+
|
| 90 |
+
Example ctd. Acting optimally in the epistemic POMDP for the sequential image classification task requires maximizing return over the distribution of labels that is induced by the posterior distribution $p ( y | \boldsymbol { x } , \mathcal { D } ) = \mathrm { \bar { E } } _ { \mathcal { M } \sim \mathcal { P } ( \mathcal { M } | \mathcal { D } ) } [ 1 ( Y _ { \mathcal { M } } ( \boldsymbol { x } ) = y ) ]$ . A deterministic policy (as is learned by standard RL algorithms) is a high-risk strategy in the POMDP; it receives exceedingly low return if the labeller outputs a different label than the one predicted. The Bayes-optimal generalization strategy corresponds to a process of elimination: first choose the most likely label $a = \arg \operatorname* { m a x } p ( y | x , \mathcal { D } )$ ; if this is incorrect, eliminate it and choose the next-most likely, repeating until the correct label is finally chosen. Amongst memoryless policies, the optimal behavior is stochastic, sampling actions according to the distribution $\pi ^ { * } ( a | x ) \propto \sqrt { p ( y | x , \mathcal { D } ) }$ (derivation in Appendix A.2).
|
| 91 |
+
|
| 92 |
+
The characteristics of the optimal policy in the epistemic POMDP for the image classification RL problem match well-established results that optimal POMDP policies are generally memory-based [47], and amongst memoryless policies, the optimal policy may be stochastic [48, 49]. Because of the equivalence between the epistemic POMDP and test-time behavior, these maxims are also true for Bayes-optimal behavior when maximizing test-time performance.
|
| 93 |
+
|
| 94 |
+
Remark 5.1. The Bayes-optimal policy for maximizing test-time performance is in general nonMarkovian. When restricted to Markovian policies, the Bayes-optimal policy is in general stochastic.
|
| 95 |
+
|
| 96 |
+
The reason that Bayes-optimal generalization often requires memory is that the experience collected thus far in the episode contains information about the identity of the MDP being acted in (which is hidden from the agent observation), and to maximize expected return, the agent must adapt its subsequent behavior to incorporate this new information. The fact that acting optimally at test-time formally requires adaptivity (or stochasticity for memoryless policies) highlights the difficulty of generalizing well in RL, and provides a new perspective for understanding the success various empirical studies have found in improving generalization performance using recurrent networks [50, 51] and stochastic regularization penalties [32, 14, 22, 33].
|
| 97 |
+
|
| 98 |
+
It is useful to understand to what degree the partial observability plays a role in determining Bayesoptimal behavior. When the partial observability is insignificant, the epistemic POMDP objective can coincide with a surrogate MDP approximation, and Bayes-optimal solutions can be attained with standard fully-observed RL algorithms. For example, if there is a policy that is simultaneously optimal in every MDP from the posterior, then an agent need not worry about the (hidden) identity of the MDP, and just follow this policy. Perhaps surprisingly, this kind of condition is difficult to relax: we show in Proposition B.1 that even if a policy is optimal in many (but not all) of the MDPs from the posterior, this seemingly “optimal” policy can generalize poorly at test-time.
|
| 99 |
+
|
| 100 |
+
Moreover, under partial observability, optimal policies for the MDPs in the posterior may differ substantially from Bayes-optimal behavior: in Proposition B.2, we show that the Bayes-optimal policy may take actions that are sub-optimal in every environment in the posterior. These results indicate the brittleness of learning policies based on optimizing return in an MDP model when the agent has not yet fully resolved the uncertainty about the true MDP parameters.
|
| 101 |
+
|
| 102 |
+
Remark 5.2 (Failure of MDP-Optimal Policies, Propositions B.1, B.2). The expected test-time return of policies that are learned by maximizing reward in any MDP from the posterior, as standard RL methods do, may be arbitrarily low compared to that of Bayes-optimal behavior.
|
| 103 |
+
|
| 104 |
+
As Bayes-optimal memoryless policies are stochastic, one may wonder if simple strategies for inducing stochasticity, such as adding $\epsilon$ -greedy noise or entropy regularization, can alleviate the suboptimality that arose with deterministic policies in the previous paragraph. In some cases, this may be true; one particularly interesting result is that in certain goal-reaching problems, entropy-regularized RL can be interpreted as optimizing an epistemic POMDP objective with a specific form of posterior distribution over reward functions (Proposition B.3) [52]. For the more general setting, we show in Proposition B.4 that entropy regularization and other general-purpose techniques can similarly catastrophically fail in epistemic POMDPs.
|
| 105 |
+
|
| 106 |
+
Remark 5.3 (Failure of Generic Stochasticity, Proposition B.4). The expected test-time return of policies learned with stochastic regularization techniques like maximum-entropy RL that are agnostic of the posterior $\mathcal { P } ( \mathcal { M } | \mathcal { D } )$ may be arbitrarily low compared to that of Bayes-optimal behavior.
|
| 107 |
+
|
| 108 |
+
This failure happens because the degree of stochasticity used by the Bayes-optimal policy reflects the agent’s epistemic uncertainty about the environment; since standard regularizations are agnostic to this uncertainty, the learned behaviors often do not reflect the appropriate level of stochasticity needed. A maze-solving agent acting Bayes-optimally, for example, may choose to act deterministically in mazes like those it has seen at training, and on others where it is less confident, rely on random exploration to exit the maze, inimitable behavior by regularization techniques agnostic to this uncertainty.
|
| 109 |
+
|
| 110 |
+
Our analysis of the epistemic POMDP highlights the difficulty of generalizing well in RL, in the complexity of Bayes-optimal policies (Remark 5.1) and the deficiencies of our standard MDP-based RL algorithms (Remark 5.2, 5.3) . While MDP-based algorithms can serve as a useful starting point for acquiring generalizable skills, learning policies that perform well in new test-time scenarios may require more complex algorithms that attend to the epistemic POMDP structure that is implicitly induced by the agent’s epistemic uncertainty.
|
| 111 |
+
|
| 112 |
+
# 6 Learning Policies that Generalize Well Using the Epistemic POMDP
|
| 113 |
+
|
| 114 |
+
When the epistemic POMDP ${ \mathcal { M } } ^ { { \mathfrak { p o } } }$ can be exactly obtained, we can learn RL policies that generalize well to the true (unknown) MDP $\mathcal { M }$ by learning an optimal policy in the POMDP. In this oracle setting, any POMDP-solving method will suffice, and design choices like policy function classes (e.g. recurrent vs Markovian policies) or agent representations (e.g. belief state vs PSRs) made based on the requirements of the specific domain. However, in practice, the epistemic POMDP can be challenging to approximate due to the difficulties of learning coherent MDP models and maintaining a posterior over such MDP models in high-dimensional domains.
|
| 115 |
+
|
| 116 |
+
In light of these challenges, we now focus on practical methods for learning generalizable policies when the exact posterior distribution (and therefore true epistemic POMDP) cannot be recovered exactly. We derive an algorithm for learning the optimal policy in the epistemic POMDP induced by an approximate posterior distribution $\hat { \mathcal { P } } ( \mathcal { M } | \mathcal { D } )$ with finite support. We use this to motivate LEEP, a simple ensemble-based algorithm for learning policies in the contextual MDP setting.
|
| 117 |
+
|
| 118 |
+
# 6.1 Policy Optimization in an Empirical Epistemic POMDP
|
| 119 |
+
|
| 120 |
+
Towards a tractable algorithm, we assume that instead of the true posterior $\mathcal { P } ( \mathcal { M } | \mathcal { D } )$ , we only have access to an empirical posterior distribution $\hat { \mathcal { P } } ( \mathcal { M } | \mathcal { D } )$ defined by $n$ MDP samples from the posterior distribution $\{ \mathcal { M } _ { i } \} _ { i \in [ n ] }$ . This empirical posterior distribution induces an empirical epistemic POMDP $\hat { \mathcal { M } } ^ { \mathrm { p o } }$ ; our ambition is to learn the optimal policy in this POMDP. Rather than directly learning this optimal policy as a generic POMDP solver might, we recognize that $\hat { \mathcal { M } } ^ { \mathrm { p o } }$ corresponds to a collection of $n$ MDPs 2 and decompose the optimization problem to mimic this structure. We will learn $n$ policies $\pi _ { 1 } , \cdots , \pi _ { n }$ , each policy $\pi _ { i }$ in one of the MDPs $\mathcal { M } _ { i }$ from the empirical posterior, and combine these policies together to recover a single policy $\pi$ for the POMDP. Reducing the POMDP policy learning problem into a set of MDP policy learning problems can allow us to leverage the many recent advances in deep RL for scalably solving MDPs. The following theorem links the expected return of a policy $\pi$ in the empirical epistemic POMDP $\hat { \mathcal { M } } ^ { \mathrm { p o } }$ , in terms of the performance of the policies $\pi _ { i }$ on their respective MDPs $\mathcal { M } _ { i }$ .
|
| 121 |
+
|
| 122 |
+
Proposition 6.1. Let $\pi , \pi _ { 1 } , \cdots \pi _ { n }$ be memoryless , and define $r _ { \mathrm { m a x } } = \mathrm { m a x } _ { i , s , a } \left| r _ { \mathcal { M } _ { i } } ( s , a ) \right|$ . The expected return of $\pi$ in $\hat { \mathcal { M } } ^ { p o }$ is bounded below as:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
J _ { \hat { \mathcal { M } } ^ { p o } } ( \pi ) \geq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } J _ { M _ { i } } ( \pi _ { i } ) - \frac { \sqrt { 2 } r _ { \operatorname* { m a x } } } { ( 1 - \gamma ) ^ { 2 } n } \sum _ { i = 1 } ^ { n } \mathbb { E } _ { s \sim d _ { M _ { i } } ^ { \pi _ { i } } } \left[ \sqrt { D _ { K L } \left( \pi _ { i } ( \cdot | s ) \mid \mid \pi ( \cdot | s ) \right) } \right] ,
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
This proposition indicates that if the policies in the collection $\{ \pi _ { i } \} _ { i \in [ n ] }$ all achieve high return in their respective MDPs (first term) and are imitable by a single policy $\pi$ (second term), then $\pi$ is guaranteed to achieve high return in the epistemic POMDP. In contrast, if the policies cannot be closely imitated by a single policy, this collection of policies may not be useful for learning in the epistemic POMDP using the lower bound. This means that it may not sufficient to naively optimize each policy $\pi _ { i }$ on its MDP $\mathcal { M } _ { i }$ without any consideration to the other policies or MDPs, since the learned policies are likely to be different and difficult to jointly imitate. To be useful for the lower bound, each policy $\pi _ { i }$ should balance between maximizing performance on its MDP and minimizing its deviation from the other policies in the set. The following proposition shows that if the policies are trained jointly to ensure this balance, it in fact recovers the optimal policy in the empirical epistemic POMDP.
|
| 129 |
+
|
| 130 |
+
Proposition 6.2. Let $f : \{ \pi _ { i } \} _ { i \in [ n ] } \mapsto \pi$ be a function that maps n policies to a single policy satisfying $f ( \pi , \cdot \cdot \cdot , \pi ) = \pi$ for every policy $\pi$ , and let $\alpha$ be a hyperparameter satisfying $\begin{array} { r } { \alpha \ge \frac { \sqrt { 2 } r _ { m a x } } { ( 1 - \gamma ) ^ { 2 } n } } \end{array}$ . Then letting $\pi _ { 1 } ^ { * } , \ldots \pi _ { n } ^ { * }$ be the optimal solution to the following optimization problem:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\{ \pi _ { i } ^ { * } \} _ { i \in [ n ] } = \underset { \pi _ { 1 } , \cdots , \pi _ { n } } { \mathrm { a r g } \operatorname* { m a x } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } J _ { M _ { i } } ( \pi _ { i } ) - \alpha \sum _ { i = 1 } ^ { n } \mathbb { E } _ { s \sim d _ { M _ { i } } ^ { \pi _ { i } } } \left[ \sqrt { D _ { K L } \left( \pi _ { i } ( \cdot | s ) \mid | \ f ( \{ \pi _ { i } \} ) ( \cdot | s ) \right) } \right] ,
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
the policy $\pi ^ { * } : = f ( \{ \pi _ { i } ^ { * } \} _ { i \in [ n ] } )$ is optimal for the empirical epistemic POMDP $\hat { \mathcal { M } } ^ { p o }$ .
|
| 137 |
+
|
| 138 |
+
# 6.2 A Practical Algorithm for Contextual MDPs: LEEP
|
| 139 |
+
|
| 140 |
+
Proposition 6.2 provides a foundation for a practical algorithm for learning policies when provided training contexts $\mathcal { C } _ { \mathrm { t r a i n } }$ from an unknown contextual MDP. In order to use the proposition in a practical algorithm, we must discuss two problems: how posterior samples $\mathcal { M } _ { i } \sim \mathcal { P } ( \mathcal { M } | \mathcal { D } )$ can be approximated, and how the function $f$ that combines policies should be chosen.
|
| 141 |
+
|
| 142 |
+
Approximating the posterior distribution: Rather than directly maintaining a posterior over
|
| 143 |
+
transition dynamics and reward models, which is especially difficult with image-based observations,
|
| 144 |
+
we can approximate samples from the posterior via a bootstrap sampling technique [53]. To sample a
|
| 145 |
+
candidate MDP $\mathcal { M } _ { i }$ , we sample with replacement from the training contexts $\mathcal { C } _ { \mathrm { t r a i n } }$ to get a new set of
|
| 146 |
+
contexts out trials $ { \mathcal { C } } _ { \mathrm { t r a i n } } ^ { i }$ , and define the posteri $\mathcal { M } _ { i }$ to bmple empirical MDPthen correspond this subset of training contexts. R selecting a context at random from distribution $\mathcal { M } _ { i }$ $ { \mathcal { C } } _ { \mathrm { t r a i n } } ^ { i }$ $\mathcal { M } _ { i }$
|
| 147 |
+
contexts, not a single context, since our goal is to sample from the posterior entire contextual MDPs.
|
| 148 |
+
|
| 149 |
+
Choosing a link function: The link function $f$ in Proposition 6.2 that combines the set of policies together effectively serves as an inductive bias: since we are optimizing in an approximation to the true epistemic POMDP and policy optimization is not exact in practice, different choices can yield combined policies with different characteristics. Since optimal behavior in the epistemic POMDP must consider all actions, even those that are potentially sub-optimal in all MDPs in the posterior (as discussed in Section 5.2), we use an “optimistic” link function
|
| 150 |
+
|
| 151 |
+
1: Receive training contexts 2: Bootstrap sample training $\mathcal { C } _ { \mathrm { t r a i n } }$ , number of etexts to create bers , wh $n$ e . ${ \mathcal { C } } _ { \operatorname { t r a i n } } ^ { 1 } , \ldots { \mathcal { C } } _ { \operatorname { t r a i n } } ^ { n }$ ${ \mathcal { C } } _ { \mathrm { t r a i n } } ^ { i } \subset { \mathcal { C } } _ { \mathrm { t r a i n } }$
|
| 152 |
+
3: Initialize $n$ policies: $\pi _ { 1 } , \ldots , \pi _ { n }$
|
| 153 |
+
4: for iteration $k = 1 , 2 , 3 , \ldots$ do
|
| 154 |
+
5: for policy $i = 1 , \ldots , n$ do
|
| 155 |
+
6: Collect environment samples in training contexts $ { \mathcal { C } } _ { \mathrm { t r a i n } } ^ { i }$ using policy $\pi _ { i }$
|
| 156 |
+
7: Take gradient steps wrt $\pi _ { i }$ on these samples with augmented RL loss: $\pi _ { i } \pi _ { i } - \eta \nabla _ { i } ( \mathcal L ^ { R L } ( \pi _ { i } ) + \alpha \mathbb E _ { s \sim \pi _ { i } , \mathcal L _ { \operatorname { u n } } ^ { i } } [ D _ { K L } ( \pi _ { i } ( a | s ) \| \operatorname* { m a x } _ { j } \pi _ { j } ( a | s ) ) ] )$
|
| 157 |
+
8: Return π = maxi π: π(a|s) = P maxi πi(a|s)a0 maxi πi(a0|s) .
|
| 158 |
+
|
| 159 |
+
that does not dismiss any action that is considered by at least one of the policies, specifically f ({πi}i∈[n]) = (maxi πi)(a|s) := P max πi(a|s)a0 max πi(a0|s) .
|
| 160 |
+
|
| 161 |
+
Algorithm: We learn a set of $n$ policies $\{ \pi _ { i } \} _ { i \in [ n ] }$ , using a policy gradient algorithm to implement the update step. To update the parameters for $\pi _ { i }$ , we take gradient steps via the surrogate loss used for the policy gradient, augmented by a disagreement penalty between the policy and the combined policy ${ \bar { f } } ( \{ \pi _ { i } \} _ { i \in [ n ] } )$ with a penalty parameter $\alpha > 0$ , as in Equation 5:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\mathcal { L } ( \pi _ { i } ) = \mathcal { L } ^ { R L } ( \pi _ { i } ) + \alpha \mathbb { E } _ { s \sim \pi _ { i } , M _ { i } } [ D _ { K L } ( \pi _ { i } ( a | s ) | | \operatorname* { m a x } _ { j } \pi _ { j } ( a | s ) ) ] .
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
Combining these elements together leads to our method, LEEP, which we summarize in Algorithm 1. In our implementation, we use PPO for training contexts to create overlapping set $\mathcal { L } ^ { R L } ( \pi _ { i } )$ [54]. In sung contexts bootstrap samples the. Every iteration, each ${ \mathcal { C } } _ { \operatorname { t r a i n } } ^ { 1 } , \ldots { \mathcal { C } } _ { \operatorname { t r a i n } } ^ { n }$ policy $\pi _ { i }$ generates rollouts in training contexts chosen uniformly from its corresponding $\mathcal { C } _ { \mathrm { t r a i n } } ^ { i }$ , and is then updated according to Equation 5, which both maximizes the expected reward and minimizes the disagreement penalty between each $\pi _ { i }$ and the combined policy $\pi = \operatorname* { m a x } _ { j } \pi _ { j }$ .
|
| 168 |
+
|
| 169 |
+
While this algorithm is structurally similar to algorithms for multi-task learning that train a separate policy for each context or group of contexts with a disagreement penalty [55, 56], the motivation and the interpretation of these approaches are completely distinct. In multi-task learning, the goal is to solve a given set of tasks, and these methods promote transfer via a loss that encourages the solutions to the tasks to be in agreement. In our setting, while we also receive a set of tasks (contexts), the goal is not to maximize performance on the training tasks, but rather to learn a policy that maximizes performance on unseen test tasks. The method also has a subtle but important distinction: each of our policies $\pi _ { i }$ acts on a sample from the contextual MDP posterior (which captures epistemic uncertainty), not a single training context [55] or element from a disjoint partitioning [56] (which does not). This distinction is crucial, since our generalization performance requires our aim is not to make it easier to solve the training contexts, but the opposite: prevent the algorithm from overfitting to the individual training contexts. Correspondingly, our experiments confirm that such multi-task learning approaches do not provide the same generalization benefits as our approach.
|
| 170 |
+
|
| 171 |
+
# 7 Experiments
|
| 172 |
+
|
| 173 |
+
The primary ambition of our empirical study is to test the hypothesis that policies that are learned through (approximations of) the epistemic POMDP do in fact attain better test-time performance than those learned by standard RL algorithms. We do so on the Procgen benchmark [16], a challenging suite of diverse tasks with image-based observations testing generalization to unseen contexts.
|
| 174 |
+
|
| 175 |
+
1. Does LEEP derived from the epistemic POMDP lead to improved test-time performance over standard RL methods? 2. Can LEEP prevent overfitting when provided a limited number of training contexts? 3. How do different algorithmic components of LEEP affect test-time performance ?
|
| 176 |
+
|
| 177 |
+
The Procgen benchmark is a set of procedurally generated games, each with different generalization challenges. In each game, during training, the algorithm can interact with 200 training levels, before it is asked to generalize to the full distribution of levels. The agent receives a $6 4 \times 6 4 \times 3$ image observation, and must output one of 15 possible actions. We instantiate our method using an ensemble of $n = 4$ policies, a penalty parameter of $\alpha = 1$ , and PPO [54] to train the individual policies (full implementation details in Appendix C).
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 4: Test set return for LEEP and PPO throughout training in four Procgen environments (averaged across 5 random seeds). LEEP achieves higher test returns than PPO on three tasks (Maze, Heist and Dodgeball) and matches test return on Bigfish while having less variance across seeds.
|
| 181 |
+
|
| 182 |
+
We evaluate our method on four games in which prior work has found a large gap between training and test performance, and which we therefore conclude pose a significant generalization challenge [16, 23, 26]: Maze, Heist, BigFish, and Dodgeball. In Figure 4, we compare the test-time performance of the policies learned using our method to those learned by a PPO agent with entropy regularization. In three of these environments (Maze, Heist, and Dodgeball), our method outperforms PPO by a significant margin, and in all cases, we find that the generalization gap between training and test performance is lower for our method than PPO (Appendix D.1).
|
| 183 |
+
|
| 184 |
+
To understand how LEEP behaves with fewer training contexts, we ran on the Maze task with only 50 levels (Figure 5 (top)); the test return of the PPO policy decreases through training, leading to final performance worse than the starting random policy, but our method avoids this degradation.
|
| 185 |
+
|
| 186 |
+
We perform an ablation study on the Maze and Heist environments (Maze in Figure 4, Heist in Appendix D.1) to rule out potential confounding causes for the improved generalization that our method displays on the Procgen benchmark tasks. First, to see if the performance benefit derives solely from the use of ensembles, we compare LEEP to a Bayesian model averaging strategy that trains an ensemble of policies without regularization (“Ensemble (no reg)”), and uses a mixture of these policies. This strategy does improve performance over the PPO policy, but does not match LEEP, indicating the usefulness of the regularization. Second, we compared to a version of LEEP that combines the ensemble policies together using the average Pni=1 πi(a|s) (“LEEP (avg)”). This link function achieves worse test-time performance than the optimistic version, which indicates that the inductive bias conferred by the $\operatorname* { m a x } _ { i } \pi _ { i }$ link function is a useful component of the algorithm. We also compare to Distral, a multi-task learning method with different motivations but similar structure to LEEP: this method helps accelerate learning on the provided training contexts (figures in Appendix D.1), but does not improve generalization performance as LEEP does. We additionally ablated the two key hyperparameters in LEEP, the number of ensemble members $n$ and the penalty coefficient $\alpha$ (Table in Appendix D.2).
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
Figure 5: (top) Performance of LEEP and PPO with only 50 training levels on Maze. (bottom) Ablations of LEEP in Maze.
|
| 190 |
+
|
| 191 |
+
# 8 Discussion
|
| 192 |
+
|
| 193 |
+
It has often been observed experimentally that generalization in RL poses a significant challenge, but it has so far remained an open question as to whether the RL setting itself presents additional generalization challenges beyond those seen in supervised learning. In this paper, we answer this question in the affirmative, and show that, in contrast to supervised learning, generalization in RL results in a new type of problem that cannot be solved with standard MDP solution methods, due to partial observability induced by epistemic uncertainty. We call the resulting partially observed setting the epistemic POMDP, where uncertainty about the true underlying MDP results in a challenging partially observed problem. We present a practical approximate method that optimizes a bound for performance in an approximation of the epistemic POMDP, and show empirically that this approach, which we call LEEP, attains significant improvements in generalization over other RL methods that do not properly incorporate the agent’s epistemic uncertainty into policy optimization. A limitation of this approach is that it optimizes a crude approximation to the epistemic POMDP with a small number of posterior samples, and may be challenging to scale to better approximations to the true objective. Developing algorithms that better model the epistemic POMDP and optimize policies within is an exciting avenue for future work, and we hope that this direction will lead to further improvements in generalization in RL.
|
| 194 |
+
|
| 195 |
+
# Acknowledgements
|
| 196 |
+
|
| 197 |
+
This research was supported by an NSF graduate fellowship, the DARPA assured autonomy program, the NSF IIS-2007278 grant, a Princeton SEAS Innovation Grant and compute support from Google and Microsoft. We thank Benjamin Eysenbach, Xinyang Geng, and Justin Fu as well as members of the Princeton Laboratory for Intelligent Probabilistic Systems for helpful discussions and feedback.
|
| 198 |
+
|
| 199 |
+
# References
|
| 200 |
+
|
| 201 |
+
[1] Jesse Farebrother, Marlos C. Machado, and Michael H. Bowling. Generalization and regularization in dqn. ArXiv, abs/1810.00123, 2018. [2] C. Zhang, Oriol Vinyals, R. Munos, and S. Bengio. A study on overfitting in deep reinforcement learning. ArXiv, abs/1804.06893, 2018.
|
| 202 |
+
[3] Niels Justesen, R. Torrado, Philip Bontrager, Ahmed Khalifa, J. Togelius, and S. Risi. Illuminating generalization in deep reinforcement learning through procedural level generation. arXiv: Learning, 2018. [4] Xingyou Song, Yiding Jiang, Stephen Tu, Yilun Du, and Behnam Neyshabur. Observational overfitting in reinforcement learning. ArXiv, abs/1912.02975, 2020. [5] R. Dearden, N. Friedman, and Stuart J. Russell. Bayesian q-learning. In AAAI/IAAI, 1998. [6] M. Duff and A. Barto. Optimal learning: computational procedures for bayes-adaptive markov decision processes. 2002.
|
| 203 |
+
[7] M. Strens. A bayesian framework for reinforcement learning. In ICML, 2000. [8] M. Ghavamzadeh, Shie Mannor, Joelle Pineau, and Aviv Tamar. Bayesian reinforcement learning: A survey. Found. Trends Mach. Learn., 8:359–483, 2015.
|
| 204 |
+
[9] A. Zhang, Yuxin Wu, and Joelle Pineau. Natural environment benchmarks for reinforcement learning. ArXiv, abs/1811.06032, 2018.
|
| 205 |
+
[10] A. Zhang, Nicolas Ballas, and Joelle Pineau. A dissection of overfitting and generalization in continuous reinforcement learning. ArXiv, abs/1806.07937, 2018.
|
| 206 |
+
[11] S. Whiteson, B. Tanner, Matthew E. Taylor, and P. Stone. Protecting against evaluation overfitting in empirical reinforcement learning. 2011 IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning (ADPRL), pages 120–127, 2011.
|
| 207 |
+
[12] Zhuang Liu, Xuanlin Li, Bingyi Kang, and Trevor Darrell. Regularization matters in policy optimization – an empirical study on continuous control. arXiv: Learning, 2020.
|
| 208 |
+
[13] Alex Nichol, Vicki Pfau, Christopher Hesse, Oleg Klimov, and John Schulman. Gotta learn fast: A new benchmark for generalization in rl. ArXiv, abs/1804.03720, 2018.
|
| 209 |
+
[14] K. Cobbe, Oleg Klimov, Christopher Hesse, Taehoon Kim, and John Schulman. Quantifying generalization in reinforcement learning. In ICML, 2019.
|
| 210 |
+
[15] Heinrich Kuttler, Nantas Nardelli, Alexander H. Miller, Roberta Raileanu, Marco Selvatici, Edward Grefenstette, and Tim Rocktäschel. The nethack learning environment. ArXiv, abs/2006.13760, 2020.
|
| 211 |
+
[16] K. Cobbe, Christopher Hesse, Jacob Hilton, and John Schulman. Leveraging procedural generation to benchmark reinforcement learning. ArXiv, abs/1912.01588, 2020.
|
| 212 |
+
[17] Austin Stone, Oscar Ramirez, K. Konolige, and Rico Jonschkowski. The distracting control suite - a challenging benchmark for reinforcement learning from pixels. ArXiv, abs/2101.02722, 2021.
|
| 213 |
+
[18] Max Jaderberg, V. Mnih, Wojciech Czarnecki, Tom Schaul, Joel Z. Leibo, D. Silver, and K. Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. ArXiv, abs/1611.05397, 2017.
|
| 214 |
+
[19] Adam Stooke, Kimin Lee, P. Abbeel, and M. Laskin. Decoupling representation learning from reinforcement learning. ArXiv, abs/2009.08319, 2020.
|
| 215 |
+
[20] A. Zhang, Rowan McAllister, R. Calandra, Y. Gal, and Sergey Levine. Learning invariant representations for reinforcement learning without reconstruction. ArXiv, abs/2006.10742, 2020.
|
| 216 |
+
[21] Rishabh Agarwal, Marlos C. Machado, P. S. Castro, and Marc G. Bellemare. Contrastive behavioral similarity embeddings for generalization in reinforcement learning. ArXiv, abs/2101.05265, 2021.
|
| 217 |
+
[22] Maximilian Igl, K. Ciosek, Yingzhen Li, Sebastian Tschiatschek, C. Zhang, Sam Devlin, and Katja Hofmann. Generalization in reinforcement learning with selective noise injection and information bottleneck. In NeurIPS, 2019.
|
| 218 |
+
[23] Minqi Jiang, Edward Grefenstette, and Tim Rocktäschel. Prioritized level replay. ArXiv, abs/2010.03934, 2020.
|
| 219 |
+
[24] Kimin Lee, Kibok Lee, Jinwoo Shin, and H. Lee. Network randomization: A simple technique for generalization in deep reinforcement learning. In ICLR, 2020.
|
| 220 |
+
[25] Ilya Kostrikov, Denis Yarats, and R. Fergus. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. ArXiv, abs/2004.13649, 2020.
|
| 221 |
+
[26] Roberta Raileanu, Maxwell Goldstein, Denis Yarats, Ilya Kostrikov, and R. Fergus. Automatic data augmentation for generalization in deep reinforcement learning. ArXiv, abs/2006.12862, 2020.
|
| 222 |
+
[27] Fereshteh Sadeghi and Sergey Levine. (cad)2rl: Real single-image flight without a single real image. ArXiv, abs/1611.04201, 2017.
|
| 223 |
+
[28] Joshua Tobin, Rachel Fong, Alex Ray, J. Schneider, W. Zaremba, and P. Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 23–30, 2017.
|
| 224 |
+
[29] A. Rajeswaran, Sarvjeet Ghotra, Sergey Levine, and Balaraman Ravindran. Epopt: Learning robust neural network policies using model ensembles. ArXiv, abs/1610.01283, 2017.
|
| 225 |
+
[30] Xue Bin Peng, Marcin Andrychowicz, Wojciech Zaremba, and Pieter Abbeel. Sim-to-real transfer of robotic control with dynamics randomization. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 1–8, May 2018.
|
| 226 |
+
[31] Katie Kang, Suneel Belkhale, Gregory Kahn, Pieter Abbeel, and Sergey Levine. Generalization through simulation: Integrating simulated and real data into deep reinforcement learning for vision-based autonomous flight. In 2019 international conference on robotics and automation (ICRA), pages 6008–6014. IEEE, 2019.
|
| 227 |
+
[32] F. Stulp, E. Theodorou, J. Buchli, and S. Schaal. Learning to grasp under uncertainty. 2011 IEEE International Conference on Robotics and Automation, pages 5703–5708, 2011.
|
| 228 |
+
[33] X. Lu, Kimin Lee, P. Abbeel, and Stas Tiomkin. Dynamics generalization via information bottleneck in deep reinforcement learning. ArXiv, abs/2008.00614, 2020.
|
| 229 |
+
[34] Deepak Ramachandran and E. Amir. Bayesian inverse reinforcement learning. In IJCAI, 2007.
|
| 230 |
+
[35] A. Lazaric and M. Ghavamzadeh. Bayesian multi-task reinforcement learning. In ICML, 2010.
|
| 231 |
+
[36] Wonseok Jeon, Seokin Seo, and Kee-Eung Kim. A bayesian approach to generative adversarial imitation learning. In NeurIPS, 2018.
|
| 232 |
+
[37] Luisa M. Zintgraf, K. Shiarlis, Maximilian Igl, Sebastian Schulze, Y. Gal, Katja Hofmann, and S. Whiteson. Varibad: A very good method for bayes-adaptive deep rl via meta-learning. ArXiv, abs/1910.08348, 2020.
|
| 233 |
+
[38] R. Weber. On the gittins index for multiarmed bandits. Annals of Applied Probability, 2:1024– 1033, 1992.
|
| 234 |
+
[39] P. Poupart, N. Vlassis, J. Hoey, and K. Regan. An analytic solution to discrete bayesian reinforcement learning. Proceedings of the 23rd international conference on Machine learning, 2006.
|
| 235 |
+
[40] R. Dearden, N. Friedman, and D. Andre. Model based bayesian exploration. In UAI, 1999.
|
| 236 |
+
[41] Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In NIPS, 2013.
|
| 237 |
+
[42] Daniel Russo and Benjamin Van Roy. Learning to optimize via posterior sampling. Math. Oper. Res., 39:1221–1243, 2014.
|
| 238 |
+
[43] Stephane Ross, Brahim Chaib-draa, and Joelle Pineau. Bayes-adaptive pomdps. In NIPS, pages 1225–1232, 2007.
|
| 239 |
+
[44] Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
|
| 240 |
+
[45] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms, 2017.
|
| 241 |
+
[46] 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, 2015.
|
| 242 |
+
[47] George E Monahan. State of the art—a survey of partially observable markov decision processes: theory, models, and algorithms. Management science, 28(1):1–16, 1982.
|
| 243 |
+
[48] Satinder P. Singh, Tommi S. Jaakkola, and Michael I. Jordan. Learning without state-estimation in partially observable markovian decision processes. In Proceedings of the Eleventh International Conference on International Conference on Machine Learning, page 284–292, San Francisco, CA, USA, 1994. Morgan Kaufmann Publishers Inc.
|
| 244 |
+
[49] Guido Montúfar, K. Zahedi, and N. Ay. Geometry and determinism of optimal stationary control in partially observable markov decision processes. ArXiv, abs/1503.07206, 2015.
|
| 245 |
+
[50] Ilge Akkaya, Marcin Andrychowicz, Maciek Chociej, Mateusz Litwin, Bob McGrew, Arthur Petron, Alex Paino, Matthias Plappert, Glenn Powell, Raphael Ribas, et al. Solving rubik’s cube with a robot hand. arXiv preprint arXiv:1910.07113, 2019.
|
| 246 |
+
[51] Xue Bin Peng, Marcin Andrychowicz, Wojciech Zaremba, and Pieter Abbeel. Sim-to-real transfer of robotic control with dynamics randomization. CoRR, abs/1710.06537, 2017.
|
| 247 |
+
[52] Benjamin Eysenbach and Sergey Levine. If maxent rl is the answer, what is the question? arXiv preprint arXiv:1910.01913, 2019.
|
| 248 |
+
[53] Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped dqn. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016.
|
| 249 |
+
[54] John Schulman, F. Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. ArXiv, abs/1707.06347, 2017.
|
| 250 |
+
[55] Yee Teh, Victor Bapst, Wojciech M. Czarnecki, John Quan, James Kirkpatrick, Raia Hadsell, Nicolas Heess, and Razvan Pascanu. Distral: Robust multitask reinforcement learning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
|
| 251 |
+
[56] Dibya Ghosh, Avi Singh, Aravind Rajeswaran, Vikash Kumar, and Sergey Levine. Divide-andconquer reinforcement learning. In International Conference on Learning Representations, 2018.
|
| 252 |
+
[57] Scott Fujimoto, H. V. Hoof, and D. Meger. Addressing function approximation error in actorcritic methods. ArXiv, abs/1802.09477, 2018.
|
| 253 |
+
[58] Ilya Kostrikov. Pytorch implementations of reinforcement learning algorithms. https:// github.com/ikostrikov/pytorch-a2c-ppo-acktr-gail, 2018.
|
| 254 |
+
[59] Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In In Proc. 19th International Conference on Machine Learning. Citeseer, 2002.
|
| 255 |
+
|
| 256 |
+
[60] Kimin Lee, Younggyo Seo, Seunghyun Lee, Honglak Lee, and Jinwoo Shin. Context-aware dynamics model for generalization in model-based reinforcement learning. ArXiv, abs/2005.06800, 2020.
|
md/train/RSU17UoKfJF/RSU17UoKfJF.md
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# R-GAP: RECURSIVE GRADIENT ATTACK ON PRIVACY
|
| 2 |
+
|
| 3 |
+
Junyi Zhu and Matthew Blaschko
|
| 4 |
+
|
| 5 |
+
Dept. ESAT, Center for Processing Speech and Images KU Leuven, Belgium {junyi.zhu,matthew.blaschko}@esat.kuleuven.be
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Federated learning frameworks have been regarded as a promising approach to break the dilemma between demands on privacy and the promise of learning from large collections of distributed data. Many such frameworks only ask collaborators to share their local update of a common model, i.e. gradients, instead of exposing their raw data to other collaborators. However, recent optimization-based gradient attacks show that raw data can often be accurately recovered from gradients. It has been shown that minimizing the Euclidean distance between true gradients and those calculated from estimated data is often effective in fully recovering private data. However, there is a fundamental lack of theoretical understanding of how and when gradients can lead to unique recovery of original data. Our research fills this gap by providing a closed-form recursive procedure to recover data from gradients in deep neural networks. We name it Recursive Gradient Attack on Privacy (R-GAP). Experimental results demonstrate that R-GAP works as well as or even better than optimization-based approaches at a fraction of the computation under certain conditions. Additionally, we propose a Rank Analysis method, which can be used to estimate the risk of gradient attacks inherent in certain network architectures, regardless of whether an optimization-based or closed-form-recursive attack is used. Experimental results demonstrate the utility of the rank analysis towards improving the network’s security. Source code is available for download from https://github.com/JunyiZhu-AI/R-GAP.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Distributed and federated learning have become common strategies for training neural networks without transferring data (Jochems et al., 2016; 2017; Konecnˇ y et al., 2016; McMahan et al., 2017). ´ Instead, model updates, often in the form of gradients, are exchanged between participating nodes. These are then used to update at each node a copy of the model. This has been widely applied for privacy purposes (Rigaki & Garcia, 2020; Cristofaro, 2020), including with medical data (Jochems et al., 2016; 2017). Recently, it has been demonstrated that this family of approaches is susceptible to attacks that can in some circumstances recover the training data from the gradient information exchanged in such federated learning approaches, calling into question their suitability for privacy preserving distributed machine learning (Phong et al., 2018; Wang et al., 2019; Zhu et al., 2019; Zhao et al., 2020; Geiping et al., 2020; Wei et al., 2020). To date these attack strategies have broadly fallen into two groups: (i) an analytical attack based on the use of gradients with respect to a bias term (Phong et al., 2018), and (ii) an optimization-based attack (Zhu et al., 2019) that can in some circumstances recover individual training samples in a batch, but that involves a difficult nonconvex optimization that doesn’t always converge to a correct solution (Geiping et al., 2020), and that provides comparatively little insights into the information that is being exploited in the attack.
|
| 14 |
+
|
| 15 |
+
The development of privacy attacks is most important because they inform strategies for protecting against them. This is achieved by perturbations to the transferred gradients, and the form of the attack can give insights into the type of perturbation that can effectively protect the data (Fan et al., 2020). As such, the development of novel closed-form attacks is essential to the analysis of privacy in federated learning. More broadly, the existence of model inversion attacks (He et al., 2019; Wang et al., 2019; Yang et al., 2019; Zhang et al., 2020) calls into question whether transferring a fully trained model can be considered privacy preserving. As the weights of a model trained by (stochastic) gradient descent are the summation of individual gradients, understanding gradient attacks can assist in the analysis of and protection against model inversion attacks in and outside of a federated learning setting.
|
| 16 |
+
|
| 17 |
+
In this work, we develop a novel third family of attacks, recursive gradient attack on privacy (RGAP), that is based on a recursive, depth-wise algorithm for recovering training data from gradient information. Different from the analytical attack using the bias term, R-GAP utilizes much more information and is the first closed-form algorithm that works on both convolutional networks and fully connected networks with or without bias term. Compared to optimization-based attacks, it is not susceptible to local optima, and is orders of magnitude faster to run with a deterministic running time. Furthermore, we show that under certain conditions our recursive attack can fully recover training data in cases where optimization attacks fail. Additionally, the insights gained from the closed form of our recursive attack have lead to a refined rank analysis that predicts which network architectures enable full recovery, and which lead to provable noisy recovery due to rankdeficiency. This explains well the performance of both closed-form and optimization-based attacks. We also demonstrate that using rank analysis we are able to make small modifications to network architectures to increase the network’s security without sacrificing its accuracy.
|
| 18 |
+
|
| 19 |
+
# 1.1 RELATED WORK
|
| 20 |
+
|
| 21 |
+
Bias attacks: The original discovery of the existence of an analytical attack based on gradients with respect to the bias term is due to Phong et al. (2018). Fan et al. (2020) also analyzed the bias attack as a system of linear equations, and proposed a method of perturbing the gradients to protect against it. Their work considers convolutional and fully-connected networks as equivalent, but this ignores the aggregation of gradients in convolutional networks. Similar to our work, they also perform a rank analysis, but it considers fewer constraints than is included in our analysis (Section 4).
|
| 22 |
+
|
| 23 |
+
Optimization attacks: The first attack that utilized an optimization approach to minimize the distance between gradients appears to be due to Wang et al. (2019). In this work, optimization is adopted as a submodule in their GAN-style framework. Subsequently, Zhu et al. (2019) proposed a method called deep leakage from gradients (DLG) which relies entirely on minimization of the difference of gradients (Section 2). They propose the use of L-BFGS (Liu & Nocedal, 1989) to perform the optimization. Zhao et al. (2020) further analyzed label inference in this setting, proposing an analytic way to reconstruct the one-hot label of multi-class classification in terms of a single input. Wei et al. (2020) show that DLG is sensitive to initialization and proposed that the same class image is an optimal initialization. They proposed to use SSIM as image similarity metric, which can then be used to guide optimization by DLG. Geiping et al. (2020) point out that as DLG requires second-order derivatives, L-BFGS actually requires third-order derivatives, which leads to challenging optimzation for networks with activation functions such as ReLU and LeakyReLU. They therefore propose to replace L-BFGS with Adam (Kingma & Ba, 2015). Similar to the work of Wei et al. (2020), Geiping et al. (2020) propose to incorporate an image prior, in this case total variation, while using PSNR as a quality measurement.
|
| 24 |
+
|
| 25 |
+
# 2 OPTIMIZATION-BASED GRADIENT ATTACKS ON PRIVACY (O-GAP)
|
| 26 |
+
|
| 27 |
+
Optimization-based gradient attacks on privacy (O-GAP) take the real gradients as its ground-truth label and utilizes optimization to decrease the distance between the real gradients $\nabla { \mathbf W }$ and the dummy gradients $\nabla { \mathbf W } ^ { \prime }$ generated by a pair of randomly initialized dummy data and dummy label. The objective function of O-GAP can be generally expressed as:
|
| 28 |
+
|
| 29 |
+
$$
|
| 30 |
+
\arg \operatorname* { m i n } _ { x ^ { \prime } , y ^ { \prime } } \| \nabla \mathbf { W } - \nabla \mathbf { W } ^ { \prime } \| ^ { 2 } = \arg \operatorname* { m i n } _ { x ^ { \prime } , y ^ { \prime } } \sum _ { i = 1 } ^ { d } \| \nabla \mathbf { W } _ { i } - \nabla \mathbf { W } _ { i } ^ { \prime } \| ^ { 2 } ,
|
| 31 |
+
$$
|
| 32 |
+
|
| 33 |
+
where the summation is taken over the layers of a network of depth $d$ , and $( x ^ { \prime } , y ^ { \prime } )$ is the dummy training data and label used to generate $\nabla W ^ { \prime }$ . The idea of O-GAP was proposed by Wang et al. (2019). However, they have adopted it as a part of their GAN-style framework and did not realize that O-GAP is able to preform a more accurate attack by itself. Later in the work of Zhu et al. (2019), O-GAP has been proposed as a stand alone approach, the framework has been named as Deep Leakage from Gradients (DLG).
|
| 34 |
+
|
| 35 |
+
The approach is intuitively simple, and in practice has been shown to give surprisingly good results (Zhu et al., 2019). However, it is sensitive to initialization and prone to fail (Zhao et al., 2020). The choice of optimizer is therefore important, and convergence can be very slow (Geiping et al., 2020). Perhaps most importantly, Equation 1 gives little insight into what information in the gradients is being exploited to recover the data. Analysis in Zhu et al. (2019) is limited to empirical insights, and fundamental open questions remain: What are sufficient conditions for arg $\begin{array} { r l } { { \bf \operatorname* { m i n } } _ { x ^ { \prime } , y ^ { \prime } } \sum _ { i = 1 } ^ { d ^ { - } } \| \nabla { \bf W } _ { i } - \nabla { \bf W } _ { i } ^ { \prime } \| ^ { 2 } } & { { } } \end{array}$ to have a unique minimizer? We address this question in Section 4, and subsequently validate our findings empirically.
|
| 36 |
+
|
| 37 |
+
# 3 CLOSED-FORM GRADIENT ATTACKS ON PRIVACY
|
| 38 |
+
|
| 39 |
+
The first attempt of closed-form GAP was proposed in a research of privacy-preserving deep learning by Phong et al. (2018).
|
| 40 |
+
|
| 41 |
+
Theorem 1 (Phong et al. (2018)). Assume a layer of a fully connected network with a bias term, expressed as:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
W x + b = z ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $W , b$ denote the weight matrix and bias vector, and $x , z$ denote the input vector and output vector of this layer. If the loss function $\ell$ of the network can be expressed as:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\ell = \ell ( f ( \pmb { x } ) , y )
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $f$ indicates a nested function of $\boldsymbol { x }$ including activation function and all subsequent layers, $y$ is the ground-truth label. Then $x$ can be derived from gradients w.r.t. $W$ and gradients w.r.t. $\pmb { b }$ , i.e.:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\begin{array} { l } { \displaystyle { \frac { \partial \ell } { \partial W } = \frac { \partial \ell } { \partial z } \pmb { x } ^ { \top } , \quad \frac { \partial \ell } { \partial \pmb { b } } = \frac { \partial \ell } { \partial z } } } \\ { \displaystyle { \boldsymbol { x } ^ { \top } = \frac { \partial \ell } { \partial W _ { j } } / \frac { \partial \ell } { \partial b _ { j } } } } \end{array}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $j$ denotes the $j$ -th row, note that in fact from each row we can compute a copy of $\mathbf { \dot { x } } ^ { \top }$ .
|
| 60 |
+
|
| 61 |
+
When this layer is the first layer of a network, it is possible to reconstruct the data, i.e. $\mathbf { X }$ , using this approach. In the case of noisy gradients, we can make use of the redundancy in estimating $\mathbf { X }$ by averaging over noisy estimates: $\begin{array} { r } { \bar { \mathbf { x } } ^ { \top } = \sum _ { j } \frac { \partial \ell } { \partial \mathbf { W } _ { j } } / \frac { \partial \ell } { \partial \mathbf { b } _ { j } } } \end{array}$ \`W / ∂\`∂b . However, simply removing the bias term can disable this attack. Besides, this approach does not work on convolutional neural networks due to a dimension mismatch in Equation 3. Both of these two problems have been resolved in our approach.
|
| 62 |
+
|
| 63 |
+
# 3.1 RECURSIVE GRADIENT ATTACK ON PRIVACY (R-GAP)
|
| 64 |
+
|
| 65 |
+
For simplicity we derive the R-GAP in terms of binary classification with a single image as input. In this setting we can generally describe the network and loss function as:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\begin{array} { r l } & { \mu = y \mathbf { w } _ { d } \sigma _ { d - 1 } \left( \mathbf { W } _ { d - 1 } \underbrace { \sigma _ { d - 1 } ( \mathbf { x } ) } _ { = : f _ { d - 2 } ( \mathbf { x } ) } \right) } \\ & { \ell = \log ( 1 + e ^ { - \mu } ) } \end{array}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $y \in \{ - 1 , 1 \}$ , $d$ denotes the $d$ -th layer, $\phi$ represents all layers previous to $d - 2$ , and $\sigma$ denotes the activation function. Note that, although our notation omits the bias term in our approach, with an augmented matrix and augmented vector it is able to represent both of the linear map and the translation, e.g. Equation 2, using matrix multiplication as shown in Equation 4. So our formulation also includes the approach proposed by Phong et al. (2018). Moreover, if the $i$ -th layer is a convolutional layer, then $\mathbf { W } _ { i }$ is an extended circulant matrix representing the convolutional kernel (Golub & Van Loan, 1996), and data $\mathbf { X }$ as well as input of each layer are represented by a flattened vector in Equation 4.
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
\`: Logistic loss
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
\`: Exponential loss
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
\`: Hinge loss
|
| 81 |
+
|
| 82 |
+
Figure 1: In consideration of logistic loss, exponential loss and hinge loss, $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ is not monotonic w.r.t. $\mu$ . It is equal to 0 at $\mu = 0$ , after that it either approximates $0 ^ { - }$ , or equals to 0 after decreasing to $\mu = 1$ .
|
| 83 |
+
|
| 84 |
+
# 3.1.1 RECOVERING DATA FROM GRADIENTS
|
| 85 |
+
|
| 86 |
+
From Equation 4 and Equation 5 we can derive following gradients:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\begin{array} { r l } & { \quad \quad \displaystyle \frac { \partial \ell } { \partial \mathbf { w } _ { d } } = y \frac { \partial \ell } { \partial \mu } f _ { d - 1 } ^ { \top } } \\ & { \quad \quad \displaystyle \frac { \partial \ell } { \partial \mathbf { W } _ { d - 1 } } = \left( \left( \mathbf { w } _ { d } ^ { \top } \left( y \frac { \partial \ell } { \partial \mu } \right) \right) \odot \sigma _ { d - 1 } ^ { \prime } \right) f _ { d - 2 } ^ { \top } } \\ & { \quad \quad \displaystyle \frac { \partial \ell } { \partial \mathbf { W } _ { d - 2 } } = \left( \left( \mathbf { W } _ { d - 1 } ^ { \top } \left( \left( \mathbf { w } _ { d } ^ { \top } \left( y \frac { \partial \ell } { \partial \mu } \right) \right) \odot \sigma _ { d - 1 } ^ { \prime } \right) \right) \odot \sigma _ { d - 2 } ^ { \prime } \right) \phi ^ { \top } } \end{array}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $\sigma ^ { \prime }$ denotes the derivative of $\sigma$ , for more details of deriving the gradients refer to Appendix $_ \mathrm { H }$ The first observation of these gradients is that:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\frac { \partial \ell } { \partial \mathbf { w } _ { d } } \cdot \mathbf { w } _ { d } = \frac { \partial \ell } { \partial \mu } \mu
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Additionally, if $\sigma _ { 1 } , \ldots , \sigma _ { d - 1 }$ are ReLU or LeakyRelu, the dot product of the gradients and weights of each layer will be the same, i.e.:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\frac { \partial \ell } { \partial \mathbf { w } _ { d } } \cdot \mathbf { w } _ { d } = \frac { \partial \ell } { \partial \mathbf { W } _ { d - 1 } } \cdot \mathbf { W } _ { d - 1 } = \ldots = \frac { \partial \ell } { \partial \mathbf { W } _ { 1 } } \cdot \mathbf { W } _ { 1 } = \frac { \partial \ell } { \partial \mu } \mu
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
Since gradients and weights of each layer are known, we can obtain $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ . If loss function $\ell$ is logistic loss (Equation 5), we obtain:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\frac { \partial \ell } { \partial \mu } \mu = \frac { - \mu } { 1 + e ^ { \mu } } .
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
In order to perform R-GAP, we need to derive $\mu$ from $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ . As we can see, $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ is non-monotonic, which means knowing $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ does not always allow us to uniquely recover $\mu$ . However, even in the case that we cannot uniquely recover $\mu$ , there are only two possible values to consider. Figure 1 illustrates $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ of logistic, exponential, and hinge losses, showing when we can uniquely recover $\mu$ from $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ . The non-uniqueness of $\mu$ inspires us to find a sort of data that can trigger exactly the same gradients as the real data, which we name twin data, denoted by $\tilde { \mathbf { x } }$ . The existence of twin data demonstrates that the objective function of DLG could have more than one global minimum, which explains at least in part why DLG is sensitive to initialization, for more information and experiments about the twin data refer to Appendix B.
|
| 111 |
+
|
| 112 |
+
The second observation on Equations 6-8 is that the gradients of each layer have a repeated format:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\begin{array} { r l r } { { \frac { \partial \ell } { \partial \mathbf { w } _ { d } } = \mathbf { k } _ { d } f _ { d - 1 } ^ { \top } ; \mathbf { k } _ { d } : = y \frac { \partial \ell } { \partial \mu } } } \\ & { } & { \frac { \partial \ell } { \partial \mathbf { W } _ { d - 1 } } = \mathbf { k } _ { d - 1 } f _ { d - 2 } ^ { \top } ; \mathbf { k } _ { d - 1 } : = ( \mathbf { w } _ { d } ^ { \top } \mathbf { k } _ { d } ) \odot \sigma _ { d - 1 } ^ { \prime } } \\ & { } & { \frac { \partial \ell } { \partial \mathbf { W } _ { d - 2 } } = \mathbf { k } _ { d - 2 } \boldsymbol { \phi } ^ { \top } ; \mathbf { k } _ { d - 2 } : = ( \mathbf { W } _ { d - 1 } ^ { \top } \mathbf { k } _ { d - 1 } ) \odot \sigma _ { d - 2 } ^ { \prime } } \end{array}
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
In Equation 12, the value of $y$ can be derived from the sign of the gradients at this layer if the activation function of previous layer is ReLU or Sigmoid, i.e. $f _ { d - 1 } > 0$ . For multi-class classification, $y$ can always be analytically derived as proved by Zhao et al. (2020). From Equations 12-14 we can see that gradients are actually linear constraints on the output of the previous layer, also the input of the current layer. We name these gradient constraints, which can be generally described as:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathbf { K } _ { i } \mathbf { x } _ { i } = \mathrm { f l a t t e n } ( \frac { \partial \ell } { \partial \mathbf { W } _ { i } } ) ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $i$ denotes $i$ -th layer, $\mathbf { x } _ { i }$ denotes the input and $\mathbf { K } _ { i }$ is a coefficient matrix containing all gradient constraints at the $i$ -th layer.
|
| 125 |
+
|
| 126 |
+
# 3.1.2 IMPLEMENTATION OF R-GAP
|
| 127 |
+
|
| 128 |
+
To reconstruct the input $\mathbf { x } _ { i }$ from the gradients $\frac { \partial \ell } { \partial \mathbf { W } _ { i } }$ at the $i$ -th layer, we need to determine $\mathbf { K } _ { i }$ or $\mathbf { k } _ { i }$ . The coefficient vector $\mathbf { k } _ { i }$ solely relies on the reconstruction of the subsequent layer. For example in Equation 13, $\mathbf { k } _ { d - 1 }$ consists of $\mathbf { w } _ { d } , \mathbf { k } _ { d } , \sigma _ { d - 1 } ^ { \prime }$ , where ${ \bf w } _ { d }$ is known, and $\mathbf { k } _ { d }$ and $\sigma _ { d - 1 } ^ { \prime }$ are products of the reconstruction at the $d$ -th layer. More specifically, $\mathbf { k } _ { d }$ can be calculated by deriving $y$ and $\mu$ as described in Section 3.1.1, $\sigma _ { d - 1 } ^ { \prime }$ can be derived from the reconstructed $f _ { d - 1 }$ . The condition for recovering $\mathbf { x } _ { i }$ under gradient constraints $\mathbf { k } _ { i }$ is that the rank of the coefficient matrix equals the number of entries of the input, $\mathrm { r a n k } ( \mathbf { K } _ { i } ) = | \mathbf { x } _ { i } |$ . Furthermore, if this rank condition holds for $i = 1 , . . . , d$ , we are able to reconstruct the input at each layer and do this recursively back to the input of the first layer.
|
| 129 |
+
|
| 130 |
+
The number of gradient constraints is the same as the number of weights, i.e. ro $\mathrm { v s } ( \mathbf { K } _ { i } ) = | \mathbf { W } _ { i } |$ ; $i =$ $1 , . . . , d$ . Specifically, in the case of a fully connected layer we always have $\mathrm { r a n k } ( \mathbf { K } _ { i } ) = \lvert \mathbf { x } _ { i } \rvert$ , which implies the reconstruction over FCNs is always feasible. However in the case of a convolutional layer the matrix could possibly be rank-deficient to derive $\mathbf { X }$ . Fortunately, from the view of recursive reconstruction and assuming we know the input of the subsequent layer, i.e. the output of the current layer, there is a new group of linear constraints which we name weight constraints:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\mathbf { W } _ { i } \mathbf { x } _ { i } = \mathbf { z } _ { i } ; \quad \mathbf { z } _ { i } \gets f _ { i }
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
For a convolution layer, the $\mathbf { W } _ { i }$ we use in this paper is the corresponding circulant matrix representing the convolutional kernel (Golub & Van Loan, 1996), so we can express the convolution in the form of Equation 16. In order to derive $\mathbf { z } _ { i }$ from $f _ { i }$ , the activation function $\sigma _ { i }$ should be monotonic. Commonly used activation functions satisfy this requirement. Note that for the ReLU activation function, a 0 value in $f _ { i }$ will remove a constraint in $\mathbf { W } _ { i }$ . Otherwise, the number of weights constraints is equal to the number of entries in output, i.e. $\mathrm { r o w s } ( \mathbf { W } _ { i } ) = | \mathbf { z } _ { i } | ; ~ i = 1 , . . . , d$ . In CNNs the number of weight constraints $\left| \mathbf { z } _ { i } \right|$ is much larger than the number of gradient constraints $| \mathbf { W } _ { i } |$ in bottom layers, and well compensate for the lack of gradient constraints in those layers. It is worth noting that, due to the transformation from a CNN to a FCN using the circulant matrix, a CNN has been regarded equivalent to a FCN in the parallel work of Fan et al. (2020). However, we would like to point out that in consideration of the gradients w.r.t. the circulant matrix, what we obtain from a CNN are the aggregated gradients. Therefore, the number of valid gradient constraints in a CNN are much smaller than its corresponding FCN. Therefore, the conclusion of a rank analysis derived from a FCN cannot be directly applied to a CNN.
|
| 137 |
+
|
| 138 |
+
Moreover, padding in the $i$ -th convolutional layer increases $\left| { { \bf { x } } _ { i } } \right|$ , but also involves the same number of constraints, so we omit this detail in the subsequent discussion. However, we have incorporated the corresponding constraints in our approach. Based on gradient constraints and weight constraints, we break the gradient attacks down to a recursive process of solving systems of linear equations, which we name R-GAP . The approach is detailed in Algorithm 1.
|
| 139 |
+
|
| 140 |
+
# 4 RANK ANALYSIS
|
| 141 |
+
|
| 142 |
+
For optimization-based gradient attacks such as DLG, it is hard to estimate whether it will converge to a unique solution given a network’s architecture other than performing an empirical test. An intuitive assumption would be that the more parameters in the model, the greater the chance of unique recovery, since there will be more terms in the objective function constraining the solution. We provide here an analytic approach, with which it is easy to estimate the feasibility of performing the recursive gradient attack, which in turn is a good proxy to estimate when DLG converges to a good solution (see Figure 2).
|
| 143 |
+
|
| 144 |
+
Algorithm 1: R-GAP (Notation is consistent with Equation 6 to Equation 15)
|
| 145 |
+
|
| 146 |
+
<table><tr><td colspan="2">Data: i: i-th layer; Wi: weights; VWi: gradients; Result: X1</td></tr><tr><td colspan="2">fori←d to1 do if i=d then</td></tr><tr><td colspan="2">μ = VWi·Wi; al μ↑ al</td></tr><tr><td colspan="2">比:</td></tr><tr><td colspan="2">y</td></tr><tr><td colspan="2">else /* Derive σ' and zi from fi. Note that Xi+1= fi. */</td></tr><tr><td colspan="2">←Xi+1;Zi←Xi+1;</td></tr><tr><td colspan="2">ki :=(Wi+1 ki+1) ① σ';</td></tr><tr><td colspan="2">end</td></tr><tr><td colspan="2">Ki ←ki; Vwi := flatten(VWi);</td></tr><tr><td colspan="2">[Wi] ; bi := Zi A:= K Vw i</td></tr></table>
|
| 147 |
+
|
| 148 |
+
Since R-GAP solves a sequence of linear equations, it is infeasible when the number of unknown parameters is more than the number of constraints at any $i$ -th layer, i.e. $\left| \mathbf { x } _ { i } \right| - \left| \mathbf { W } _ { i } \right| - \left| \mathbf { z } _ { i } \right| > 0 .$ . More precisely, R-GAP requires that the rank of $\mathbf { A } _ { i }$ , which consists of $\mathbf { W } _ { i }$ and $\mathbf { K } _ { i }$ as shown in Algorithm 1, is equal to the number of input entries $\left| { { \bf { x } } _ { i } } \right|$ . However, $\mathbf { A } _ { i } \mathbf { x } _ { i } = \mathbf { z } _ { i }$ does not include all effective constraints over $\mathbf { x } _ { i }$ . Because $\mathbf { x } _ { i }$ is unique to $\mathbf { z } _ { i - 1 }$ or partly unique in terms of the ReLU activation function, any constraint over $\mathbf { z } _ { i - 1 }$ will limit the possible value of $\mathbf { x } _ { i }$ . On that note, suppose $| { \bf x } _ { i - 1 } | =$ $m$ , $| { \bf z } _ { i - 1 } | = n$ and the weight constraints at the $i - 1$ layer is overdetermined, i.e. $\mathbf { W } _ { i - 1 } \mathbf { x } _ { i - 1 } =$ $\mathbf { z } _ { i - 1 }$ ; $m < n$ , $r a n k ( \mathbf { W } _ { i - 1 } ) = m$ . Without the loss of generality, let the first $m$ entries of $\mathbf { z } _ { i - 1 }$ be linearly independent, the $m + 1$ , . . . , $n$ entries of $\mathbf { z } _ { i - 1 }$ can be expressed as linear combination of the first $m$ entries, i.e. $\mathbf { M } \mathbf { z } _ { i - 1 } ^ { 1 , . . . , m } = \mathbf { z } _ { i - 1 } ^ { m + 1 , . . . , n }$ . In other words, if the previous layers are overdetermined by weight constraints, the subsequent layer will have additional constraints, not merely its local weight constraints and gradient constraints. Since this type of additional constraint is not derived from the parameters of the layer that under reconstruction, we name them virtual constraints denoted by $\nu$ . When the activation function is the identity function, the virtual constraints are linear and can be readily derived. For the derivative of the activation function not being a constant, the virtual constraints will become non-linear. For more details about deriving the virtual constraints, refer to Appendix C. Optimization based attacks such as DLG are iterative algorithms based on gradient descent, and are able to implicitly utilize the non-linear virtual constraints. Therefore to provide a comprehensive estimate of the data vulnerability under gradient attacks, we also have to count the number of virtual constraints. It is worth noticing that virtual constraints can be passed along through the linear equation systems chain, but only in one direction that is to the subsequent layers. Next, we will informally use $| \nu _ { i } |$ to denote the number of virtual constraints at the $i$ -th layer, which can be approximated by $\begin{array} { r } { \sum _ { n = 1 } ^ { i - 1 } m a x ( | \mathbf { z } _ { n } | - | \mathbf { x } _ { n } | , 0 ) - m a x ( | \mathbf { x } _ { n } | - | \mathbf { z } _ { n } | - | \mathbf { W } _ { n } | , 0 ) . } \end{array}$ . For more details refer to Appendix C. In practice, the real number of such constraints is dependent on the data, current weights, and choice of activation function.
|
| 149 |
+
|
| 150 |
+
These three types of constraints, gradient, weight and virtual constraints, are effective for predicting the risk of gradient attack. To conclude, we propose that $\left| \mathbf { x } _ { i } \right| - \left| \mathbf { W } _ { i } \right| - \left| \mathbf { z } _ { i } \right| - \left| \mathcal { V } _ { i } \right|$ is a good index to estimate the feasibility of fully recovering the input using gradient attacks at the $i$ -th layer. We denote this value rank analysis index $( R A - i )$ . Particularly, $| \mathbf { \bar { x } } _ { i } | - | \mathbf { W } _ { i } | - | \mathbf { z } _ { i } | - | \mathcal { V } _ { i } | > 0$ indicates it is not possible to perform a complete reconstruction of the input, and the larger this index is, the poorer the quality of reconstruction will be. If the constraints in a particular problem are linearly independent, $| \mathbf { x } _ { i } | - | \mathbf { W } _ { i } | - | \mathbf { z } _ { i } | - | \mathcal { V } _ { i } | < 0$ implies the ability to fully recover the input. The quality of reconstruction of data is well estimated by the maximal RA-i of all layers, as shown in Figure 2. In practice, the layers close to the data usually have smaller RA-i due to fewer virtual constraints.
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 2: Estimating the privacy leakage of network through rank analysis. The critical layer for reconstruction has been red colored. First three columns show that even though bigger network has much more parameters denoted by $| \mathbf { W } |$ , which means we can collect more gradients to reconstruct the data, but if the layer close to data is rank-deficient, we are not able to fully recover the data. Despite that in the objective function of DLG, distance between all gradients will be reduced at the same time, redundant constraints in subsequent layer certainly cannot compensate the lack of constraints in previous layer. The fourth column shows that if rank-deficiency happens at the intermediate layer, redundant weight constraints in previous layer, i.e. virtual constraints, is able to compensate the deficiency at the intermediate layer. If a layer is rank-deficient after taking virtual constraints into account, fully recovery is again not possible as shown in the fifth column. However, as the rank analysis index of last column is smaller than the one of the second and third column, the reconstruction at the fifth column has a better quality. This figure demonstrates that rank analysis can correctly estimate the feasibility of performing DLG, for statistic result refer to Appendix A.
|
| 154 |
+
|
| 155 |
+
On top of that we analyse the residual block in ResNet, which shows some interesting traits of the skip connection in terms of the rank-deficiency, for more details refer to Appendix D.
|
| 156 |
+
|
| 157 |
+
A valuable observation we obtain through the rank analysis is that the architecture rather than the number of parameters is critical to gradient attacks, as shown in Figure 2. This observation is not obvious from simply specifying the DLG optimization problem(see Equation 1). Furthermore, since the data vulnerability of a network depends on the layer with maximal RA-i, we can design rank-deficiency into the architecture to improve the security of a network (see Figure 4).
|
| 158 |
+
|
| 159 |
+
# 5 RESULTS
|
| 160 |
+
|
| 161 |
+
Our novel approach R-GAP successfully extends the analytic gradient attack (Phong et al., 2018) from attacking a FCN with bias terms to attacking FCNs and $\mathrm { C N N s ^ { 1 } }$ with or without bias terms. To test its performance, we use a CNN6 network as shown in Figure 3, which is full-rank considering gradient constraints and weight constraints. Additionally, we report results using a CNN6-d network, which is rank-deficient without consideration of virtual constraints, in order to to fairly compare the performance of DLG and R-GAP. CNN6-d has a CNN6 backbone and just decreases the output channel of the second convolutional layer to 20. The activation function is a LeakyReLU except the last layer, which is a Sigmoid. We have randomly initialized the network, as DLG is prone to fail if the network is at a late stage of training (Geiping et al., 2020). Furthermore, as the label can be analytically recovered by R-GAP, we always provide DLG the ground-truth label and let it recover the image only. Therefore the experiment actually compares R-GAP with iDLG (Zhao et al., 2020). The experimental results show that, due to an analytic one-shot process, run-time of R-GAP is orders of magnitude shorter than DLG. Moreover, R-GAP can recover the data more accurately, while optimization-based methods like DLG recover the data with artifacts, as shown in Figure 3. The statistical results in Table 1 also show that the reconstruction of R-GAP has a much lower MSE than DLG on the CNN6 network. However, as R-GAP only considers gradient constraints and weight constraints in the current implementation, it does not work well on the CNN6-d network. Nonetheless, we find that it is easy to assess the quality of reconstruction of gradient attack without knowing the original image. As the better reconstruction has less salt-and-pepper type noise. We measure this by the difference of the image and its smoothed version (achieved by a simple $3 \mathrm { x } 3$ averaging) and select the output with the smaller norm. This hybrid approach which we name HGAP combines the strengths of R-GAP and DLG, and obtains the best results.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 3: Performance of our approach and DLG over a CNN6 architecture. The diagram on the left demonstrates the network architecture on which we perform attack. The activation functions are LeakyReLU, except the last one which is Sigmoid.
|
| 165 |
+
|
| 166 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>CNN6*</td><td rowspan=1 colspan=1>CNN6-d*</td><td rowspan=1 colspan=1>CNN6**</td><td rowspan=1 colspan=1>CNN6-d**</td></tr><tr><td rowspan=1 colspan=1>R-GAP</td><td rowspan=1 colspan=1>0.010± 0.0017</td><td rowspan=1 colspan=1>1.4 ± 0.073</td><td rowspan=1 colspan=1>1.9×10-4±7.0×10-5</td><td rowspan=1 colspan=1>0.0090±9.3×10-4</td></tr><tr><td rowspan=1 colspan=1>DLG</td><td rowspan=1 colspan=1>0.050±0.0014</td><td rowspan=1 colspan=1>0.053±0.0016</td><td rowspan=1 colspan=1>4.2×10 ±5.9×10-5</td><td rowspan=1 colspan=1>0.0012±1.8×10-4</td></tr><tr><td rowspan=1 colspan=1>H-GAP</td><td rowspan=1 colspan=1>0.0069±0.0012</td><td rowspan=1 colspan=1>0.053± 0.0016</td><td rowspan=1 colspan=1>1.4×10-4±2.3×10-5</td><td rowspan=1 colspan=1>0.0012±1.8×10</td></tr></table>
|
| 167 |
+
|
| 168 |
+
\*:CIFAR10 \*\*:MNIST
|
| 169 |
+
|
| 170 |
+
Table 1: Comparison of the performance of R-GAP, DLG and H-GAP. MSE has been used to measure the quality of the reconstruction.
|
| 171 |
+
|
| 172 |
+
Moreover, we compare R-GAP with DLG on LeNet which has been benchmarked in DLG(Zhu et al., 2019), the statistical results are shown in Table 2. Both DLG and R-GAP perform well on LeNet. Empirically, if the MSE is around or below $1 \times 1 0 ^ { - 4 }$ , the difference of the reconstruction will be visually undetectable. However, we surprisingly find that by replacing the Sigmoid function with the Leaky ReLU, the reconstruction of DLG becomes much poorer. The condition number of matrix A (from Algorithm 1) changes significantly in this case. Since the Sigmoid function leads to a higher condition number at each convolutional layer, reconstruction error in the subsequent layer could be amplified in the previous layer, therefore DLG is forced to converge to a better result. In contrast, R-GAP has an accumulated error and naturally performs much better on LeNet\*. Additionally, we find R-GAP could be a good initialization tool for DLG. As shown in the last column of Table 2, by initializing DLG with the reconstruction of R-GAP, and running $8 \%$ of the previous iterations, we achieve a visually indistinguishable result. However, for LeNet\*, we find that DLG reduces the reconstruction quality obtained by R-GAP, which further shows the instability of DLG.
|
| 173 |
+
|
| 174 |
+
Our rank analysis is a useful offline tool to understand the risk inherent in certain network architectures. More precisely, we can use the rank analysis to find out the critical layer for the success of
|
| 175 |
+
|
| 176 |
+
<table><tr><td rowspan=2 colspan=1></td><td rowspan=1 colspan=3>Condition number</td><td rowspan=1 colspan=3>MSE</td></tr><tr><td rowspan=1 colspan=1>conv1</td><td rowspan=1 colspan=1>conv2</td><td rowspan=1 colspan=1>conv3</td><td rowspan=1 colspan=1>DLG</td><td rowspan=1 colspan=1>R-GAP</td><td rowspan=1 colspan=1>R-GAP→DLG</td></tr><tr><td rowspan=1 colspan=1>LeNet</td><td rowspan=1 colspan=1>1.8×104±2.9</td><td rowspan=1 colspan=1>6.1×10±0.3</td><td rowspan=1 colspan=1>32.4±2.9×10-4</td><td rowspan=1 colspan=1>3.7×10-8±8.6×10-10</td><td rowspan=1 colspan=1>1.1×10-4±7.8× 10-6</td><td rowspan=1 colspan=1>1.1×10-6±1.1 ×10-6</td></tr><tr><td rowspan=1 colspan=1>LeNet*</td><td rowspan=1 colspan=1>1.2×10±19.7</td><td rowspan=1 colspan=1>1.3×10±22.5</td><td rowspan=1 colspan=1>14.2±0.05</td><td rowspan=1 colspan=1>5.2×10-2±2.9 ×10-3</td><td rowspan=1 colspan=1>1.5×10-10±2.5 × 10-11</td><td rowspan=1 colspan=1>4.8×10±9.1 × 10-5</td></tr></table>
|
| 177 |
+
|
| 178 |
+
LeNet\* is identical to LeNet but uses Leaky ReLU activation function instead of Sigmoid
|
| 179 |
+
|
| 180 |
+
Table 2: Comparison of R-GAP and DLG on LeNet benchmarked in DLG(Zhu et al., 2019).
|
| 181 |
+
|
| 182 |
+
gradient attacks and take precision measurements to improve the network’s defendability. We report results on the ResNet-18, where the third residual block is critical since by cutting its skip connection the RA-i increases substantially. To perform the experiments, we use the approach proposed by Geiping et al. (2020), which extends DLG to incorporate image priors and performs better on deep networks. As shown in Figure 4, by cutting the skip connection of the third residual block, reconstructions become significantly poorer and more unstable. As a control test, cutting the skip connection of a non-critical residual block does not increase defendability noticeably. Note that two variants have the same or even slightly better performance on the classification task compared with the backbone. In previous works (Zhu et al., 2019; Wei et al., 2020), trade-off between accuracy and defendability of adding noise to gradients has been discussed. We show that using the rank analysis we are able to increase the defendability of a network with no cost in accuracy.
|
| 183 |
+
|
| 184 |
+

|
| 185 |
+
Figure 4: Left: Architectures of the ResNet18 with base width 16 and two variants. Variant 1 cuts the skip connection of the third residual block. Variant 2 cuts the skip connection of the eighth residual block. Upper right: Reconstruction examples of three networks. Lower right: Accuracy and reconstruction error of three networks. Training 200 epochs on CIFAR10 and saving the model with the best performance on the validation set, three networks achieve a close accuracy. Two variants perform even slightly better. In terms of gradient attacks, MSE of reconstructions from ResNet18 and Variant 2 are similar, since Variant 2 cut the skip connection of a non-critical layer and the RA-i does not change. Whereas, by cuting the skip connection of a critical layer, according to the rank analysis, increases RA-i substantially. MSE of the reconstructions from Variant 1 increases by nearly a factor of three with higher variance.
|
| 186 |
+
|
| 187 |
+
# 6 DISCUSSION AND CONCLUSIONS
|
| 188 |
+
|
| 189 |
+
R-GAP makes the first step towards a general analytic gradient attack and provides a framework to answer questions about the functioning of optimization-based attacks. It also opens new questions, such as how to analytically reconstruct a minibatch of images, especially considering nonuniqueness due to permutation of the image indices. Nonetheless, we believe that by studying these questions, we can gain deeper insights into gradient attacks and privacy secure federated learning.
|
| 190 |
+
|
| 191 |
+
In this paper, we propose a novel approach R-GAP, which has achieved an analytic gradient attack for CNNs for the first time. Through analysing the recursive reconstruction process, we propose a novel rank analysis to estimate the feasibility of performing gradient based privacy attacks given a network architecture. Our rank analysis can be applied to the analysis of both closed-form and optimization-based attacks such as DLG. Using our rank analysis, we are able to determine network modifications that maximally improve the network’s security, empirically without sacrificing its accuracy. Furthermore, we have analyzed the existence of twin data using R-GAP, which can explain at least in part why DLG is sensitive to initialization and what type of initialization is optimal. In summary, our work proposes a novel type of gradient attack, a risk estimation tool and advances the understanding of optimization-based gradient attacks.
|
| 192 |
+
|
| 193 |
+
# ACKNOWLEDGEMENTS
|
| 194 |
+
|
| 195 |
+
This research received funding from the Flemish Government (AI Research Program).
|
| 196 |
+
|
| 197 |
+
# REFERENCES
|
| 198 |
+
|
| 199 |
+
Peter L Bartlett, Michael I Jordan, and Jon D McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006.
|
| 200 |
+
|
| 201 |
+
Emiliano De Cristofaro. An overview of privacy in machine learning. arXiv:2005.08679, 2020.
|
| 202 |
+
|
| 203 |
+
Lixin Fan, Kam Woh Ng, Ce Ju, Tianyu Zhang, Chang Liu, Chee Seng Chan, and Qiang Yang. Rethinking privacy preserving deep learning: How to evaluate and thwart privacy attacks. In Qiang Yang, Lixin Fan, and Han Yu (eds.), Federated Learning: Privacy and Incentive, pp. 32– 50. Springer, 2020.
|
| 204 |
+
|
| 205 |
+
Jonas Geiping, Hartmut Bauermeister, Hannah Droge, and Michael Moeller. Inverting gradients: ¨ How easy is it to break privacy in federated learning? In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33, 2020.
|
| 206 |
+
|
| 207 |
+
Gene H. Golub and Charles F. Van Loan. Matrix Computations. Johns Hopkins University Press, 1996.
|
| 208 |
+
|
| 209 |
+
Zecheng He, Tianwei Zhang, and Ruby B. Lee. Model inversion attacks against collaborative inference. In Proceedings of the 35th Annual Computer Security Applications Conference, ACSAC ’19, pp. 148–162, 2019.
|
| 210 |
+
|
| 211 |
+
Arthur Jochems, Timo M. Deist, Johan van Soest, Michael Eble, Paul Bulens, Philippe Coucke, Wim Dries, Philippe Lambin, and Andre Dekker. Distributed learning: Developing a predictive model based on data from multiple hospitals without data leaving the hospital – a real life proof of concept. Radiotherapy and Oncology, 121(3):459 – 467, 2016.
|
| 212 |
+
|
| 213 |
+
Arthur Jochems, Timo Deist, Issam El Naqa, Marc Kessler, Chuck Mayo, Jackson Reeves, Shruti Jolly, Martha Matuszak, Randall Ten Haken, Johan Soest, Cary Oberije, Corinne Faivre-Finn, Gareth Price, Dirk Ruysscher, Philippe Lambin, and Andre Dekker. Developing and validating ´ a survival prediction model for nsclc patients through distributed learning across three countries. International Journal of Radiation Oncology\*Biology\*Physics, 99, 04 2017.
|
| 214 |
+
|
| 215 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun (eds.), 3rd International Conference on Learning Representations, 2015.
|
| 216 |
+
|
| 217 |
+
Jakub Konecnˇ y, H. Brendan McMahan, Felix X. Yu, Peter Richtarik, Ananda Theertha Suresh, and´ Dave Bacon. Federated learning: Strategies for improving communication efficiency. In NIPS Workshop on Private Multi-Party Machine Learning, 2016.
|
| 218 |
+
|
| 219 |
+
Dong C. Liu and Jorge Nocedal. On the limited memory BFGS method for large scale optimization. Math. Program., 45(1–3):503–528, August 1989.
|
| 220 |
+
|
| 221 |
+
Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Aarti Singh and Jerry Zhu (eds.), Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, volume 54 of Proceedings of Machine Learning Research, pp. 1273–1282, 2017.
|
| 222 |
+
|
| 223 |
+
L. T. Phong, Y. Aono, T. Hayashi, L. Wang, and S. Moriai. Privacy-preserving deep learning via additively homomorphic encryption. IEEE Transactions on Information Forensics and Security, 13(5):1333–1345, 2018.
|
| 224 |
+
|
| 225 |
+
Maria Rigaki and Sebastian Garcia. A survey of privacy attacks in machine learning. CoRR, abs/2007.07646, 2020.
|
| 226 |
+
|
| 227 |
+
Z. Wang, M. Song, Z. Zhang, Y. Song, Q. Wang, and H. Qi. Beyond inferring class representatives: User-level privacy leakage from federated learning. In IEEE INFOCOM 2019 - IEEE Conference on Computer Communications, pp. 2512–2520, 2019.
|
| 228 |
+
|
| 229 |
+
Wenqi Wei, Ling Liu, Margaret Loper, Ka-Ho Chow, Mehmet Emre Gursoy, Stacey Truex, and Yanzhao Wu. A framework for evaluating client privacy leakages in federated learning. In Liqun Chen, Ninghui Li, Kaitai Liang, and Steve Schneider (eds.), Computer Security – ESORICS, pp. 545–566. Springer, 2020.
|
| 230 |
+
|
| 231 |
+
Ziqi Yang, Jiyi Zhang, Ee-Chien Chang, and Zhenkai Liang. Neural network inversion in adversarial setting via background knowledge alignment. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 225–240, 2019.
|
| 232 |
+
|
| 233 |
+
Yuheng Zhang, Ruoxi Jia, Hengzhi Pei, Wenxiao Wang, Bo Li, and Dawn Song. The secret revealer: Generative model-inversion attacks against deep neural networks. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 250–258, 2020.
|
| 234 |
+
|
| 235 |
+
Bo Zhao, Konda Reddy Mopuri, and Hakan Bilen. iDLG: Improved deep leakage from gradients. arXiv:2001.02610, 2020.
|
| 236 |
+
|
| 237 |
+
Ligeng Zhu, Zhijian Liu, and Song Han. Deep leakage from gradients. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alche Buc, E. Fox, and R. Garnett (eds.),´ Advances in Neural Information Processing Systems 32, pp. 14774–14784, 2019.
|
| 238 |
+
|
| 239 |
+
# A QUANTITATIVE RESULTS OF RANK ANALYSIS
|
| 240 |
+
|
| 241 |
+
A quantitative analysis of the predictive performance of the rank analysis index for the mean squared error of reconstruction is shown in Table 3.
|
| 242 |
+
|
| 243 |
+
$$
|
| 244 |
+
\frac { \mathrm { R A - i } } { \mathrm { M S E } } \| \begin{array} { c } { 4 8 4 } \\ { 4 . 2 \times 1 0 ^ { - 9 } } \\ { \pm 2 . 2 \times 1 0 ^ { - 9 } } \end{array} | \begin{array} { c } { 4 0 5 } \\ { 0 . 0 5 6 \pm 0 . 0 0 3 5 } \\ { 0 . 0 6 3 \pm 0 . 0 0 4 } \\ { \pm 2 . 0 \times 1 0 ^ { - 5 } } \end{array} \| \begin{array} { c } { 4 0 5 } \\ { 2 . 7 \times 1 0 ^ { - 4 } } \\ { 2 . 2 \times 1 0 ^ { - 5 } } \end{array} \frac { 3 1 6 } { \begin{array} { c } { 0 . 1 8 } \\ { 0 . 0 1 3 } \\ { \pm 7 . 2 \times 1 0 ^ { - 4 } } \end{array} } .
|
| 245 |
+
$$
|
| 246 |
+
|
| 247 |
+
Table 3: Mean square error of the reconstruction over test set of CIFAR10. The corresponding network architecture has been shown in Figure 2 in the same order. Rank analysis index (RA-i) clearly predicts the reconstruction error. We can also regard RA-i as the security level of a network. A negative value indicates that the gradients of the network are able to fully expose the data, i.e. insecure, while a positive value indicates that completely recover the data from gradients is not possible. On top of that, higher RA-i indicate higher reconstruction error, therefore the network is more secure. According to our experiment, if the order of magnitude of MSE is equal to or less than $1 0 ^ { - 4 }$ , we could barely visually distinguish the recovered and real data, as shown in the fourth column of Figure 2. Note that, as the network gets deeper, DLG will become vulnerable, R-GAP will also be effected by numerical error. Besides that, DLG is sensitive to the initialization of dummy data, while R-GAP also needs to confirm the $\mu$ if it is not unique. Therefore, RA-i provides a reasonable upper bound of the privacy risk rather than quality prediction of one reconstruction.
|
| 248 |
+
|
| 249 |
+
# B TWIN DATA
|
| 250 |
+
|
| 251 |
+
As we know $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ is non-monotonic as shown in Figure 1, which means knowing $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ does not always allow us to uniquely recover $\mu$ . It is relatively straightforward to show that for monotonic convex losses (Bartlett et al., 2006), $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu$ is invertible for $\mu \ < \ 0$ , $\textstyle { \frac { \partial \ell } { \partial \mu } } \mu \ \leq \ 0$ for $\mu \geq 0$ , and $\begin{array} { r } { \operatorname* { l i m } _ { \mu \to \infty } \frac { \partial \ell } { \partial \mu } \mu = 0 . } \end{array}$ . Due to the non-uniqueness of $\mu$ w.r.t to ∂\`∂µ µ, we have:
|
| 252 |
+
|
| 253 |
+
$$
|
| 254 |
+
\exists \mathrm { \bf ~ x } , \tilde { \bf x } \mathrm { s } . \mathrm { t } . \mu \neq \tilde { \mu } ; \frac { \partial \ell } { \partial \mu } \mu = \frac { \partial \ell } { \partial \tilde { \mu } } \tilde { \mu }
|
| 255 |
+
$$
|
| 256 |
+
|
| 257 |
+
where $\mathbf { X }$ is the real data.
|
| 258 |
+
|
| 259 |
+
Taking the common setting that activation functions are ReLU or LeakyReLU, we can derive from Eq. 10 that:
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
\frac { \partial \ell } { \partial \mathbf { W } _ { i } } \cdot \mathbf { W } _ { i } = \frac { \partial \ell } { \partial \tilde { \mathbf { W } } } \cdot \tilde { \mathbf { W } } _ { i } ; \quad i = 1 , \ldots , d
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
if there is a $\tilde { \mathbf { W } } _ { i }$ is equal to $\mathbf { W } _ { i }$ , whereas the corresponding $\tilde { \mathbf { x } }$ is not same as $\mathbf { X }$ since $\mu \ne \tilde { \mu }$ , we can find a data point that differs from the true data but leads to the same gradients. We name such data twin data, denoted by $\tilde { \mathbf { x } }$ . As we know the gradients and $\mu$ of the twin data $\tilde { \mathbf { x } }$ , by just giving them to R-GAP, we are able to easily find out the twin data. As shown in in Figure 5, twin data is actually proportional to the real data and smaller than it, which can also be straightforwardly derived from Equation 6 to Equation 8. Since the twin data and the real data trigger the same gradients, by decreasing the distance of gradients as Equation 1, DLG is suppose to converge to either of these data. As shown in Figure 5, we initialize DLG with a data close to the twin data $\tilde { \mathbf { x } }$ , DLG converges to the twin data. In the work of Wei et al. (2020), the authors argue that using an image from the same class as the real data would be the optimal initialization and empirically prove that. We want to point out that twin data is one important factor why DLG is so sensitive to the initialization and prone to fail with random initialization of dummy data particularly after some training steps of the network. Since DLG converges either to the twin data or the real data depends on the distance between these two data and the initialization, an image of the same class is usually close to the real data, therefore, DLG works better with that. While, with respect to $\mu$ or the prediction of the network, a random initialization is close to the twin data, so DLG converges to the twin data. However, the twin data has extremely small value, so any noise that comes up with optimization process stands out in the last result as shown in Figure 5.
|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
Figure 5: Twin data. The left figure demonstrates a twin data $\tilde { \mathbf { x } }$ , which will trigger exactly the same gradients as the real data $\mathbf { X }$ does. Therefore, from the perspective of DLG, these two data are global minimum for the objective function. The right figure shows that by adding noise to shift the twin data a little and using it as an initialization, DLG will converge to the twin data rather than real data.
|
| 269 |
+
|
| 270 |
+
It is worth noting that the twin data can be fully reconstructed only if $\mathrm { { R A } } \mathrm { { - i } } < 0$ . In other words, if complete reconstruction is feasible and the twin data exits, R-GAP and DLG can recover either the twin data or real data depend on the initialization. But both of them lead to privacy leakage.
|
| 271 |
+
|
| 272 |
+
# C VIRTUAL CONSTRAINTS
|
| 273 |
+
|
| 274 |
+
In this section we investigate the virtual constraints as proposed in the rank analysis. To the beginning, let us derive the explicit virtual constraints from the $i - 1$ layer at the reconstruction of the $i$ layer by assuming the activation function is an identity function. The weight constraints of the $i - 1$ layer can be expressed as:
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
\mathbf { W } \mathbf { x } _ { i - 1 } = \mathbf { z } ;
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
Split $\mathbf { W } , \mathbf { z }$ into two parts coherently, i.e.:
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
\begin{array} { r } { [ \mathbf { W } _ { + } ] _ { \mathbf { W } _ { - } } = [ \mathbf { z } _ { + } ] } \\ { \mathbf { W } _ { - } ] \mathbf { x } _ { i - 1 } = [ \mathbf { z } _ { - } ] } \end{array}
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
Assume the upper part of the weights ${ \bf W } _ { + }$ is already full rank, therefore:
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\begin{array} { c } { \mathbf { z } _ { + } = \mathbf { I } _ { + } \mathbf { z } } \\ { \mathbf { x } _ { i - 1 } = \mathbf { W } _ { + } ^ { - 1 } \mathbf { I } _ { + } \mathbf { z } } \\ { \mathbf { z } _ { - } = \mathbf { I } _ { - } \mathbf { z } } \\ { \mathbf { W } _ { - } \mathbf { x } _ { i - 1 } = \mathbf { I } _ { - } \mathbf { z } } \end{array}
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
Substituting Equation 21 into Equation 23, we can derive the following constraints over $\mathbf { z }$ after rearranging:
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
( \mathbf { W } _ { - } \mathbf { W } _ { + } ^ { - 1 } \mathbf { I } _ { + } - \mathbf { I } _ { - } ) \mathbf { z } = \mathbf { 0 }
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
Since the activation function is the identity function, i.e. $\mathbf { z } = \mathbf { x } _ { i }$ , the virtual constraints $\nu$ that the $i$ -th layer has inherited from the weight constraints of $i - 1$ layer are:
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\mathcal { V } \mathbf { { x } } _ { i } = \mathbf { 0 } ; ~ \mathcal { V } = \mathbf { W } _ { - } \mathbf { W } _ { + } ^ { - 1 } \mathbf { I } _ { + } - \mathbf { I } _ { - }
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
Virtual constraints as external constraints are able to compensate the local rank-deficiency of an intermediate layer. For other strictly monotonic activation function like Leaky ReLU, Sigmoid, Tanh, the virtual constraints over $\mathbf { x } _ { i }$ can be expressed as:
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\gamma \sigma _ { i - 1 } ^ { - 1 } ( \mathbf { x } _ { i } ) = \mathbf { 0 }
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
This is not a linear equation system w.r.t. $\mathbf { x } _ { i }$ , therefore it is hard to be incorporated in R-GAP. In terms of ReLU the virtual constraints could become further more complicated which will reduce its efficacy. Nevertheless, the reconstruction of the $i$ -th layer must take the virtual constraints into account. Otherwise, it will trigger a non-negligible reconstruction error later on. From this perspective, we can see that iterative algorithms like optimization-based attacks can inherently utilize such virtual constraints, which is a strength of O-GAP.
|
| 311 |
+
|
| 312 |
+
We would like to point out that theoretically the gradient constraints also have the same effect as the weight constraints in the virtual constraints but in a more sophisticated way. Empirical results show that the gradient constraints of previous layers do not have an evident impact on the subsequent layer in the O-GAP, so we have not taken it into account. The number of virtual constraints at $i$ -th layer can therefore be approximated by $\begin{array} { r } { \sum _ { n = 1 } ^ { i - 1 } m a x ( | \mathbf { z } _ { n } | - | \mathbf { x } _ { n } | , 0 ) - m a x ( | \mathbf { x } _ { n } | - | \mathbf { z } _ { n } | - | \mathbf { W } _ { n } | , 0 ) , } \end{array}$ .
|
| 313 |
+
|
| 314 |
+
# D RANK ANALYSIS OF THE SKIP CONNECTION
|
| 315 |
+
|
| 316 |
+
If the skip connection skips one layer, for simplicity assuming the activation function is the identity function, then the layer can be expressed as:
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
f = \mathbf { W } ^ { * } \mathbf { x } ; \ \mathbf { W } ^ { * } = \mathbf { W } + \mathbf { I }
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
where $f$ is the output of this layer, the weight matrix $\mathbf { W } ^ { * }$ is clear and the number of weight constraints is equal to $| f |$ . While the expression of gradients are the same as without skip connection, since:
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\nabla \mathbf { W } ^ { * } = \nabla \mathbf { W }
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
Therefore the number of gradient constraints is equal to $| \mathbf { W } |$ . In other words, without consideration of the virtual constraints, if $| f | + | \mathbf { W } | < | x |$ this layer is locally rank-deficient, otherwise it is full rank. This is the same as removing the skip connection.
|
| 329 |
+
|
| 330 |
+
If the skip connection skips over two layers, for simplicity assuming the activation function is identity function, then the residual block can be expressed as:
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\mathbf { x } _ { 2 } = \mathbf { W } _ { 1 } \mathbf { x } _ { 1 } ; ~ f = \mathbf { W } _ { 2 } \mathbf { x } _ { 2 } + \mathbf { x } _ { 1 }
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
Whereas, the residual block has its equivalent fully connected format, i.e.:
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
\begin{array} { r l } & { \mathbf { W } _ { 1 } ^ { * } = \left[ \begin{array} { l } { \mathbf { W } _ { 1 } } \\ { \mathbf { I } } \end{array} \right] ; ~ \mathbf { W } _ { 2 } ^ { * } = [ \mathbf { W } _ { 2 } \quad \mathbf { I } ] } \\ & { ~ \mathbf { x } _ { 2 } ^ { * } = \mathbf { W } _ { 1 } ^ { * } \mathbf { x } _ { 1 } = \left[ \begin{array} { l } { \mathbf { W } _ { 1 } \mathbf { x } _ { 1 } } \\ { \mathbf { x } _ { 1 } } \end{array} \right] } \\ & { ~ \boldsymbol { f } = \mathbf { W } _ { 2 } ^ { * } \mathbf { W } _ { 1 } ^ { * } \mathbf { x } _ { 1 } } \end{array}
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
From the perspective of a recursive reconstruction, $f$ is clear, so after the reconstruction of $\mathbf { X } _ { 2 }$ , the input of this block $\mathbf { X } _ { 1 }$ can be directly calculated by subtracting ${ \bf W } _ { \mathrm { 2 } } { \bf x } _ { \mathrm { 2 } }$ from $f$ as shown in Equation 29. Back to the Equation 31 that means only $\mathbf { x } _ { 2 } ^ { * }$ needs to be recovered. Similar to the analysis for one layer, in terms of the reconstruction of $\mathbf { x } _ { 2 } ^ { * }$ , the number of weight constraints is $| f |$ and the number of gradient constraints is $| \mathbf { W } _ { 2 } |$ . On top of that the upper part and lower part of $\mathbf { x } _ { 2 } ^ { * }$ are related, which actually represents the virtual constraints from the first layer. Taking these into account, there are $| \mathbf { W } _ { 2 } | + | f | + | \mathbf { x } _ { 2 } |$ constraints for the reconstruction of $\mathbf { x } _ { 2 } ^ { * }$ . However, $\mathbf { x } _ { 2 } ^ { * }$ is also augmented compared with $\mathbf { X } _ { 2 }$ and the number of entries is $| \mathbf { x } _ { 1 } | + | \mathbf { x } _ { 2 } |$ . To conclude, if $| f | + | \mathbf { \bar { W } } _ { 2 } | < | \mathbf { x } _ { 1 } |$ the residual block is locally rank-deficient, otherwise it is full rank. Seemingly, the constraints of the last layer have been used to reconstruct the input of the residual block due to the skip connection2. This is an interesting trait, because the skip connection is able to make the rank-deficient layers like bottlenecks again full rank, as shown in Figure 6. It is worth noticing that the bottlenecks have been commonly used for residual blocks. Further, downsampling residual blocks also have this characteristic of rank condition, as the gradient constraints in the last layer are much more than the first layer due to the number of channels.
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure 6: Comparison of optimization-based gradient attacks over architectures with or without the skip connection. The width of blue bars represents the number of features at each layer. The first row shows that there is no impact on the reconstruction if the skip connection skips one layer. The second row shows if the skip connection skips a bottleneck block, which is rank-deficient, the resulting network can still be full rank and enable full recovery of the data. The third row shows the reconstructions of two full-rank architectures. Since the skip connection aids in the optimization process, the quality of its reconstruction is marginally better.
|
| 346 |
+
|
| 347 |
+
# E IMPROVING DEFENDABILITY OF RESNET101
|
| 348 |
+
|
| 349 |
+
We also apply the rank analysis to ResNet101 and try to improve its defendability. However, we find that this network is too redundant. It is not possible to decrease the RA-i by cutting a single skip connection as was done in Figure 4. Nevertheless, we devise two variants, the first of which cuts the skip connection of the third residual block and generates a layer that is locally rank-deficient and requires a large number of virtual constraints. Additionally, we devise a second variant, which cuts the skip connection of the first residual block and reduces the redundancy of two layers. The accuracy and reconstruction error of these networks can be found in Table 4.
|
| 350 |
+
|
| 351 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>RA-i</td><td rowspan=1 colspan=1>Accuracy on val.</td><td rowspan=1 colspan=1>MSE of reconstructions</td></tr><tr><td rowspan=1 colspan=1>ResNet101</td><td rowspan=1 colspan=1>-1.4×104</td><td rowspan=1 colspan=1>91.04%</td><td rowspan=1 colspan=1>0.96 ± 0.091</td></tr><tr><td rowspan=1 colspan=1>Variant 1</td><td rowspan=1 colspan=1>-1.4 × 104</td><td rowspan=1 colspan=1>90.36%</td><td rowspan=1 colspan=1>1.8 ± 0.14</td></tr><tr><td rowspan=1 colspan=1>Variant 2</td><td rowspan=1 colspan=1>-1.4×104</td><td rowspan=1 colspan=1>90.16%</td><td rowspan=1 colspan=1>1.3 ± 0.14</td></tr></table>
|
| 352 |
+
|
| 353 |
+
Table 4: Training 200 epochs on CIFAR10 and saving the model with the best performance on the validation set, ResNet101 with base width 16 and its two variants achieve similar accuracy on the classification task. The two modified variants which are designed to introduce rank deficiency perform almost as well as the original, but better protect the training data. We conduct a gradient attack with the state-of-the-art approach proposed by Geiping et al. (2020). MSE of the reconstructions of the two rank-deficient variants is significantly higher, which indicates that for deep networks, we can also improve the defendability by decreasing local redundancy or even making layers locally rank-deficient.
|
| 354 |
+
|
| 355 |
+
# F R-GAP IN THE BATCH SETTING RETURNS A LINEAR COMBINATION OF TRAINING IMAGES
|
| 356 |
+
|
| 357 |
+
It can be verified straightforwardly that R-GAP in the batch setting will return a linear combination of the training data. This is due to the fact that in the batch setting the gradients are simply accumulated. The weighting coefficients of the data in this linear mixture are dependent on the various values of $\mu$ for the different training data (see Figure 1). Figures 7 and 8 illustrate the results vs. batch DLG (Zhu et al., 2019) on examples from MNIST.
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
Figure 7: Reconstruction over a FCN3 network with batch-size equal to 2. For FCN network, RGAP is able to reconstruct sort of a linear combination of the input images. DLG will also works perfectly on such architecture.
|
| 361 |
+
|
| 362 |
+
# G ADDING NOISE TO THE GRADIENTS
|
| 363 |
+
|
| 364 |
+
The effect on reconstruction of adding noise to the gradients is illustrated in Figure 9.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 8: Reconstruction over a FCN3 network with batch-size equal to 5. Sometimes DLG will converge to a image similar to the one reconstructed by the R-GAP.
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 9: In terms of least square as what we have used for R-GAP, overall increasing the width of the network will involve more constraints and hence enhance the denoising ability of the gradient attack. For O-GAP this also means a more stable optimization process and less noise in the reconstructed image, which has been empirically proven by Geiping et al. (2020). Increasing the width of every layer will definitely decrease the RA-i, so the quality of reconstruction has been improved. Whereas, increasing the width of some layers may not change RA-i of a network, since the RA-i of a network is equal to the largest RA-i among all the layers, i,e, the reconstruction will not get better. However, it is widely believed that more parameter means less secure.
|
| 371 |
+
|
| 372 |
+
# H DERIVING GRADIENTS
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
\begin{array} { r l } & { \quad _ { 1 } - \kappa _ { 4 } \kappa _ { 1 } + \kappa _ { 1 } ^ { 2 } } \\ & { \quad _ { 2 } + \kappa _ { 2 } ^ { 3 } - \kappa _ { 3 } ^ { 3 } } \\ & { \quad _ { 3 } - \kappa _ { 1 } ^ { 3 } - \kappa _ { 2 } ^ { 3 } } \\ & { \quad _ { 4 } - \kappa _ { 3 } ^ { 3 } - \kappa _ { 3 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 2 } ^ { 3 } \kappa _ { 3 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 2 } ^ { 3 } } \\ & { \quad _ { 4 } - \kappa _ { 1 } ^ { 3 } \kappa _ { 2 } ^ { 3 } \kappa _ { 3 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } } \\ & { \quad _ { 4 } - \kappa _ { 2 } ^ { 3 } \kappa _ { 3 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } } \\ & { \quad _ { 4 } - \kappa _ { 4 } ^ { 3 } \kappa _ { 2 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ { 3 } } \\ & \quad \partial _ { t } \kappa _ { 1 } ^ { 3 } - \kappa _ { 1 } ^ { 3 } \kappa _ { 1 } ^ \end{array}
|
| 376 |
+
$$
|
md/train/S1Jhfftgx/S1Jhfftgx.md
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ENFORCING CONSTRAINTS ON OUTPUTS WITH UNCONSTRAINED INFERENCE
|
| 2 |
+
|
| 3 |
+
Jay Yoon Lee
|
| 4 |
+
Carnegie Mellon University Pittsburgh, PA
|
| 5 |
+
jaylee@cs.cmu.edu
|
| 6 |
+
Michael Wick, Jean-Baptiste Tristan
|
| 7 |
+
Oracle Labs
|
| 8 |
+
Burlington, MA
|
| 9 |
+
{michael.wick,jean.baptiste.tristan}@oracle.com
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
Increasingly, practitioners apply neural networks to complex problems in natural language processing (NLP), such as syntactic parsing, that have rich output structures. Many such applications require deterministic constraints on the output values; for example, requiring that the sequential outputs encode a valid tree. While hidden units might capture such properties, the network is not always able to learn them from the training data alone, and practitioners must then resort to postprocessing. In this paper, we present an inference method for neural networks that enforces deterministic constraints on outputs without performing post-processing or expensive discrete search over the feasible space. Instead, for each input, we nudge the continuous weights until the network’s unconstrained inference procedure generates an output that satisfies the constraints. We find that our method reduces the number of violating outputs by up to $81 \%$ , while improving accuracy.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
Many neural networks have discrete-valued output units that correspond to an inference or prediction about an input. Often, a problem might involve multiple discrete outputs. Unlike multiclass classification, which associates a single discrete output with each input, so called structured prediction problems associate multiple outputs with each input. For example, in multi-label classification, instead of predicting a single relevant class pertaining to the image or sentence, we must predict all relevant classes: the image contains a dog, a tree, and a sky. In sequence prediction problems, the discrete outputs might be a sequence of words or symbols that must form a coherent translation of a source language sentence (Cho et al., 2014; Sutskever et al., 2014), description of an image (Vinyals et al., 2015b), answer to a question (Kumar et al., 2016), or a parse-tree for an input sentence (Vinyals et al., 2015a). Crucially, in structured prediction, the output values are interdependent. Even though neural networks usually predict outputs independently or sequentially (one output at a time), the hidden units allow them to successfully capture many dependencies.
|
| 18 |
+
|
| 19 |
+
Sometimes, the outputs must obey hard constraints. For example, in sequence labeling with BILOU encoding, a ‘begin’ marker B cannot immediately follow an ‘inside’ marker I (Ratinov & Roth, 2009). In clustering, pairwise binary decisions must obey transitivity so that they yield a valid equivalence class relation over the data points (McCallum & Wellner, 2005; Wick et al., 2006; 2008). In syntactic/dependency parsing, the output sequence must encode a valid parse tree (McDonald & Pereira, 2006; Vinyals et al., 2015a; Dyer et al., 2016). In formal language generation or neural compilers the output must belong to a context free language or compile (Reed & de Freitas, 2016). In dual decomposition approaches to joint inference, copies of variables must satisfy equality constraints (Koo et al., 2010; Rush et al., 2010; Rush & Collins, 2012). Finally, in some ensemble methods, the outputs of multiple conditionally independent classifiers must reach a consensus on the output class. Indeed, there are a tremendous number of problems that require hard constraints on the outputs. Unlike softer dependencies, violating a hard-constraint is often unacceptable because the output of the network would not “type-check” causing problems for downstream components. Unfortunately in practice, networks are not always able to exactly learn constraints from the training data alone.
|
| 20 |
+
|
| 21 |
+
As a motivating example, consider a sequence-to-sequence network that inputs a sentence and outputs a sequence of “shift-reduce” commands that describe the sentence’s parse tree. Briefly, the shiftreduce commands control a parsing algorithm by indicating how and when to use its stack. Each command controls whether to shift (s) a token onto the stack, reduce $( { \boldsymbol { \mathbf { \mathit { r } } } } )$ the top of the stack into a parent tree node, or push (!) the current reduction back onto the stack.
|
| 22 |
+
|
| 23 |
+
To be successful, the network must generate commands that imply a valid tree over the entire input sentence. However, the decoder outputs just a single command at a time, producing some outputs that are not globally-consistent, valid shift-reduce programs. Indeed, the output may not have enough shifts to include every input token in the tree or may attempt to reduce when the stack is empty. For example, the following input sentence “ So it ’s a very mixed bag . ” comprises ten space-delimited tokens (the quotations are part of the input), but our unconstrained sequence-to-sequence network outputs an invalid sequence with only nine shifts ssr!sr!ssssrrr!rr!ssrrrrrr!. We must introduce another shift so the last token is pushed onto the stack and issue another reduce so it is inserted into the tree.
|
| 24 |
+
|
| 25 |
+
We could attempt to fix the output with post-processing, but where is the right place to insert these commands in the sequence? There are $4 0 6 = \mathrm { c h o o s e } ( 2 9 , 2 )$ candidate locations. Further complicating our post-processing dilemma is the fact that the output contains several other errors that are seemingly unrelated to the constraint. Instead, we could attempt to fix the problem with a more sophisticated decoder, but this is difficult because the decoder outputs a single character at each time-step and our constraints are global, limiting corrections to the end of the sequence when it is too late to rectify an earlier decision. A beam search is less myopic, but in practice most of the network’s output mass is peaked on the best output token, resulting in little improvement.
|
| 26 |
+
|
| 27 |
+
In this paper, we propose an inference method for neural networks that enforces output constraints without employing combinatorial discrete search. The idea is to modify some (or all) of the weights for each instance at test-time, iteratively nudging them, until the network’s efficient unconstrained inference procedure produces a valid output. We achieve this by expressing the hard constraints as an optimization problem over the continuous weights and employ back-propagation to change them. Prima facie, back-propagation is doomed because the constraint loss is necessarily a function of the argmax that produced the discrete values. However, we circumvent this problem by optimizing over the energy of the violating outputs instead. Since the weights directly determine the output through the energy, we are able to manipulate the unconstrained inference procedure to produce the desired result. Much like scoped-learning, the algorithm customizes the weights for each example at test-time (Blei et al., 2002), but does so in a way to satisfy the constraints.
|
| 28 |
+
|
| 29 |
+
When applied to the above example, our method removes enough energy mass from the invalid output space in only twelve steps, allowing unconstrained decoding to produce a valid output sequence:
|
| 30 |
+
|
| 31 |
+
ssr!sr!ssssrrr!rr!ssrrrrrr! (initial output) sssr!ssssrr!srrr!rr!ssrrrrrr! (rectified output after 12 steps)
|
| 32 |
+
|
| 33 |
+
Interestingly, the network generates an additional s command at the beginning of the sequence while also producing a cascade of error correction in later time steps: the new output now satisfies the constraints and is a perfectly correct parse. Of course, enforcing constraints does not always lead to an improvement in accuracy, but we find that often it does in practice, especially for a well-trained network. We find that our method is able to completely satisfy constraints in up to $81 \%$ of the outputs.
|
| 34 |
+
|
| 35 |
+
# 2 BACKGROUND
|
| 36 |
+
|
| 37 |
+
Consider a neural network that generates a variable length output vector $\mathbf { y } = \{ y _ { i } \} _ { 1 } ^ { n _ { y } }$ from a variable length input vector $\mathbf { x } = \{ x _ { i } \} _ { 1 } ^ { m _ { x } }$ . For example, in image classification, the input vector encodes fixed multi-dimensional tensor of pixel intensities and the output vector comprises just a single element corresponding to the discrete class label. In sequence-to-sequence, the input might be a variable length vector of French tokens, and the output would be a variable length vector of its English translation. It is sometimes convenient to think of the network as a function from input to output
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
f ( \mathbf { x } ; W ) \mapsto \mathbf { y }
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
However, for the purpose of exposition, we separate the neural network into a real-valued model (negative energy function) that scores the compatibility of the outputs (given the weights and input) and an inference procedure that searches for high scoring outputs.
|
| 44 |
+
|
| 45 |
+
For the model, let $y _ { i }$ be a discrete output from an output unit and let $\psi ( y _ { i } ; \mathbf { x } , W )$ be its corresponding real-valued log-space activation score (e.g., the log of the softmax for locally normalized models or simply a linear activation value for globally normalized models). Define the negative energy $\Psi$ over a collection of output values y as an exponentiated sum of log-space activation scores
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\Psi ( { \bf y } ; { \bf x } , W ) = \exp \left( \sum _ { i } \psi ( y _ { i } ; { \bf x } , W ) \right)
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
Then, inference is the problem of finding the values of the outputs $\mathbf { y }$ that maximize the negative energy given fixed inputs $\mathbf { x }$ and weights $W$ . Thus, we can rewrite the neural network as the function:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
f ( \mathbf { x } ; W ) \mapsto \underset { \mathbf { y } } { \mathrm { a r g m a x } } \Psi ( \mathbf { y } ; \mathbf { x } , W )
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
The purpose of separating the model from the inference procedure is so we can later formalize our optimization problem. We emphasize that this formulation is consistent with existing neural networks. Indeed, inference in feed-forward networks is a single feed-forward pass from inputs to outputs. When the outputs only depend on each other through hidden states that only depend on earlier layers of the network, feed-forward inference is exact in the sense that it finds the optimum of Equation 3. For recurrent neural networks (RNNs), each output depends on hidden states that are functions of previous output values. However, we can still think of the usual procedure that produces the highest scoring output at each time step as a local greedy approximation to global inference; of course, the procedure can optionally be improved with a beam.
|
| 58 |
+
|
| 59 |
+
# 3 CONSTRAINED INFERENCE FOR NEURAL NETWORKS
|
| 60 |
+
|
| 61 |
+
A major advantage of neural networks is that once trained, inference is extremely efficient. However, constraints can render inference intractable due to discrete search. Our goal is take advantage of the fact that unconstrained inference is inexpensive and design a constrained inference algorithm that exploits such a procedure as a black box. Our method iteratively adjusts the weights for each test-time input, concentrating the probability mass on the feasible region so that unconstrained inference becomes increasingly likely to generate an output that satisfies the constraints.
|
| 62 |
+
|
| 63 |
+
In this work, we focus on constraints that require the outputs to belong to an input-dependent contextfree language $\mathcal { L } ^ { \bf x }$ (CFL). The idea is to treat the output space of the neural network as the terminal symbols, and devise the appropriate production rules and non-terminals to express constraints on them. An advantage of employing CFLs over other formalisms such as first order logic (FOL) is that CFLs are intuitive for expressing constraints on the outputs, especially for language models and sequence-to-sequence networks. For example, when modeling Python or Java code, it is easy to express many of the desired programming language’s constraints using a CFL, but cumbersome in FOL. Indeed, CFLs are an expressive class of languages.
|
| 64 |
+
|
| 65 |
+
To motivate our algorithm, we begin with the ideal optimization problem and argue that unlike for linear models with local constraints, the resulting Lagrangian is not well suited for globally constrained inference in neural networks. We ultimately settle on an alternative objective function that reasonably models our constrained inference problem. Although our algorithm lacks the theoretical guarantees enjoyed by classic relaxation algorithms we nevertheless find it works well in practice.
|
| 66 |
+
|
| 67 |
+
Consider the following constrained inference problem for neural networks
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\begin{array} { r l } { \underset { \mathbf { y } } { \operatorname* { m a x } } } & { { } \Psi ( \mathbf { x } , \mathbf { y } , W ) } \\ { \mathrm { s . t . } } & { { } \mathbf { y } \in \mathcal { L } ^ { \mathbf { x } } } \end{array}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
Naively enforcing the constraint requires combinatorial discrete search, which is intractable in general.
|
| 74 |
+
Instead, we prefer a smooth optimization problem with meaningful gradients to guide the search.
|
| 75 |
+
|
| 76 |
+
With this in mind, let $g ( \mathbf { y } , { \mathcal { L } } ) \mapsto r$ for $r \in \mathbb { R } _ { + }$ be a function that measures a loss between a sentence $\mathbf { y }$ and a grammar $\mathcal { L }$ such that $g ( \mathbf { y } , { \mathcal { L } } ) = 0$ if and only if there are no grammatical errors in y. That is, $g ( \mathbf { y } , { \mathcal { L } } ) = 0$ for the feasible region and is strictly positive everywhere else. For a large class of CFLs, $g$ could be the least errors count function (Lyon, 1974) or a weighted version thereof. We could then express CFL membership as an equality constraint and minimize the Lagrangian
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\operatorname* { m i n } _ { \lambda } \operatorname* { m a x } _ { \mathbf { y } } \Psi ( \mathbf { x } , \mathbf { y } , W ) + \lambda g ( \mathbf { y } , { \mathcal { L } } )
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
However, this dual optimization problem has a major flaw. Our constraints are global and do not necessarily factorize over the individual outputs. Consequently, there is just a single dual variable $\lambda$ . Optimizing $\lambda$ does little more than eliminate a single contour of output configurations at a time, resulting in a brute-force trial and error search.
|
| 83 |
+
|
| 84 |
+
Instead, observe that the network’s weights control the negative energy of the output configurations. By properly adjusting the weights, we can affect the outcome of inference by removing mass from invalid outputs. The weights are likely to generalize much better than the single dual variable because in most neural networks, the weights are tied across space (e.g., CNNs) or time (e.g., RNNs). As a result, lowering the negative energy for a single invalid output has the effect of lowering the negative energy for an entire family of invalid outputs, enabling faster search. With this in mind, we introduce an independent copy $W _ { \lambda }$ of the network’s weights $W$ and minimize with respect to these “dual weights” instead of the dual variable. This is powerful because we have effectively introduced an exponential number of “dual variables” (via the energy, which scores each output) that we can easily control via the weights; although similar, the new optimization is no longer equivalent to the original:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\operatorname* { m i n } _ { W _ { \lambda } } \operatorname* { m a x } _ { \mathbf { y } } \Psi ( \mathbf { x } , \mathbf { y } , W ) + \Psi ( \mathbf { x } , \mathbf { y } , W _ { \lambda } ) g ( \mathbf { y } , { \mathcal { L } } )
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
While a step in the right direction, the objective still requires combinatorial search because (1) the maximization involves two non-linear neural networks and (2) a greedy decoding algorithm is unable to cope with the global loss $\mathrm { g ( ) }$ because the constraints do not factorize over the individual outputs. In contrast the functions involved in classic Lagrangian relaxation methods for NLP have multipliers for each output variable that can be combined with linear models to form a single unified decoding problem for which efficient inference exists (Koo et al., 2010; Rush et al., 2010; Rush & Collins, 2012). Since our non-linear functions and global constraints do not afford us the same ability, we must modify the optimization problem for a final time so that we can employ the network’s efficient inference procedure as a black-box. In particular, we (1) remove the negative-energy term that involves the original weights $W$ and compensate with a regularizer that attempts to keep the dual weights $W _ { \lambda }$ as close to these weights as possible and (2) maximize exclusively over the network parameterized by $W _ { \lambda }$ . The result is a different optimization problem on which our algorithm is based:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\operatorname* { m i n } _ { W _ { \lambda } } \left( \Psi ( \mathbf { x } , \mathbf { y } , W _ { \lambda } ) g ( \mathbf { y } , \mathcal { L } ^ { x } ) + \alpha \| W - W _ { \lambda } \| _ { 2 } \middle | \mathbf { y } = \underset { \mathbf { y } } { \operatorname { a r g m a x } } \ \Psi ( \mathbf { x } , \mathbf { y } , W _ { \lambda } ) \right)
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
Informally, our algorithm alternates the maximization (by running efficient unconstrained inference) and minimization (by performing SGD) until it produces a feasible output or it exceeds a maximum number of iterations. For each test-example, we re-initialize the dual weights to the trained weights to ensure the network does not deviate too far from the trained network. More precisely see Algorithm 1.
|
| 97 |
+
|
| 98 |
+
<table><tr><td>Algorithm1 Constrained inference for neural nets</td></tr><tr><td>Inputs: test instance x, input specific CFL L×, pretrained weights W</td></tr><tr><td>Wx ← W #reset instance-specific weights while not converged do</td></tr><tr><td>y ← f(x; Wx) #perform inference using weights Wx</td></tr><tr><td>4↑ 亚(x,y,Wx)g(y,L×) + al/W -Wxll #compute constraint loss a</td></tr><tr><td></td></tr><tr><td>Wx ← Wx - nV #update instance-specific weights with SGD or a variant thereof end while</td></tr></table>
|
| 99 |
+
|
| 100 |
+
# 4 APPLICATION TO PARSING
|
| 101 |
+
|
| 102 |
+
Consider the structured prediction problem of syntactic parsing in which the goal is to input a sentence comprising a sequence of tokens and output a tree describing the grammatical parse of the sentence. One way to model the problem with neural networks is to linearize the representation of the parse tree and then employ the familiar sequence-to-sequence model (Vinyals et al., 2015a).
|
| 103 |
+
|
| 104 |
+
Let us suppose we linearize the tree using a sequence of shift (s) and reduce $\left( \boldsymbol { \tt r } , \boldsymbol { \tt r } ! \right)$ commands that control an implicit shift reduce parser. Intuitively, these commands describe the exact instructions for converting the input sentence into a complete parse tree: the interpretation of the symbol $_ { \textrm { \scriptsize S } }$ is that we shift an input token onto the stack and the interpretation of the symbol $\mathtt { r }$ is that we start (or continue) reducing (popping) the top elements of the stack, the interpretation of a third symbol ! is that we stop reducing and push the reduced result back onto the stack. Thus, given an input sentence and an output sequence of shift-reduce commands, we can deterministically recover the tree by simulating a shift reduce parser. For example, the sequence ssrr!ssr!rr!rr! encodes a type-free version of the parse tree (S (NP the ball) (VP is (NP red))) for the input sentence “the ball is red” It is easy to recover the tree structure from the input sentence and the output commands by simulating a shift reduce parser, performing one command at a time as prescribed by the classic algorithm.
|
| 105 |
+
|
| 106 |
+
Note that for output sequences to form a valid tree over the input, the sequence must satisfy a number of constraints. First, the number of shifts must equal the number of input tokens $m _ { \mathbf { x } }$ , otherwise either the tree would not cover the entire input sentence or the tree would contain spurious terminal symbols. Second, the parser cannot issue a reduce command if there are no items left on the stack. Third, the number of reduces must be sufficient to leave just a single item, the root node, on the stack.
|
| 107 |
+
|
| 108 |
+
We can express most of these constraints with a CFL
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\mathcal { L } = \{ \begin{array} { r l } { G } & { s R r ! } \\ { R } & { s R r } \\ { R } & { R r ! } \\ { R } & { R R } \\ { R } & { \epsilon } \end{array}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Intuitively, Rule 1 states that a valid shift-reduce command set must begin with a shift (since stack is initially empty, there is nothing to reduce) and end with a reduce that places the final result on the stack. Rule 2 states that if we do a shift, then we need to reduce the shifted token at some point in the future. Rule 3 states that if we do not shift then we are allowed to reduce only if we also push the result on the stack. Rule 4 allows for multiple subtrees. Rule 5 is the base case.
|
| 115 |
+
|
| 116 |
+
Note, however, that this grammar is for a general purpose shift-reduce language, but we need to constrain the number of shifts to equal the number of input tokens $m _ { \mathbf { x } }$ . Since the constraint is a bit verbose to express with production rules, we can instead write the regular language $( s ( r ! ) ^ { \star } ) ^ { m _ { \mathbf { x } } } ( r ! ) ^ { \star }$ where $m$ is the number of elements in $\mathbf { x }$ and intersect it with our CFL.
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathcal { L } ^ { x } = \mathcal { L } \cap ( s ( r ! ) ^ { \star } ) ^ { m _ { \mathbf { x } } } ( r ! ) ^ { \star }
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
Rather than relying on a general purpose algorithm to compute $g ( \mathbf { y } , \mathcal { L } ^ { x } )$ that measures the number of grammatical errors, we instead implement it specifically for our language. Let $\mathsf { c t } _ { i = 1 } ^ { n } ( b ( i ) )$ be the function that counts the number of times proposition $b ( i )$ is true. Now, define the following loss
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
r ( \mathbf { y } , { \mathcal { L } } ^ { x } ) = ( m - \mathbf { c } \mathbf { t } ( y _ { i } = s ) ) ^ { 2 } + \left( \sum _ { i } \sum _ { j > i } \mathbf { ( } y _ { j } = r ) - \mathbf { c } \mathbf { t } ( y _ { j } \in \{ s , 1 \} ) \right) ^ { 2 } + { \mathrm { c t } } ( y _ { i } = r ) - ( \mathbf { c } \mathbf { t } ( y _ { i } \in \{ s , 1 \} ) ) ^ { 2 }
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
The first term measures the amount of violation due to the regular language and the second and third terms measure the amount of violation according to the CFL.
|
| 129 |
+
|
| 130 |
+
# 5 RELATED WORK
|
| 131 |
+
|
| 132 |
+
There has been recent work in applying neural networks to structured prediction problems. For example, the recent structured prediction energy networks (SPENS) combines graphical models and neural networks via an energy function defined over the output variables (Belanger & McCallum, 2016). SPENS focuses on soft constraints (via the energy function) and performs inference by relaxing the binary output variables to be continuous and then backpropagating into them. In contrast, our method focuses on hard constraints and we backpropagate into the weights rather than into the outputs directly. We could combine our method with SPENs to handle soft constraints; for example, by back-propagating the output energy into the weights instead of the relaxed outputs themselves.
|
| 133 |
+
|
| 134 |
+
There has been recent work on applying neural networks to parsing problems that require the ability to handle hard constraints. For example, by employing a sequence-to-sequence network (Vinyals et al., 2015a) or a custom network designed for shift reduce parsing (Dyer et al., 2016). The former requires
|
| 135 |
+
|
| 136 |
+
<table><tr><td>task</td><td>inference</td><td>weights changed (Wx)</td><td>conversion rate</td><td>accuracy</td></tr><tr><td rowspan="5">azbz</td><td>unconstrained</td><td>none</td><td>0.0%</td><td>75.6%</td></tr><tr><td>constrained</td><td>all</td><td>65.2%</td><td>82.4%</td></tr><tr><td>constrained</td><td>output only</td><td>20.9%</td><td>77.8%</td></tr><tr><td>constrained</td><td>encoder only</td><td>58.2%</td><td>82.5%</td></tr><tr><td>constrained</td><td>decoder only</td><td>57.4%</td><td>82.3%</td></tr><tr><td rowspan="2">S r no types</td><td>unconstrained constrained</td><td>none all</td><td>0.0%</td><td>84.0%</td></tr><tr><td></td><td></td><td>81.8%</td><td>84.4%</td></tr><tr><td rowspan="6">Sr with types</td><td>unconstrained</td><td>none</td><td>0.0%</td><td>87.8%</td></tr><tr><td>constrained</td><td>all</td><td>79.2%</td><td>88.3%</td></tr><tr><td>constrained</td><td> output only</td><td>5.0%</td><td>88.1%</td></tr><tr><td>constrained</td><td>decoder (top layer)</td><td>36.2%</td><td>88.2%</td></tr><tr><td>constrained constrained</td><td>decoder (all layers)</td><td>54.7%</td><td>88.3%</td></tr><tr><td>constrained</td><td>decoder (top) +attention</td><td>38.0%</td><td>88.1%</td></tr><tr><td></td><td></td><td>decoder (all) +attention</td><td>56.5%</td><td>88.2%</td></tr></table>
|
| 137 |
+
|
| 138 |
+
Table 1: Conversion rates on all three tasks with 100 steps of SGD. Note that satisfying the constraints has no negative affect on accuracy and often has a positive affect.
|
| 139 |
+
|
| 140 |
+
bzazbzazbzazazbzbzbzbzbz − zbaaazbaaazbaaaaaazbzbzbzbzb
|
| 141 |
+
Table 2: An example for which enforcing the constraints improves accuracy. Red indicates errors. The output changes more than once before the constraints are finally enforced. Greedy decoding with constraints might correct this example because the spurious a’s are at the end of the sequence.
|
| 142 |
+
|
| 143 |
+
<table><tr><td>iteration</td><td>output</td><td>loss</td><td>accuracy</td></tr><tr><td>0</td><td>zbaaazbaaazbaaaaaazbzbzbaaazbzb</td><td>0.260</td><td>75.0</td></tr><tr><td>39</td><td>zbaaazbaaazbaaaaaazbzbzbaaazbzb</td><td>0.259</td><td>75.0</td></tr><tr><td>40</td><td>zbaaazbaaazbaaaaaazbzbzbaaazb</td><td>0.250</td><td>80.0</td></tr><tr><td>72</td><td>zbaaazbaaazbaaaaaazbzbzbaaazb</td><td>0.249</td><td>80.0</td></tr><tr><td>73</td><td>zbaaazbaaazbaaaaaazbzbzbzbzb</td><td>0.0</td><td>100.0</td></tr></table>
|
| 144 |
+
|
| 145 |
+
the output to form a valid parse tree and hence they employ post-processing to ensure this property.
|
| 146 |
+
The latter satisfies constraints as part of the decoding process by sampling over a combinatorial space.
|
| 147 |
+
Our approach does not rely on post processing or discrete search.
|
| 148 |
+
|
| 149 |
+
Another intriguing approach is to distill the hard constraints into the weights at training time using a teacher network (Hu et al., 2016). The method is appealing because it does not require constrained inference or combinatorial search. However, the method must achieve a difficult balance between the loss due to the training data and the loss due to the constraint violations. Further, it would crucially rely on network’s ability to generalize the constraints learned on the training data to the testing data.
|
| 150 |
+
|
| 151 |
+
Finally, our method highly resembles dual decomposition and more generally Lagrangian relaxation for structured prediction (Koo et al., 2010; Rush et al., 2010; Rush & Collins, 2012). In such techniques, it is assumed that a computationally efficient inference algorithm can maximize over a superset of the feasible region (indeed this assumption parallels our exploitation of the fact that unconstrained inference in the neural network is efficient). Then, the method employs gradient descent to gradually concentrate this superset onto the feasible region until the constraints are satisfied. However, for computational reasons, these techniques assume that the constraints factorize over the output and that the functions are linear so that they can be combined into a single model. In contrast, we have a single dual variable so we instead minimize with respect to the weights, which generalize better over the output. Further, we are unable to combine the dual into a single model over which we can do inference because the network is highly non-linear.
|
| 152 |
+
|
| 153 |
+
# 6 EXPERIMENTS
|
| 154 |
+
|
| 155 |
+
In this section we empirically evaluate our constrained inference procedure on two sequence-tosequence tasks. The first is a transduction task between two simple languages, which we describe next. The second is the sequence-to-sequence shift-reduce parsing task described in Section 4.
|
| 156 |
+
|
| 157 |
+
azazbzazbzbzazbzbzbzbzbz $\longrightarrow$ aaaaaazbaaazbzbaaazbzbzbzbzb
|
| 158 |
+
Table 3: An example for which enforcing the constraints improves accuracy. Red indicates errors. Note that greedy decoding with constraints would not fix the errors in the middle since errors are made before constraints are violated. In contrast, the proposed method takes the constraints into account in a globall manner, allowing earlier errors to be corrected by future constraint violations.
|
| 159 |
+
|
| 160 |
+
<table><tr><td rowspan=1 colspan=1>iteration</td><td rowspan=1 colspan=1>output</td><td rowspan=1 colspan=1>loss</td><td rowspan=1 colspan=1>accuracy</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=3 colspan=1>aaaaaazbaaazbaaazbzbzbzbaaazbaaaaaazbaaazbaaazbzbzbzbaaazbaaaaaazbaaazbaaazbzbzbzbaaazbaaaaaazbaaazbzbaaazbzbzbzbzb</td><td rowspan=1 colspan=1>0.2472</td><td rowspan=1 colspan=1>66.7</td></tr><tr><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>123</td><td rowspan=2 colspan=1>0.24670.24620.0</td><td rowspan=2 colspan=1>66.766.7100.0</td></tr><tr><td rowspan=1 colspan=1>23</td></tr></table>
|
| 161 |
+
|
| 162 |
+
bzbzbzbzazbzbzazazazazbz− zbzbzbzbaaazbzbaaaaaaaaaaaazb
|
| 163 |
+
Table 4: An example for which enforcing the constraints degrades accuracy. Errors in red.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>iteration output</td><td></td><td>loss</td><td>accuracy</td></tr><tr><td>0</td><td>zbzbzbzbaaazbaaaaaaaaaaaazbaaa</td><td>0.2954</td><td>74.2</td></tr><tr><td>4</td><td> zbzbzbzbzbaaaaaaaaazbzbaaaaaa</td><td>0.0</td><td>60.0</td></tr></table>
|
| 166 |
+
|
| 167 |
+
A transducer $T : { \mathcal { L } } _ { 1 } \to { \mathcal { L } } _ { 2 }$ is a function from a source language to a target language. For the purpose of the experiments $T$ is known and our goal is to learn it from data. We choose a transducer similar to those studied in recent work (Grefenstette et al., 2015). The source language $\mathcal { L } _ { 0 }$ is $( \mathsf { a z } | \mathsf { b z } ) ^ { \star }$ and the target language $\mathcal { L } _ { 1 }$ is $( \mathsf { a a a } \mathsf { i } \mathsf { z b } ) ^ { \star }$ . The transducer is defined to map az to aaa and bz to zb. For example, T(bzazbz) $\mapsto$ zbaaazb. The training set comprises 1934 sequences of length 2–20 and the test set contain sentences of lengths 21-24. As is common practice, we employ shorter sentences for training to require generalization to longer sentences at test time.
|
| 168 |
+
|
| 169 |
+
We employ a thirty-two hidden unit single-layered, attentionless, sequence-to-sequence long shortterm memory (LSTM) in which the decoder LSTM inputs the final encoder state at each time-step. The encoder and decoder LSTMs each have their own set of weights. We train the network for 1000 epochs using RMSProp to maximize the likelihood of the output (decoder) sequences in the training set. The network achieves perfect train accuracy while learning the rules of the output grammar nearly perfectly, even on the test-set. However, despite learning the train-set perfectly, the network fails to learn the input-specific constraint that the number of a’s in the output should be three times as the number in the input. We implement a loss for this constraint and evaluate how well our method enforces the constraint at test-time: $\begin{array} { r } { g ( \mathbf { y } , \mathcal { L } _ { 1 } ^ { x } ) = ( n + m ) ^ { - 1 } \left( \left( 3 \sum _ { x _ { i } } \mathbb { I } ( x _ { i } = a ) \right) - \left( \sum _ { y _ { i } } \mathbb { I } ( y _ { i } = a ) \right) \right) ^ { 2 } } \end{array}$ where $n + m$ , the combined intput/output length, normalizes between 0 and 1. For constrained inference we run Algorithm 1 and employ vanilla stochastic gradient descent with a learning rate of 0.05 and no weight decay. We cap the number of iterations at a maximum of 100.
|
| 170 |
+
|
| 171 |
+
The top section of Table 1 contains the results for this azbz task. We use the term converted to refer to a sentence that initially had a constraint-violation, but was later fixed by the constrained-inference procedure. The conversion rate is the percentage of such sentences that we convert: on this task, up to two-thirds. We experiment with which subset of the weights is best for satisfying the constraints, finding that it is best to modify them all. We also report accuracy to study an initial concern. Specifically, we had to omit the negative energy of the original weights $W$ from our optimization problem, Equation 7, potentially allowing the network to find a set of dual weights $W _ { \lambda }$ that happen to satisfy the constraints, but that have poor performance. However, we found this not to be the case. In fact, we report the token-wise accuracy over the examples for which the unconstrained neural network violated constraints and find that on the contrary, accuracy improves. Further, we find the regularizer is unnecessary since the initialization $W _ { \lambda } = W$ ensures the network never drifts too far.
|
| 172 |
+
|
| 173 |
+
In order to gain a better understanding of the algorithm’s behavior, we provide data-cases that highlight both success and failure (Tables 2,3,4). The title of these tables is the input and the desired ground truth output. The rows of the table show the network’s output at each iteration (as indicated). The loss column is the constraint loss weighted by the output’s energy $\Psi ( \mathbf { x } , \mathbf { y } , W _ { \lambda } ) g ( \mathbf { y } , \mathcal { L } _ { 1 } ^ { X } )$ , and the final column is the token-wise accuracy between the output and the ground truth.
|
| 174 |
+
|
| 175 |
+
h“ So it ’s a very mixed bag . ”i −→ sssr!ssssrr!srrr!rr!ssrrrrrr!
|
| 176 |
+
Table 5: A shift-reduce example for which the method successfully enforces constraints. The initial output has only nine shifts, but there are ten tokens in the input. Enforcing the constraint not only corrects the number of shifts to ten, but changes the implied tree structure to the correct tree.
|
| 177 |
+
|
| 178 |
+
<table><tr><td>iteration</td><td>output</td><td>loss</td><td>accuracy</td></tr><tr><td>0</td><td>ssr!sr!ssssrrr!rr!ssrrrrrr!</td><td>0.0857</td><td>33.3%</td></tr><tr><td>11</td><td>ssr!sr!ssssrrr!rr!ssrrrrrr!</td><td>0.0855</td><td>33.3%</td></tr><tr><td>12</td><td>sssr!ssssrr!srrr!rr!ssrrrrrr!</td><td>0.0000</td><td>100.0%</td></tr></table>
|
| 179 |
+
|
| 180 |
+
Table 2 contains an example for which our method successfully satisfies the constraints resulting in perfect accuracy. However, because the constraint violation appears at the end of the string, a greedy decoder that opportunistically enforces constraints on the fly could potentially correct this error. In Table 3 we show a more interesting example for which such a greedy decoder would not be as successful. In particular, the unconstrained network outputs the final aaa too early in the sequence, but the constraint that controls the number of a’s in the output is not violated until the end of the sequence. In contrast, our method takes the constraint into account globally, allowing the network to not only rectify the constraint, but to achieve perfect accuracy on the sentence (in just four gradient updates). Finally, in Table 4, we show an example for which enforcing the constraints hurts the accuracy. The updates causes the network to erroneously change outputs that were actually correct. This can happen if (a) the underlying network is sometimes inaccurate in its output or confidence/probabilities thereon or (b) the gradient steps are too large causing the network to completely leapfrog over the correct solution in a single step. The latter can be avoided by normalizing the constraint loss so it does not grow unbounded with the number of outputs and by erring on the side of a smaller learning rate.
|
| 181 |
+
|
| 182 |
+
We repeat the same experiment (middle section of Table 1), but on the shift-reduce parsing task described in Section 4. We convert the Wall Street Journal portion of the Penn Tree Bank (PTB) into shift-reduce commands and randomly split into $3 0 \mathrm { k }$ train and $9 . 2 \mathrm { k }$ test examples. We increase the number of hidden units to sixty-four to accommodate the larger input space (50k words) and employ Equation 10 (normalized by sequence length) for the constraint loss. We measure the sequencealigned token accuracy. Otherwise, we employ the exact same experimental parameters as the azbz task, both for training the LSTM and for our algorithm. We find that our algorithm performs even better on the real-world task, converting over $80 \%$ of the violated outputs. We again find that our procedure has no negative impact on accuracy, which in fact improves, but not as substantially as for the azbz task. Table 5 contains a successful example that we had previously highlighted in Section 1. The algorithm satisfies the constraints, and also corrects the remaining output errors.
|
| 183 |
+
|
| 184 |
+
Finally, we conduct a version of the shift-reduce experiment that includes the phrase types (e.g., noun-phrase (NP)). To accommodate the larger output space (output alphabet size increases to 479), we employ a larger network with 128 hidden units, attention and three-layers. Note that even this more sophisticated network fails to learn the constraints from data and adding layers does not help. The larger network affords us the opportunity to experiment with modifying different subsets of weights for enforcing constraints. As seen in the last section of Table 1, modifying all the weights works best, converting $7 9 . 2 \%$ of the violating sentences; again without negatively affecting accuracy.
|
| 185 |
+
|
| 186 |
+
# 7 CONCLUSION
|
| 187 |
+
|
| 188 |
+
We presented an algorithm for satisfying constraints in neural networks that avoids combinatorial search, but employs the network’s efficient unconstrained procedure as a black box. We evaluated the algorithm on two sequence to sequence tasks, a toy transducer problem and a real-world shiftreduce parsing problem. We found that the method was able to completely rectify up to $80 \%$ of violated outputs when capping the number of iterations at 100. Often, enforcing constraints caused the accuracy to improve, dispelling initial concerns that adjusting the weights at test-time would be treacherous. Our method currently lacks the same theoretical guarantees as classic Lagrangian relaxation methods, so in future work we want to focus on supplemental theory and additional objective functions. We also hope to extend the work to handle soft constraints, for example, as imposed by an external language model.
|
| 189 |
+
|
| 190 |
+
# REFERENCES
|
| 191 |
+
|
| 192 |
+
David Belanger and Andrew McCallum. Structured prediction energy networks. In International Conference on Machine Learning, 2016.
|
| 193 |
+
|
| 194 |
+
David M. Blei, Andrew Bagnell, and Andrew K. McCallum. Learning with scope, with application to information extraction and classification. In Uncertainty in Artificial Intelligence (UAI), 2002.
|
| 195 |
+
|
| 196 |
+
Kyunghyun Cho, Bart Van Merrienboer, ¨ C¸ alar Gul¨ c¸ehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1724–1734. Association for Computational Linguistics, October 2014.
|
| 197 |
+
|
| 198 |
+
Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In NAACL-HLT, pp. 199–209, 2016.
|
| 199 |
+
|
| 200 |
+
Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Neural Information Processing Systems (NIPS), 2015.
|
| 201 |
+
|
| 202 |
+
Zhiting Hu, Xuezhe Ma, Zhengzhong Liu, Eduard Hovy, and Eric P. Xing. Harnessing deep neural networks with logical rules. In Association for Computational Linguistics (ACL), 2016.
|
| 203 |
+
|
| 204 |
+
Terry Koo, Alexander M Rush, Michael Collins, Tommi Jaakkola, and David Sontag. Dual decomposition for parsing with non-projective head automata. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pp. 1288–1298. Association for Computational Linguistics, 2010.
|
| 205 |
+
|
| 206 |
+
Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. Machine Learning, pp. 1378–1387, 2016.
|
| 207 |
+
|
| 208 |
+
Gordon Lyon. Syntax-directed least-errors anallysis for context-free languages: A practical approach. Programming Languages, 17(1), January 1974.
|
| 209 |
+
|
| 210 |
+
Andrew McCallum and Ben Wellner. Conditional models of identity uncertainty with applications to noun coreference. In Neural Information Processing Systems (NIPS), 2005.
|
| 211 |
+
|
| 212 |
+
Ryan McDonald and Fernando Pereira. Learning of approximate dependency parsing algorithms. In EACL, 2006.
|
| 213 |
+
|
| 214 |
+
Lev Ratinov and Dan Roth. Design challenges and misconceptions in named entity recognition. In Computational Natural Language Learning (CoNNL), 2009.
|
| 215 |
+
|
| 216 |
+
Scott Reed and Nando de Freitas. Neural program interpreters. In International Conference on Learning Representations (ICLR), 2016.
|
| 217 |
+
|
| 218 |
+
Alexander M. Rush and Michael Collins. A tutorial on dual decomposition and lagrangian relaxation for inference in natural language processing. Journal of Artificial Intelligence Research, 45: 305–362, 2012.
|
| 219 |
+
|
| 220 |
+
Alexander M Rush, David Sontag, Michael Collins, and Tommi Jaakkola. On dual decomposition and linear programming relaxations for natural language processing. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pp. 1–11. Association for Computational Linguistics, 2010.
|
| 221 |
+
|
| 222 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Neural Information Processing Systems (NIPS), 2014.
|
| 223 |
+
|
| 224 |
+
Oriol Vinyals, Luksz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. Grammar as a foreign language. In NIPS, 2015a.
|
| 225 |
+
|
| 226 |
+
Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Computer Vision and Pattern Recognition (CVPR), 2015b.
|
| 227 |
+
|
| 228 |
+
Michael Wick, Aron Culotta, and Andrew McCallum. Learning field compatibilities to extract database records from unstructured text. In Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing, EMNLP ’06, pp. 603–611, Stroudsburg, PA, USA, 2006. Association for Computational Linguistics. ISBN 1-932432-73-6.
|
| 229 |
+
|
| 230 |
+
Michael Wick, Khashayar Rohanimanesh, Andrew McCallum, and AnHai Doan. A discriminative approach to ontology alignment. In In proceedings of the 14th NTII WS at the conference for Very Large Databases (VLDB), 2008.
|
md/train/SJ3dBGZ0Z/SJ3dBGZ0Z.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LSH SOFTMAX: SUB-LINEAR LEARNING AND INFERENCE OF THE SOFTMAX LAYER IN DEEP ARCHITECTURES
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Log-linear models models are widely used in machine learning, and in particular are ubiquitous in deep learning architectures in the form of the softmax. While exact inference and learning of these requires linear time, it can be done approximately in sub-linear time with strong concentrations guarantees. In this work, we present LSH Softmax, a method to perform sub-linear learning and inference of the softmax layer in the deep learning setting. Our method relies on the popular Locality-Sensitive Hashing to build a well-concentrated gradient estimator, using nearest neighbors and uniform samples. We also present an inference scheme in sub-linear time for LSH Softmax using the Gumbel distribution. On language modeling, we show that Recurrent Neural Networks trained with LSH Softmax perform on-par with computing the exact softmax while requiring sub-linear computations.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep neural networks have achieved impressive successes in tasks spanning vision (He et al., 2016; Krizhevsky et al., 2012), language (Bahdanau et al., 2014), speech (Graves et al., 2013; Oord et al., 2016) and videos (Abu-El-Haija et al., 2016). While these models can vastly differ in architecture, activation functions, and presence of recurrence, they (almost) all share a common trait: the softmax layer. The softmax layer, or log-linear model, is a widely used model in machine learning and statistics that transforms a feature vector into a distribution over the output space, modeling log-probabilities as a linear function of the feature vector. For example, in object classification, the softmax layer at the end of a deep convolutional network transforms a feature vector into a probability distribution over classes for the image; in language modeling using recurrent neural networks, it maps the hidden state to a distribution over next words.
|
| 12 |
+
|
| 13 |
+
While parameterizing for logits offers modeling flexibility, inference and learning have linear runtime in the number of classes. Indeed, both of these require computing the un-normalized probability for every class to compute the partition function and retrieve an actual probability distribution. Problems with large output spaces arise naturally in many areas like natural language processing (NLP), where the output space is a language’s vocabulary and can be on the order of hundreds of thousands of elements Jozefowicz et al. (2016); Jean et al. (2014). This can also occur in computer vision (Joulin et al., 2016) when attempting tag prediction on massive, weakly-labeled datasets such as Flickr100M (Thomee et al., 2015).
|
| 14 |
+
|
| 15 |
+
Many solutions have been proposed to address this bottleneck, all revolving around two themes: approximation of the softmax probabilities or computation of exact probabilities for an approximate model. Canonical examples of the former are importance sampling (IS) or noise contrastive estimation (NCE; Gutmann & Hyvarinen (2012)). Instead of computing probabilities over the whole ¨ output space, these methods compute the softmax over a smaller, sampled vocabulary and re-weight the probabilities, providing an unbiased estimator. An illustration of the latter is Hierarchical Softmax (Morin & Bengio, 2005), where the output classes are first clustered such that you only need to compute the softmax over a smaller output space. While the former is an unbiased estimate, it comes with no concentration guarantees, and it is often more art than science to craft proposal distributions which will provide low-variance estimators. The latter, while efficient, requires carefully hand-crafted clustering of the output space, at the risk of making mistakes from which there is no recovery.
|
| 16 |
+
|
| 17 |
+
More recently, estimators based on nearest neighbor search have been proposed for inference and learning in log-linear models (Mussmann & Ermon, 2016; Mussmann et al., 2017). These estimators hinge on Maximum Inner Product Search using Locality-Sensitive to retrieve the largest logits of the distribution and account for the tail with uniformly sampled classes. They boast strong theoretical guarantees and well-established concentration bounds. However, they were constrained to toy settings and not directly applicable to real-world, large-scale, machine learning. In this work, we build upon these estimators to make them amenable to deep learning practitioners, without losing any theoretical guarantees. We first show how they can be extended to be usable within training of deep learning models, then present our efficient implementation, adapted to deep learning hardware and frameworks. Finally, we show the applicability and efficiency of our method by evaluating on a real-world task: language modeling. We show significant perplexity gains against competing methods with significant speed-ups.
|
| 18 |
+
|
| 19 |
+
Our contributions are as follows:
|
| 20 |
+
|
| 21 |
+
• We present a new deep learning layer, LSH Softmax, an efficient replacement for the softmax layer based on Locality-Sensitive Hashing and the Gumbel distribution, for any deep learning architecture, with strong theoretical guarantees for sub-linear learning and inference. • We provide details for efficient implementation on deep learning hardware (GPUs) and modern deep learning frameworks (Abadi et al., 2016; Maclaurin et al.)). • Empirically, we show, on several datasets, that training and sampling from LSH Softmax performs similarly to an exact softmax while requiring significantly less FLOPS.
|
| 22 |
+
|
| 23 |
+
# 2 BACKGROUND
|
| 24 |
+
|
| 25 |
+
In this section, we first provide a quick overview of Neural Networks and the most popular classification layer, the softmax layer. We then present the Gumbel distribution (Gumbel & Lieblein, 1954) and introduce Locality-Sensitive Hashing (Indyk & Motwani, 1998), both of which our estimator is built upon for inference and learning. Notationally, $\mathcal { X }$ is the input space, e.g. $\mathcal { X } \triangleq \mathbf { R } ^ { d }$ and $\mathcal { V }$ is a discrete output space: $\mathcal { Y } \triangleq \{ 1 , \dots , C \}$ .
|
| 26 |
+
|
| 27 |
+
# 2.1 NEURAL NETWORKS
|
| 28 |
+
|
| 29 |
+
Feedforward Networks Neural networks models are built hierarchically by applying linear and non-linear transformations in alternating fashion. Formally, given input $x \in \mathcal { X }$ , an $m$ -layer neural network with $\sigma ( \cdot )$ non-linearity transforms $x$ into $h$ defined as:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\begin{array} { r } { \boldsymbol { h } = \sigma ( { W _ { m } } \cdot \sigma ( \dots \cdot \sigma ( { W _ { 1 } } \cdot { x } + { b _ { 1 } } ) + \dots ) + { b _ { m } } ) . } \end{array}
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
$\{ W _ { i } \} _ { i \le m }$ and $\{ b _ { i } \} _ { i \le m }$ are learned weights of the network. $\sigma ( \cdot )$ denotes an element-wise nonlinearity such as ReLU $( \operatorname* { m a x } ( \cdot , 0 ) )$ or sigmoid $( ( 1 + \exp ( - \cdot ) ) ^ { - 1 } )$ ).
|
| 36 |
+
|
| 37 |
+
Recurrent Networks Recurrent Neural Networks (RNN) are an extension of the previous setting to arbitrarily long sequences by keeping an internal state $h _ { t }$ . Formally, given an input sequence $( x _ { 1 } , \dots , x _ { T } )$ , it can be written as a dynamical system of the form:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
h _ { 0 } = \mathbf { 0 } ; h _ { t } = \sigma ( U h _ { t - 1 } + V x _ { t } ) .
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $U$ and $V$ are learnable weight matrices. In practice, this parametrization is not wellconditioned for optimization as it can be subject to vanishing or exploding gradients and in practice the Longer Short Term Memory (LSTM; Hochreiter & Schmidhuber (1997)) is preferred.
|
| 44 |
+
|
| 45 |
+
In both cases, these outputs are then given as input to a softmax layer which produces a distribution over the output space $\mathcal { V }$ . In the rest of this work, we denote by $\phi$ the parameters of the neural network.
|
| 46 |
+
|
| 47 |
+
# 2.2 SOFTMAX
|
| 48 |
+
|
| 49 |
+
The softmax layer is the common name given to a log-linear model for multi-classification at the end of a neural network. Let us consider the multi-classification setting with inputs in $\mathcal { X }$ and outputs in $\mathcal { V }$ . Given a feature vector $\psi ( x )$ and $C$ weight vectors $\{ \theta _ { c } \} _ { c \leq C }$ , the softmax layer parameterizes the following distribution:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
p ( Y = c | x ; \theta ) \propto \exp ( \psi ( x ) ^ { T } \theta _ { c } )
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
In the particular case of neural networks, $p ( y | x ; \theta , \phi ) \propto \exp ( h ^ { T } \theta _ { i } )$ . $\{ h ^ { T } \theta _ { i } \} _ { i \leq C }$ are called the logits. It is important to note that computing the distribution over the output space, for inference or learning, requires $O ( C )$ operations. For the rest of this work, $\theta$ denotes the parameters of the softmax whereas $\phi$ denotes the parameters of the neural network (producing the feature).
|
| 56 |
+
|
| 57 |
+
# 2.3 GUMBEL DISTRIBUTION
|
| 58 |
+
|
| 59 |
+
First introduced by Gumbel & Lieblein (1954), the Gumbel distribution is defined by the following cumulative distribution function: $p ( G < s ) = \exp ( - \exp ( - s ) )$ . More practically, one can sample from the Gumbel distribution by first sampling $U \sim \mathcal { U } [ 0 , 1 ]$ and returning $G = \dot { - } \log ( - \log ( \bar { U } ) )$ . This distribution is particularly useful as it casts sampling as optimization.
|
| 60 |
+
|
| 61 |
+
Theorem 1 (Maddison et al. (2014)). Let $\{ y _ { i } \} _ { i \le C }$ be un-normalized probabilities (or logits) over $\mathcal { V }$ and let $\{ G _ { i } \} _ { i \leq C }$ be i.i.d Gumbel variables. Then:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\arg \operatorname* { m a x } _ { i \leq C } \{ y _ { i } + G _ { i } \} \sim \mathrm { C a t e g o r i c a l } \left\{ \frac { 1 } { Z } e ^ { y _ { i } } \right\} _ { i \leq C }
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
# 2.4 MIPS AND LOCALITY-SENSITIVE HASHING
|
| 68 |
+
|
| 69 |
+
Nearest neighbor search is a task that arises in many fields, such as information retrieval. Given a fixed set of vectors $s$ and a distance, this task consists of, given any incoming query $q$ , returning the vectors closest to the query according to the specified distance. In this work, we will be interested in the Maximum Inner Product Search (MIPS) task. Let $\mathcal { S } = \{ s _ { 1 } , \ldots , s _ { N } \}$ be a subset of $\mathbf { R } ^ { d }$ . Given a query $q \in \mathbf { R } ^ { d }$ , MIPS aims at retrieving arg $\operatorname* { m a x } _ { s \in \mathcal { S } } q ^ { T } s$ .
|
| 70 |
+
|
| 71 |
+
This requires $\Theta ( N )$ operations as one has to compute the dot-product of $q$ with all elements of $s$ . In the case where we assume that, for a given set $s$ , it is needed to retrieve the nearest neighbor for a large numbers of queries, we can achieve amortized sub-linear time.
|
| 72 |
+
|
| 73 |
+
This problem is commonly addressed with space partitioning techniques, such as Locality-Sensitive Hashing (LSH; Indyk & Motwani (1998)). LSH leverages hashing to reduce the number of candidate vectors to evaluate, based on the idea that similar vectors will hash in the same bucket. We have the following result:
|
| 74 |
+
|
| 75 |
+
Theorem 2 (Indyk & Motwani (1998)). Given a set $s$ of size $N$ , a similarity measure $d ( \cdot , \cdot )$ and $a$ family of hash functions $\mathcal { H }$ s.t. for $S > T$ and $p > q$ :
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\begin{array} { r } { \bullet \forall x , y \in S , d ( x , y ) \geq S \Rightarrow p \left[ h ( x ) = h ( y ) \right] \geq p . } \\ { \bullet \forall x , y \in S , d ( x , y ) \leq T \Rightarrow p \left[ h ( x ) = h ( y ) \right] \leq q . } \end{array}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
we can construct a data structure s.t. given an incoming query $q$ , a nearest neighbor can be retrieved, with high probability, in sub-linear time $O ( N ^ { \rho } \log N )$ with $\begin{array} { r } { \rho \triangleq \frac { \log p } { \log q } < 1 } \end{array}$ .
|
| 82 |
+
|
| 83 |
+
Recent work builds on top of LSH to either reduce the number of tables (Lv et al., 2007), or utilize more expressive hash functions (Andoni et al., 2015). A common family of hash is the hyperplane hash, i.e. for $\boldsymbol { v } \sim \mathcal { N } ( 0 , I ) , \boldsymbol { h } _ { \boldsymbol { v } } ( \boldsymbol { x } ) = \mathrm { s i g n } \left( \boldsymbol { v } ^ { T } \boldsymbol { x } \right)$ , also called Signed Random Projections (Charikar, 2002). For the rest of this work, we denote $b$ the number of hashing bits (equivalently, the number of random vectors) per table, and $L$ the number of tables.
|
| 84 |
+
|
| 85 |
+
# 3 LEARNING
|
| 86 |
+
|
| 87 |
+
In this section, we show how we can apply Theorem 3.5 of (Mussmann et al., 2017) to enable sublinear learning of softmax parameters in the context of deep models, i.e. where both weights and inputs can change. This is crucial for real-world use.
|
| 88 |
+
|
| 89 |
+
Deep learning models for both classification (Krizhevsky et al., 2012) and generation (Mikolov, 2012) are often trained with a maximum-likelihood objective. Formally, given a training pair $( x , y ) \in \mathcal { X } \times \mathcal { Y }$ , one aims at maximizing $\log p ( \boldsymbol { y } | \boldsymbol { x } ; \boldsymbol { \theta } , \boldsymbol { \phi } )$ , where $\theta \in \Theta$ and $\phi \in \Phi$ are respectively the parameters of the softmax and of the neural network. To optimize this model, the usual method is to use back-propagation (Rumelhart et al., 1988) to differentiate and then perform stochastic gradient descent (SGD; LeCun et al. (1998)) on $\theta$ and $\phi$ .
|
| 90 |
+
|
| 91 |
+
Let’s denote by $f ( x ; \phi ) \triangleq h$ the feature vector given as input to the softmax. Given our notation, the objective is written as $\begin{array} { r } { \ell ( x , y , \boldsymbol { \theta } , \boldsymbol { \phi } ) \triangleq \log p ( y | x ; \boldsymbol { \theta } , \boldsymbol { \phi } ) = h ^ { T } \boldsymbol { \theta } _ { y } - \log \sum _ { i < C } \exp ( h ^ { T } \boldsymbol { \theta } _ { i } ) } \end{array}$ . For backpropagation, we need to compute the gradient of $\ell$ w.r.t to both $\theta$ and $h -$ the gradient w.r.t. $h$ is then passed down to compute the gradient w.r.t. $\phi$ .
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\begin{array} { r l } & { \nabla _ { h } \ell = \theta _ { y } - \mathbb { E } _ { i \sim p ( \cdot \vert x ; \theta , \phi ) } \left[ \theta _ { i } \right] } \\ & { \nabla _ { \theta _ { i } } \ell = \mathbf { 1 } _ { i = y } h - h \frac { \exp \left( h ^ { T } \theta _ { i } \right) } { Z _ { \theta } ( h ) } } \end{array}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
with $\begin{array} { r } { Z _ { \theta } ( h ) \ \triangleq \ \sum _ { i } \exp ( h ^ { T } \theta _ { i } ) } \end{array}$ . Computing these gradients clearly requires $O ( | \mathcal { V } | )$ operations. In practice, this constitutes a major bottleneck for large output spaces. Mussmann et al. (2017) shows how to compute expectation in in sub-linear time, with a well-concentrated estimator using an LSH structure. Intuitively, we can build a good estimate of the partition function by retrieving the largest logits (using LSH) and accounting for the tail with uniform samples. Applying this result, we can compute the expectations necessary to compute the softmax gradients in sub-linear time. This is described in Theorem 3.
|
| 98 |
+
|
| 99 |
+
Theorem 3 (LSH Softmax for Learning). Let $h = f ( x ; \phi )$ be input to a softmax layer with parameters $\{ \theta _ { c } \} _ { c \leq C }$ and define $\ell ( x , y , \theta , \phi )$ as previously. Given $s$ , the $k$ -nearest neighbors of $h$ in $\{ \theta _ { c } \} _ { c \leq C }$ and $\tau$ , $l$ uniform samples from $\left\{ 1 , \dots , C \right\} - { \mathcal { S } }$ , let us define:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\begin{array} { l } { \displaystyle \hat { Z } _ { \theta } ( h ) \triangleq \sum _ { i \in \mathcal { S } } \exp ( h ^ { T } \theta _ { i } ) + \frac { C - k } { l } \sum _ { i \in \mathcal { T } } \exp ( h ^ { T } \theta _ { i } ) } \\ { \displaystyle \quad \hat { g } _ { \theta _ { i } } \triangleq h \mathbf { 1 } _ { i = y } - \left( \mathbf { 1 } _ { i \in \mathcal { S } } + \frac { C - k } { l } \mathbf { 1 } _ { i \in \mathcal { T } } \right) h _ { t } \frac { \exp ( h ^ { T } \theta _ { i } ) } { \hat { Z } _ { \theta } ( h ) } } \\ { \displaystyle \quad \hat { g } _ { h } \triangleq \theta _ { y } - \frac { 1 } { \hat { Z } _ { \theta } ( h ) } \left[ \sum _ { i \in \mathcal { S } } \theta _ { i } \exp ( h ^ { T } \theta _ { i } ) + \frac { C - k } { l } \sum _ { i \in \mathcal { T } } \theta _ { i } \exp ( h ^ { T } \theta _ { i } ) \right] } \end{array}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
These estimators are well concentrated: i.e. for $\epsilon , \delta > 0 \quad$ , $\begin{array} { r } { i f k = l = O \left( n ^ { { \frac { 2 } { 3 } } } { \frac { 1 } { \epsilon } } { \sqrt { \frac { 1 } { \delta } } } \right) } \end{array}$ , then with probability greater than $1 - \delta$ :
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
| Z _ { \theta } ( h ) - \hat { Z } _ { \theta } ( h ) | \leq \epsilon ; \forall i \leq C , | | \nabla _ { \theta _ { i } } \ell - \hat { g } _ { \theta _ { i } } | | \leq \epsilon ; | | \nabla _ { h } \ell - \hat { g } _ { h } | | \leq \epsilon
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
While Theorem 3 provides computation of the gradients in sub-linear time, it is only usable in a setting where the weights $( \{ \theta _ { i } \} _ { i \leq C } )$ are not updated. Indeed, querying nearest neighbors in sublinear time assumes that an appropriate data structure (here LSH) was built in advance. However, when training deep models, we are required to update the weights at every training step. This necessitates online updating of the LSH structure. To maintain the sub-linear runtime, we perform these updates in a sparse manner. We describe in Algorithm 1 how this estimator can be used in a training loop, with weight updating and sparse LSH updates.
|
| 112 |
+
|
| 113 |
+
Proposition 4. The softmax computations described in Algorithm 1 run in sub-linear time.
|
| 114 |
+
|
| 115 |
+
# Algorithm 1 Fast Training of the Softmax layer
|
| 116 |
+
|
| 117 |
+
Inputs: Dataset $\mathcal { D } = \{ ( x ^ { ( i ) } , y ^ { ( i ) } \} _ { i \leq N } \subset \mathcal { X } \times \mathcal { Y } , k , l , n _ { \mathrm { i t e r s } }$ number of training iterations.
|
| 118 |
+
Initialize $\theta$ and $\phi$
|
| 119 |
+
Initialize the MIPS structure with {θi}i≤|V|.
|
| 120 |
+
for $j \leq n _ { \mathrm { i t e r s } } { \bf d o }$ Sample an example $( x , y )$ from $\mathcal { D }$ . $\Delta \theta \gets 0$ Compute $h f ( x ; \phi )$ Find $s$ , $k$ -nearest-neighbors of $\mathbf { h }$ using the MIPS. Define $\tau$ as $l$ indexes uniformly sampled from ${ \mathcal { V } } - { \mathcal { S } }$ . $\begin{array} { r l r } & { \hat { Z } _ { \theta } ( h ) \gets \sum _ { i \in S } \exp ( h ^ { T } \theta _ { i } ) + \frac { | \mathcal { V } | - k } { l } \sum _ { i \in \mathcal { T } } \exp ( h ^ { T } \theta _ { i } ) } & { \mathrm { ~ \mathbb { P } ~ P a r t ~ } } \\ & { \mathrm { O u t p u t ~ } \hat { \ell } = h ^ { T } \theta _ { y } - \log \hat { Z } _ { \theta } ( h ) } & \\ & { \Delta \theta _ { i } \gets \Delta \theta _ { i } + h \mathbf { 1 } _ { i = y } - \left( \mathbf { 1 } _ { i \in S } + \frac { | \mathcal { V } | - k } { l } \mathbf { 1 } _ { i \in \mathcal { T } } \right) h \frac { \exp ( h ^ { T } \theta _ { i } ) } { \hat { Z } _ { \theta } ( h ) } } \\ & { \hat { g } _ { h } \gets \theta _ { y } - \frac { 1 } { \hat { Z } _ { \theta _ { i } } ( h ) } \left[ \sum _ { i \in \mathcal { S } } \theta _ { i } \exp ( h ^ { T } \theta _ { i } ) + \frac { | \mathcal { V } | - k } { l } \sum _ { i \in \mathcal { T } } \theta _ { i } \exp ( h ^ { T } \theta _ { i } ) \right] } \end{array}$ ition function estimate Pass down $\hat { g } _ { \bf h }$ for back-propagation. Re-hash the updated vectors (at most $( k + l ) )$ into the right buckets.
|
| 121 |
+
end for
|
| 122 |
+
|
| 123 |
+
Proof. The softmax computations can be split into three parts: retrieving nearest neighbors, computing the forward/backward passes, and rehashing updated vectors. With a sub-linear MIPS such as LSH, the first part is guaranteed to be sub-linear. For the second part, computing the partition function and the entire gradient estimator requires computing a finite number of sums over $O ( k + l ) = O ( n ^ { \frac { 2 } { 3 } } )$ terms, which is sub-linear. The third part consists of re-hashing updated vectors. Re-hashing a vector is a constant operation (consisting of $b \times L$ dot-products) and thus, given that only a sub-linear number of vectors are updated, re-hashing is sub-linear. □
|
| 124 |
+
|
| 125 |
+
# 4 INFERENCE
|
| 126 |
+
|
| 127 |
+
In the last section, we presented a method to speed-up training time based on an LSH data structure. In addition to these training time gains, LSH Softmax can be utilized for computational gains at inference time as well. While MAP inference can be easily derived from the MIPS structure, sampling from the conditional distribution is often required (e.g. to generate diverse sentences in language modeling or machine translation). These gains can be crucial for large-scale deployment. This is a direct application of (Mussmann et al., 2017) that once again leverages a MIPS structure and the Gumbel distribution. By lazily evaluating Gumbel noise, once can devise an inference scheme which allows to sample from log-linear models in sub-linear time.
|
| 128 |
+
|
| 129 |
+
Theorem 5 (LSH Softmax for Inference). We reuse the same notations as the once in Theorem 3. We define $t \triangleq - \log ( - \log ( 1 - l / C ) )$ . Let $\{ G _ { i } \} _ { i \leq k }$ be $k$ samples from the Gumbel distribution. We then proceed to sample $m \sim$ Binomial $( C , l / \bar { C } )$ , and sample $\tau$ , m points from ${ \mathcal { V } } - { \mathcal { S } }$ with associated Gumbels $\{ G _ { i } ^ { \prime } \} _ { i \leq m }$ s.t. each $G _ { i } ^ { \prime }$ are larger than $t$ . Let us define:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array} { r } { \hat { y } \stackrel { \triangle } { = } \mathrm { a r g } \operatorname* { m a x } \{ h ^ { T } \theta _ { i } + G _ { i } , i \in \mathcal { S } \} \bigcup \{ h ^ { T } \theta _ { i } + G _ { i } ^ { \prime } , i \in \mathcal { T } \} . } \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
Let $\epsilon , \delta > 0$ , we then have the two following results:
|
| 136 |
+
|
| 137 |
+
1. For $k = l \geq \sqrt { \log \frac { 1 } { \delta } }$ , $\hat { y }$ is a sample from $p ( \boldsymbol { y } | \boldsymbol { x } ; \boldsymbol { \theta } , \phi )$ with probability greater than $1 - \delta$ .
|
| 138 |
+
|
| 139 |
+
2. This inference scheme runs in sub-linear time.
|
| 140 |
+
|
| 141 |
+
Proof. (Mussmann et al., 2017)
|
| 142 |
+
|
| 143 |
+
We denote by $p ^ { \mathtt { G u m b e l } } ( \cdot | h ; \theta )$ the implicit distribution over $\mathcal { V }$ provided by this inference scheme. While we can sample from $p ^ { \mathtt { G u m b e 1 } }$ , we note that the likelihood is intractable. We also emphasize that this scheme can be utilized for any softmax model, regardless of the training method.
|
| 144 |
+
|
| 145 |
+
# 5 EFFICIENT IMPLEMENTATION
|
| 146 |
+
|
| 147 |
+
Recent successes of deep neural networks hinge on their efficient implementation on specialized hardware: Graphics Processor Units (GPU), which enables training of large models in reasonable time. Often, methods with theoretically faster runtime are dismissed by practitioners because of their incompatibility with the hardware, rendering them hard to implement efficiently and ultimately not widely used. In this section, we first detail how our method is indeed amenable to GPU implementation and can amount to wall-clock gains in practice, and explain why LSH Softmax is easy to implement in the context of modern deep learning frameworks who often provide a gradient computation API.
|
| 148 |
+
|
| 149 |
+
GPU Implementation Standard LSH implementations consist of three steps:
|
| 150 |
+
|
| 151 |
+
1. Hashing: Given a query $q \in \mathbf { R } ^ { d }$ , hash $q$ into $L$ tables i.e. computing $b \times L$ dot-product with (random) hyperplanes.
|
| 152 |
+
2. Look-up: Given $L$ signatures in $\{ 0 , 1 \} ^ { b }$ , retrieve candidates in each of the $L$ tables. Let us denote $C _ { q }$ the number of candidates retrieved.
|
| 153 |
+
3. Distances: Given those candidates $\{ x _ { 1 } , . . . , x _ { C _ { q } } \} \subset \mathbf { R } ^ { d }$ , compute the distances $\{ q ^ { T } x _ { i } \} _ { i \leq C _ { q } }$ and only return the closest one. It is also important to note that deep learning models are often trained using minibatch optimization;
|
| 154 |
+
let us describe how each of these steps can be computed efficiently and in the minibatch setting.
|
| 155 |
+
|
| 156 |
+
The first step is amenable to the GPU setting; a batch of queries $\{ q _ { i } \} _ { i \leq m } \subset \mathbf { R } ^ { d }$ can be represented by $Q \in \mathbf { R } ^ { m \times d }$ . Given that the hyperplanes are similarly presented in matrix form i.e. $H \in { \mathbf { R } } ^ { d \times ( b \times L ) }$ , the hashing step is equivalent to $\mathrm { s i g n } \left( Q \cdot H \right) \in \{ \bar { 0 } , \bar { 1 } \} ^ { m \times ( b \times L ) }$ . This is the type of operations that GPUs excel at: matrix-multiply followed by element-wise function.
|
| 157 |
+
|
| 158 |
+
The second step, while not as compatible with GPU, is still massively parallelizable using multithreading on CPU. Given the computed signatures, one can run parallelism at the query level (i.e. each thread retrieves candidates for a given query), rendering that step efficient. It also allows for more memory-efficient look-up such as (Lv et al., 2007).
|
| 159 |
+
|
| 160 |
+
The last operation is, once again, very amenable to GPU. It simply consists of a gather (i.e. building a matrix with the appropriate indexes from the candidates) into a 3-d tensor. Indeed, after the previous step, the LSH structure returns $m$ lists of $s$ candidates, and the gather step returns the appropriate vectors from the vocabulary into a 3-d tensor of shape $\mathbf { R } ^ { m \times s \times d }$ . As the batched queries can be also seen as a 3-d tensor $\mathbf { R } ^ { m \times d \times 1 }$ , computing the exact distances then reduces to a batch matrix-multiply which is a very efficient operation on GPU.
|
| 161 |
+
|
| 162 |
+
Software Implementation Another crucial point for practitioners is the ability to rely on frameworks automatically providing gradients, such as (Abadi et al., 2016; Maclaurin et al.), to implement deep learning models; this abstracts away the need to write down the exact gradients which can be both cumbersome and error-prone. An additional advantage of our estimator is that it can be effortlessly implemented in these frameworks. Indeed, given logits computed over the nearest-neighbors and the additional uniformly sampled indexes, one can compute the estimate of the partition function and thus an estimate of the loss. Computing the gradient estimators now reduces to differentiating this loss, which can be very simply done using the framework’s differentiation API.
|
| 163 |
+
|
| 164 |
+
# 6 EXPERIMENTS
|
| 165 |
+
|
| 166 |
+
After having presented our new layer LSH Softmax, we now proceed to show its applicability and efficiency in a real-world setting for deep learning practitioners, specifically towards language modeling. We first show that our method significantly outperforms approximate softmax baselines while performing within $2 0 \%$ of the performance of the exact softmax. We then provide a computational comparison. While we evaluate our method on NLP tasks, we want to emphasize that it is directly applicable to other domains, such as vision. However, public vision benchmark datasets with large output spaces require significantly more computational resources (e.g. 98 GPU nodes for 8 days for Flickr100M (Thomee et al., 2015)) which is outside the scope of this paper.
|
| 167 |
+
|
| 168 |
+
# 6.1 LANGUAGE MODELING
|
| 169 |
+
|
| 170 |
+
Language modeling is the task of, given a sequence of words $( w _ { 1 } , \dots , w _ { T } )$ in a vocabulary $\nu$ , estimating $\begin{array} { r } { p ( w _ { 1 } , \dots , w _ { T } ) = \prod _ { t \leq T } \overline { { p ( w _ { t } | w _ { < t } ) } } } \end{array}$ . Substantial work has been done to model these distributions using non-parametric $n$ -gram counts with additional smoothing techniques, but can fail to model long histories because of an exponential number of sequences. Recently, parametric models using RNNs have shown impressive success on these tasks (Mikolov, 2012). In this setting, large output spaces arise naturally, as the vocabulary size can range from $1 0 ^ { 4 }$ to $1 0 ^ { 6 }$ . We first describe our experimental protocol, and then report perplexity (ppl) of LSH Softmax against a set of baselines on this task for several datasets.
|
| 171 |
+
|
| 172 |
+
Datasets We evaluate our method on three standard datasets for Language Modeling with varying number of characters and vocabulary size:
|
| 173 |
+
|
| 174 |
+
• Penn TreeBank (PTB): We follow the pre-processing described by (Mikolov, 2012), which results in $9 2 9 k$ training tokens, $7 3 k$ validation and $8 2 k$ test tokens with a $1 0 k$ vocabulary size.
|
| 175 |
+
• Text8 is a dataset consisting of the first 100 millions characters of Wikipedia, and has a vocabulary size of $4 4 k$ . This dataset has been used recently in the context of language modeling (Xie et al., 2017). We use the $9 0 M$ first words for training and split the remaining between the validation and test set. Wikitext-2. First introduced in Merity et al. (2016), this is a selected corpus of Wikipedia articles. It has a vocabulary size of $3 3 k$ and contains $2 1 7 k$ tokens. As previously, we split between a training, validation and testing set.
|
| 176 |
+
|
| 177 |
+
Baselines We evaluate the performance of models trained with (1) exact softmax i.e. computed over the entire output space, (2) Biased Importance Sampled softmax (BIS), as presented in (Jean et al., 2014), which consists of sub-sampling the vocabulary according to a proposal distribution based on unigram counts, and (3) Negative Sampling (NS), proposed in Mikolov et al. (2013), equivalent to (BIS) with a uniform distribution, (4) standard Importance Sampling (Jozefowicz et al., 2016) and (5) Noise-Contrastive Estimation (NCE; Gutmann & Hyvarinen (2012)). These baselines ¨ are what practitioners canonically use to circumvent the bottleneck of large output spaces.
|
| 178 |
+
|
| 179 |
+
Implementation Details Our architecture is a 2-layer RNN with LSTM cells and 650 hidden units. Weights are initialized uniformly within $[ - 0 . 1 , 0 . 1 ]$ . Our models are trained using SGD using gradient clipping, with an initial learning rate of 20. This learning rate is annealed when the validation perplexity plateaus. Our models are trained for 40 epochs for PTB, 3 epochs for Text8, 25 epochs for Wikitext-2. With the notations of Theorem 3, for LSH Softmax, we choose $k = 1 0 \sqrt { | \nu | }$ and $l = \sqrt { | \nu | }$ . For the IS and NS baselines, we choose to sample $k + l$ classes from the output space for a fair comparison. We choose the number of bits per signature $b \triangleq \log _ { 2 } | \nu |$ and choose $L$ , number of tables, to have sufficient recall for the MIPS task.
|
| 180 |
+
|
| 181 |
+
# 6.1.1 LEARNING
|
| 182 |
+
|
| 183 |
+
We report perplexity for a fixed architecture but comparing different softmax evaluations; we present both learning curves and perplexity on each set. We report the perplexity of all trained models using the exact probabilities i.e. the full softmax. Perplexities are reported in Table 1 and learning curves in Figure 1. We see that LSH Softmax consistently outperforms the approximate baselines by a fair margin while performing a similar number of operations, showcasing the strength of this estimator. We also observe from the training curves that approximate methods’ performances tend to plateau, as IS and NS cannot target the proper classes to push down. In constrast, LSH Softmax does not.
|
| 184 |
+
|
| 185 |
+
# 6.2 COMPUTATIONAL COMPARISON
|
| 186 |
+
|
| 187 |
+
Having established that the proposed estimator performs very well on real-world tasks, we now proceed to evaluate the computation gains. It is important to note that for models with large output spaces, the softmax computation can amount to about $8 0 \%$ of the total computation (Joulin et al.,
|
| 188 |
+
|
| 189 |
+
<table><tr><td>Method</td><td colspan="3">PTB</td><td colspan="3">Wikitext-2</td><td colspan="3">Text8</td></tr><tr><td></td><td>Train</td><td>Val</td><td>Test</td><td>Train</td><td>Val</td><td>Test</td><td>Train</td><td>Val</td><td>Test</td></tr><tr><td>Exact</td><td>29.67</td><td>83.52</td><td>79.80</td><td>38.05</td><td>101.88</td><td>95.06</td><td>164.68</td><td>151.92</td><td>189.67</td></tr><tr><td>BIS</td><td>48.76</td><td>133.26</td><td>135.51</td><td>65.57</td><td>214.9</td><td>205.65</td><td>1</td><td></td><td>1</td></tr><tr><td>NS</td><td>32.12</td><td>103.26</td><td>101.48</td><td>42.66</td><td>142.82</td><td>136.30</td><td>255.62</td><td>234.02</td><td>281.11</td></tr><tr><td>IS</td><td>1</td><td>1</td><td>114.33</td><td>1</td><td>1</td><td>128.38</td><td>1</td><td>1</td><td>205.94</td></tr><tr><td>NCE</td><td>1</td><td>1</td><td>115.30</td><td>1</td><td>1</td><td>122.04</td><td>1</td><td>1</td><td>386.87</td></tr><tr><td>Ours</td><td>25.68</td><td>97.45</td><td>92.91</td><td>63.60</td><td>124.51</td><td>115.11</td><td>206.20</td><td>178.86</td><td>224.42</td></tr></table>
|
| 190 |
+
|
| 191 |
+
Table 1: LSH Softmax performs closest to the exact softmax and handily outperforms importance sampling based methods with no concentration guarantees.
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 1: LSH Softmax converges faster than compared baselines on all three datasets. IS is not reported for Text8 as the results were order of magnitude worse than compared method.
|
| 195 |
+
|
| 196 |
+
2016; Ji et al., 2015); we thus choose to only evaluate computational gains in the softmax layer. We evaluate our method in CPU, with a batch size of 1, to have an accurate estimation of the ratio of FLOPS. We report both speed-up and validation perplexity (ppl) relative difference with the exact softmax for LSH Softmax and NS. Note that NS requires the same number of operations as importance sampling (IS) but outperforms it in all tasks. Additionally, we show the speed-ups one can achieve on the One Billion Word dataset (Chelba et al., 2013), whose ppl was not evaluated due to computational constraints. We report the results in Table 2. We observe that, while faster, NS performs significantly worse than LSH Softmax. Furthermore, its performance deteriorates significantly when increasing the size of the output space, contrary to LSH Softmax which always performs in the same relative range.
|
| 197 |
+
|
| 198 |
+
<table><tr><td>Method</td><td colspan="2">PTB</td><td colspan="2">Wikitext-2</td><td colspan="2">Text8</td><td>Billion Word</td></tr><tr><td></td><td>Speed-up</td><td>△ppl</td><td>Speed-up</td><td>△ppl</td><td>Speed-up</td><td>△ ppl</td><td>Speed-up</td></tr><tr><td>NS</td><td>2.8×</td><td>23.6%</td><td>3.7×</td><td>40.2%</td><td>3.1×</td><td>54.0%</td><td>5.7×</td></tr><tr><td>Ours</td><td>1.6×</td><td>16.7%</td><td>2.4×</td><td>22.2%</td><td>2.3×</td><td>17.8%</td><td>4.1×</td></tr></table>
|
| 199 |
+
|
| 200 |
+
Table 2: LSH Softmax performs closest to the exact softmax and handily outperforms importance sampling based methods with no concentration guarantees.
|
| 201 |
+
|
| 202 |
+
# 7 RELATED WORK
|
| 203 |
+
|
| 204 |
+
In recent years, MIPS-based estimators for log-linear models have been explored in the literature. Vijayanarasimhan et al. (2014) propose retrieving the largest logits using LSH and estimating the Softmax using only those classes. Their method is encompassed in ours by simply setting $l$ to 0. However, we note that not accounting for the tail can lead to highly biased gradients. Indeed, Mussmann et al. (2017) show that, using only the top- $k$ largest values leads to significantly worse performance. In a similar direction, Spring & Shrivastava (2017b) propose using LSH at each layer and only retaining the largest activations which can be viewed as a form of adaptive dropout. This work differs with ours in two ways: first of all, their paper provides no theoretical guarantees and secondly, they focus on reducing memory footprint which is not the aim of our work. Finally, Spring & Shrivastava (2017a) proposed using the LSH structure as a proposal distribution to evaluate the Softmax. While unbiased and efficient, their method does not offer any concentration guarantees and the estimator can have arbitrarily bad variance.
|
| 205 |
+
|
| 206 |
+
# 8 CONCLUSION
|
| 207 |
+
|
| 208 |
+
In this work, we presented LSH Softmax, a softmax approximation layer for large output spaces with sub-linear learning and inference cost (in the number of states) and strong theoretical guarantees. We showcased both its applicability and efficiency by evaluating LSH on a common NLP task, language modeling. On several datasets for this task, we report perplexity closest to exact training among all baselines, as well as significant speed-ups. Our hope is that, for any architecture, this layer could be chosen in lieu of softmax, when the output space is sufficiently large to warrant the approximation. To that end, we plan to release source-code with the camera-ready version.
|
| 209 |
+
|
| 210 |
+
# REFERENCES
|
| 211 |
+
|
| 212 |
+
Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016.
|
| 213 |
+
Sami Abu-El-Haija, Nisarg Kothari, Joonseok Lee, Paul Natsev, George Toderici, Balakrishnan Varadarajan, and Sudheendra Vijayanarasimhan. Youtube- $. 8 \mathrm { m }$ : A large-scale video classification benchmark. arXiv preprint arXiv:1609.08675, 2016.
|
| 214 |
+
Alexandr Andoni, Piotr Indyk, Thijs Laarhoven, Ilya Razenshteyn, and Ludwig Schmidt. Practical and optimal lsh for angular distance. In Advances in Neural Information Processing Systems, pp. 1225–1233, 2015.
|
| 215 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 216 |
+
Moses S Charikar. Similarity estimation techniques from rounding algorithms. In Proceedings of the thiryfourth annual ACM symposium on Theory of computing, pp. 380–388. ACM, 2002.
|
| 217 |
+
Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. arXiv preprint arXiv:1312.3005, 2013.
|
| 218 |
+
Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In Acoustics, speech and signal processing (icassp), 2013 ieee international conference on, pp. 6645–6649. IEEE, 2013.
|
| 219 |
+
Emil Julius Gumbel and Julius Lieblein. Statistical theory of extreme values and some practical applications: a series of lectures. 1954.
|
| 220 |
+
Michael U Gutmann and Aapo Hyvarinen. Noise-contrastive estimation of unnormalized statistical models, ¨ with applications to natural image statistics. Journal of Machine Learning Research, 13(Feb):307–361, 2012.
|
| 221 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), 2016 IEEE Conference on, 2016.
|
| 222 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8):1735–1780, 1997.
|
| 223 |
+
Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pp. 604–613. ACM, 1998.
|
| 224 |
+
Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large target vocabulary ´ for neural machine translation. arXiv preprint arXiv:1412.2007, 2014.
|
| 225 |
+
|
| 226 |
+
Shihao Ji, SVN Vishwanathan, Nadathur Satish, Michael J Anderson, and Pradeep Dubey. Blackout: Speeding up recurrent neural network language models with very large vocabularies. arXiv preprint arXiv:1511.06909, 2015.
|
| 227 |
+
|
| 228 |
+
Armand Joulin, Laurens van der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In European Conference on Computer Vision, pp. 67–84. Springer, 2016.
|
| 229 |
+
|
| 230 |
+
Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
|
| 231 |
+
|
| 232 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 233 |
+
|
| 234 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document ´ recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 235 |
+
|
| 236 |
+
Qin Lv, William Josephson, Zhe Wang, Moses Charikar, and Kai Li. Multi-probe lsh: efficient indexing for high-dimensional similarity search. In Proceedings of the 33rd international conference on Very large data bases, pp. 950–961. VLDB Endowment, 2007.
|
| 237 |
+
|
| 238 |
+
Dougal Maclaurin, David Duvenaud, Matthew Johnson, and Ryan P Adams. Autograd: Reverse-mode differentiation of native python, 2015. URL http://github. com/HIPS/autograd.
|
| 239 |
+
|
| 240 |
+
Chris J Maddison, Daniel Tarlow, and Tom Minka. A\* sampling. In Advances in Neural Information Processing Systems, pp. 3086–3094, 2014.
|
| 241 |
+
|
| 242 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
|
| 243 |
+
|
| 244 |
+
Toma´s Mikolov. Statistical language models based on neural networks. ˇ Presentation at Google, Mountain View, 2nd April, 2012.
|
| 245 |
+
|
| 246 |
+
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pp. 3111–3119, 2013.
|
| 247 |
+
|
| 248 |
+
Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Aistats, volume 5, pp. 246–252, 2005.
|
| 249 |
+
|
| 250 |
+
Stephen Mussmann and Stefano Ermon. Learning and inference via maximum inner product search. In Proceedings of The 33rd International Conference on Machine Learning, pp. 2587–2596, 2016.
|
| 251 |
+
|
| 252 |
+
Stephen Mussmann, Daniel Levy, and Stefano Ermon. Fast amortized inference and learning in log-linear models with randomly perturbed nearest neighbor search. arXiv preprint arXiv:1707.03372, 2017.
|
| 253 |
+
|
| 254 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
|
| 255 |
+
|
| 256 |
+
David E Rumelhart, Geoffrey E Hinton, Ronald J Williams, et al. Learning representations by back-propagating errors. Cognitive modeling, 5(3):1, 1988.
|
| 257 |
+
|
| 258 |
+
Ryan Spring and Anshumali Shrivastava. A new unbiased and efficient class of lsh-based samplers and estimators for partition function computation in log-linear models. arXiv preprint arXiv:1703.05160, 2017a.
|
| 259 |
+
|
| 260 |
+
Ryan Spring and Anshumali Shrivastava. Scalable and sustainable deep learning via randomized hashing. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 445–454. ACM, 2017b.
|
| 261 |
+
|
| 262 |
+
Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. The new data and new challenges in multimedia research. arXiv preprint arXiv:1503.01817, 1(8), 2015.
|
| 263 |
+
|
| 264 |
+
Sudheendra Vijayanarasimhan, Jonathon Shlens, Rajat Monga, and Jay Yagnik. Deep networks with large output spaces. arXiv preprint arXiv:1412.7479, 2014.
|
| 265 |
+
|
| 266 |
+
Ziang Xie, Sida I Wang, Jiwei Li, Daniel Levy, Aiming Nie, Dan Jurafsky, and Andrew Y Ng. Data noising as ´ smoothing in neural network language models. arXiv preprint arXiv:1703.02573, 2017.
|
md/train/SklTQCNtvS/SklTQCNtvS.md
ADDED
|
@@ -0,0 +1,414 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SIGN-OPT: A QUERY-EFFICIENT HARD-LABEL ADVERSARIAL ATTACK
|
| 2 |
+
|
| 3 |
+
Minhao Cheng1\*, Simranjit Singh1∗, Patrick Chen1, Pin-Yu Chen2, Sijia Liu2, Cho-Jui Hsieh1
|
| 4 |
+
1Department of Computer Science, UCLA, 2IBM Research
|
| 5 |
+
{mhcheng, simranjit, patrickchen, chohsieh}@cs.ucla.edu
|
| 6 |
+
{pin-yu.chen, sijia.liu}@ibm.com
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
We study the most practical problem setup for evaluating adversarial robustness of a machine learning system with limited access: the hard-label black-box attack setting for generating adversarial examples, where limited model queries are allowed and only the decision is provided to a queried data input. Several algorithms have been proposed for this problem but they typically require huge amount $( > 2 0 , 0 0 0 )$ of queries for attacking one example. Among them, one of the state-of-the-art approaches (Cheng et al., 2019) showed that hard-label attack can be modeled as an optimization problem where the objective function can be evaluated by binary search with additional model queries, thereby a zeroth order optimization algorithm can be applied. In this paper, we adopt the same optimization formulation but propose to directly estimate the sign of gradient at any direction instead of the gradient itself, which enjoys the benefit of single query. Using this single query oracle for retrieving sign of directional derivative, we develop a novel query-efficient Sign-OPT approach for hard-label black-box attack. We provide a convergence analysis of the new algorithm and conduct experiments on several models on MNIST, CIFAR-10 and ImageNet. We find that Sign-OPT attack consistently requires $5 \times$ to $1 0 \times$ fewer queries when compared to the current state-of-the-art approaches, and usually converges to an adversarial example with smaller perturbation.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
It has been shown that neural networks are vulnerable to adversarial examples (Szegedy et al., 2016; Goodfellow et al., 2015; Carlini & Wagner, 2017; Athalye et al., 2018). Given a victim neural network model and a correctly classified example, an adversarial attack aims to compute a small perturbation such that with this perturbation added, the original example will be misclassified. Many adversarial attacks have been proposed in the literature. Most of them consider the white-box setting, where the attacker has full knowledge about the victim model, and thus gradient based optimization can be used for attack. Popular Examples include C&W (Carlini & Wagner, 2017) and PGD (Madry et al., 2017) attacks. On the other hand, some more recent attacks have considered the probability black-box setting where the attacker does not know the victim model’s structure and weights, but can iteratively query the model and get the corresponding probability output. In this setting, although gradient (of output probability to the input layer) is not computable, it can still be estimated using finite differences, and algorithms many attacks are based on this (Chen et al., 2017; Ilyas et al., 2018a; Tu et al., 2019; Jun et al., 2018).
|
| 15 |
+
|
| 16 |
+
In this paper, we consider the most challenging and practical attack setting – hard-label black-box setting – where the model is hidden to the attacker and the attacker can only make queries and get the corresponding hard-label decisions (e.g., predicted labels) of the model. A commonly used algorithm proposed in this setting, also called Boundary attack (Brendel et al., 2017), is based on random walks on the decision surface, but it does not have any convergence guarantee. More recently, Cheng et al. (2019) showed that finding the minimum adversarial perturbation in the hard-label setting can be reformulated as another optimization problem (we call this Cheng’s formulation in this paper). This new formulation enjoys the benefit of having a smooth boundary in most tasks and the function value is computable using hard-label queries. Therefore, the authors of (Cheng et al., 2019) are able to use standard zeroth order optimization to solve the new formulation. Although their algorithm converges quickly, it still requires large number of queries (e.g., 20,000) for attacking a single image since every function evaluation of Cheng’s formulation has to be computed using binary search requiring tens of queries.
|
| 17 |
+
|
| 18 |
+
In this paper, we follow the same optimization formulation of (Cheng et al., 2019) which has the advantage of smoothness, but instead of using finite differences to estimate the magnitude of directional derivative, we propose to evaluate its sign using only a single query. With this single-query sign oracle, we design novel algorithms for solving the Cheng’s formulation, and we theoretically prove and empirically demonstrate the significant reduction in the number of queries required for hard-label black box attack.
|
| 19 |
+
|
| 20 |
+
Our contribution are summarized below:
|
| 21 |
+
|
| 22 |
+
• Novelty in terms of adversarial attack. We elucidate an efficient approach to compute the sign of directional derivative of Cheng’s formulation using a single query, and based on this technique we develop a novel optimization algorithm called Sign-OPT for hard-label black-box attack. Novelty in terms of optimization. Our method can be viewed as a new zeroth order optimization algorithm that features fast convergence of signSGD. Instead of directly taking the sign of gradient estimation, our algorithm utilizes the scale of random direction. This make existing analysis inappropriate to our case, and we provide a new recipe to prove the convergence of this new optimizer. We conduct comprehensive experiments on several datasets and models. We show that the proposed algorithm consistently reduces the query count by 5–10 times across different models and datasets, suggesting a practical and query-efficient robustness evaluation tool. Furthermore, on most datasets our algorithm can find an adversarial example with smaller distortion compared with previous approaches.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
White-box attack Since it was firstly found that neural networks are easy to be fooled by adversarial examples (Goodfellow et al., 2015), a lot of work has been proposed in the white-box attack setting, where the classifier $f$ is completely exposed to the attacker. For neural networks, under this assumption, back-propagation can be conducted on the target model because both network structure and weights are known by the attacker. Algorithms including (Goodfellow et al., 2015; Kurakin et al., 2016; Carlini & Wagner, 2017; Chen et al., 2018; Madry et al., 2017) are then proposed based on gradient computation. Recently, the BPDA attack introduced by Athalye et al. (2018) bypasses some models with obfuscated gradients and is shown to successfully circumvent many defenses. In addition to typical attacks based on small $\ell _ { p }$ norm perturbation, non- $\ell _ { p }$ norm perturbations such as scaling or shifting have also been considered (Zhang et al., 2019).
|
| 27 |
+
|
| 28 |
+
Black-box attack Recently, black-box setting is drawing rapidly increasing attention. In black-box setting, the attacker can query the model but has no (direct) access to any internal information inside the model. Although there are some works based on transfer attack (Papernot et al., 2017), we consider the query-based attack in the paper. Depending on the model’s feedback for a given query, an attack can be classified as a soft-label or hard-label attack. In the soft-label setting, the model outputs a probability score for each decision. Chen et al. (2017) uses a finite difference in a coordinate-wise manner to approximately estimate the output probability changes and does a coordinate descent to conduct the attack. Ilyas et al. (2018a) uses Neural evolution strategy (NES) to approximately estimate the gradient directly. Later, some variants (Ilyas et al., 2018b; Tu et al., 2019) were proposed to utilize the side information to further speed up the attack procedure. Alzantot et al. (2019) uses a evolutionary algorithm as a black-box optimizer for the soft-label setting. Recently, Al-Dujaili & O’Reilly (2019) proposes SignHunter algorithm based on signSGD (Bernstein et al., 2018) to achieve faster convergence in the soft-label setting. The recent work (Al-Dujaili & O’Reilly, 2019) proposes SignHunter algorithm to achieve a more query-efficent sign estimate when crafting black-box adversarial examples through soft-label information.
|
| 29 |
+
|
| 30 |
+
In the hard-label case, only the final decision, i.e. the top-1 predicted class, is observed. As a result, the attacker can only make queries to acquire the corresponding hard-label decision instead of the probability outputs. Brendel et al. (2017) first studied this problem and proposed an algorithm based on random walks near the decision boundary. By selecting a random direction and projecting it onto a boundary sphere in each iteration, it aims to generate a high-quality adversarial example. Query-Limited attack (Ilyas et al., 2018a) tries to estimate the output probability scores with model query and turn the hard-label into a soft-label problem. Cheng et al. (2019) instead re-formalizes the hard-label attack into an optimization problem that finds a direction which could produce the shortest distance to decision boundary.
|
| 31 |
+
|
| 32 |
+
The recent arXiv paper (Chen et al., 2019) applied the zeroth-order sign oracle to improve Boundary attack, and also demonstrated significant improvement. The major differences to our algorithm are that we propose a new zeroth-order gradient descent algorithm, provide its algorithmic convergence guarantees, and aim to improve the query complexity of the attack formulation proposed in (Cheng et al., 2019). For completeness, we also compare with this method in Section A.1. Moreover, (Chen et al., 2019) uses one-point gradient estimate, which is unbiased but may encounter larger variance compared with the gradient estimate in our paper. Thus, we can observe in Section A.1 that although they are slightly faster in the initial stage, Sign-OPT will catch up and eventually lead to a slightly better solution.
|
| 33 |
+
|
| 34 |
+
# 3 PROPOSED METHOD
|
| 35 |
+
|
| 36 |
+
We follow the same formulation in (Cheng et al., 2019) and consider the hard-label attack as the problem of finding the direction with shortest distance to the decision boundary. Specifically, for a given example $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , true label $y _ { 0 }$ and the hard-label black-box function $f : \mathbb { R } ^ { d } \mathbf { \bar { \{ 1 , \dots , } } \dot { K } \}$ , the objective function $g : \mathbb { R } ^ { d } \mathbb { R }$ (for the untargeted attack) can be written as:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\operatorname* { m i n } _ { \pmb { \theta } } g ( \pmb { \theta } ) \ \mathrm { w h e r e } \ g ( \pmb { \theta } ) = \arg \operatorname* { m i n } _ { \lambda > 0 } \left( f ( x _ { 0 } + \lambda \frac { \pmb \theta } { \lVert \pmb \theta \rVert } ) \neq y _ { 0 } \right) .
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
It has been shown that this objective function is usually smooth and the objective function $g$ can be evaluated by a binary search procedure locally. At each binary search step, we query the function $f ( x _ { 0 } + \lambda \frac { \tilde { \theta } } { | | \theta | | } )$ and determine whether the distance to decision boundary in the direction $\pmb \theta$ is greater or smaller than $\lambda$ based on the hard-label prediction1.
|
| 43 |
+
|
| 44 |
+
As the objective function is computable, the directional derivative of $g$ can be estimated by finite differences:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
{ \hat { \nabla } } g ( \pmb { \theta } ; \mathbf { u } ) : = \frac { g ( \pmb { \theta } + \epsilon \mathbf { u } ) - g ( \pmb { \theta } ) } { \epsilon } \mathbf { u }
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $\textbf { \em u }$ is a random Gaussian vector and $\epsilon \mathrm { ~ ~ { ~ \gamma ~ } ~ } > \mathrm { ~ ~ { ~ 0 ~ } ~ }$ is a very small smoothing parameter. This is a standard zeroth order oracle for estimating directional derivative and based on this we can apply many different zeroth order optimization algorithms to minimize $g$
|
| 51 |
+
|
| 52 |
+
For example, Cheng et al. (2019) used the Random Derivative Free algorithm Nesterov & Spokoiny (2017) to solve problem (1). However, each computation of (2) requires many hard-label queries due to binary search, so Cheng et al. (2019) still requires a huge number of queries despite having fast convergence.
|
| 53 |
+
|
| 54 |
+
In this work, we introduce an algorithm that hugely improves the query complexity over Cheng et al. (2019). Our algorithm is based on the following key ideas: (i) one does not need very accurate values of directional derivative in order to make the algorithm converge, and (ii) there exists an imperfect but informative estimation of directional derivative of $g$ that can be computed by a single query.
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 1: Illustration
|
| 58 |
+
|
| 59 |
+
# Algorithm 1: Sign-OPT attack
|
| 60 |
+
|
| 61 |
+
<table><tr><td>Input: Hard-label model f,original image xo,initial 0o ;</td><td></td></tr><tr><td>for t=1,2,...,Tdo Randomly sample u1,...,uQ from a Gaussian or Uniform distribution;</td><td></td></tr><tr><td></td><td></td></tr><tr><td>Computeg ←∑q=1sign(g(0t + εuq)-g(0t)) ·uq;</td><td></td></tr><tr><td>Update0t+1←0t-ng ;</td><td></td></tr><tr><td></td><td>Evaluate g(0t) using the same search algorithm in Cheng et al. (2019) ;</td></tr></table>
|
| 62 |
+
|
| 63 |
+
# 3.1 A SINGLE QUERY ORACLE
|
| 64 |
+
|
| 65 |
+
As mentioned before, the previous approach requires com
|
| 66 |
+
puting $g ( \pmb \theta + \epsilon \pmb u ) - g ( \pmb \theta )$ which consumes a lot of queries. However, based on the definition of $g ( \cdot )$ , we can compute the sign of this value $\mathrm { s i g n } ( g ( \pmb { \theta } + \epsilon \mathbf { \bar { u } } ) - g ( \pmb { \theta } ) )$ using a single query. Considering the untargeted attack case, the sign can be computed by
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\mathrm { s i g n } ( g ( \pmb \theta + \epsilon \mathbf u ) - g ( \pmb \theta ) ) = \left\{ \begin{array} { l l } { + 1 , } & { f ( x _ { 0 } + g ( \pmb \theta ) \frac { ( \pmb \theta + \epsilon \mathbf u ) } { \| \pmb \theta + \epsilon \mathbf u \| } ) = y _ { 0 } , } \\ { - 1 , } & { \mathrm { O t h e r w i s e } . } \end{array} \right.
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
This is illustrated in Figure 1. Essentially, for a new direction ${ \pmb \theta } + \epsilon { \bf u }$ , we test whether a point at the original distance $g ( \pmb \theta )$ from $x _ { 0 }$ in this direction lies inside or outside the decision boundary, i.e. if the produced perturbation will result in a wrong prediction by classifier. If the produced perturbation is outside the boundary i.e. $\begin{array} { r } { f ( x _ { 0 } + g ( \pmb { \theta } ) \frac { ( \pmb { \theta } + \epsilon \mathbf { u } ) } { \lVert \pmb { \theta } + \epsilon \mathbf { u } \rVert } ) \neq y _ { 0 } } \end{array}$ , the new direction has a smaller distance to decision boundary, and thus giving a smaller value of $g$ . It indicates that $\mathbf { u }$ is a descent direction to minimize $g$ .
|
| 73 |
+
|
| 74 |
+
# 3.2 SIGN-OPT ATTACK
|
| 75 |
+
|
| 76 |
+
By sampling random Gaussian vector $Q$ times, we can estimate the imperfect gradient by
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\hat { \nabla } g ( \pmb \theta ) \approx \hat { \pmb g } : = \sum _ { q = 1 } ^ { Q } \mathrm { s i g n } ( g ( \pmb \theta + \epsilon \mathbf { u } _ { q } ) - g ( \pmb \theta ) ) \mathbf { u } _ { q } ,
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
which only requires $Q$ queries. We then use this imperfect gradient estimate to update our search direction $\pmb { \theta }$ as $\pmb { \theta } \pmb { \theta } - \eta \hat { \mathbf { g } }$ with a step size $\eta$ and use the same search procedure to compute $g ( \pmb \theta )$ up to a certain accuracy. The detailed procedure is shown in Algorithm 1.
|
| 83 |
+
|
| 84 |
+
We note that Liu et al. (2019) designed a Zattack (not hard-label setting). They use $\begin{array} { r } { \hat { \nabla } g ( \pmb { \theta } ) \approx \hat { \pmb { g } } : = \sum _ { q = 1 } ^ { Q } \mathrm { s i g n } ( g ( \pmb { \theta } + \epsilon \mathbf { u } _ { q } ) - g ( \pmb { \theta } ) \mathbf { u } _ { q } ) } \end{array}$ box and shows that it could achieve a comparable or even better convergence rate than zeroth order stochastic gradient descent by using only sign information of gradient estimation. Although it is possible to combine ZO-SignSGD with our proposed single query oracle for solving hard-label attack, their estimator will take sign of the whole vector and thus ignore the direction of $\mathbf { u } _ { q }$ , which leads to slower convergence in practice (please refer to Section 4.4 and Figure 5(b) for more details).
|
| 85 |
+
|
| 86 |
+
To the best of our knowledge, no previous analysis can be used to prove convergence of Algorithm 1. In the following, we show that Algorithm 1 can in fact converge and furthermore, with similar convergence rate compared with (Liu et al., 2019) despite using a different gradient estimator.
|
| 87 |
+
|
| 88 |
+
Assumption 1. Function $g ( \theta )$ is $L$ -smooth with a finite value of L.
|
| 89 |
+
|
| 90 |
+
Assumption 2. At any iteration step t, the gradient of the function $g$ is upper bounded by $\lVert \nabla g ( \pmb { \theta } _ { t } ) \rVert _ { 2 } \leq \sigma$ .
|
| 91 |
+
|
| 92 |
+
Theorem 3.1. Suppose that the conditions in the assumptions hold, and the distribution of gradient noise is unimodal and symmetric. Then, Sign-OPT attack with learning rate $\begin{array} { r } { \eta _ { t } = O \big ( \frac { - 1 } { Q \sqrt { d T } } \big ) } \end{array}$ and $\begin{array} { r } { \epsilon = O ( \frac { 1 } { d T } ) } \end{array}$ will give following bound on $\mathbb { E } [ \| \nabla g ( \pmb { \theta } ) \| _ { 2 } ]$ :
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mathbb { E } [ \| \nabla g ( \pmb { \theta } ) \| _ { 2 } ] = O ( \frac { \sqrt { d } } { \sqrt { T } } + \frac { d } { \sqrt { Q } } ) .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
The proof can be found in subsection A.2. The main difference with the original analysis provided by Liu et al. (2019) is that they only only deal with sign of each element, while our analysis also takes the magnitudes of each element of $\pmb { u } _ { q }$ into account.
|
| 99 |
+
|
| 100 |
+
# 3.3 OTHER GRADIENT ESTIMATIONS
|
| 101 |
+
|
| 102 |
+
Note that the value $\operatorname { s i g n } ( g ( \pmb \theta + \epsilon \pmb u ) - g ( \pmb \theta ) )$ computed by our single query oracle is actually the sign of the directional derivative:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\operatorname { s i g n } ( \langle \nabla g ( \theta ) , u \rangle ) = \operatorname { s i g n } ( \operatorname* { l i m } _ { \epsilon \to \infty } \frac { g ( \theta + \epsilon u ) - g ( \theta ) } { \epsilon } ) = \operatorname { s i g n } ( g ( \theta + \epsilon u ) - g ( \theta ) )
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Therefore, we can use this information to estimate the original gradient. The Sign-OPT approach in the previous section uses $\begin{array} { r l } { \sum _ { q } \mathrm { s i g n } ( \langle \nabla g ( \pmb { \theta } ) , \pmb { u } _ { q } \rangle ) \pmb { u } _ { q } } \end{array}$ as an estimation of gradient. Let $y _ { q } : =$ $\operatorname { s i g n } ( \langle \nabla g ( \pmb \theta ) , \pmb u _ { q } \rangle )$ , a more accurate gradient estimation can be cast as the following constraint optimization problem:
|
| 109 |
+
|
| 110 |
+
Find a vector $_ { z }$ such that $\operatorname { s i g n } ( \langle z , \mathbf { u } _ { q } \rangle ) = y _ { q } \forall q = 1 , \ldots , Q .$
|
| 111 |
+
|
| 112 |
+
Therefore, this is equivalent to a hard constraint SVM problem where each $\pmb { u } _ { q }$ is a training sample and $y _ { q }$ is the corresponding label. The gradient can then be recovered by solving the following quadratic programming problem:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\operatorname* { m i n } _ { z } \ z ^ { T } z \ \mathrm { ~ s . t . ~ } \ z ^ { T } { \pmb u } _ { q } \geq y _ { q } , \ \forall q = 1 , \ldots , Q .
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
By solving this problem, we can get a good estimation of the gradient. As explained earlier, each $y _ { q }$ can be determined with a single query. Therefore, we propose a variant of Sign-OPT, which is called SVM-OPT attack. The detailed procedure is shown in Algorithm 2. We will present an empirical comparison of our two algorithms in subsection 4.1.
|
| 119 |
+
|
| 120 |
+
# Algorithm 2: SVM-OPT attack
|
| 121 |
+
|
| 122 |
+
<table><tr><td>Input: Hard-label model f,original image xo,initial 0o ; fort=1,2,...,Tdo</td></tr><tr><td>Sample u1,...,uq from Gaussian or orthogonal basis ; Solve z defined by (5) ;</td></tr><tr><td>Update0t+1 ←0t-ηz; Evaluate g(0t) using search algorithm in (Cheng et al., 2019) ;</td></tr></table>
|
| 123 |
+
|
| 124 |
+
# 4 EXPERIMENTAL RESULTS
|
| 125 |
+
|
| 126 |
+
We evaluate the SIGN-OPT algorithm for attacking black-box models in a hard-label setting on three different standard datasets - MNIST (LeCun et al., 1998), CIFAR-10 (Krizhevsky et al.) and ImageNet-1000 (Deng et al., 2009) and compare it with existing methods. For fair and easy comparison, we use the CNN networks provided by (Carlini & Wagner, 2017), which have also been used by other previous hard-label attacks as well. Specifically, for both MNIST and CIFAR-10, the model consists of nine layers in total - four convolutional layers, two max-pooling layers and two fully-connected layers. Further details about implementation, training and parameters are available on (Carlini & Wagner, 2017). As reported in (Carlini & Wagner, 2017) and (Cheng et al., 2019), we were able to achieve an accuracy of $9 9 . 5 \%$ on MNIST and $8 2 . 5 \%$ on CIFAR-10. We use the pretrained Resnet-50 (He et al., 2016) network provided by torchvision (Marcel & Rodriguez, 2010) for ImageNet-1000, which achieves a Top-1 accuracy of $7 6 . 1 5 \%$ .
|
| 127 |
+
|
| 128 |
+
In our experiments, we found that Sign-OPT and SVM-OPT perform quite similarly in terms of query efficiency. Hence we compare only Sign-OPT attack with previous approaches and provide a comparison between Sign-OPT and SVM-OPT in subsection 4.1. We compare the following attacks:
|
| 129 |
+
|
| 130 |
+
• Sign-OPT attack (black box): The approach presented in this paper. • Opt-based attack (black box): The method proposed in Cheng et al. (2019) where they use Randomized Gradient-Free method to optimize the same objective function. We use the implementation provided at https://github.com/LeMinhThong/blackbox-attack.
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 2: Example of Sign-OPT targeted attack. $L _ { 2 }$ distortions and queries used are shown above and below the images. First two rows: Example comparison of Sign-OPT attack and OPT attack. Third and fourth rows: Examples of Sign-OPT attack on CIFAR-10 and ImageNet
|
| 134 |
+
|
| 135 |
+
• Boundary attack (black box): The method proposed in Brendel et al. (2017). This is compared only in $L _ { 2 }$ setting as it is designed for the same. We use the implementation provided in Foolbox (https://github.com/bethgelab/foolbox).
|
| 136 |
+
|
| 137 |
+
• Guessing Smart Attack (black box): The method proposed in (Brunner et al., 2018). This attack enhances boundary attack by biasing sampling towards three priors. Note that one of the priors assumes access to a similar model as the target model and for a fair comparison we do not incorporate this bias in our experiments. We use the implementation provided at https://github.com/ttbrunner/biased_boundary_attack.
|
| 138 |
+
|
| 139 |
+
• C&W attack (white box): One of the most popular methods in the white-box setting proposed in Carlini & Wagner (2017). We use C&W $L _ { 2 }$ norm attack as a baseline for the white-box attack performance.
|
| 140 |
+
|
| 141 |
+
For each attack, we randomly sample 100 examples from validation set and generate adversarial perturbations for them. For untargeted attack, we only consider examples that are correctly predicted by model and for targeted attack, we consider examples that are already not predicted as target label by the model. To compare different methods, we mainly use median distortion as the metric. Median distortion for $x$ queries is the median adversarial perturbation of all examples achieved by a method using less than $x$ queries. Since all the hard-label attack algorithms will start from an adversarial exmample and keep reduce the distortion, if we stop at any time they will always give an adversarial example and medium distortion will be the most suitable metric to compare their performance. Besides, we also show success rate (SR) for $x$ queries for a given threshold (), which is the percentage of number of examples that have achieved an adversarial perturbation below $\epsilon$ with less than $x$ queries. We evaluate success rate on different thresholds which depend on the dataset being used. For comparison of different algorithms in each setting, we chose the same set of examples across all attacks.
|
| 142 |
+
|
| 143 |
+
Implementation details: To optimize algorithm 1, we estimate the step size $\eta$ using the same line search procedure implemented in Cheng et al. (2019). At the cost of a relatively small number of queries, this provides significant speedup in the optimization. Similar to Cheng et al. (2019), $g ( \theta )$ in last step of algorithm 1 is approximated via binary search. The initial $\theta _ { 0 }$ in algorithm 1 is calculated by evaluating $g ( \theta )$ on 100 random directions and taking the best one. We provide our implementation publicly2.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 3: Median $L _ { 2 }$ distortion vs Queries. First two: Comparison of Sign-OPT and SVM-OPT attack for MNIST and CIFAR-10. Third: Performance of Sign-OPT for different values of $Q$ .
|
| 147 |
+
|
| 148 |
+
# 4.1 COMPARISON BETWEEN SIGN-OPT AND SVM-OPT
|
| 149 |
+
|
| 150 |
+
In our experiments, we found that the performance in terms of queries of both these attacks is remarkably similar in all settings (both $L _ { \mathrm { 2 } } / L _ { \infty }$ & Targeted/Untargeted) and datasets. We present a comparison for MNIST and CIFAR-10 ( $L _ { 2 }$ norm-based) for both targeted and untargeted attacks in Figure 3. We see that the median distortion achieved for a given number of queries is quite on part for both Sign-OPT and SVM-OPT.
|
| 151 |
+
|
| 152 |
+
Number of queries per gradient estimate: In Figure 3, we show the comparison of Sign-OPT attack with different values of $Q$ . Our experiments suggest that $Q$ does not have an impact on the convergence point reached by the algorithm. Although, small values of $Q$ provide a noisy gradient estimate and hence delayed convergence to an adversarial perturbation. Large values of $Q$ , on the other hand, require large amount of time per gradient estimate. After fine tuning on a small set of examples, we found that $Q = 2 0 0$ provides a good balance between the two. Hence, we set the value of $Q = 2 0 0$ for all our experiments in this section.
|
| 153 |
+
|
| 154 |
+
# 4.2 UNTARGETED ATTACK
|
| 155 |
+
|
| 156 |
+
In this attack, the objective is to generate an adversary from an original image for which the prediction by model is different from that of original image. Figure 4 provides an elaborate comparison of different attacks for $L _ { 2 }$ case for the three datasets. Sign-OPT attack consistently outperforms the current approaches in terms of queries. Not only is Sign-OPT more efficient in terms of queries, in most cases it converges to a lower distortion than what is possible by other hard-label attacks. Furthermore, we observe Sign-OPT converges to a solution comparable with C&W white-box attack (better on CIFAR-10, worse on MNIST, comparable on ImageNet). This is significant for a hard-label attack algorithm since we are given very limited information.
|
| 157 |
+
|
| 158 |
+
We highlight some of the comparisons of Boundary attack, OPT-based attack and Sign-OPT attack $L _ { 2 }$ norm-based) in Table 1. Particularly for ImageNet dataset on ResNet-50 model, Sign-OPT attack reaches a median distortion below 3.0 in less than $3 0 k$ queries while other attacks need more than $2 0 0 k$ queries for the same.
|
| 159 |
+
|
| 160 |
+
# 4.3 TARGETED ATTACK
|
| 161 |
+
|
| 162 |
+
In targeted attack, the goal is to generate an adversarial perturbation for an image so that the prediction of resulting image is the same as a specified target. For each example, we randomly specify the target label, keeping it consistent across different attacks. We calculate the initial $\theta _ { 0 }$ in algorithm 1 using 100 samples in target label class from training dataset and this $\theta _ { 0 }$ is the same across different attacks. Figure 2 shows some examples of adversarial examples generated by Sign-OPT attack and the Opt-based attack. The first two rows show comparison of Sign-OPT and Opt attack respectively on an example from MNIST dataset. The figures show adversarial examples generated at almost same number of queries for both attacks. Sign-OPT method generates an $L _ { 2 }$ adversarial perturbation of $0 . 9 4 \mathrm { i n } \sim 6 k$ queries for this particular example while Opt-based attack requires $\sim 3 5 k$ for the same. Figure 5 displays a comparison among different attacks in targeted setting. In our experiments, average distortion achieved by white box attack C&W for MNIST dataset is 1.51, for which Sign-OPT requires $\sim 1 2 k$ queries while others need $> 1 2 0 k$ queries. We present a comparison of success rate of different attacks for CIFAR-10 dataset in Figure 6 for both targeted and untargeted cases.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 4: Untargeted attack: Median distortion vs Queries for different datasets.
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 5: (a) Targeted Attack: Median distortion vs Queries of different attacks on MNIST and CIFAR-10. (b) Comparing Sign-OPT and ZO-SignSGD with and without single query oracle (SQO).
|
| 169 |
+
|
| 170 |
+
# 4.4 THE POWER OF SINGLE QUERY ORACLE
|
| 171 |
+
|
| 172 |
+
In this subsection, we conduct several experiments to prove the effectiveness of our proposed single query oracle in hard-label adversarial attack setting. ZO-SignSGD algorithm (Liu et al., 2019) is proposed for soft-label black box attack and we extend it into hard-label setting. A straightforward way is simply applying ZO-SignSGD to solve the hard-label objective proposed in Cheng et al. (2019), estimate the gradient using binary search as (Cheng et al., 2019) and take its sign. In Figure 5(b), we clearly observe that simply combining ZO-SignSGD and Cheng et al. (2019) is not efficient. With the proposed single query sign oracle, we can also reduce the query count of this method, as demonstrated in Figure 5(b). This verifies the effectiveness of single query oracle, which can universally improve many different optimization methods in the hard-label attack setting. To be noted, there is still improvement on Sign-OPT over ZO-SignSGD with single query oracle because instead of directly taking the sign of gradient estimation, our algorithm utilizes the scale of random direction $u$ as well. In other words, signSGD’s gradient norm is always 1 while our gradient norm takes into account the magnitude of $u$ . Therefore, our signOPT optimization algorithm is fundamentally different (Liu et al., 2019) or any other proposed signSGD varieties. Our method can be viewed as a new zeroth order optimization algorithm that features fast convergence in signSGD.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 6: Success Rate vs Queries for CIFAR-10 ( $L _ { 2 }$ norm-based attack). First two and last two depict untargeted and targeted attacks respectively. Success rate threshold is at the top of each plot.
|
| 176 |
+
|
| 177 |
+
Table 1: $L _ { 2 }$ Untargeted attack - Comparison of average $L _ { 2 }$ distortion achieved using a given number of queries for different attacks. SR stands for success rate.
|
| 178 |
+
|
| 179 |
+
<table><tr><td rowspan="2"></td><td colspan="3">MNIST</td><td colspan="3">CIFAR10</td><td colspan="3">ImageNet (ResNet-50)</td></tr><tr><td>#Queries</td><td>AvgL2</td><td>SR(e=1.5)</td><td>#Queries</td><td>AvgL2</td><td>SR(∈=0.5)|</td><td>#Queries</td><td>AvgL2</td><td>SR(∈=3.0)</td></tr><tr><td rowspan="2">Boundary attack</td><td>4.000 8.000</td><td>4.24 4.24</td><td>1.0% 1.0%</td><td>4,000 8.000</td><td>3.12 2.84</td><td>2.3% 7.6%</td><td>4,000 30,000</td><td>209.63 17.40</td><td>0% 16.6%</td></tr><tr><td></td><td>2.13</td><td>16.3%</td><td>12.000</td><td>0.78</td><td>29.2%</td><td>160,000</td><td>4.62</td><td>41.6%</td></tr><tr><td rowspan="2">OPT attack</td><td>14,000</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>4,000</td><td>3.65</td><td>3.0%</td><td>4,000</td><td>0.77</td><td>37.0%</td><td>4,000</td><td>83.85</td><td>2.0%</td></tr><tr><td rowspan="2"></td><td>8.000</td><td>2.41</td><td>18.0%</td><td>8.000 12.000</td><td>0.43</td><td>53.0%</td><td>30.000</td><td>16.77</td><td>14.0%</td></tr><tr><td>14,000</td><td>1.76</td><td>36.0%</td><td></td><td>0.33</td><td>61.0%</td><td>160,000</td><td>4.27</td><td>34.0%</td></tr><tr><td rowspan="2">Guessing Smart</td><td>4,000</td><td>1.74</td><td>41.0%</td><td>4,000</td><td>0.29</td><td>75.0%</td><td>4,000</td><td>16.69</td><td>12.0%</td></tr><tr><td>8.000</td><td>1.69</td><td>42.0%</td><td>8.000</td><td>0.25</td><td>80.0%</td><td>30,000</td><td>13.27</td><td>12.0%</td></tr><tr><td rowspan="2">Sign-OPT attack</td><td>14,000</td><td>1.68</td><td>43.0%</td><td>12.000</td><td>0.24</td><td>80.0%</td><td>160,000</td><td>12.88</td><td>12.0%</td></tr><tr><td>4,000</td><td>1.54</td><td>46.0%</td><td>4,000 8.000</td><td>0.26</td><td>73.0%</td><td>4,000</td><td>23.19</td><td>8.0%</td></tr><tr><td rowspan="2">C&W(white-box)</td><td>8.000</td><td>1.18</td><td>84.0% 94.0%</td><td>12.000</td><td>0.16</td><td>90.0%</td><td>30.000</td><td>2.99</td><td>50.0%</td></tr><tr><td>14,000 -</td><td>1.09 0.88</td><td>99.0%</td><td>-</td><td>0.13 0.25</td><td>95.0% 85.0%</td><td>160,000 1</td><td>1.21 1.51</td><td>90.0% 80.0%</td></tr></table>
|
| 180 |
+
|
| 181 |
+
# 5 CONCLUSION
|
| 182 |
+
|
| 183 |
+
We developed a new and ultra query-efficient algorithm for adversarial attack in the hard-label black-box setting. Using the same smooth reformulation in Cheng et al. (2019), we design a novel zeroth order oracle that can compute the sign of directional derivative of the attack objective using single query. Equipped with this single-query oracle, we design a new optimization algorithm that can dramatically reduce number of queries compared with Cheng et al. (2019). We prove the convergence of the proposed algorithm and show our new algorithm is overwhelmingly better than current hard-label black-box attacks.
|
| 184 |
+
|
| 185 |
+
# ACKNOWLEDGEMENT
|
| 186 |
+
|
| 187 |
+
This work is based upon work supported by the Department of Energy National Energy Technology Laboratory under Award Number DE-OE0000911 and by NSF under IIS1719097.
|
| 188 |
+
|
| 189 |
+
# REFERENCES
|
| 190 |
+
|
| 191 |
+
Abdullah Al-Dujaili and Una-May O’Reilly. There are no bit parts for sign bits in black-box attacks. arXiv preprint arXiv:1902.06894, 2019.
|
| 192 |
+
|
| 193 |
+
Moustafa Alzantot, Yash Sharma, Supriyo Chakraborty, Huan Zhang, Cho-Jui Hsieh, and Mani B Srivastava. Genattack: Practical black-box attacks with gradient-free optimization. In Proceedings of the Genetic and Evolutionary Computation Conference, pp. 1111–1119, 2019.
|
| 194 |
+
|
| 195 |
+
Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In ICML, 2018.
|
| 196 |
+
|
| 197 |
+
Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Animashree Anandkumar. signSGD: Compressed optimisation for non-convex problems. 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. 560–569, Stockholmsmssan, Stockholm Sweden, 10– 15 Jul 2018. PMLR. URL http://proceedings.mlr.press/v80/bernstein18a. html.
|
| 198 |
+
|
| 199 |
+
Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. arXiv preprint arXiv:1712.04248, 2017.
|
| 200 |
+
|
| 201 |
+
Thomas Brunner, Frederik Diehl, Michael Truong Le, and Alois Knoll. Guessing smart: Biased sampling for efficient black-box adversarial attacks. arXiv preprint arXiv:1812.09803, 2018.
|
| 202 |
+
|
| 203 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pp. 39–57. IEEE, 2017.
|
| 204 |
+
|
| 205 |
+
Jianbo Chen, Michael I. Jordan, and Martin J. Wainwright. Hopskipjumpattack: A query-efficient decision-based attack. arXiv preprint arXiv:1904.02144, 2019.
|
| 206 |
+
|
| 207 |
+
Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pp. 15–26. ACM, 2017.
|
| 208 |
+
|
| 209 |
+
Pin-Yu Chen, Yash Sharma, Huan Zhang, Jinfeng Yi, and Cho-Jui Hsieh. Ead: elastic-net attacks to deep neural networks via adversarial examples. In Thirty-second AAAI conference on artificial intelligence, 2018.
|
| 210 |
+
|
| 211 |
+
Minhao Cheng, Thong Le, Pin-Yu Chen, Huan Zhang, JinFeng Yi, and Cho-Jui Hsieh. Queryefficient hard-label black-box attack: An optimization-based approach. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id= rJlk6iRqKX.
|
| 212 |
+
|
| 213 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009.
|
| 214 |
+
|
| 215 |
+
John C Duchi, Peter L Bartlett, and Martin J Wainwright. Randomized smoothing for stochastic optimization. SIAM Journal on Optimization, 22(2):674–701, 2012.
|
| 216 |
+
|
| 217 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015.
|
| 218 |
+
|
| 219 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
|
| 220 |
+
|
| 221 |
+
Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In International Conference on Machine Learning, pp. 2142–2151, 2018a.
|
| 222 |
+
|
| 223 |
+
Andrew Ilyas, Logan Engstrom, and Aleksander Madry. Prior convictions: Black-box adversarial attacks with bandits and priors. arXiv preprint arXiv:1807.07978, 2018b.
|
| 224 |
+
|
| 225 |
+
Kwang-Sung Jun, Lihong Li, Yuzhe Ma, and Jerry Zhu. Adversarial attacks on stochastic bandits. In Advances in Neural Information Processing Systems, pp. 3640–3649, 2018.
|
| 226 |
+
|
| 227 |
+
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-10 (canadian institute for advanced research). URL http://www.cs.toronto.edu/˜kriz/cifar.html.
|
| 228 |
+
|
| 229 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016.
|
| 230 |
+
|
| 231 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 232 |
+
|
| 233 |
+
Sijia Liu, Bhavya Kailkhura, Pin-Yu Chen, Paishun Ting, Shiyu Chang, and Lisa Amini. Zeroth-order stochastic variance reduction for nonconvex optimization. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 3727– 3737. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/ 7630-zeroth-order-stochastic-variance-reduction-for-nonconvex-optimizatio pdf.
|
| 234 |
+
|
| 235 |
+
Sijia Liu, Pin-Yu Chen, Xiangyi Chen, and Mingyi Hong. signSGD via zeroth-order oracle. In International Conference on Learning Representations, 2019. URL https://openreview. net/forum?id ${ . } = { }$ BJe-DsC5Fm.
|
| 236 |
+
|
| 237 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 238 |
+
|
| 239 |
+
Sebastien Marcel and Yann Rodriguez. Torchvision the machine-vision package of torch. In ´ Proceedings of the 18th ACM International Conference on Multimedia, MM ’10, pp. 1485–1488, New York, NY, USA, 2010. ACM. ISBN 978-1-60558-933-6. doi: 10.1145/1873951.1874254. URL http://doi.acm.org/10.1145/1873951.1874254.
|
| 240 |
+
|
| 241 |
+
Yurii Nesterov and Vladimir Spokoiny. Random gradient-free minimization of convex functions. Foundations of Computational Mathematics, 17(2):527–566, 2017.
|
| 242 |
+
|
| 243 |
+
Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, pp. 506–519. ACM, 2017.
|
| 244 |
+
|
| 245 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016.
|
| 246 |
+
|
| 247 |
+
Chun-Chen Tu, Paishun Ting, Pin-Yu Chen, Sijia Liu, Huan Zhang, Jinfeng Yi, Cho-Jui Hsieh, and Shin-Ming Cheng. Autozoom: Autoencoder-based zeroth order optimization method for attacking black-box neural networks. AAAI, 2019.
|
| 248 |
+
|
| 249 |
+
Huan Zhang, Hongge Chen, Zhao Song, Duane Boning, Inderjit S Dhillon, and Cho-Jui Hsieh. The limitations of adversarial training and the blind-spot attack. arXiv preprint arXiv:1901.04684, 2019.
|
| 250 |
+
|
| 251 |
+
# A APPENDIX
|
| 252 |
+
|
| 253 |
+
# A.1 COMPARISON WITH HOPSKIPJUMPATTACK
|
| 254 |
+
|
| 255 |
+
There is a recent paper (Chen et al., 2019) that applied the zeroth-order sign oracle to improve Boundary attack, and also demonstrated significant improvement. The major differences to our algorithm are that we propose a new zeroth-order gradient descent algorithm, provide its algorithmic convergence guarantees, and aim to improve the query complexity of the attack formulation proposed in (Cheng et al., 2019). To be noted, HopSkipJumpAttack only provides the bias and variance analysis (Theorem 2 and 3) without convergence rate analysis.
|
| 256 |
+
|
| 257 |
+
Also, HopSkipJumpAttack uses one-point gradient estimate compared to the 2-point gradient estimate used by SignOPT. Therefore, although the estimation is unbiased, it has large variance, which achieves successful attack faster but generates a worse adversarial example with larger distortion than ours. For completeness, we also compare with this method (and mention the results) as follows.
|
| 258 |
+
|
| 259 |
+
Figure 7 shows a comparison of Sign-OPT and HopSkipJumpAttack for CIFAR-10 and MNIST datasets for the case of $L _ { 2 }$ norm based attack. We find in our experiments that performance of both attacks is comparable in terms of queries consumed. In some cases, Sign-OPT converges to a better solution.
|
| 260 |
+
|
| 261 |
+

|
| 262 |
+
Figure 7: Comparison with HopSkipJumpAttack for CIFAR and MNIST: Median distortion vs Queries. (U) represents untargeted attack and (T) represents targeted attack.
|
| 263 |
+
|
| 264 |
+
# A.2 PROOF
|
| 265 |
+
|
| 266 |
+
Define following notations:
|
| 267 |
+
|
| 268 |
+
$$
|
| 269 |
+
\begin{array} { l } { \displaystyle \hat { \nabla } g ( \theta _ { t } ; u _ { q } ) : = \mathrm { s i g n } ( g ( \pmb \theta _ { t } + \epsilon \pmb u _ { q } ) - g ( \pmb \theta _ { t } ) ) \pmb u _ { q } } \\ { \displaystyle \dot { \nabla } g ( \pmb \theta _ { t } ; \pmb u _ { q } ) : = \cfrac { 1 } { \epsilon } ( g ( \pmb \theta _ { t } + \epsilon \pmb u _ { q } ) - g ( \pmb \theta _ { t } ) ) \pmb u _ { q } } \\ { \displaystyle \bar { \nabla } g ( \pmb \theta _ { t } ; \pmb u _ { q } ) : = \mathrm { s i g n } ( \cfrac { 1 } { \epsilon } ( g ( \pmb \theta _ { t } + \epsilon \pmb u _ { q } ) - g ( \pmb \theta _ { t } ) ) \pmb u _ { q } ) } \end{array}
|
| 270 |
+
$$
|
| 271 |
+
|
| 272 |
+
Thus we could write the corresponding estimate of gradients as follow:
|
| 273 |
+
|
| 274 |
+
$$
|
| 275 |
+
\begin{array} { l } { \displaystyle \dot { g } _ { t } = \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \dot { \mathrm { s i g n } } ( g ( \theta _ { t } + \epsilon { \bf u } _ { q } ) - g ( \theta _ { t } ) ) u _ { q } = \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) } \\ { \displaystyle \dot { g } _ { t } = \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \frac { 1 } { \epsilon } ( g ( \theta _ { t } + \epsilon u _ { q } ) - g ( \theta _ { t } ) ) u _ { q } = \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) } \\ { \displaystyle \ddot { g } _ { t } = \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \dot { \mathrm { s i g n } } ( \frac { 1 } { \epsilon } ( g ( \theta _ { t } + \epsilon u _ { q } ) - g ( \theta _ { t } ) ) u _ { q } ) = \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \ddot { \nabla } g ( \theta _ { t } ; u _ { q } ) } \end{array}
|
| 276 |
+
$$
|
| 277 |
+
|
| 278 |
+
Clearly, we have $\bar { \nabla } g ( \pmb \theta _ { t } ; \pmb u _ { q } ) = \mathrm { s i g n } ( \dot { \nabla } g ( \pmb \theta _ { t } ; \pmb u _ { q } ) )$ and we could relate $\bar { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } )$ and $\hat { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } )$ by writing ${ \hat { \nabla } } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) = G _ { q } \odot { \bar { \nabla } } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } )$ where where $G _ { q } \in \mathbb { R } ^ { d }$ is absolute value of vector $\pmb { u } _ { q }$ (i.e. $G _ { q } = ( | \boldsymbol { u } _ { q , 1 } | , | \boldsymbol { u } _ { q , 2 } | , \cdot \cdot \cdot , | \boldsymbol { u } _ { q , d } | ) ^ { T } )$ .
|
| 279 |
+
|
| 280 |
+
Note that Zeroth-order gradient estimate $\dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } )$ is a biased approximation to the true gradient of $\mathbf { g }$ . Instead, it becomes unbiased to the gradient of the randomized smoothing function $g _ { \epsilon } ( \pmb { \theta } ) =$ $\mathbb { E } _ { \pmb { u } } \mathbf { \bar { [ { g } ( \pmb { \theta } + \epsilon { u } ) ] } }$ Duchi et al. (2012).
|
| 281 |
+
|
| 282 |
+
Our analysis is based on the following two assumptions:
|
| 283 |
+
|
| 284 |
+
Assumption 1 function $\mathbf { g }$ is L-smooth with a finite value of L.
|
| 285 |
+
|
| 286 |
+
Assumption 2 At any iteration step t, the gradient of the function $\mathbf { g }$ is upper bounded by $\| \nabla g ( \pmb \theta _ { t } ) \| _ { 2 } \le \sigma$ .
|
| 287 |
+
|
| 288 |
+
To prove the convergence of proposed method, we need the information on variance of the update $\dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } )$ . Here, we introduce a lemma from previous works.
|
| 289 |
+
|
| 290 |
+
Lemma 1 The variance of Zeroth-Order gradient estimate $\dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } )$ is upper bounded by
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
\mathbb { E } \big [ \| \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) - \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) \| _ { 2 } ^ { 2 } \big ] \leq \frac { 4 ( Q + 1 ) } { Q } \sigma ^ { 2 } + \frac { 2 } { Q } C ( d , \epsilon ) ,
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
where $C ( d , \epsilon ) : = 2 d \sigma ^ { 2 } + \epsilon ^ { 2 } L ^ { 2 } d ^ { 2 } / 2$
|
| 297 |
+
|
| 298 |
+
Proof of Lemma 1 This lemma could be proved by using proposition 2 in Liu et al. (2019) with b $= 1$ and $\mathbf q = \mathbf Q$ . When $\mathbf b = 1$ there is no difference between with/without replacement, and we opt for with replacement case to obtain above bound.
|
| 299 |
+
|
| 300 |
+
By talking $\mathrm { Q } = 1$ , we know that $\mathbb { E } \big [ \| \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) - \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) \| _ { 2 } ^ { 2 } \big ]$ is upper bounded. And by Jensen’s inequality, we also know that the
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
\begin{array} { r } { \mathbb { E } \big [ | ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) \iota | \big ] \leq \sqrt { \mathbb { E } \big [ ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) ) _ { l } ^ { 2 } \big ] } : = \delta _ { l } , } \end{array}
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
where $\delta _ { l }$ denotes the upper bound of $l t h$ coordinate of $\mathbb { E } \big [ | \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) - \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) | \big ]$ , and $\delta _ { l }$ is finite since $\mathbb { E } \big [ \lVert \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) - \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) \rVert _ { 2 } ^ { 2 } \big ]$ is upper bounded.
|
| 307 |
+
|
| 308 |
+
Next, we want to show the $\operatorname { P r o b } [ \operatorname { s i g n } ( ( { \bar { g } } _ { t } ) _ { l } ) \neq \operatorname { s i g n } ( ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ) ]$ by following lemma.
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\begin{array} { r } { | ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } | \mathrm { P r o b } [ \mathrm { s i g n } ( ( \bar { g } _ { t } ) _ { l } ) \neq \mathrm { s i g n } ( ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ) ] \leq \frac { \delta _ { l } } { \sqrt { Q } } } \end{array}
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
Proof of Lemma 2 Similar to Bernstein et al. (2018), we first relax $\operatorname { P r o b } [ \operatorname { s i g n } ( ( \dot { \nabla } g ( \pmb \theta _ { t } ; \pmb u _ { q } ) ) _ { l } ) \neq$ $\mathrm { s i g n } ( \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) ) _ { l } ]$ by Markov inequality:
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\begin{array} { r l } & { \mathrm { P r o b } [ \mathrm { s i g n } ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ) ] \leq \mathrm { P r o b } [ | \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) _ { l } ) | \geq | \nabla g _ { \epsilon } ( \theta _ { t } ) _ { l } | ] } \\ & { \quad \quad \quad \quad \quad \leq \frac { \mathbb { E } \left[ | ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } | \right] } { | \nabla g _ { \epsilon } ( \theta _ { t } ) _ { l } | } } \\ & { \quad \quad \quad \quad \quad \leq \frac { \delta _ { l } } { | \nabla g _ { \epsilon } ( \theta _ { t } ) _ { l } | } , } \end{array}
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
where the last inequality comes from eq (6). Recall that $( \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) ) _ { l } )$ is an unbiased estimation to $( \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) ) _ { l }$ . Under the assumption that the noise distribution is unimodal and symmetric, from Bernstein et al. (2018) Lemma D1, we will have
|
| 321 |
+
|
| 322 |
+
$$
|
| 323 |
+
\operatorname { P r o b } [ \mathrm { s i g n } ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ] : = M \leq \left\{ \begin{array} { l l } { \frac { 2 } { 9 } \frac { 1 } { S ^ { 2 } } , } & { \mathrm { S } \geq \frac { 2 } { \sqrt { 3 } } } \\ { \frac { 1 } { 2 } - \frac { S } { 2 \sqrt { 3 } } , } & { o t h e r w i s e } \end{array} \right. < \frac { 1 } { 2 } ,
|
| 324 |
+
$$
|
| 325 |
+
|
| 326 |
+
where $S : = | \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) _ { l } | / \delta _ { l }$ .
|
| 327 |
+
|
| 328 |
+
Note that this probability bound applies uniformly to all $q \in Q$ regardless of the magnitude $| ( { \pmb u } _ { q } ) _ { l } |$ . That is,
|
| 329 |
+
|
| 330 |
+
$$
|
| 331 |
+
\begin{array} { r l r } { { \mathrm { P r o b } [ \mathrm { s i g n } ( \sum _ { q = 1 } ^ { Q } \vert ( { \boldsymbol u } _ { q } ) _ { l } \vert \mathrm { s i g n } ( ( \dot { \nabla } g ( { \boldsymbol \theta } _ { t } ; { \boldsymbol u } _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( \nabla g _ { \epsilon } ( { \boldsymbol \theta } _ { t } ) ) _ { l } ] = } } \\ & { } & { \mathrm { P r o b } [ \mathrm { s i g n } ( ( \sum _ { q = 1 } ^ { Q } \mathrm { s i g n } ( \dot { \nabla } g ( { \boldsymbol \theta } _ { t } ; { \boldsymbol u } _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( \nabla g _ { \epsilon } ( { \boldsymbol \theta } _ { t } ) ) _ { l } ] . } \end{array}
|
| 332 |
+
$$
|
| 333 |
+
|
| 334 |
+
This is true as when all $\begin{array} { r } { u _ { q } ) _ { l } \vert = 1 , \mathrm { P r o b } [ \mathrm { s i g n } ( ( \sum _ { q = 1 } ^ { Q } \mathrm { s i g n } ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ] } \end{array}$ is equivalent to majority voting of each estimate q yielding correct sign. This is the same as sum of Q bernoulli trials (i.e. binomial distribution) with error rate $\mathbf { M }$ . And since error probability $\mathbf { M }$ is independent of sampling of $| ( { \pmb u } _ { q } ) _ { l } |$ , calculating $\mathrm { P r o b } [ \mathrm { s i g n } ( \sum _ { q = 1 } ^ { Q } | ( u _ { q } ) _ { l } | \mathrm { s i g n } ( ( \dot { \nabla } g ( \pmb _ { t } ; \pmb { u } _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) ) _ { l } ]$ could be thought as taking Q bernoulli experiments and then independently draw a weight from unit length for each of $\mathrm { Q }$ experiment. Since the weight is uniform, we will have expectation of weights on correct counts and incorrect counts are the same and equal to $1 / 2$ . Therefore, the probability of $\mathrm { P r o b } [ \mathrm { s i g n } ( \sum _ { q = 1 } ^ { Q } | ( u _ { q } ) _ { l } | \mathrm { s i g n } ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) ) _ { l } ) \neq \mathrm { s i g n } ( \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) ) _ { l } ]$ is still the $\operatorname { s i g n } ( \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) _ { l } ) = \bar { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) _ { l }$ inomthus $\begin{array} { r } { \frac { 1 } { Q } \sum _ { q = 1 } ^ { Q } \mathrm { s i g n } ( \dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) ) _ { l } = ( \bar { \pmb { g } } _ { t } ) _ { l } } \end{array}$ nota. Let $Z$ n, we will havecounts the number of estimates $\dot { \nabla } g ( \pmb { \theta } _ { t } ; \pmb { u } _ { q } ) _ { l }$ yielding correct sign of $\nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) _ { l }$ . Probability in eq (7) could be written as:
|
| 335 |
+
|
| 336 |
+
$$
|
| 337 |
+
\operatorname { P r o b } [ \operatorname { s i g n } ( \operatorname { s i g n } ( ( { \bar { g } } _ { t } ) _ { l } ) \neq \operatorname { s i g n } ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ] = P [ Z \leq { \frac { Q } { 2 } } ] .
|
| 338 |
+
$$
|
| 339 |
+
|
| 340 |
+
Following the derivation of theorem 2b in Bernstein et al. (2018), we could get
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
\begin{array} { c } { \displaystyle P [ Z \leq \frac { Q } { 2 } ] \leq \frac { 1 } { \sqrt { Q S } } } \\ { \displaystyle \Rightarrow \vert ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } \vert \mathrm { P r o b } [ \mathrm { s i g n } ( ( \bar { g } _ { t } ) _ { l } ) \neq \mathrm { s i g n } ( ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ) ] \leq \frac { \delta _ { l } } { \sqrt { Q } } } \end{array}
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
We also need few more lemmas on properties of function g.
|
| 347 |
+
|
| 348 |
+
Lemma 3 $g _ { \epsilon } ( \pmb { \theta } _ { 1 } ) - g _ { \epsilon } ( \pmb { \theta } _ { T } ) \leq g _ { \epsilon } ( \pmb { \theta } _ { 1 } ) - g ^ { * } + \epsilon ^ { 2 } L$
|
| 349 |
+
|
| 350 |
+
Proof of Lemma 3 The proof can be found in Liu et al. (2018) Lemma C.
|
| 351 |
+
|
| 352 |
+
Lemma 4 $\begin{array} { r } { \mathbb { E } [ \| \nabla g ( \pmb { \theta } ) \| _ { 2 } ] \le \sqrt { 2 } \mathbb { E } [ \| \nabla g _ { \epsilon } ( \pmb { \theta } ) \| _ { 2 } ] + \frac { \epsilon L d } { \sqrt { 2 } } } \end{array}$ , where $g ^ { * } = \operatorname* { m i n } _ { \pmb { \theta } } g ( \pmb { \theta } )$
|
| 353 |
+
|
| 354 |
+
Proof of Lemma 4 The proof can be found in Liu et al. (2019).
|
| 355 |
+
|
| 356 |
+
Theorem 1 Suppose that the conditions in the assumptions hold, and the distribution of gradient noise is unimodal and symmetric. Then, Sign-OPT attack with learning rate $\begin{array} { r } { \eta _ { t } = O \big ( \frac { 1 } { Q \sqrt { d T } } \big ) } \end{array}$ ( 1Q√dT ) and $\begin{array} { r } { \epsilon = O ( \frac { 1 } { d T } ) } \end{array}$ will give following bound on $\mathbb { E } [ \| \nabla g ( \pmb { \theta } ) \| _ { 2 } ]$
|
| 357 |
+
|
| 358 |
+
$$
|
| 359 |
+
\mathbb { E } [ \| \nabla g ( \pmb { \theta } ) \| _ { 2 } ] = O ( \frac { \sqrt { d } } { \sqrt { T } } + \frac { d } { \sqrt { Q } } )
|
| 360 |
+
$$
|
| 361 |
+
|
| 362 |
+
Proof of Theorem 1 From L-smoothness assumption we could have
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\begin{array} { r l } & { g _ { \epsilon } ( \theta _ { t + 1 } ) \leq g _ { \epsilon } ( \theta _ { t } ) + \langle \nabla g _ { \epsilon } ( \theta _ { t } ) , \theta _ { t + 1 } - \theta _ { t } \rangle + \displaystyle \frac { L } { 2 } \| \theta _ { t + 1 } - \theta _ { t } \| _ { 2 } ^ { 2 } } \\ & { \quad \quad \quad = g _ { \epsilon } ( \theta _ { t } ) - \eta _ { k } \langle \nabla g _ { \epsilon } ( \theta _ { t } ) , \hat { g } _ { t } \rangle + \displaystyle \frac { L } { 2 } \eta _ { t } ^ { 2 } \| \hat { g } _ { t } \| _ { 2 } ^ { 2 } } \\ & { \quad \quad \quad = g _ { \epsilon } ( \theta _ { t } ) - \eta _ { t } \odot \bar { G } _ { t } \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 1 } + \displaystyle \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G } _ { t } ^ { \ 2 } } \\ & { \quad \quad \quad \quad + 2 \eta _ { t } \odot \bar { G } _ { t } \sum _ { l = 1 } ^ { d } | ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } | \mathrm { P r o b } [ \mathrm { s i g n } ( ( \bar { g } _ { t } ) _ { l } ) \neq \mathrm { s i g n } ( ( \nabla g _ { \epsilon } ( \theta _ { t } ) ) _ { l } ) ] , } \end{array}
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
where $\hat { G } _ { t }$ is defined as $\begin{array} { r } { ( \bar { G } _ { t } ) _ { l } = \sum _ { q = 1 } ^ { Q } { ( G _ { q } ) _ { l } } \bar { \nabla } g ( \theta _ { t } ; \boldsymbol { u } _ { q } ) _ { l } = \sum _ { q = 1 } ^ { Q } | ( \boldsymbol { u } _ { q } ) _ { l } | \bar { \nabla } g ( \theta _ { t } ; \boldsymbol { u } _ { q } ) _ { l } } \end{array}$ . Continue the inequality,
|
| 369 |
+
|
| 370 |
+
by eq (8)
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\begin{array} { r l } & { \mathcal { G } _ { t } ( \theta _ { t } ) - \mathcal { H } _ { t } \odot \bar { G } _ { t } | | \nabla _ { \mathcal { A } _ { t } } \{ \theta _ { t } \} | | _ { 1 } + \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G } _ { t } ^ { 2 } } \\ & { + 2 \eta _ { t } \odot \bar { G } _ { t } \sum _ { l = 1 } ^ { 1 } | | \nabla _ { \mathcal { A } _ { t } } \{ \theta _ { t } \} | | \operatorname* { P o b } \{ \bar { \mathrm { s i g n } } ( ( \overline { { g } } _ { t } ) _ { l } ) \} \times \mathrm { s i g n } ( ( \nabla _ { \mathcal { A } _ { t } } \{ \theta _ { t } \} ) _ { l } ) | } \\ & { \le \mathcal { E } _ { t } ( \theta _ { t } ) - \mathcal { H } _ { t } \odot \bar { G } _ { t } | | \nabla _ { \mathcal { A } _ { t } } \{ \theta _ { t } \} | | 1 + \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G } _ { t } ^ { 2 } + 2 \eta _ { t } \odot \bar { G } _ { t } \underset { t = 1 } { \overset { d , d } { \sum } } \frac { \bar { G } _ { t } } { \nabla | \mathcal { Q } } } \\ & { \le \mathcal { E } _ { t } ( \theta _ { t } ) - \eta _ { t } \odot \bar { G } _ { t } | | \nabla _ { \mathcal { A } _ { t } } \{ \theta _ { t } \} | | 1 + \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G } _ { t } ^ { 2 } + 2 \eta _ { t } \odot \bar { G } _ { t } \frac { | | \hat { \mathcal { A } } | } { \sqrt { d } } } \\ & { \le \mathcal { E } _ { t } ( \theta _ { t } ) - \eta _ { t } \odot \bar { G } _ { t } | | \nabla _ { \mathcal { A } _ { t } } \{ \theta _ { t } \} | | 1 + \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G } _ { t } ^ { 2 } + 2 \eta _ { t } \odot \bar { G } _ { t } \frac { | | \hat { \mathcal { A } } | } { \sqrt { d } } } \\ & = \mathcal { E } _ { t } ( \theta _ { t } ) - \eta _ { t } \odot \bar { G } _ { t } | | \nabla _ { \mathcal { A } _ { t } } \{ \end{array}
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
Thus we will have,
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\begin{array} { r l } & { \displaystyle _ { t _ { \epsilon } } ( \theta _ { t + 1 } ) - g _ { \epsilon } ( \theta _ { t } ) \leq - \eta _ { t } \odot \bar { G } _ { t } \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 1 } + \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G _ { t } } ^ { 2 } + 2 \eta _ { t } \odot \bar { G } _ { t } \frac { \sqrt { d } \sqrt { \mathbb { E } \big [ ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) ) _ { l } \big ] } } { \sqrt { Q } } , } \\ & { \displaystyle \Rightarrow \eta _ { t } \odot \bar { G } _ { t } \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 1 } \le g _ { \epsilon } ( \theta _ { t } ) - g _ { \epsilon } ( \theta _ { t + 1 } ) + \frac { d L } { 2 } \eta _ { t } ^ { 2 } \odot \bar { G _ { t } } ^ { 2 } + 2 \eta _ { t } \odot \bar { G } _ { t } \frac { \sqrt { d } \sqrt { \mathbb { E } \big [ ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) ) _ { l } \big ] } } { \sqrt { Q } } , } \\ & { \displaystyle \Rightarrow \hat { \eta } _ { t } \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 1 } \le g _ { \epsilon } ( \theta _ { t } ) - g _ { \epsilon } ( \theta _ { t + 1 } ) + \frac { d L } { 2 } \hat { \eta } _ { t } ^ { 2 } + 2 \hat { \eta } _ { t } \sqrt { d } \frac { \sqrt { \mathbb { E } \big [ ( ( \dot { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) ) _ { l } ^ { 2 } \big ] } } { \sqrt { Q } } , } \end{array}
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
where we define $\hat { \eta _ { t } } : = \eta _ { t } \odot \bar { G } _ { t }$ . Sum up all inequalities for all ts and take expectation on both side, we will have
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\begin{array} { r l } & { \displaystyle \hat { \eta } _ { t } \mathbb { E } [ \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 1 } ] \le \mathbb { E } [ g _ { \epsilon } ( \theta _ { 1 } ) - g _ { \epsilon } ( \theta _ { T } ) ] + \frac { d L } { 2 } \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } ^ { 2 } + \sum _ { t = 1 } ^ { T } 2 \hat { \eta } _ { t } \sqrt { d } \sqrt { \mathbb { E } \big [ ( ( \hat { \nabla } g ( \theta _ { t } ; u _ { q } ) - \nabla g _ { \epsilon } ( \theta _ { t } ) ) ) \big ] } } \\ & { \displaystyle \le \mathbb { E } \big [ g _ { \epsilon } ( \theta _ { 1 } ) - g _ { \epsilon } ( \theta _ { T } ) \big ] + \frac { d L } { 2 } \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } ^ { 2 } + \sum _ { t = 1 } ^ { T } 2 \hat { \eta } _ { t } \sqrt { d } \sqrt { \frac { 4 ( Q + 1 ) } { Q } \sigma ^ { 2 } + \frac { 2 } { Q } C ( d , \epsilon ) } } \end{array}
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
by Lemma 1.
|
| 389 |
+
|
| 390 |
+
Substitute Lemma 3 into above inequality, we get
|
| 391 |
+
|
| 392 |
+
$$
|
| 393 |
+
\sum _ { = 1 } ^ { T } \hat { \eta } _ { t } \mathbb { E } [ \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 1 } ] \le g _ { \epsilon } ( \theta _ { 1 } ) - g ^ { * } + \epsilon ^ { 2 } L + \frac { d L } { 2 } \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } ^ { 2 } + \sum _ { t = 1 } ^ { T } 2 \hat { \eta } _ { t } \sqrt { d } \sqrt { \frac { 4 ( Q + 1 ) } { Q } } \sigma ^ { 2 } + \frac { 2 } { Q } C ( d , \epsilon ) .
|
| 394 |
+
$$
|
| 395 |
+
|
| 396 |
+
Since $\| \cdot \| _ { 2 } \leq \| \cdot \| _ { 1 }$ and we could divide $\textstyle \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t }$ on both side to get
|
| 397 |
+
|
| 398 |
+
$$
|
| 399 |
+
\sum _ { i = 1 } ^ { T } \frac { \hat { \eta } _ { t } } { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } } \mathbb { E } [ \| \nabla g _ { \epsilon } ( \theta _ { t } ) \| _ { 2 } ] \leq \frac { g _ { \epsilon } ( \theta _ { 1 } ) - g ^ { * } + \epsilon ^ { 2 } L } { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } } + \frac { d L } { 2 } \frac { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } ^ { 2 } } { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } } + \sum _ { t = 1 } ^ { T } \frac { 2 \sqrt { d } } { \sqrt { Q } } \sqrt { 4 ( Q + 1 ) \sigma ^ { 2 } + 2 C \| \hat { \eta } _ { t } \| ^ { 2 } } .
|
| 400 |
+
$$
|
| 401 |
+
|
| 402 |
+
Define a new random variable $\mathbf { R }$ with probability $\begin{array} { r } { P ( R = t ) = \frac { \eta _ { t } } { \sum _ { t = 1 } ^ { T } \eta _ { t } } } \end{array}$ , we will have
|
| 403 |
+
|
| 404 |
+
$$
|
| 405 |
+
\mathbb { E } [ \| \nabla g _ { \epsilon } ( \pmb { \theta } _ { R } ) \| _ { 2 } ] = \mathbb { E } [ \mathbb { E } _ { R } [ \| \nabla g _ { \epsilon } ( \pmb { \theta } _ { R } ) \| _ { 2 } ] ] = \mathbb { E } \Big [ \sum _ { t = 1 } ^ { T } P ( R = t ) \| \nabla g _ { \epsilon } ( \pmb { \theta } _ { t } ) \| _ { 2 } \Big ] .
|
| 406 |
+
$$
|
| 407 |
+
|
| 408 |
+
Substitute all the quantities into Lemma 4, we will get
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\mathbb { Z } [ \| \nabla g ( \theta ) \| _ { 2 } ] \le \frac { \sqrt { 2 } \big ( g _ { \epsilon } ( \theta _ { 1 } ) - g ^ { * } + \epsilon ^ { 2 } L \big ) } { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } } + \frac { d L } { \sqrt { 2 } } \frac { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } ^ { 2 } } { \sum _ { t = 1 } ^ { T } \hat { \eta } _ { t } } + \frac { \epsilon L d } { \sqrt { 2 } } + \sum _ { t = 1 } ^ { T } \frac { 2 \sqrt { 2 } \sqrt { d } } { \sqrt { Q } } \sqrt { 4 ( Q + 1 ) \sigma ^ { 2 } + 2 \sigma ^ { 2 } } ,
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
By choosing $\begin{array} { r } { \epsilon = O ( \frac { 1 } { d T } ) } \end{array}$ and $\begin{array} { r } { \eta _ { t } = O ( \frac { 1 } { Q \sqrt { d T } } ) } \end{array}$ , then the convergence rate as shown in above is $\begin{array} { r } { O ( \frac { d } { T } + \frac { d } { \sqrt { Q } } ) } \end{array}$ .
|
md/train/Skxuk1rFwB/Skxuk1rFwB.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/Syxwsp4KDB/Syxwsp4KDB.md
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TED: A PRETRAINED UNSUPERVISED SUMMARIZATION MODEL WITH THEME MODELING AND DENOISING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Text summarization aims to extract essential information from a piece of text and transform it into a concise version. Existing unsupervised abstractive summarization models use recurrent neural networks framework and ignore abundant unlabeled corpora resources. In order to address these issues, we propose TED, a transformer-based unsupervised summarization system with pretraining on largescale data. We first leverage the lead bias in news articles to pretrain the model on large-scale corpora. Then, we finetune TED on target domains through theme modeling and a denoising autoencoder to enhance the quality of summaries. Notably, TED outperforms all unsupervised abstractive baselines on NYT, CNN/DM and English Gigaword datasets with various document styles. Further analysis shows that the summaries generated by TED are abstractive and containing even higher proportions of novel tokens than those from supervised models.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Summarization refers to the task of condensing a document into a shorter version. Summarization models can be categorized into two classes: abstractive and extractive. Extractive models select sentences from the input article as the summary. Such process ensures a basic level of grammaticality and accuracy, but also limit the model to copying. In contrast, abstractive models summarize documents using tokens and phrases that may not be found in the input article, a process requiring an advanced ability to refine, paraphrase and re-organize information (See et al., 2017; Narayan et al., 2018).
|
| 12 |
+
|
| 13 |
+
Like most machine learning algorithms, summarization models can also be divided into supervised and unsupervised categories. Supervised approaches require in-domain parallel data, i.e. both input articles and corresponding reference summaries must be present for training (Hermann et al., 2015; Liu & Lapata, 2019). Unfortunately, high-quality paired data are not always available across different text domains and styles. Moreover, considering the fact that summarization is not an easy task even for people, reliable human-labeled data are also difficult to obtain. Therefore, several unsupervised summarization approaches have been proposed, which do not require reference summaries for the target domain. We introduce these methods as follows.
|
| 14 |
+
|
| 15 |
+
Unsupervised extractive models. TextRank (Mihalcea & Tarau, 2004) encodes sentences in the article as nodes in an undirected graph. The weights of edges are measured by sentences similarity. The centrality of a node (sentence) is computed by PageRank (Brin & Page, 1998) to decide whether a sentence should be included in the final summary. Zheng & Lapata (2019) advances upon TextRank by using BERT (Devlin et al., 2018) to compute sentence similarity and build graphs with directed edges decided by the relative positions of sentences.
|
| 16 |
+
|
| 17 |
+
Unsupervised abstractive models. Baziotis et al. (2019) leverages differentiable sampling and optimizes by re-constructing the input article from the generated summary. Chu & Liu (2018) proposes a similar idea in the multi-document summarization setting. Wang & Lee (2018) uses adversarial training and reinforcement learning to make the summary human-readable. Fevry & Phang (2018) ´ adopts denoising autoencoders originally used in sentence compression. However, most of these models are only tested on datasets with considerably small article/summary length. Also, previous models usually utilize the recurrent neural networks (RNNs). However, transformers (Vaswani et al., 2017; Devlin et al., 2018) have shown superior performances over RNNs on various NLP tasks, including machine translation, reading comprehension, sentiment analysis, etc.
|
| 18 |
+
|
| 19 |
+
In this paper, we present TED, an unsupervised abstractive summarization model with theme modeling and denoising that uses a transformer-based encoder-decoder structure and the pretraining leverages large scale unlabeled corpora. Our main contributions are two-fold as follows.
|
| 20 |
+
|
| 21 |
+
First, we leverage the lead bias in news articles for model pretraining. The lead bias is introduced by the journalistic convention of writing using an inverted pyramid structure, placing the most important information in the beginning of an article. We propose to use the leading sentences as the target summary and train the model to predict it during pretraining. In this way, we can utilize large-scale unlabeled corpora. Without any finetuing, the model pretrained in this way on 21.4M news articles can yield better performance than most existing unsupervised methods.
|
| 22 |
+
|
| 23 |
+
Second, to finetune on specific datasets, TED is further trained with a theme modeling loss and a denoising autoencoder. The role of the theme modeling module is to make the generated summary semantically close to the article. The module uses a semantic classifier trained using a discriminative objective function. Furthermore, to optimize on the generated summary tokens, we adopt the Gumbel-Softmax (Jang et al., 2016) estimator to replace the non-differentiable arg max. The denoising autoencoder has been previously used in unsupervised machine translation (Lample et al., 2017) and sentence compression (Fevry & Phang, 2018), and we employ it to help the model extract ´ salient information from corrupted text.
|
| 24 |
+
|
| 25 |
+
Also, instead of classical word tokenization, we adopt the SentencePiece tokenization (Kudo & Richardson, 2018) to alleviates the long-standing out-of-vocabulary (OOV) problem in language generation tasks (Luong et al., 2014; Sennrich et al., 2015).
|
| 26 |
+
|
| 27 |
+
We test TED on several benchmark datasets. The experimental results show that TED outperform all unsupervised abstractive baselines on all datasets. For example, on the CNN/DM dataset, it outperforms the state-of-the-art unsupervised abstractive model by more than 9 ROUGE-1 points and compares favorably with most unsupervised extractive models. We further show that TED is capable of generating novel words and phrases in the summaries, and is a highly abstractive system even compared with supervised systems.
|
| 28 |
+
|
| 29 |
+
# 2 METHODOLOGY
|
| 30 |
+
|
| 31 |
+
In this section, we will go through the model structure of TED, i.e. the transformer encoder and decoder, theme modelling and the denoising autoencoder. The overall architecture of TED is illustrated in Fig. 1.
|
| 32 |
+
|
| 33 |
+
# 2.1 TRANSFORMER ENCODER AND DECODER
|
| 34 |
+
|
| 35 |
+
Previous unsupervised summarization methods are based on the sequence to sequence (seq2seq) model (Sutskever et al., 2014) that primarily uses the RNN model. As the transformer structure (Vaswani et al., 2017) has been successfully used in a large number of NLP tasks, our model employs the multi-layer transformer encoder-decoder architecture. We follow the standard transformer design in our network and refer readers to Vaswani et al. (2017) for more technical details. Denote the number of layers (i.e., Transformer blocks) as $L$ , the number of self-attention heads as $H$ and the hidden size as $N$ . We explore two different configurations in experiments, 4 layers 4 heads (4L4H) with $N = 5 1 2$ and 10 layers 8 heads (10L8H) with $N = 7 2 0$ .
|
| 36 |
+
|
| 37 |
+
Denote the input article token sequence as $X = \{ x _ { 1 } , x _ { 2 } , . . . , x _ { n } \}$ , and each token is transferred to a vector by a trainable embeddings matrix $V$ . The output from transformer encoder $E$ is a sequence of encoded vectors $E ( X ) = \{ \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { u } _ { 1 } ^ { E } , \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf \mathbf { } \mathbf \mathbf \mathbf { } \mathbf \mathbf \mathbf { } \mathbf \mathbf \mathbf { } \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf { \mathbf } \mathbf \mathbf \mathbf \mathbf { } \mathbf \mathbf \mathbf$ . The decoder can be viewed as a conditional language model to generate the summary. Given $k$ input summary tokens ${ \underline { { W } } } = \{ w _ { 1 } , w _ { 2 } , . . . , w _ { k } \}$ , the cross attention layer in the decoder $D$ attends with encoder outputs $\{ { \pmb u } _ { i } ^ { E } \} _ { i = 1 } ^ { n }$ . The decoder outputs are ${ \cal D } ( \{ w _ { 1 } , w _ { 2 } , . . . , w _ { k } \} ) = \{ { \pmb u } _ { 1 } ^ { D } , { \pmb u } _ { 2 } ^ { D } , . . . , { \pmb u } _ { k } ^ { D } \}$ . The probability distribution over the vocabulary for $w _ { k + 1 }$ is given by:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
P ( w _ { k + 1 } | w _ { 1 : k } , x _ { 1 : n } ) = \mathrm { s o f t m a x } ( V \pmb { u } _ { k } ^ { D } )
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
In our model, the text are not tokenized by spaces but by the SentencePiece (Kudo & Richardson, 2018) model, in order to address the challenging out-of-vocabulary (OOV) words issue. Efforts have been made to address this issue at the cost of losing semantic information, such as mapping OOV words to a special “UNK” token. To mitigate the open vocabulary problem, we adopt SentencePiece, a data-driven method that trains tokenization models from sentences in large-scale corpora. The advantage of the SentencePiece model is that its subwords can cover all possible word forms and the subword vocabulary size is controllable. In our experiments, we train a SentencePiece subword vocabulary of size 32,000.
|
| 44 |
+
|
| 45 |
+
Note for supervised summarization models, the inputs to the decoder are the groundtruths/reference summary tokens; for unsupervised learning, input tokens are generated in the previous pass. More details are available in section 2.3.1.
|
| 46 |
+
|
| 47 |
+
# 2.2 PRETRAINING WITH UNLABELED CORPORA
|
| 48 |
+
|
| 49 |
+
Leveraging large scale unlabeled text corpora to pretrain models has been proven as an effective method in multiple NLP tasks (Devlin et al., 2018). However, such approach has not yet been utilized in text summarization.
|
| 50 |
+
|
| 51 |
+
News articles follow an inverted pyramid structure, i.e. front loading the most salient information. This so-called ”lead bias” for news summarization is so strong that See et al. (2017) have shown that using the first 3 sentences in a news article as a summary can score higher than many sophisticated deep learning models. Although this poses a great challenge to previous research, we leverage this property in our favor in the pretraining phase.
|
| 52 |
+
|
| 53 |
+
For a news article, we set the target summary to be the first three sentences. This allows the model to exploit the structural bias of the news domain and infer the most important information using the background materials in the remainder of the article. For pretraining, we obtain three years of online news articles from 2016 to 2019 via an industrial search engine. The search engine indexes major online news domain, for instance, New York Times and Bloomberg. Then we collect the parsed articles within the 2016-2019 time range as the raw data. Note that this time span does not overlap any of three test datasets we use in this paper, therefore the pretraining should not lead to data leakage in test.
|
| 54 |
+
|
| 55 |
+
Next we conduct data cleaning to remove irrelevant distracting content and filter out articles whose top three sentences do not form a good summary. First, many news articles begin with media names, reporter names, dates or other irrelevant information for summarization, e.g. “New York (CNN) –”, “Adam Smith, June 3rd 2018:”. We automatically clean these using regular expressions. Second, we only include articles whose top three sentences contain between 10 and 150 words, and remaining sentences contain between 150 and 1,200 words. Third, we try to remove articles for which the first three sentences may not contain the major information in the article. We use a simple and easy-tocompute metric: overlapping words. We compute the portion of non-stopping words in the top three sentences that also appear in the rest of an article. A higher ratio indicates that the rest of the article is likely to elaborate on the beginning part. We keep those articles with this ratio of overlapping words higher than 0.65.
|
| 56 |
+
|
| 57 |
+
Finally, we end up with 21.4M articles. We randomly sample 12,000 from the data for validation. We conduct pretraining for 10 epochs and pick the model with the best ROUGE-L score on the validation set. The pretraining idea is also used in (Anonymous, 2020). After pretraining, we finetune TED on target datasets in an unsupervised manner. This includes two modules: theme modeling and denoising autoencoder.
|
| 58 |
+
|
| 59 |
+
# 2.3 THEME MODELING
|
| 60 |
+
|
| 61 |
+
Theme modeling aims to make the generated summary semantically close to the input article. We employ differential sampling to enable optimization on generated summaries and train a classifier to improve the semantic relatedness between the summary and article.
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 1: Overall structure of our model. TED first pretrains on news articles and then finetunes with theme modeling and denoising. (from left to right).
|
| 65 |
+
|
| 66 |
+
# 2.3.1 DIFFERENTIABLE SAMPLING
|
| 67 |
+
|
| 68 |
+
In order to optimize the network on output summaries, we need to make the generation of summary tokens differentiable. Recall the probability distribution of token $w _ { k + 1 }$ is ${ \bar { P } } ( w _ { k + 1 } | w _ { 1 : k } , x _ { 1 : n } ) \ i =$ softmax $( V u _ { k } ^ { D } )$ . Let $\pi$ denote $P ( w _ { k + 1 } | w _ { 1 : k } , x _ { 1 : n } )$ . One can use arg max on $\pi$ to obtain the token $w _ { k + 1 }$ in the forward pass, however, it is not differentiable in the gradient back-propagation. Although one can get around by obtaining the embedding of $w _ { k + 1 }$ as a weighted sum of the vocabulary embeddings $V$ , this results in an undesirable gap between the forward pass in training (weighted sum) and inference (discrete sampling). To solve this issue, we employ the straight-through GumbelSoftmax estimator (Jang et al., 2016) as in Yang et al. (2018); Baziotis et al. (2019). Specifically, the forward pass in training still uses arg max sampling, but for gradient computation, the following Gumbel-Softmax distribution is used as a differentiable approximation for the arg max operation:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\tilde { \pi } _ { i } = \frac { \exp ( \log ( \pi _ { i } ) + g _ { i } ) / \tau ) } { \sum _ { j = 1 } ^ { k } \exp ( \log ( \pi _ { j } ) + g _ { j } ) / \tau ) }
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $g _ { 1 } , \cdots , g _ { k }$ are i.i.d samples drawn from the Gumbel distribution $G ( 0 , 1 )$ and $\tau$ denotes the softmax temperature. As shown in Jang et al. (2016), as $\tau 0$ , the Gumbel-Softmax distribution converges to the categorical (one-hot) distribution; as $\tau \mathrm { i n f }$ , the Gumbel-Softmax distribution converges to the uniform distribution. Although this gradient estimator is biased, we find that this method works well in practice. We choose $\tau = 0 . 1$ based on the CNN/DM validation set and use this value in all the experiments. Denote the input article as $\mathbf { \delta } _ { d }$ , the generated summary as $\pmb { \mathscr { s } } = \{ w _ { 1 } , w _ { 2 } , . . . , w _ { m } \}$ . The generation of $\pmb { s }$ follows the recursive process that input $w _ { 1 : k }$ to the transformer decoder to obtain $w _ { k + 1 }$ , then input $w _ { 1 : k + 1 }$ to compute $w _ { k + 2 }$ and so on. The first input token $w _ { 1 }$ is always the special beginning token [START].
|
| 75 |
+
|
| 76 |
+
# 2.3.2 ENCODER TRANSFORMER AS A SEMANTIC CLASSIFIER
|
| 77 |
+
|
| 78 |
+
We frame the semantic similarity problem in a discriminative setting. As the generated summary may be off the article theme at the beginning of training, we add sentence pairs from the article to facilitate similarity computation.
|
| 79 |
+
|
| 80 |
+
Concretely, during training, we pick two consecutive sequences of tokens $\mathbf { a } _ { 1 }$ and $\mathbf { a } _ { 2 }$ from an article to form a positive sequence pair $\{ a _ { 1 } , a _ { 2 } \}$ . Second, sequence $b _ { 1 }$ is chosen from a random article from the dataset to form the negative sequence pair $\{ a _ { 1 } , b _ { 1 } \}$ . Following Devlin et al. (2018), each sequence pair is packed into one single sequence by inserting a special token [SEP] between them and adding trainable segment embeddings. A special classification token [CLS] is also added to the beginning. As shown in Fig. 2, the packed sequence is fed as input into TED’s encoder. The output vector associated with the token [CLS], is then classified into similar/distinct categories by a two-layer fully connected network. We use the following cross-entropy loss to optimize the encoder. Note that the theme modeling loss does not involve the transformer decoder.
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\mathcal { L } _ { t h e m e } = - \log ( p ( y = 1 | a _ { 1 } , a _ { 2 } ) ) - \log ( p ( y = 1 | s , d ) ) - \log ( p ( y = 0 | a _ { 1 } , b _ { 1 } ) )
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2: Theme modeling is essentially a semantic classifier. The input sentence pair is first processed by adding a “class” token in the beginning and a “separation” token in between. Then the sentence pair is fed into the transformer encoder, and then a linear classifier.
|
| 88 |
+
|
| 89 |
+
# 2.4 DENOISING AUTOENCODER
|
| 90 |
+
|
| 91 |
+
The idea of denoising autoencoder (Vincent et al., 2008) has been used in unsupervised machine translation (Artetxe et al., 2017; Lample et al., 2017) to prevent the model learning to merely copy every input word one by one. This denoising process imitates text simplification and helps to refine essential semantic information.
|
| 92 |
+
|
| 93 |
+
In detail, a sequence of $n$ consecutive tokens $_ { \textbf { \em x } }$ from the input article is injected with two types of noise. First, we insert noisy tokens sampled from other articles in the same dataset into the original sequence at random positions, obtaining a new sequence with length $n ^ { \prime }$ , where $n ^ { \prime }$ is $4 0 \% { - } 5 0 \%$ larger than $n$ . Next, similar to Lample et al. (2017), the sequence is slightly shuffled by applying a permutation $\sigma$ such that $\forall i \in [ 1 , 2 , \cdots , n ^ { \prime } ]$ , $| \sigma ( i ) - i | \leq k$ , where the permutation distance $k$ is set to be $2 0 \%$ of the length of $_ { \textbf { \em x } }$ . The final corrupted sequence is denoted as $\mathbf { x } ^ { \prime }$ .
|
| 94 |
+
|
| 95 |
+
The TED model is trained to recover the original token sequence given the corrupted sequence:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathcal { L } _ { d e n o i s e } = C E ( \pmb { x } , \mathrm { T E D } ( \pmb { x } ^ { \prime } ) )
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $C E$ denotes the mean of token-level cross-entropy loss. $\mathrm { T E D } ( { \pmb x } ^ { \prime } )$ denotes the sequence of probability distribution outputs $\{ \pi \}$ from the decoder with inputing $\mathbf { x } ^ { \prime }$ to the encoder and $_ { \textbf { \em x } }$ to the decoder for teacher forcing.
|
| 102 |
+
|
| 103 |
+
The final objective function is the mean of Eq. (3) and Eq. (4):
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathcal { L } _ { \mathrm { T E D } } = \frac { \mathcal { L } _ { t h e m e } + \mathcal { L } _ { d e n o i s e } } { 2 }
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
# 3 EXPERIMENTS
|
| 110 |
+
|
| 111 |
+
# 3.1 IMPLEMENTATION DETAILS
|
| 112 |
+
|
| 113 |
+
For pretraining, we use a dropout rate of 0.3 for all inputs to transformer layers. We use RAdam (Liu et al., 2019) as the optimizer, with a learning rate of $1 \bar { 0 } ^ { - 4 }$ . Also, due to the different numerical scales of the positional embedding and initialized sentence piece embeddings, we divide the positional embedding by 100 before feeding it into the transformer.
|
| 114 |
+
|
| 115 |
+
For unsupervised finetuning on specific datasets, the learning rate is set to $2 \times 1 0 ^ { - 4 }$ and dropout ratio stays the same as in pretraining. The batch size is 16, and the vocabulary embeddings are also updated in the training process. During test, we generate the summarization from trained encoder and decoder by beam search.
|
| 116 |
+
|
| 117 |
+
Table 1: Average document and summary length in number of words and sentences on NYT, CNN/DM, and English Gigaword datasets (test set).
|
| 118 |
+
|
| 119 |
+
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">#docs</td><td colspan="2"> avg. document</td><td colspan="2"> avg. summary</td></tr><tr><td>words</td><td>sen.</td><td>words</td><td>sen.</td></tr><tr><td>CNN/DM</td><td>11,490</td><td>641.9</td><td>28.0</td><td>54.6</td><td>3.9</td></tr><tr><td>NYT</td><td>4,375</td><td>1,290.5</td><td>50.7</td><td>79.8</td><td>3.5</td></tr><tr><td>English Gigaword</td><td>1,937</td><td>29</td><td>1</td><td>8</td><td>1</td></tr></table>
|
| 120 |
+
|
| 121 |
+
# 3.2 RESULTS
|
| 122 |
+
|
| 123 |
+
We evaluate our model on three summarization datasets: NYT, CNN/DM and English Gigaword. The text statistics on these datasets are summarized in Table 1. Numbers of NYT and CNN/DM are collected from Zheng & Lapata (2019).
|
| 124 |
+
|
| 125 |
+
We compare TED with the following baselines: Brief (Wang & Lee, 2018), SEQ3 (Baziotis et al., 2019), GPT-2 (Radford et al., 2019), TextRank (Mihalcea & Tarau, 2004), PACSUM (Zheng & Lapata, 2019), PGNet (See et al., 2017) and REFRESH (Narayan et al., 2018). These models cover both unsupervised and supervised categories, and include abstractive and extractive methods.
|
| 126 |
+
|
| 127 |
+
We measure the quality of generated summaries by ROUGE F1 score (Lin, 2004), including unigram (ROUGE-1), bigram (ROUGE-2) and longest common subsequence (ROUGE-L).
|
| 128 |
+
|
| 129 |
+
The NYT dataset (Durrett et al., 2016) contains 110,540 news articles with 100,834/9,706 train/test split. Following Liu & Lapata (2019), we choose 4,000 examples as the validation set and filter out examples with summaries of fewer than 50 words. As demonstrated by the results in table 2, the unsupervised fine-tuning of TED improves upon the pretrained model by $2 . 7 5 \% / 1 . 0 6 \% / 2 . 3 7 \%$ on ROUGE-1/ROUGE-2/ROUGE-L respectively. Note that ROUGE metric prefers extractive systems that preserve original phrasing (See et al., 2017). Considering this factor, TED achieves results that are competitive with unsupervised extractive baselines and surpasses all unsupervised abstractive models.
|
| 130 |
+
|
| 131 |
+
The CNN/DM dataset (Hermann et al., 2015) is composed of articles from CNN and Daily Mail, and uses associated highlights as reference summaries. We use the same training, validation and test split (287,227/13,368/11,490) as other baselines. Similar to See et al. (2017) and Liu & Lapata (2019), input articles are truncated to 500 tokens. Results are shown in Table 2. TED with a larger model size (10L8H) outperforms all unsupervised abstractive methods and compares favorably with unsupervised extractive baselines. Note that TED outperforms GTP-2, a powerful transformer-based language generation model pretrained on large scale webpage textual data, by siginificant margins. Again, TED further improves upon pretrained models on both 10L8H and 4L4H configurations.
|
| 132 |
+
|
| 133 |
+
For the English Gigaword sentence compression dataset, the input text is the first sentence of a news article, and the reference summary is the article’s headline. The size of train/val/test is $3 . 8 \mathbf { M } / 1 8 9 \mathbf { k } / 1 . 9 3 7$ respectively, after filtering out data examples with articles containing only ”UNK” tokens. As shown in Table 3. TED outperforms all the unsupervised baselines.
|
| 134 |
+
|
| 135 |
+
# 4 DISCUSSION
|
| 136 |
+
|
| 137 |
+
# 4.1 ABLATION STUDY
|
| 138 |
+
|
| 139 |
+
The ablation studies shown in Table 4 verify the effectiveness of each module in TED. Training the transformer encoder-decoder from scratch yields reasonable performance. Pretraining on largescale data results in more than $10 \%$ improvement on all three metrics on training TED from scratch. Pretraining plus either theme modeling or denoising improves upon the pretrained model by more than $2 \%$ . The full TED model, pretraining with theme modeling and denoising, produces the best result overall.
|
| 140 |
+
|
| 141 |
+
Table 2: ROUGE $F _ { 1 }$ scores on NYT and CNN/DM datasets. R1/R2/RL stands for ROUGE1/ROUGE-2/ROUGE-L respectively. Best results in each unsupervised category is in bold. Results of other models are obtained from original papers or running open-sourced software.
|
| 142 |
+
|
| 143 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">CNN/DM</td><td colspan="3">NYT</td></tr><tr><td>R1</td><td>R2</td><td>RL</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td colspan="7">Unsupervised Abstractive</td></tr><tr><td>TED 10L8H (ours) Pretrained 10L8H (ours) TED 4L4H (ours) Pretrained 4L4H (ours)</td><td>38.73 38.38 34.38 31.20</td><td>16.84 16.49 9.56 10.05</td><td>35.40 35.08 30.10 27.80</td><td>37.78 35.03 1</td><td>17.63 16.57 -</td><td>34.33 31.96</td></tr><tr><td>SEQ Brief GPT-2</td><td>23.24 28.11 29.34</td><td>7.10 9.97 8.27</td><td>22.15 25.41 26.58</td><td>17.85 1</td><td>3.94 -</td><td>19.53 1</td></tr><tr><td colspan="7">Unsupervised Extractive</td></tr><tr><td>LEAD-3 TextRank + tf-idf</td><td>40.50 33.20 31.40</td><td>17.70 11.80</td><td>36.70 29.60</td><td>35.50 33.20</td><td>17.20 13.10</td><td>32.00 29.00</td></tr><tr><td>TextRank + skip-thought TextRank+BERT</td><td>30.80</td><td>10.20 9.60</td><td>28.20 27.40</td><td>30.10 29.70</td><td>9.60 9.00</td><td>26.10 25.30</td></tr><tr><td>PACSUM+ tf-idf</td><td>39.20</td><td>16.30</td><td>35.30</td><td>40.40</td><td>20.60</td><td>36.40</td></tr><tr><td>PACSUM + skip-thought</td><td>38.60</td><td>16.10</td><td>34.90</td><td>38.30</td><td>18.80</td><td>34.50</td></tr><tr><td>PACSUM+BERT</td><td>40.70</td><td>17.80</td><td>36.90</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>41.40</td><td>21.70</td><td>37.50</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Supervised Abstractive </td><td>&Extractive</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SUMO</td><td>41.00</td><td>18.40</td><td>37.20</td><td>42.30</td><td>22.70</td><td>38.60</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PGNet REFRESH</td><td>39.50 41.30</td><td>17.30 18.40</td><td>36.40 37.50</td><td>42.70 41.30</td><td>22.10 22.00</td><td>38.00 37.80</td></tr></table>
|
| 144 |
+
|
| 145 |
+
Table 3: Results on the English Gigaword dataset. Numbers are collected from original papers. The best performance is in bold.
|
| 146 |
+
|
| 147 |
+
<table><tr><td>Model</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td>TED 10L8H (ours)</td><td>25.58</td><td>8.94</td><td>22.83</td></tr><tr><td>Pretrained 10L8H (ours)</td><td>25.23</td><td>8.84</td><td>22.56</td></tr><tr><td>TED 4L4H (ours)</td><td>24.59</td><td>8.10</td><td>21.91</td></tr><tr><td>Pretrained 4L4H (ours)</td><td>22.52</td><td>7.46</td><td>20.09</td></tr><tr><td>LEAD-8</td><td>21.86</td><td>7.66</td><td>20.45</td></tr><tr><td>SEQ</td><td>25.39</td><td>8.21</td><td>22.68</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Brief</td><td>21.26</td><td>5.60</td><td>18.89</td></tr></table>
|
| 148 |
+
|
| 149 |
+
Table 4: Ablation study of different components in TED on the NYT dataset. We test with the 10L8H model configuration.
|
| 150 |
+
|
| 151 |
+
<table><tr><td>Model</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td>train from scratch</td><td>24.49</td><td>4.41</td><td>20.14</td></tr><tr><td>pretrained only</td><td>35.03</td><td>16.57</td><td>31.96</td></tr><tr><td> pretrained w/ theme modeling</td><td>37.16</td><td>18.18</td><td>34.15</td></tr><tr><td>pretrained w/ denoise loss</td><td>37.48</td><td>17.83</td><td>34.05</td></tr><tr><td>full model</td><td>37.78</td><td>17.63</td><td>34.33</td></tr></table>
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 3: Proportion of novel grams in summaries on the CNN/DM test set. We compare three systems, TED, PGNet and reference summaries. Numbers of PGNet are computed from its publicly released output.
|
| 155 |
+
|
| 156 |
+
# 4.2 MODEL ANALYSIS
|
| 157 |
+
|
| 158 |
+
Novel N-grams. To examine how abstractive TED is, we compute the proportion of novel N-grams in the summary output (Fig. 3). The reference summary and the output from PGNet are included for comparison. Although TED is unsupervised, it includes more novel grams than the supervised model PGNet. The reference summaries have the highest proportion of n-grams.
|
| 159 |
+
|
| 160 |
+
Example. We showcase a sample summary from CNN/DM dataset along with the input article and the reference summary (Fig. 4). As shown, TED is able to capture and organize the essential information into fluent language. We attribute the grammatical correctness to the pretraining process and the denoising autoencoder. However, we also note that although TED manages to recognize the temporal information related to reported event (a few hours after Fox news reports), it makes a mistake by summarizing as “a few hours after a report about roberts’ research was released. . . ”. It shows that fact cross-checking is a potential future research direction.
|
| 161 |
+
|
| 162 |
+
# Article
|
| 163 |
+
|
| 164 |
+
after exposing potential security risks with airlines’ in-flight entertainment systems, one of the top experts on counter-threat intelligence in the world was pulled off a flight by fbi agents. chris roberts, who featured in a string of fox news reports, was yanked off his plane after it landed in syracuse, new york, on wednesday night by two fbi agents and two uniformed officers. roberts, who works for security intelligence company one world labs, was questioned for the next four hours ...
|
| 165 |
+
|
| 166 |
+
# TED Summary
|
| 167 |
+
|
| 168 |
+
chris roberts, who works for security intelligence company one world labs, was pulled off a plane in syracuse, new york, on wednesday night by two fbi agents and two uniformed officers.
|
| 169 |
+
the incident occurred only a few hours after a report about roberts’ research was released by the government accountability office earlier this week.
|
| 170 |
+
|
| 171 |
+
# Reference
|
| 172 |
+
|
| 173 |
+
chris roberts of one world labs grabbed after plane landed in syracuse. two fbi agents spent four hours questioning him about cyberhacking. agents confiscated electronic devices and computer files from roberts. he flew in to give talk at aerospace conference about plane vulnerabilities.
|
| 174 |
+
roberts featured on fox news’ on the record with greta van susteren. regarded as one of the world’s top experts on counter-threat intelligence.”
|
| 175 |
+
|
| 176 |
+
Figure 4: An example of a generated summary by TED. The reference summary and parts of the input article are also included.
|
| 177 |
+
|
| 178 |
+
# 5 CONCLUSION
|
| 179 |
+
|
| 180 |
+
In this paper, we propose TED, an unsupervised abstractive text summarization model. First, we introduce an effective and powerful pretraining approach leveraging the lead bias in news articles. We then develop a finetuning scheme to induce the semantic similarity between summaries and input articles, together with a denoising autoencoder. Experiments across three datasets show that TED outperforms unsupervised abstractive baselines. For future work, we would like to encode the criteria of relevance, informativeness and importance proposed in Peyrard (2019) into TED. Fact cross checking is another interesting direction as mentioned in the section 4.2.
|
| 181 |
+
|
| 182 |
+
# REFERENCES
|
| 183 |
+
|
| 184 |
+
Anonymous. Make lead bias in your favor: A simple and effective method for news summarization. In Submitted to International Conference on Learning Representations, 2020. URL https: //openreview.net/forum?id $=$ ryxAY34YwB. under review.
|
| 185 |
+
|
| 186 |
+
Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. Unsupervised neural machine translation. arXiv preprint arXiv:1710.11041, 2017.
|
| 187 |
+
|
| 188 |
+
Christos Baziotis, Ion Androutsopoulos, Ioannis Konstas, and Alexandros Potamianos. Seqˆ 3: Differentiable sequence-to-sequence-to-sequence autoencoder for unsupervised abstractive sentence compression. arXiv preprint arXiv:1904.03651, 2019.
|
| 189 |
+
|
| 190 |
+
Sergey Brin and Lawrence Page. The anatomy of a large-scale hypertextual web search engine. In COMPUTER NETWORKS AND ISDN SYSTEMS, pp. 107–117. Elsevier Science Publishers B. V., 1998.
|
| 191 |
+
|
| 192 |
+
Eric Chu and Peter J Liu. Meansum: A neural model for unsupervised multi-document abstractive summarization. arXiv preprint arXiv:1810.05739, 2018.
|
| 193 |
+
|
| 194 |
+
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.
|
| 195 |
+
|
| 196 |
+
Greg Durrett, Taylor Berg-Kirkpatrick, and Dan Klein. Learning-based single-document summarization with compression and anaphoricity constraints. arXiv preprint arXiv:1603.08887, 2016.
|
| 197 |
+
|
| 198 |
+
Thibault Fevry and Jason Phang. Unsupervised Sentence Compression using Denoising Auto-´ Encoders. arXiv e-prints, art. arXiv:1809.02669, Sep 2018.
|
| 199 |
+
|
| 200 |
+
Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in neural information processing systems, pp. 1693–1701, 2015.
|
| 201 |
+
|
| 202 |
+
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
|
| 203 |
+
|
| 204 |
+
Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. arXiv preprint arXiv:1808.06226, 2018.
|
| 205 |
+
|
| 206 |
+
Guillaume Lample, Alexis Conneau, Ludovic Denoyer, and Marc’Aurelio Ranzato. Unsupervised machine translation using monolingual corpora only. arXiv preprint arXiv:1711.00043, 2017.
|
| 207 |
+
|
| 208 |
+
Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pp. 74–81, 2004.
|
| 209 |
+
|
| 210 |
+
Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Jiawei Han. On the variance of the adaptive learning rate and beyond. arXiv preprint arXiv:1908.03265, 2019.
|
| 211 |
+
|
| 212 |
+
Yang Liu and Mirella Lapata. Text Summarization with Pretrained Encoders. arXiv e-prints, art. arXiv:1908.08345, Aug 2019.
|
| 213 |
+
|
| 214 |
+
Minh-Thang Luong, Ilya Sutskever, Quoc V Le, Oriol Vinyals, and Wojciech Zaremba. Addressing the rare word problem in neural machine translation. arXiv preprint arXiv:1410.8206, 2014.
|
| 215 |
+
|
| 216 |
+
Rada Mihalcea and Paul Tarau. Textrank: Bringing order into text. In Proceedings of the 2004 conference on empirical methods in natural language processing, pp. 404–411, 2004.
|
| 217 |
+
|
| 218 |
+
Shashi Narayan, Shay B Cohen, and Mirella Lapata. Ranking sentences for extractive summarization with reinforcement learning. arXiv preprint arXiv:1802.08636, 2018.
|
| 219 |
+
|
| 220 |
+
Maxime Peyrard. A simple theoretical model of importance for summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1059–1073, 2019.
|
| 221 |
+
|
| 222 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8), 2019.
|
| 223 |
+
|
| 224 |
+
Abigail See, Peter J Liu, and Christopher D Manning. Get to the point: Summarization with pointergenerator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1073–1083, 2017.
|
| 225 |
+
|
| 226 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.
|
| 227 |
+
|
| 228 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
|
| 229 |
+
|
| 230 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 5998–6008. Curran Associates, Inc., 2017. URL http://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf.
|
| 231 |
+
|
| 232 |
+
Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008.
|
| 233 |
+
|
| 234 |
+
Yau-Shian Wang and Hung-Yi Lee. Learning to encode text as human-readable summaries using generative adversarial networks. arXiv preprint arXiv:1810.02851, 2018.
|
| 235 |
+
|
| 236 |
+
Zichao Yang, Zhiting Hu, Chris Dyer, Eric P Xing, and Taylor Berg-Kirkpatrick. Unsupervised text style transfer using language models as discriminators. In Advances in Neural Information Processing Systems, pp. 7287–7298, 2018.
|
| 237 |
+
|
| 238 |
+
Hao Zheng and Mirella Lapata. Sentence centrality revisited for unsupervised summarization. arXiv preprint arXiv:1906.03508, 2019.
|
md/train/XjIm8hOCxTm/XjIm8hOCxTm.md
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Few-Shot Object Detection via Association and DIscrimination
|
| 2 |
+
|
| 3 |
+
Yuhang Cao1 Jiaqi Wang1,2B Ying Jin1 Tong Wu1 Kai Chen2,3 Ziwei Liu4 Dahua Lin1,2
|
| 4 |
+
|
| 5 |
+
1CUHK-SenseTime Joint Lab, The Chinese University of Hong Kong 2Shanghai AI Laboratory 3SenseTime Research 4S-Lab, Nanyang Technological University {cy020,wj017,jy021,wt020,dhlin}@ie.cuhk.edu.hk chenkai@sensetime.com ziwei.liu@ntu.edu.sg
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Object detection has achieved substantial progress in the last decade. However, detecting novel classes with only few samples remains challenging, since deep learning under low data regime usually leads to a degraded feature space. Existing works employ a holistic fine-tuning paradigm to tackle this problem, where the model is first pre-trained on all base classes with abundant samples, and then it is used to carve the novel class feature space. Nonetheless, this paradigm is still imperfect. Durning fine-tuning, a novel class may implicitly leverage the knowledge of multiple base classes to construct its feature space, which induces a scattered feature space, hence violating the inter-class separability. To overcome these obstacles, we propose a two-step fine-tuning framework, Few-shot object detection via Association and DIscrimination (FADI), which builds up a discriminative feature space for each novel class with two integral steps. 1) In the association step, in contrast to implicitly leveraging multiple base classes, we construct a compact novel class feature space via explicitly imitating a specific base class feature space. Specifically, we associate each novel class with a base class according to their semantic similarity. After that, the feature space of a novel class can readily imitate the well-trained feature space of the associated base class. 2) In the discrimination step, to ensure the separability between the novel classes and associated base classes, we disentangle the classification branches for base and novel classes. To further enlarge the inter-class separability between all classes, a set-specialized margin loss is imposed. Extensive experiments on standard Pascal VOC and MS-COCO datasets demonstrate that FADI achieves new state-of-the-art performance, significantly improving the baseline in any shot/split by $+ 1 8 . 7$ . Notably, the advantage of FADI is most announced on extremely few-shot scenarios (e.g. 1- and 3- shot). Code is available at: https://github.com/yhcao6/FADI
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Deep learning has achieved impressive performance on object detection [21, 11, 1] in recent years. However, their strong performance heavily relies on a large amount of labeled training data, which limits the scalability and generalizability of the model in the data scarcity scenarios. In contrast, human visual systems can easily generalize to novel classes with only a few supervisions. Therefore, great interests have been invoked to explore few-shot object detection (FSOD), which aims at training a network from limited annotations of novel classes with the aid of sufficient data of base classes.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Conceptually visualization of our FADI. (a) The conventional fine-tuning paradigm, e.g., TFA [28], learns good decision boundaries during the pre-training stage to separate the decision space into several subspaces (rectangles) occupied by different base classes. In the fine-tuning stage, a novel class (‘cow’) may exploit multiple similar base classes (‘sheep’ and ‘horse’) to construct the feature space of itself, which induces a scattered intra-class structure (the feature space of ‘cow’ across two base classes, ‘sheep’ and ‘horse’). FADI divides the fine-tuning stage into two steps. (b) In the association step, to construct a compact intra-class structure, we associate each novel class with a well-learned base class based on their semantic similarity (‘cow’ is similar to ‘sheep’, ‘motor’ is similar to ‘bike’). The novel class readily learns to align its intra-class distribution to the associated base class. (c) In the discrimination step, to ensure the inter-class separability between novel classes and associated base classes, we disentangle the classification branches for base and novel classes. A set-specialized margin loss is further imposed to enlarge the inter-class separability between all classes.
|
| 17 |
+
|
| 18 |
+
Various methods have since been proposed to tackle the problem of FSOD, including metalearning [13, 35, 32], metric learning [14], and fine-tuning [28, 31, 23]. Among them, fine-tuningbased methods are one of the dominating paradigms for few-shot object detection. [28] introduces a simple two-stage fine-tuning approach (TFA). MPSR [31] improves upon TFA [28] via alleviating the problem of scale variation. The recent state-of-the-art method FSCE [23] shows the classifier is more error-prone than the regressor, and introduces the contrastive-aware object proposal encodings to facilitate the classification of detected objects. All these works employ a holistic fine-tuning paradigm, where the model is first trained on all base classes with abundant samples, and then the pre-trained model is fine-tuned on novel classes. Although it exhibits a considerable performance advantage compared with the earlier meta-learning methods, this fine-tuning paradigm is still imperfect. To be specific, the current design of the fine-tuning stage directly extracts the feature representation of a novel class from the network pre-trained on base classes. Therefore, a novel class may exploit the knowledge of multiple similar base classes to construct the feature space of itself. As a result, the feature space of a novel class will have an incompact intra-class structure that scatters across feature spaces of other classes, breaking the inter-class separability, hence leading to classification confusion, as shown in Figure 1a.
|
| 19 |
+
|
| 20 |
+
To overcome these obstacles, we propose a two-step fine-tuning framework, Few-shot object detection via Association and DIscrimination (FADI), which constructs a discriminable feature space for each novel class with two integral steps, association and discrimination. Specifically, in the association step, as shown in Figure 1b, to construct a compact intra-class structure, we associate each novel class with a well-trained base class based on their underlying semantic similarity. The novel class readily learns to align its feature space to the associated base class, thus naturally becomes separable from the remaining classes. In the discrimination step, as shown in Figure 1c, to ensure the separability between the novel classes and associated base classes, we disentangle the classification branches for base and novel classes to reduce the ambiguity in the feature space induced by the association step. To further enlarge the inter-class separability between all classes, a set-specialized margin loss is applied. To this end, the fine-tuning stage is divided into two dedicated steps, and together complement each other.
|
| 21 |
+
|
| 22 |
+
Extensive experimental results have validated the effectiveness of our approach. We gain significant performance improvements on the Pascal VOC [7] and COCO [18] benchmarks, especially on the extremely few-shot scenario. Specifically, without bells and whistles, FADI improves the TFA [28] baseline by a significant margin in any split and shot with up to $+ 1 8 . 7 \mathrm { m A P } ,$ , and push the envelope of the state-of-the-art performance by 2.5, 4.3, 2.8 and 5.6, 7.8, 1.6 for shot $K = 1 , 2 , 3$ on novel split-1 and split-3 of Pascal VOC dataset, respectively.
|
| 23 |
+
|
| 24 |
+
# 2 Related Work
|
| 25 |
+
|
| 26 |
+
Few-Shot Classification Few-Shot Classification aims to recognize novel instances with abundant base samples and a few novel samples. Metric-based methods address the few-shot learning by learning to compare, different distance formulations [26, 22, 24] are adopted. Initialization-based methods [9, 15] learn a good weight initialization to promote the adaption to unseen samples more effectively. Hallucination-based methods introduce hallucination techniques [10, 29] to alleviate the shortage of novel data. Recently, researchers find out that the simple pre-training and fine-tuning framework [4, 6] can compare favorably against other complex algorithms.
|
| 27 |
+
|
| 28 |
+
Few-Shot Object Detection As an emerging task, FSOD is less explored than few-shot classification. Early works mainly explore the line of meta-learning [13, 35, 32, 14, 36, 37, 8], where a meta-learner is introduced to acquire class agnostic meta knowledge that can be transferred to novel classes. Later, [28] introduces a simple two-stage fine-tuning approach (TFA), which significantly outperforms the earlier meta-learning methods. Following this framework, MPSR [31] enriches object scales by generating multi-scale positive samples to alleviate the inherent scale bias. Recently, FSCE [23] shows in FSOD, the classifier is more error-prone than the regressor and introduces the contrastive-aware object proposal encodings to facilitate the classification of detected objects. Similarly, FADI also aims to promote the discrimination capacity of the classifier. But unlike previous methods that directly learn the classifier by implicitly exploiting the base knowledge, motivated by the works of [34, 33], FADI explicitly associates each novel class with a semantically similar base class to learn a compact intra-class distribution.
|
| 29 |
+
|
| 30 |
+
Margin Loss Loss function plays an important role in the field of recognition tasks. To enhance the discrimination power of traditional softmax loss, different kinds of margin loss are proposed. SphereFace [19] introduces a multiplicative margin constrain in a hypersphere manifold. However, the non-monotonicity of cosine function makes it difficult for stable optimization, CosFace [27] then proposed to further normalize the feature embedding and impose an additive margin in the cosine space. ArcFace [5] moves the additive cosine margin into the angular space to obtain a better discrimination power and more stable training. However, we find these margin losses are not directly applicable under data-scarce settings as they equally treat different kinds of samples but ignore the inherent bias of the classifier towards base classes. Hence we propose a set-specialized margin loss that takes the kind of samples into consideration which yields significantly better performance.
|
| 31 |
+
|
| 32 |
+
# 3 Our Approach
|
| 33 |
+
|
| 34 |
+
In this section, we first review the preliminaries of few-shot object detection setting and the conventional two-stage fine-tuning framework. Then we introduce our method that tackles few-shot object detection via association and discrimination (FADI).
|
| 35 |
+
|
| 36 |
+
# 3.1 Preliminaries
|
| 37 |
+
|
| 38 |
+
In few-shot detection, the training set is composed of a base set $D ^ { B } = \{ x _ { i } ^ { B } , y _ { i } ^ { B } \}$ with abundant data of classes $C ^ { B }$ , and a novel set $D ^ { N } = \{ x _ { i } ^ { N } , y _ { i } ^ { N } \}$ with few-shot data of classes $C ^ { N }$ , where $x _ { i }$ and $y _ { i }$ indicate training samples and labels, respectively. The number of objects for each class in $C ^ { N }$ is $K$ for $K$ -shot detection. The model is expected to detect objects in the test set with classes in $C ^ { B } \cup C ^ { N }$ .
|
| 39 |
+
|
| 40 |
+
Fine-tuning-based methods are the current one of the leading paradigms for few-shot object detection, which successfully adopt a simple two-stage training pipeline to leverage the knowledge of base classes. TFA [28] is a widely adopted baseline of fine-tuning-based few-shot detectors. In the base training stage, the model is trained on base classes with sufficient data to obtain a robust feature representation. In the novel fine-tuning stage, the pre-trained model on base classes is then fine-tuned on a balanced few-shot set which comprises both base and novel classes $( C _ { B } \cup C _ { N } )$ . Aiming at preventing over-fitting during fine-tuning, only the box predictor, i.e., classifier and regressor, are updated to fit the few-shot set. While the feature extractor, i.e., other structures of the network, are frozen [28] to preserve the pre-trained knowledge on the abundant base classes.
|
| 41 |
+
|
| 42 |
+
Although the current design of fine-tuning stage brings considerable gains on few-shot detection, we observe that it may induce a scattered feature space on novel class, which violates the inter-class separability and leads to confusion of classification. Towards this drawback, we proposes few-shot object detection via association and discrimination (FADI), which divides the fine-tuning stage of TFA into a two-step association and discrimination pipelines. In the association step (Sec. 3.2), to construct a compact intra-class distribution, we associate each novel class with a base class based on their underlying semantic similarity. The feature representation of the associated base class is explicitly learned by the novel class. In the discrimination step (Sec. 3.3), to ensure the inter-class separability, we disentangle the base and novel branches and impose a set-specialized margin loss to train a more discriminative classifier for each class.
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
Step1: Association
|
| 46 |
+
Figure 2: Method overview. There are two steps in FADI: association and discrimination. To construct a compact intra-class structure, the association step aligns the feature distribution of each novel class with a well-learned base class based on their semantic similarity. To ensure inter-class separability, the discrimination step disentangles classification branches for base and novel classes and imposes a set-specialized margin loss.
|
| 47 |
+
|
| 48 |
+
# 3.2 Association Step
|
| 49 |
+
|
| 50 |
+
In the base training stage, the base model is trained on the abundant base data $D ^ { B }$ and its classifier learns a good decision boundary (see Figure 1) to separate the whole decision space into several subspaces that are occupied by different base classes. Therefore, if a novel class can align the feature distribution of a base class, it will fall into the intra-class distribution of the associated base class, and be naturally separable from the other base classes. And if two novel classes are assigned to different base classes, they will also become separable from each other.
|
| 51 |
+
|
| 52 |
+
To achieve this goal, we introduce a new concept named association, which pairs each novel class to a similar base class by semantic similarity. After then, the feature distribution of the novel class is aligned with the associated base class via feature distribution alignment.
|
| 53 |
+
|
| 54 |
+
Similarity Measurement In order to ease the difficulty of feature distribution alignment, given a novel class $C _ { i } ^ { N }$ and a set of base classes $C ^ { B }$ , we want to associate $C _ { i } ^ { N }$ to the most similar base class in $C ^ { B }$ . An intuitive way is to rely on visual similarity between feature embeddings. However, the embedding is not representative for novel classes under data-scarce scenarios. Thus, we adopt WordNet [20] as an auxiliary to describe the semantic similarity between classes. WordNet is an English vocabulary graph, where nodes represent lemmas or synsets and they are linked according to their relations. It incorporates rich lexical knowledge which benefits the association. Lin Similarity [16] is used to calculate the class-to-class similarity upon WordNet which is given by:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\sin ( \boldsymbol { C } _ { i } ^ { N } , \boldsymbol { C } _ { j } ^ { B } ) = \frac { 2 \cdot \operatorname { I C } ( \operatorname { L C S } ( \boldsymbol { C } _ { i } ^ { N } , \boldsymbol { C } _ { j } ^ { B } ) ) } { \operatorname { I C } ( \boldsymbol { C } _ { i } ^ { N } ) + \operatorname { I C } ( \boldsymbol { C } _ { j } ^ { B } ) } ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where LCS denotes the lowest common subsumer of two classes in lexical structure of WordNet. IC, i.e., information content, is the probability to encounter a word in a specific corpus. SemCor Corpus is adopted to count the word frequency here. We take the maximum among all base classes to obtain
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 3: t-SNE here shows the distribution of feature after $F C _ { 2 } / F C _ { 2 } ^ { \prime }$ from 200 randomly selected images on PASCAL VOC, ‘horse’ and ‘dog’ are base classes, ‘cow’ and ‘bird’ are novel classes, respectively. The feature space learned by FADI has a more compact intra-class structure and larger inter-class separability.
|
| 64 |
+
|
| 65 |
+
the associated base class $C _ { j i } ^ { B }$ where $j \to i$ means the base class $C _ { j } ^ { B }$ is assigned to the novel class $C _ { i } ^ { N }$ .
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
C _ { j \to i } ^ { B } \underset { j \in | C ^ { B } | } { \operatorname { a r g m a x } } \sin ( C _ { i } ^ { N } , C _ { j } ^ { B } ) .
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
To this end, novel class set $C ^ { N }$ is associated with a subset of base class $C ^ { B \to N } \subset C ^ { B }$ .
|
| 72 |
+
|
| 73 |
+
Feature Distribution Alignment After obtaining the associated base class for each novel class, given a sample $x _ { i } ^ { N }$ of novel class $C _ { i } ^ { N }$ , it is associated with a pseudo label $y _ { j } ^ { B }$ of the assigned base class $C _ { j i } ^ { B }$ . We design a pseudo label training mechanism to directly align the feature distribution of the novel class with the assigned base class, as follows.
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\operatorname* { m i n } _ { \mathcal { W } _ { a s s o } ^ { N } } \mathcal { L } _ { c l s } ( y _ { j } ^ { B } , f ( \mathbf { z } _ { i } ^ { N } ; \widetilde { \mathcal { W } } _ { c l s } ^ { B } ) ) , \mathrm { ~ w h e r e ~ } \mathbf { z } _ { i } ^ { N } = g ( \phi ( x _ { i } ^ { N } ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } ) ; \mathcal { W } _ { a s s o } ^ { N } ) ,
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\widetilde { \mathcal W }$ means the weights are frozen. Thus, $f ( \cdot ; \widetilde { \mathcal { W } } _ { c l s } ^ { B } )$ and $\phi ( \cdot ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } )$ indicate the classifier (one fc layer) and the feature extractor (main network structures) with frozen weights and are pre-trained on base classes, and $g ( \cdot ; \mathcal { W } _ { a s s o } ^ { N } )$ means an intermediate structure (one or more fc layers) to align the feature distribution via updating the weights . By assigning pseudo labels and freezing the classifier, this intermediate structure learns to align the feature distribution of the novel class to the associated base class. The main network structures $\phi ( \cdot ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } )$ is also fixed to keep the pre-trained knowledge from base classes.
|
| 80 |
+
|
| 81 |
+
As shown in Figure 2, we use the same RoI head structure of Faster R-CNN [21], but we remove the regressor to reduce it to a pure classification problem. During training, we freeze all parameters except the second linear layer $F C _ { 2 } ^ { ' }$ , which means $g ( \cdot ; \mathcal { W } _ { a s s o } ^ { N } )$ is a single fc layer. We then construct a balanced training set with $K$ shots per class. It is noted we discard the base classes that are associated with novel classes in this step. And the labels of novel classes are replaced by their assigned pseudo labels. As a result, the supervision will enforce the classifier to identify samples of the novel class $C _ { i } ^ { N }$ as the assigned base class $C _ { j i } ^ { B }$ , which means the feature representation of novel classes before the classifier gradually shifts toward their assigned base classes. As shown in Figure 3b, the t-SNE [25] visualization confirms the effectiveness of our distribution alignment. After the association step, the feature distribution of two associated pairs ("bird" and "dog"; "cow" and "horse") are well aligned.
|
| 82 |
+
|
| 83 |
+
# 3.3 Discrimination Step
|
| 84 |
+
|
| 85 |
+
As shown in Figure 3b, after the association step, the feature distribution of each novel class is aligned with the associated base class. Therefore, this novel class will have a compact intra-class distribution and be naturally distinguishable from other classes. However, the association step inevitably leads to confusion between the novel class and its assigned base class. To tackle this problem, we introduce a discrimination step that disentangles the classification branches for base and novel classes. A set-specialized margin loss is further applied to enlarge the inter-class separability.
|
| 86 |
+
|
| 87 |
+
Disentangling Given a training sample $x _ { i }$ with label $y _ { i }$ , we disentangle the classification branches for base and novel classes as follows,
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\begin{array} { c } { \displaystyle \operatorname* { m i n } _ { \mathcal { W } _ { c l s } ^ { B } , \mathcal { W } _ { c l s } ^ { N } } \mathcal { L } _ { c l s } ( y _ { i } , [ { \mathbf { p } } ^ { B } , { \mathbf { p } } ^ { N } ] ) , \mathrm { ~ w h e r e ~ } } \\ { \displaystyle { \mathbf { p } ^ { B } = f ( g ( \mathbf { q } ; \widetilde { \mathcal { W } } _ { o r i g i n } ^ { B } ) ; \mathcal { W } _ { c l s } ^ { B } ) , \mathbf { p } ^ { N } = f ( g ( \mathbf { q } ; \widetilde { \mathcal { W } } _ { a s s o } ^ { N } ) ; \mathcal { W } _ { c l s } ^ { N } ) , \mathbf { q } = \phi ( x _ { i } ; \widetilde { \mathcal { W } } _ { p r e } ^ { B } ) , } } \end{array}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $f ( \cdot ; \mathcal { W } _ { c l s } ^ { B } ) , f ( \cdot ; \mathcal { W } _ { c l s } ^ { N } )$ are the classifiers for base and novel classes, respectively. $g ( \cdot , \widetilde { \mathcal { W } } _ { o r i g i n } ^ { B } )$ $g ( \cdot , \widetilde { \mathcal { W } } _ { a s s o } ^ { N } )$ are the last fc layer with frozen weights for base and novel classes, respectively. As shown in Figunovel classes. we d and ngle the classifiers and thload the original weights layers that ar $F C _ { 2 }$ and train $F C _ { 2 } ^ { ' }$ ) for base andh base classes $F C _ { 2 }$ $F C _ { 2 } ^ { ' }$ $\widetilde { \mathcal { W } } _ { o r i g i n } ^ { B }$ and the weights $\widetilde { \mathcal W } _ { a s s o } ^ { N }$ after association step, respectively. They are frozen in the discrimination step to keep their specific knowledge for base and novel classes. Therefore, $F C _ { 2 }$ and $F C _ { 2 } ^ { ' }$ are suitable to deal with base classes and novel classes, respectively. We attach the base classifier $f ( \cdot ; \mathcal { W } _ { c l s } ^ { B } )$ to $F C _ { 2 }$ , and the novel classifier $f ( \cdot ; \mathcal { W } _ { c l s } ^ { N } )$ to $F C { _ 2 } ^ { \prime }$ . The base classifier is a $| C _ { B } |$ -way classifier. The novel classifier is a $( | C _ { N } | + 1 )$ -way classifier since we empirically let the novel classifier be also responsible for recognizing background class $C _ { 0 }$ . The prediction $\mathbf { p } ^ { B }$ and $\mathbf { p } ^ { N }$ from these two branches will be concatenated to yield the final $( | C _ { B } | + | C _ { N } | + 1 )$ -way prediction $[ \mathbf { p } ^ { B } , \mathbf { p } ^ { N } ]$ .
|
| 94 |
+
|
| 95 |
+
Set-Specialized Margin Loss Besides disentangling, we further propose a set-specialized margin loss to alleviate the confusion between different classes. Different from previous margin losses [19, 27, 5] that directly modify the original CE loss, we introduce a margin loss as an auxiliary loss for the classifier. Given an $i$ -th training sample of label $y _ { i }$ , we adopt cosine similarity to formulate the logits prediction, which follows the typical conventions in few-shot classification and face recognition [27].
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
p _ { y _ { i } } = \frac { \tau \cdot \mathbf { x } ^ { T } \mathcal { W } _ { y _ { i } } } { | | \mathbf { x } | | \cdot | | \mathcal { W } _ { y _ { i } } | | } , s _ { y _ { i } } = \frac { e ^ { p _ { y _ { i } } } } { \sum _ { j = 1 } ^ { C } e ^ { p _ { j } } } ,
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $\mathcal { W }$ is the weight of the classifier, $\mathbf { x }$ is the input feature and $\tau$ is the temperature factor. We try to maximize the margin of decision boundary between $C _ { y _ { i } }$ and any other class $C _ { j , j \neq y _ { i } }$ , as follows,
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\mathcal { L } _ { m _ { i } } = \sum _ { j = 1 , j \neq y _ { i } } ^ { C } - \log ( ( s _ { y _ { i } } - s _ { j } ) ^ { + } + \epsilon ) ,
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $s _ { y _ { i } }$ and $s _ { j }$ are classification scores on class $C _ { y _ { i } }$ and $C _ { j , j \neq y _ { i } }$ , and $\epsilon$ is a small number $( 1 e ^ { - 7 } )$ to keep numerical stability.
|
| 108 |
+
|
| 109 |
+
In the scenario of few-shot learning, there exists an inherent bias that the classifier tends to predict higher scores on base classes, which makes the optimization of margin loss on novel classes becomes more difficult. And the number of background (negative) samples dominates the training samples, thus we may suppress the margin loss on background class $C _ { 0 }$ .
|
| 110 |
+
|
| 111 |
+
Towards the aforementioned problem, it is necessary to introduce the set-specialized handling of different set of classes into the margin loss. Thanks to adopting margin loss as an auxiliary benefit, our design can easily enable set-specialized handling of different sets of classes by simply re-weighting the margin loss value:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
{ \mathcal { L } } _ { m } = \sum _ { \{ i | y _ { i } \in C ^ { B } \} } \alpha \cdot { \mathcal { L } } _ { m _ { i } } + \sum _ { \{ i | y _ { i } \in C ^ { N } \} } \beta \cdot { \mathcal { L } } _ { m _ { i } } + \sum _ { \{ i | y _ { i } = C ^ { 0 } \} } \gamma \cdot { \mathcal { L } } _ { m _ { i } } ,
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
where $\alpha , \beta , \gamma$ are hyper-parameters controlling the margin of base samples, novel samples and negative samples, respectively. Intuitively, $\beta$ is larger than $\alpha$ because novel classes are more challenging, and $\gamma$ is a much smaller value to balance the overwhelming negative samples. Finally, the loss function of the discrimination step is shown as in Eq. 8
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\mathcal { L } _ { f t } = \mathcal { L } _ { c l s } + \mathcal { L } _ { m } + 2 \cdot \mathcal { L } _ { r e g } ,
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where $\mathcal { L } _ { c l s }$ is a cross-entropy loss for classification, $\mathcal { L } _ { \boldsymbol { r } \boldsymbol { e } \boldsymbol { g } }$ is a smooth-L1 loss for regression, and ${ \mathcal { L } } _ { m }$ is the proposed set-specialized margin loss. Since our margin loss increases the gradients on the classification branch, we scale $\mathcal { L } _ { \boldsymbol { r } \boldsymbol { e } \boldsymbol { g } }$ by a factor of 2 to keep the balance of the two tasks. The overall loss takes the form of multi-task learning to jointly optimize the model.
|
| 124 |
+
|
| 125 |
+
Table 1: Performance (novel AP50) on PASCAL VOC dataset. $^ \dagger$ denotes meta-learning-based methods.
|
| 126 |
+
|
| 127 |
+
<table><tr><td rowspan="2">Method /Shot</td><td rowspan="2">Backbone</td><td colspan="5">Novel Split 1</td><td colspan="5">Novel Split 2</td><td colspan="5">Novel Split 3</td></tr><tr><td></td><td>2</td><td>3</td><td>5</td><td>10</td><td>1</td><td>2</td><td>3</td><td>5</td><td>10</td><td>1</td><td>2</td><td>3</td><td>5</td><td>10</td></tr><tr><td>LSTD [2]</td><td>VGG-16</td><td>8.2</td><td>1.0</td><td>12.4</td><td>29.1</td><td>38.5</td><td>11.4</td><td>3.8</td><td>5.0</td><td>15.7</td><td>31.0</td><td>12.6</td><td>8.5</td><td>15.0</td><td>27.3</td><td>36.3</td></tr><tr><td>YOLOv2-ft [30]</td><td>YOLO V2</td><td>6.6</td><td>10.7</td><td>12.5</td><td>24.8</td><td>38.6</td><td>12.5</td><td>4.2</td><td>11.6</td><td>16.1</td><td>33.9</td><td>13.0</td><td>15.9</td><td>15.0</td><td>32.2</td><td>38.4</td></tr><tr><td>fFSRW[13] tMetaDet [30]</td><td></td><td>14.8 17.1</td><td>15.5 19.1</td><td>26.7 28.9</td><td>33.9 35.0</td><td>47.2 48.8</td><td>15.7 18.2</td><td>15.3 20.6</td><td>22.7 25.9</td><td>30.1 30.6</td><td>40.5 41.5</td><td>21.3 20.1</td><td>25.6 22.3</td><td>28.4 27.9</td><td>42.8 41.9</td><td>45.9 42.9</td></tr><tr><td>tRepMet [14]</td><td>InceptionV3</td><td>26.1</td><td>32.9</td><td>34.4</td><td>38.6</td><td>41.3</td><td></td><td>22.1</td><td>23.4</td><td></td><td></td><td></td><td></td><td>31.5</td><td>34.4</td><td>37.2</td></tr><tr><td>FRCN-ft[30]</td><td></td><td>13.8</td><td>19.6</td><td></td><td></td><td></td><td>17.2</td><td></td><td></td><td>28.3</td><td>35.8</td><td>27.5</td><td>31.1</td><td></td><td></td><td>45.1</td></tr><tr><td>FRCN+FPN-ft [28]</td><td>FRCN-R101</td><td>8.2</td><td>20.3</td><td>32.8 29.0</td><td>41.5 40.1</td><td>45.6 45.5</td><td>7.9 13.4</td><td>15.3 20.6</td><td>26.2 28.6</td><td>31.6 32.4</td><td>39.1 38.8</td><td>9.8 19.6</td><td>11.3 20.8</td><td>19.1 28.7</td><td>35.0 42.2</td><td>42.1</td></tr><tr><td>+MetaDet [30]</td><td></td><td>18.9</td><td>20.6</td><td>30.2</td><td>36.8</td><td>49.6</td><td>21.8</td><td>23.1</td><td>27.8</td><td>31.7</td><td>43.0</td><td>20.6</td><td>23.9</td><td>29.4</td><td>43.9</td><td>44.1</td></tr><tr><td>tMeta R-CNN [35]</td><td></td><td>19.9</td><td>25.5</td><td>35.0</td><td>45.7</td><td>51.5</td><td>10.4</td><td>19.4</td><td>29.6</td><td>34.8</td><td>45.4</td><td>14.3</td><td>18.2</td><td>27.5</td><td>41.2</td><td>48.1</td></tr><tr><td>TFA w/fc [28]</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TFA w/ cos [28]</td><td></td><td>36.8</td><td>29.1</td><td>43.6</td><td>55.7</td><td>57.0</td><td>18.2</td><td>29.0</td><td>33.4</td><td>35.5</td><td>39.0</td><td>27.7</td><td>33.6</td><td>42.5</td><td>48.7</td><td>50.2</td></tr><tr><td></td><td></td><td>39.8</td><td>36.1</td><td>44.7</td><td>55.7</td><td>56.0</td><td>23.5</td><td>26.9</td><td>34.1</td><td>35.1</td><td>39.1</td><td>30.8</td><td>34.8</td><td>42.8</td><td>49.5</td><td>49.8</td></tr><tr><td>MPSR [31]</td><td>FRCN-R101</td><td>41.7</td><td>-</td><td>51.4</td><td>55.2</td><td>61.8</td><td>24.4</td><td>-</td><td>39.2</td><td>39.9</td><td>47.8</td><td>35.6</td><td>-</td><td>42.3</td><td>48.0</td><td>49.7</td></tr><tr><td>SRR-FSD [38]</td><td></td><td>47.8</td><td>50.5</td><td>51.3</td><td>55.2</td><td>56.8</td><td>32.5</td><td>35.3</td><td>39.1</td><td>40.8</td><td>43.8</td><td>40.1</td><td>41.5</td><td>44.3</td><td>46.9</td><td>46.4</td></tr><tr><td>FSCE[23]</td><td></td><td>44.2</td><td>43.8</td><td>51.4</td><td>61.9</td><td>63.4</td><td>27.3</td><td>29.5</td><td>43.5</td><td>44.2</td><td>50.2</td><td>37.2</td><td>41.9</td><td>47.5</td><td>54.6</td><td>58.5</td></tr><tr><td>FADI(Ours)</td><td></td><td>50.3</td><td>54.8</td><td>54.2</td><td>59.3</td><td>63.2</td><td>30.6</td><td>35.0</td><td>40.3</td><td>42.8</td><td>48.0</td><td>45.7</td><td>49.7</td><td>49.1</td><td>55.0</td><td>59.6</td></tr></table>
|
| 128 |
+
|
| 129 |
+
<table><tr><td rowspan="2">shot</td><td colspan="2">nAP</td><td colspan="2">nAP50</td><td colspan="2">nAP75</td></tr><tr><td>TFA</td><td>FADI</td><td>TFA</td><td>FADI</td><td>TFA</td><td>FADI</td></tr><tr><td>1</td><td>3.4</td><td>5.7</td><td>5.8</td><td>10.4</td><td>3.8</td><td>6.0</td></tr><tr><td>2</td><td>4.6</td><td>7.0</td><td>8.3</td><td>13.1</td><td>4.8</td><td>7.0</td></tr><tr><td>3</td><td>6.6</td><td>8.6</td><td>12.1</td><td>15.8</td><td>6.5</td><td>8.3</td></tr><tr><td>5</td><td>8.3</td><td>10.1</td><td>15.3</td><td>18.6</td><td>8.0</td><td>9.7</td></tr><tr><td>10</td><td>10.0</td><td>12.2</td><td>19.1</td><td>22.7</td><td>9.3</td><td>11.9</td></tr><tr><td>30</td><td>13.7</td><td>16.1</td><td>24.9</td><td>29.1</td><td>13.4</td><td>15.8</td></tr></table>
|
| 130 |
+
|
| 131 |
+
(a) Comparison with baseline TFA
|
| 132 |
+
|
| 133 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">nAP</td><td rowspan="2">nAP75 30</td></tr><tr><td>10</td><td>30 10</td></tr><tr><td>+FSRW [13]</td><td>5.6</td><td>9.1</td><td>4.6 7.6</td></tr><tr><td>+ MetaDet [30]</td><td>7.1</td><td>11.3</td><td>5.9 10.3</td></tr><tr><td>†Meta R-CNN [35]</td><td>8.7</td><td>12.4</td><td>6.6 10.8</td></tr><tr><td>MPSR [31]</td><td>9.8</td><td>14.1</td><td>9.7 14.2</td></tr><tr><td>SRR-FSD [38]</td><td>11.3</td><td>14.7</td><td>9.8 13.5</td></tr><tr><td>FSCE[23]</td><td>11.9</td><td>16.4</td><td>10.5 16.2</td></tr><tr><td>Ours (FADI)</td><td>12.2</td><td>16.1</td><td>11.9 15.8</td></tr></table>
|
| 134 |
+
|
| 135 |
+
(b) Comparison with latest methods.
|
| 136 |
+
Table 2: Performance on MS COCO dataset. $^ \dagger$ denotes meta-learning-based methods. nAP means novel AP.
|
| 137 |
+
|
| 138 |
+
# 4 Experiments
|
| 139 |
+
|
| 140 |
+
# 4.1 Datasets and Evaluation Protocols
|
| 141 |
+
|
| 142 |
+
We conduct experiments on both PASCAL VOC $( 0 7 + 1 2 )$ [7] and MS COCO [18] datasets. To ensure fair comparison, we strictly follow the data split construction and evaluation protocol used in [13, 28, 23]. PASCAL VOC contains 20 categories, and we consider the same 3 base/novel splits with TFA [28] and refer them as Novel Split 1, 2, 3. Each split contains 15 base categories with abundant data and 5 novel categories with $K$ annotated instances for $K = 1 , 2 , 3 , 5 , 1 0$ . We report AP50 of novel categories (nAP50) on VOC07 test set. For MS COCO, 20 classes that overlap with PASCAL VOC are selected as novel classes, and the remaining 60 classes are set as base ones. Similarly, we evaluate our method on shot 1, 2, 3, 5, 10, 30 and the standard COCO-style ap metric is adopted.
|
| 143 |
+
|
| 144 |
+
# 4.2 Implementation Details
|
| 145 |
+
|
| 146 |
+
We implement our methods based on MMDetection [3]. Faster-RCNN [21] with Feature Pyramid Network [17] and ResNet-101 [12] are adopted as base model. Detailed settings are described in the supplementary material.
|
| 147 |
+
|
| 148 |
+
# 4.3 Benchmarking Results
|
| 149 |
+
|
| 150 |
+
Comparison with Baseline Methods To show the effectiveness of our method, we first make a detailed comparison with TFA since our method is based on it. As shown in Table 1, FADI outperforms TFA by a large margin in any shot and split on PASCAL VOC benchmark. To be specific, FADI improves TFA by 10.5, 18.7, 9.5, 3.6, 7.2 and 7.1, 8.1, 6.2, 7.7, 8.9 and 14.9, 14.9, 6.3, 5.5, 9.8 for $K { = } 1$ , 2, 3, 5, 10 on Novel split1, split2 and split3. The lower the shot, the more difficult to learn a discriminative novel classifier. The significant performance gap reflects our FADI can effectively alleviate such problem even under low shot, i.e., $K < = 3$ . Similar improvements can be observed on the challenging COCO benchmark. As shown in Table 2, we boost TFA by 2.3, 2.4, 2.0, 1.8, 2.2, 2.4 for $K { = } 1$ , 2, 3, 5, 10, 30. Besides, we also report nAP50 and nAP75, a larger gap can be obtained under IoU threshold 0.5 which suggests FADI benefits more under lower IoU thresholds.
|
| 151 |
+
|
| 152 |
+
Table 3: Effectiveness of different components of FADI.
|
| 153 |
+
|
| 154 |
+
<table><tr><td>Association</td><td>Disentangling</td><td>Margin</td><td colspan="3">nAP50</td></tr><tr><td></td><td></td><td></td><td>1</td><td>3</td><td>5</td></tr><tr><td></td><td></td><td></td><td>41.3</td><td>46.3</td><td>53.7</td></tr><tr><td></td><td></td><td></td><td>42.4</td><td>46.8</td><td>55.2</td></tr><tr><td></td><td></td><td></td><td>42.2 44.9</td><td>47.3</td><td>54.1</td></tr><tr><td></td><td></td><td></td><td>46.3</td><td>50.3 48.8</td><td>56.8 56.4</td></tr><tr><td>x<x<xv</td><td>xx<<x></td><td>xxxxν></td><td>50.3</td><td>54.2</td><td>59.3</td></tr></table>
|
| 155 |
+
|
| 156 |
+
<table><tr><td>Margin</td><td>nAP50</td></tr><tr><td>TFA</td><td>41.3</td></tr><tr><td>CosFace [27]</td><td>38.9</td></tr><tr><td>ArcFace [5]</td><td>37.9</td></tr><tr><td>CosFace (novel)</td><td>44.2</td></tr><tr><td>ArcFace (novel)</td><td>44.3</td></tr><tr><td>Ours</td><td>46.3</td></tr></table>
|
| 157 |
+
|
| 158 |
+
Table 4: Comparison of different margin loss on the TFA baseline model.
|
| 159 |
+
|
| 160 |
+
<table><tr><td>base /novel</td><td>bird</td><td>bus</td><td>cow</td><td>motorbike</td><td>sofa</td><td>nAP50</td></tr><tr><td>random</td><td>person</td><td>boat</td><td>horse</td><td>aeroplane</td><td>sheep</td><td>39.6</td></tr><tr><td>human</td><td>aeroplane</td><td>train</td><td>sheep</td><td>bicycle</td><td>chair</td><td>44.1</td></tr><tr><td>visual</td><td>dog</td><td>car</td><td>horse</td><td>person</td><td>chair</td><td>43.3</td></tr><tr><td>top2</td><td>dog</td><td>car</td><td>sheep</td><td>tv</td><td>diningtable</td><td>41.2</td></tr><tr><td>top1</td><td>horse</td><td>train</td><td>horse</td><td>bicycle</td><td>chair</td><td>44.3</td></tr><tr><td>top1 w/o dup</td><td>dog</td><td>train</td><td>horse</td><td>bicycle</td><td>chair</td><td>44.9</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Table 5: Comparison of different assign policies. Set-specialized margin loss is not adopted in this table.
|
| 163 |
+
|
| 164 |
+
Comparison with State-of-the-Art Methods Next, we compare with other latest few-shot methods. As shown in Table 1, our method pushes the envelope of current SOTA by a large margin in shot 1, 2, 3 for novel split 1 and 3. Specifically, we outperform current SOTA by 2.5, 4.3, 2.8 and 5.6, 7.8, 1.6 for $K = 1 , 2 , 3$ on novel split1 and 3, respectively. As the shot grows, the performance of FADI is slightly behind FSCE [23], we conjecture by unfreezing more layers in the feature extractor, the model can learn a more compact feature space for novel classes as it exploits less base knowledge, and it can better represent the real distribution than the distribution imitated by our association. However, it is not available when the shot is low as the learned distribution will over-fit training samples.
|
| 165 |
+
|
| 166 |
+
# 4.4 Ablation Study
|
| 167 |
+
|
| 168 |
+
In this section, we conduct a thorough ablation study of each component of our method. We first analyze the performance contribution of each component, and then we show the effect of each component and why they work. Unless otherwise specified, all ablation results are reported on Novel Split 1 of Pascal VOC benchmark based on our implementation of TFA [28].
|
| 169 |
+
|
| 170 |
+
Component Analysis Table 3 shows the effectiveness of each component, i.e., Association, Disentangling, and Set-Specialized Margin Loss in our method. It is noted that when we study association without disentangling, we train a modified TFA model by replacing the $F C _ { 2 }$ with $\bar { F C _ { 2 } } ^ { \prime }$ after the association step. Since the association confuses the novel and its assigned base class, the performance of only applying association is not very significant. However, when equipped with disentangling, it can significantly boost the nAP50 by 3.6, 4.0, 3.1 for $K { = } 1$ , 3, 5, respectively. The set-specialized margin loss shows it is generally effective for both the baseline and the proposed ‘association $^ +$ disentangling’ framework. Applying margin loss improves ‘association $^ +$ disentangling’ by 5.4, 3,9, 2.5. With all 3 components, our method totally achieves a gain of 9.0, 7.9, 5.6.
|
| 171 |
+
|
| 172 |
+
Semantic-Guided Association The assigning policy is a key component in the association step. To demonstrate the effectiveness of our semantic-guided assigning with WordNet [20], we explore different assign policies. The results are shown in Table 5. Random means we randomly assign a base class to a novel class. Human denotes manually assigning based on human knowledge. Visual denotes associating base and novel classes by visual similarity. Specifically, we regard the weights of the base classifier as prototype representations of base classes. As a result, the score prediction of novel instances on base classifier can be viewed as the visual similarity. Top1 and top2 mean the strategies that we assign each novel class to the most or second similar base classes by Eq. 1. In such cases, one base class may be assigned to two different novel classes ("horse" is assigned to "bird" and "cow"), we remove such duplication by taking the similarity as the priority of assigning. Specifically, the base and novel classes with the highest similarity will be associated, and they will be removed from the list of classes to be associated. Then we rank the similarity of the remaining classes and choose the new association. We can learn that top1 is better than random and top2 by 4.7 and 3.1, which suggests semantic similarity has a strong implication with performance. By removing the duplication, we further obtain a 0.6 gain.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 4: Score confusion matrices of different methods on Pascal VOC novel split1. The element in $_ { i }$ -th row, $j$ -th column represents for samples of novel class $i$ , the score prediction on class $j$ . Brighter colors indicate higher scores. If class $_ { i }$ and $j$ are the same, this indicates a more accurate score prediction. Otherwise, it indicates a heavier confusion. The font color of classes represents the association relations, e.g., the associated pairs ‘bird’ and ‘dog’ have the same font color blue.
|
| 176 |
+
|
| 177 |
+
Table 6: Comparison of visual and semantic similarity.
|
| 178 |
+
|
| 179 |
+
<table><tr><td>Metric</td><td colspan="3">Novel Split1</td><td colspan="3">Novel Split2</td><td colspan="3">Novel Split3</td></tr><tr><td></td><td>1</td><td>3</td><td>5</td><td>1</td><td>3</td><td>5</td><td>1</td><td>3</td><td>5</td></tr><tr><td>Visual Semantic</td><td>43.3 44.9</td><td>49.3 50.3</td><td>56.4 56.8</td><td>22.5 26.1</td><td>37.2 38.5</td><td>39.3 40.1</td><td>31.8 37.1</td><td>43.1 45.0</td><td>50.7 51.5</td></tr></table>
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 5: Examples of co-occurance
|
| 183 |
+
|
| 184 |
+
Set-Specialized Margin Loss Table 4 compares our margin loss with Arcface [5] and CosFace [27]. It can be shown that directly applying these two margin losses will harm the performance. But the degeneration of performance can be reserved by only applying to samples of novel classes. This rescues Arcface from 37.9 to 44.3, Cosface from 38.9 to 44.2. Nevertheless, they are still inferior to our margin loss by 2.0. Detailed hyper-parameter study is described in the supplementary materials.
|
| 185 |
+
|
| 186 |
+
Complementarity between Association and Discrimination Figure 4 shows the score confusion matrices of different methods. We can see that there exists an inherent confusion between some novel and base classes, e.g. in the left top figure, "cow" is confused most with "sheep" and then "horse". However, our association biases such confusion and enforces "cow" to be confused with its more semantic similar class "horse", which demonstrates the association step can align the feature distribution of the associated pairs. On the other hand, thanks to the discrimination step, the confusion incurred by association is effectively alleviated and overall it shows less confusion than TFA (the second column of Figure 4). Moreover, our FADI yields significantly higher score predictions than TFA, which confirms the effectiveness of disentangling and set-specialized margin loss.
|
| 187 |
+
|
| 188 |
+
Superiority of Semantic Similarity over Visual Similarity Table 5 demonstrates semantic similarity works better than visual similarity. Here the weights of the base classifier as prototype representations of base classes. Thus, we take the score prediction of novel instances on base classifier as the visual similarity. However, we find it sometimes can be misleading, especially when a novel instance co-occurrent with a base instance, e.g., ‘cat’ sits on a ‘chair’, ‘person’ rides a ‘bike’ as shown in Figure 5. Such co-occurrence deceives the base classifier that ‘cat’ is similar to ‘chair’ and ‘bike’ is similar to ‘person’, which makes the visual similarity not reliable under data scarcity scenarios. As shown in Table 6, when the shot grows, the performance gap between semantic and visual can be reduced by a more accurate visual similarity measurement.
|
| 189 |
+
|
| 190 |
+
# 5 Conclusion
|
| 191 |
+
|
| 192 |
+
In this paper, we propose Few-shot object detection via Association and DIscrimination (FADI). In the association step, to learn a compact intra-class structure, we selectively associate each novel class with a well-trained base class based on their semantic similarity. The novel class readily learns to align its intra-class distribution to the associated base class. In the discrimination step, to ensure the inter-class separability, we disentangle the classification branches for base and novel classes, respectively. A set-specialized margin loss is further imposed to enlarge the inter-class distance. Experiments results demonstrate that FADI is a concise yet effective solution for FSOD.
|
| 193 |
+
|
| 194 |
+
Acknowledgements. This research was conducted in collaboration with SenseTime. This work is supported by GRF 14203518, ITS/431/18FX, CUHK Agreement TS1712093, Theme-based Research Scheme 2020/21 (No. T41-603/20- R), NTU NAP, RIE2020 Industry Alignment Fund – Industry Collaboration Projects (IAF-ICP) Funding Initiative, and Shanghai Committee of Science and Technology, China (Grant No. 20DZ1100800).
|
| 195 |
+
|
| 196 |
+
# References
|
| 197 |
+
|
| 198 |
+
[1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 1
|
| 199 |
+
[2] Hao Chen, Yali Wang, Guoyou Wang, and Yu Qiao. Lstd: A low-shot transfer detector for object detection. In AAAI Conference on Artificial Intelligence, 2018. 7
|
| 200 |
+
[3] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019. 7, 12
|
| 201 |
+
[4] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In International Conference on Learning Representations, 2019. 3
|
| 202 |
+
[5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3, 6, 8, 9
|
| 203 |
+
[6] Guneet S Dhillon, Pratik Chaudhari, Avinash Ravichandran, and Stefano Soatto. A baseline for few-shot image classification. arXiv preprint arXiv:1909.02729, 2019. 3
|
| 204 |
+
[7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303–338, June 2010. 2, 7, 12
|
| 205 |
+
[8] Qi Fan, Wei Zhuo, Chi-Keung Tang, and Yu-Wing Tai. Few-shot object detection with attention-rpn and multi-relation detector. In IEEE Conference on Computer Vision and Pattern Recognition, 2020. 3
|
| 206 |
+
[9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, 2017. 3
|
| 207 |
+
[10] Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In IEEE International Conference on Computer Vision, 2017. 3
|
| 208 |
+
[11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In IEEE International Conference on Computer Vision, 2017. 1
|
| 209 |
+
[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
|
| 210 |
+
[13] Bingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu, Jiashi Feng, and Trevor Darrell. Few-shot object detection via feature reweighting. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7
|
| 211 |
+
[14] Leonid Karlinsky, Joseph Shtok, Sivan Harary, Eli Schwartz, Amit Aides, Rogerio Feris, Raja Giryes, and Alex M Bronstein. Repmet: Representative-based metric learning for classification and few-shot object detection. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7
|
| 212 |
+
[15] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3
|
| 213 |
+
[16] Dekang Lin et al. An information-theoretic definition of similarity. In International Conference on Machine Learning, 1998. 4
|
| 214 |
+
[17] Tsung-Yi Lin, Piotr Dollár, Ross B Girshick, Kaiming He, Bharath Hariharan, and Serge J Belongie. Feature pyramid networks for object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 7
|
| 215 |
+
[18] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, 2014. 2, 7, 12
|
| 216 |
+
[19] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3, 6
|
| 217 |
+
[20] George A Miller. Wordnet: a lexical database for english. Communications of the ACM. 4, 8
|
| 218 |
+
[21] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, 2015. 1, 5, 7
|
| 219 |
+
[22] Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, 2017. 3
|
| 220 |
+
[23] Bo Sun, Banghuai Li, Shengcai Cai, Ye Yuan, and Chi Zhang. Fsce: Few-shot object detection via contrastive proposal encoding. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 2, 3, 7, 8
|
| 221 |
+
[24] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3
|
| 222 |
+
[25] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008. 5
|
| 223 |
+
[26] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, 2016. 3
|
| 224 |
+
[27] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3, 6, 8, 9
|
| 225 |
+
[28] Xin Wang, Thomas E. Huang, Trevor Darrell, Joseph E Gonzalez, and Fisher Yu. Frustratingly simple few-shot object detection. In International Conference on Machine Learning, 2020. 2, 3, 7, 8
|
| 226 |
+
[29] Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3
|
| 227 |
+
[30] Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Meta-learning to detect rare objects. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 7
|
| 228 |
+
[31] Jiaxi Wu, Songtao Liu, Di Huang, and Yunhong Wang. Multi-scale positive sample refinement for few-shot object detection. In European Conference on Computer Vision, 2020. 2, 3, 7
|
| 229 |
+
[32] Yang Xiao and Renaud Marlet. Few-shot object detection and viewpoint estimation for objects in the wild. In European Conference on Computer Vision, 2020. 2, 3
|
| 230 |
+
[33] Chen Xing, Negar Rostamzadeh, Boris Oreshkin, and Pedro O O Pinheiro. Adaptive cross-modal few-shot learning. Advances in Neural Information Processing Systems, 2019. 3
|
| 231 |
+
[34] Caixia Yan, Qinghua Zheng, Xiaojun Chang, Minnan Luo, Chung-Hsing Yeh, and Alexander G Hauptman. Semantics-preserving graph propagation for zero-shot object detection. IEEE Transactions on Image Processing, 2020. 3
|
| 232 |
+
[35] Xiaopeng Yan, Ziliang Chen, Anni Xu, Xiaoxi Wang, Xiaodan Liang, and Liang Lin. Meta r-cnn: Towards general solver for instance-level low-shot learning. In IEEE International Conference on Computer Vision, 2019. 2, 3, 7
|
| 233 |
+
[36] Yukuan Yang, Fangyu Wei, Miaojing Shi, and Guoqi Li. Restoring negative information in few-shot object detection. In Advances in Neural Information Processing Systems, 2020. 3
|
| 234 |
+
[37] Ze Yang, Yali Wang, Xianyu Chen, Jianzhuang Liu, and Yu Qiao. Context-transformer: tackling object confusion for few-shot detection. In AAAI Conference on Artificial Intelligence, 2020. 3
|
| 235 |
+
[38] Chenchen Zhu, Fangyi Chen, Uzair Ahmed, and Marios Savvides. Semantic relation reasoning for shotstable few-shot object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2021. 7
|
| 236 |
+
|
| 237 |
+
# Checklist
|
| 238 |
+
|
| 239 |
+
1. For all authors...
|
| 240 |
+
|
| 241 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 242 |
+
(b) Did you describe the limitations of your work? [Yes] See Appendix 1.
|
| 243 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 244 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 245 |
+
|
| 246 |
+
2. If you are including theoretical results...
|
| 247 |
+
|
| 248 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 249 |
+
|
| 250 |
+
3. If you ran experiments...
|
| 251 |
+
|
| 252 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We will release the code to ensure strict reproducibility upon the paper accepted.
|
| 253 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4.1, Appendix 2 and Appendix 3.
|
| 254 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No]
|
| 255 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix 2.
|
| 256 |
+
|
| 257 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 258 |
+
|
| 259 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] Pascal VOC [7], MS COCO [18], MMDetection [3]
|
| 260 |
+
(b) Did you mention the license of the assets? [No]
|
| 261 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 262 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No]
|
| 263 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No]
|
| 264 |
+
|
| 265 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 266 |
+
|
| 267 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 268 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 269 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/dOcQK-f4byz/dOcQK-f4byz.md
ADDED
|
@@ -0,0 +1,374 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TEACHING TEMPORAL LOGICS TO NEURAL NETWORKS∗
|
| 2 |
+
|
| 3 |
+
Christopher Hahn CISPA Helmholtz Center for Information Security Saarbrucken, 66123 Saarland, Germany ¨ christopher.hahn@cispa.de
|
| 4 |
+
|
| 5 |
+
Frederik Schmitt CISPA Helmholtz Center for Information Security Saarbrucken, 66123 Saarland, Germany ¨ frederik.schmitt@cispa.de
|
| 6 |
+
|
| 7 |
+
Jens U. Kreber
|
| 8 |
+
Saarland University
|
| 9 |
+
Saarbrucken, 66123 Saarland, Germany ¨ kreber@react.uni-saarland.de
|
| 10 |
+
|
| 11 |
+
Markus N. Rabe Google Research Mountain View, CA, USA mrabe@google.com
|
| 12 |
+
|
| 13 |
+
Bernd Finkbeiner
|
| 14 |
+
CISPA Helmholtz Center for Information Security
|
| 15 |
+
Saarbrucken, 66123 Saarland, Germany ¨
|
| 16 |
+
finkbeiner@cispa.de
|
| 17 |
+
|
| 18 |
+
# ABSTRACT
|
| 19 |
+
|
| 20 |
+
We study two fundamental questions in neuro-symbolic computing: can deep learning tackle challenging problems in logics end-to-end, and can neural networks learn the semantics of logics. In this work we focus on linear-time temporal logic (LTL), as it is widely used in verification. We train a Transformer on the problem to directly predict a solution, i.e. a trace, to a given LTL formula. The training data is generated with classical solvers, which, however, only provide one of many possible solutions to each formula. We demonstrate that it is sufficient to train on those particular solutions to formulas, and that Transformers can predict solutions even to formulas from benchmarks from the literature on which the classical solver timed out. Transformers also generalize to the semantics of the logics: while they often deviate from the solutions found by the classical solvers, they still predict correct solutions to most formulas.
|
| 21 |
+
|
| 22 |
+
# 1 INTRODUCTION
|
| 23 |
+
|
| 24 |
+
Machine learning has revolutionized several areas of computer science, such as image recognition (He et al., 2015), face recognition (Taigman et al., 2014), translation (Wu et al., 2016), and board games (Moravc´ık et al., 2017; Silver et al., 2017). For complex tasks that involve symbolic reasoning, however, deep learning techniques are still considered as insufficient. Applications of deep learning in logical reasoning problems have therefore focused on sub-problems within larger logical frameworks, such as computing heuristics in solvers (Lederman et al., 2020; Balunovic et al., 2018; Selsam & Bjørner, 2019) or predicting individual proof steps (Loos et al., 2017; Gauthier et al., 2018; Bansal et al., 2019; Huang et al., 2018). Recently, however, the assumption that deep learning is not yet ready to tackle hard logical questions was drawn into question. Lample & Charton (2020) demonstrated that Transformer models (Vaswani et al., 2017) perform surprisingly well on symbolic integration, Rabe et al. (2020) demonstrated that self-supervised training leads to mathematical reasoning abilities, and Brown et al. (2020) demonstrated that large-enough language models learn basic arithmetic despite being trained on mostly natural language sources.
|
| 25 |
+
|
| 26 |
+
This poses the question if other problems that are thought to require symbolic reasoning lend themselves to a direct learning approach. We study the application of Transformer models to challenging logical problems in verification. We thus consider linear-time temporal logic (LTL) (Pnueli, 1977), which is widely used in the academic verification community (Dwyer et al., 1998; Li et al., 2013; Duret-Lutz et al., 2016; Rozier & Vardi, 2007; Schuppan & Darmawan, 2011; Li et al., 2013; 2014; Schwendimann, 1998) and is the basis for industrial hardware specification languages like the IEEE standard PSL (IEEE-Commission et al., 2005). LTL specifies infinite sequences and is typically used to describe system behaviors. For example, LTL can specify that some proposition $P$ must hold at every point in time $( \sqsubseteq P )$ or that $P$ must hold at some future point of time $( \diamondsuit P )$ . By combining these operators, one can specify that $P$ must occur infinitely often $( \bigtriangledown \bigcirc P )$ .
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
Figure 1: Performance of our best models trained on practical pattern formulas. The $\mathbf { X }$ -axis shows the formula size. Syntactic accuracy, i.e., where the Transformer agrees with the generator are displayed in dark green. Instances where the Transformer deviates from the generators output but still provides correct output are displayed in light green; incorrect predictions in orange.
|
| 30 |
+
|
| 31 |
+
In this work, we apply a direct learning approach to the fundamental problem of LTL to find a satisfying trace to a formula. In applications, solutions to LTL formulas can represent (counter) examples for a specified system behavior, and over the last decades, generations of advanced algorithms have been developed to solve this question automatically. We start from the standard benchmark distribution of LTL formulas, consisting of conjunctions of patterns typically encountered in practice (Dwyer et al., 1998). We then use classical algorithms, notably spot by Duret-Lutz et al. (2016), that implement a competitive classical algorithm, to generate solutions to formulas from this distribution and train a Transformer model to predict these solutions directly.
|
| 32 |
+
|
| 33 |
+
Relatively small Transformers perform very well on this task and we predict correct solutions to $9 6 . 8 \%$ of the formulas from a held-out test set (see Figure 1). Impressive enough, Transformers hold up pretty well and predict correct solutions in $83 \%$ of the cases, even when we focus on formulas on which spot timed out. This means that, already today, direct machine learning approaches may be useful to augment classical algorithms in logical reasoning tasks.
|
| 34 |
+
|
| 35 |
+
We also study two generalization properties of the Transformer architecture, important to logical problems: We present detailed analyses on the generalization to longer formulas. It turns out that transformers trained with tree-positional encodings (Shiv & Quirk, 2019) generalize to much longer formulas than they were trained on, while Transformers trained with the standard positional encoding (as expected) do not generalize to longer formulas. The second generalization property studied here is the question whether Transformers learn to imitate the generator of the training data, or whether they learn to solve the formulas according to the semantics of the logics. This is possible, as for most formulas there are many possible satisfying traces. In Figure 1 we highlight the fact that our models often predicted traces that satisfy the formulas, but predict different traces than the one found by the classical algorithm with which we generated the data. Especially when testing the models out-of-distribution we observed that almost no predicted trace equals the solution proposed by the classical solver.
|
| 36 |
+
|
| 37 |
+
To demonstrate that these generalization behaviors are not specific to the benchmark set of LTL formulas, we also present experimental results on random LTL formulas. Further, we exclude that spot, the tool with which we generate example traces, is responsible for these behaviors, by repeating the experiments on propositional formulas for which we generate the solutions by SAT solvers.
|
| 38 |
+
|
| 39 |
+
The remainder of this paper is structured as follows. We give an overview over related work in Section 2. We describe the problem definitions and present our data generation in Section 3. Our experimental setup is described in Section 4 and our findings in Section 5, before concluding in Section 6.
|
| 40 |
+
|
| 41 |
+
# 2 RELATED WORK
|
| 42 |
+
|
| 43 |
+
Datasets for mathematical reasoning. While we focus on a classical task from verification, other works have studied datasets derived from automated theorem provers (Blanchette et al., 2016; Loos et al., 2017; Gauthier et al., 2018), interactive theorem provers (Kaliszyk et al., 2017; Bansal et al., 2019; Huang et al., 2018; Yang & Deng, 2019; Polu & Sutskever, 2020; Wu et al., 2020; Li et al., 2020; Lee et al., 2020; Urban & Jakubuv, 2020; Rabe et al., 2020), symbolic mathematics (Lample ˚ & Charton, 2020), and mathematical problems in natural language (Saxton et al., 2019; Schlag et al., 2019). Probably the closest work to this paper are the applications of Transformers to directly solve differential equations (Lample & Charton, 2020) and directly predict missing assumptions and types of formal mathematical statements (Rabe et al., 2020). We focus on a different problem domain, verification, and demonstrate that Transformers are roughly competitive with classical algorithms in that domain on their dataset. Learning has been applied to mathematics long before the rise of deep learning. Earlier works focused on ranking premises or clauses Cairns (2004); Urban (2004; 2007); Urban et al. (2008); Meng & Paulson (2009); Schulz (2013); Kaliszyk & Urban (2014).
|
| 44 |
+
|
| 45 |
+
Neural architectures for logical reasoning. (Paliwal et al., 2020) demonstrate significant improvements in theorem proving through the use of graph neural networks to represent higher-order logic terms. Selsam et al. (2019) presented NeuroSAT, a graph neural network (Scarselli et al., 2008; Li et al., 2017; Gilmer et al., 2017; Wu et al., 2019) for solving the propositional satisfiability problem. In contrast, we apply a generic sequence-to-sequence model to predict the solutions to formulas, not only whether there is a solution. This allows us to apply the approach to a wider set of logics (logics without a CNF). A simplified NeuroSAT architecture was trained for unsat-core predictions (Selsam & Bjørner, 2019). Lederman et al. (2020) have used graph neural networks on CNF to learn better heuristics for a 2QBF solver. Evans et al. (2018) study the problem of logical entailment in propositional logic using tree-RNNs. Entailment is a subproblem of satisfiability and (besides being a classification problem) could be encoded in the same form as our propositional formulas. The formulas considered in their dataset are much smaller than in this work.
|
| 46 |
+
|
| 47 |
+
Language models applied to programs. Transformers have also been applied to programs for tasks such as summarizing code (Fernandes et al., 2018) or variable naming and misuse (Hellendoorn et al., 2020). Other works focused on recurrent neural networks or graph neural networks for code analysis, e.g. (Piech et al., 2015; Gupta et al., 2017; Bhatia et al., 2018; Wang et al., 2018; Allamanis et al., 2017). Another area in the intersection of formal methods and machine learning is the verification of neural networks (Seshia & Sadigh, 2016; Seshia et al., 2018; Singh et al., 2019; Gehr et al., 2018; Huang et al., 2017; Dreossi et al., 2019).
|
| 48 |
+
|
| 49 |
+
# 3 DATASETS
|
| 50 |
+
|
| 51 |
+
To demonstrate the generalization properties of the Transformer on logical tasks, we generated several datasets in three different fashions. We will describe the underlying logical problems and our data generation in the following.
|
| 52 |
+
|
| 53 |
+
# 3.1 TRACE GENERATION FOR LINEAR-TIME TEMPORAL LOGIC
|
| 54 |
+
|
| 55 |
+
Linear-time temporal logic (LTL, Pnueli, 1977) combines propositional connectives with temporal operators such as the Next operator $\bigcirc$ and the Until operator $\mathcal { U }$ . $\bigcirc \varphi$ means that $\varphi$ holds in the next position of a sequence; $\varphi _ { 1 } \mathcal { U } \varphi _ { 2 }$ means that $\varphi _ { 1 }$ holds until $\varphi _ { 2 }$ holds. For example, the LTL formula $\mathsf { \bar { ( } } b \mathsf { \mathcal { U } } a ) \wedge ( c \mathsf { \mathcal { U } } \neg \bar { a } )$ states that $b$ has to hold along the trace until $a$ holds and $c$ has to hold until $a$ does not hold anymore. There also exist derived operators. For example, consider the following specification of an arbiter: $\square ( \mathrm { r e q u e s t } \odot \mathrm { g r a n t } )$ ) states that, at every point in time $\sqsubset$ -operator), if there is a request signal, then a grant signal must follow at some future point in time ( $\bigcirc$ -operator).
|
| 56 |
+
|
| 57 |
+
The full semantics and an explanation of the operators can be found in Appendix A. We consider infinite sequences, that are finitely represented in the form of a “lasso” $u v ^ { \omega }$ , where $u$ , called prefix, and $v$ , called period, are finite sequences of propositional formulas. We call such sequences (symbolic) traces. For example, the symbolic trace $( a \wedge b ) ^ { \omega }$ defines the infinite sequence where $a$ and $b$ evaluate to true on every position. Symbolic traces allow us to underspecify propositions when they do not matter. For example, the LTL formula $\bigcirc \bigcirc \sqsupset a$ is satisfied by the symbolic trace: true true $( a ) ^ { \omega }$ , which allow for any combination of propositions on the first two positions.
|
| 58 |
+
|
| 59 |
+
Our datasets consist of pairs of satisfiable LTL formulas and satisfying symbolic traces generated with tools and automata constructions from the spot framework (Duret-Lutz et al., 2016). We use a compact syntax for ultimately periodic symbolic traces: Each position in the trace is separated by the delimiter “;”. True and False are represented by “1” and $ { ^ { 6 } } 0 ^ { 9 }$ , respectively. The beginning of the period $v$ is signaled by the character “ $\{ \} ^ { , , }$ and analogously its end by $\mathbf { \bar { \Sigma } } ^ { 6 6 } \mathbf { \bar { \Sigma } } ^ { 5 }$ . For example, the ultimately periodic symbolic trace denoted by $a ; a ; a ; \{ b \}$ , describes all infinite traces where on the first 3 positions $a$ must hold followed by an infinite period on which $b$ must hold on every position.
|
| 60 |
+
|
| 61 |
+
Given a satisfiable LTL formula $\varphi$ , our trace generator constructs a Buchi automaton ¨ $A _ { \varphi }$ that accepts exactly the language defined by the LTL formula, i.e., $\mathcal { L } ( A _ { \varphi } ) = \mathcal { L } ( \varphi )$ . From this automaton, we construct an arbitrary accepted symbolic trace, by searching for an accepting run in $A _ { \varphi }$ .
|
| 62 |
+
|
| 63 |
+
# 3.1.1 SPECIFICATION PATTERN
|
| 64 |
+
|
| 65 |
+
Our main dataset is constructed from formulas following $5 5 \mathrm { L T L }$ specification patterns identified by the literature (Dwyer et al., 1998). For example, the arbiter property $( \bigcirc p _ { 0 } ) \ \bar { { } } \ ( p _ { 1 } { \mathcal { U } } p _ { 0 } )$ , stating that if $p _ { 0 }$ is scheduled at some point in time, $p _ { 1 }$ is scheduled until this point. The largest specification pattern is of size 40 consisting of 6 atomic propositions. It has been shown that conjunctions of such patterns are challenging for LTL satisfiability tools that rely on classical methods, such as automata constructions (Li et al., 2013). They start coming to their limits when more than 8 pattern formulas are conjoined. We decided to build our dataset in a similar way from these patterns only to allow for a better comparison.
|
| 66 |
+
|
| 67 |
+
We conjoined random specification patterns with randomly chosen variables (from a supply of 6 variables) until one of the following four conditions are met: 1) the formula size succeeds 126, 2) more than 8 formulas would be conjoined, 3) our automaton-based generator timed out $( > 1 s )$ while computing the solution trace, or 4) the formula would become unsatisfiable. In total, we generated 1664487 formula-trace pairs in 24 hours on 20 CPUs. While generating, approximately $4 \bar { 1 } \%$ of the instances ran into the first termination condition, $2 1 \%$ into the second, $3 7 \%$ into the third and $1 \%$ into the fourth. We split this set into an $8 0 \%$ training set, a $1 0 \%$ validation set, and a $1 0 \%$ test set. The size distribution of the dataset can be found in Appendix B.
|
| 68 |
+
|
| 69 |
+
For studying how the Transformer performs on longer specification patterns, we accumulated pattern formulas where spot timed out $( > 6 0 s )$ while searching for a satisfying trace. We call this dataset LTLUnsolved254 . We capped the maximum length at 254, which is twice as large as the formulas the model saw during training. The size distribution of the generated formulas can be found in Appendix B.
|
| 70 |
+
|
| 71 |
+
In the following table, we illustrate the complexity of our training dataset with two examples from the above described set LTLPattern126, where the subsequent number of the notation of our datasets denotes the maximum size of a formula’s syntax tree. The first line shows the LTL formula and the symbolic trace in mathematical notation. The second line shows the input and output representation of the Transformer (in Polish notation):
|
| 72 |
+
|
| 73 |
+
<table><tr><td rowspan=1 colspan=1>LTL formula</td><td rowspan=1 colspan=1>satisfying symbolic trace</td></tr><tr><td rowspan=1 colspan=1>(a→d)>-fWfw-fWfw-f(c→-cu(c>-bWbW-bWbW□-b))&&G>aFdW!fWfW!fWfG!f>FcU!c&cW!bWbW!bWbG!b</td><td rowspan=1 colspan=1>(-a>-c∧-fV-c△d∧-f){!a&!c&!f|!c&d&!f}</td></tr><tr><td rowspan=1 colspan=1>□b>-a△a→cua)△□a→□c)△(<b→-bu(b>-fWfW-fWfW□-f))^(<a→(c^O(-aue)→O(-au(e△<f)))ua)>△c>□(a□e→-(-e>fO(-eu(-e>d)))u(evc))^(□-av△(a>-fWd))△□(e→□-c)&&&&&&&G>&&b!aFaUcaG>aGc>FbU!b&bW!fWfW!fWfG!f>FaU>&cXU!aeXU!a&eFfaFcG>&aFeU!&&!efXU!e&!edlec|G!aF&aW!fdG>eG!c</td><td rowspan=1 colspan=1>(-a△b∧-c∧-e∧f)(-a△-c△-e>-f)(-a∧-c∧-e△f)(-a△c∧-e△-f)(-a>e∧-f)ω&&&&!ab!c!ef;&&&!a!c!e!f;&&&!a!c!ef;&&&!ac!e!f;{&&!a!e!f}</td></tr></table>
|
| 74 |
+
|
| 75 |
+
# 3.1.2 RANDOM FORMULAS
|
| 76 |
+
|
| 77 |
+
To show that the generalization properties of the Transformer are not specific to our data generation, we also generated a dataset of random formulas. Our dataset of random formulas consist of 1 million generated formulas and their solutions, i.e., a satisfying symbolic trace. The number of different propositions is fixed to 5. Each dataset is split into a training set of $8 0 0 \mathrm { K }$ formulas, a validation set of 100K formulas, and a test set of 100K formulas. All datasets are uniformly distributed in size, apart from the lower-sized end due to the limited number of unique small formulas. The formula and trace distribution of the dataset LTLRandom35, as well as three randomly drawn example instances can be found in Appendix B. Note that we filtered out examples with traces larger than 62 (less than $0 . 0 5 \%$ of the original set).
|
| 78 |
+
|
| 79 |
+
To generate the formulas, we used the randltl tool of the spot framework, which builds unique formulas in a specified size interval, following a supplied node probability distribution. During the building process, the actual distribution occasionally differs from the given distribution in order to meet the size constraints, e.g., by masking out all binary operators. The distribution between all $k$ -ary nodes always remains the same. To furthermore achieve a (quasi) uniform distribution in size, we subsequently filtered the generated formulas. Our node distribution puts equal weight on all operators $\neg , \land , \bigcirc$ and $\mathcal { U }$ . Constants True and False are allowed with 2.5 times less probability than propositions.
|
| 80 |
+
|
| 81 |
+
# 3.2 ASSIGNMENT GENERATION FOR PROPOSITIONAL LOGIC
|
| 82 |
+
|
| 83 |
+
To show that the generalization of the Transformer to the semantics of logics is not a unique attribute of LTL, we also generated a dataset for propositional logic (SAT). A propositional formula consists of Boolean operators $\wedge$ (and), $\vee$ (or), $\neg$ (not), and variables also called literals or propositions. We consider the derived operators $\varphi _ { 1 } \varphi _ { 2 } \equiv \lnot \varphi _ { 1 } \lor \varphi _ { 2 }$ (implication), $\varphi _ { 1 } \varphi _ { 2 } \equiv ( \varphi _ { 1 } \varphi _ { 2 } ) \wedge ( \varphi _ { 2 } $ $\varphi _ { 1 }$ ) (equivalence), and $\varphi _ { 1 } \oplus \varphi _ { 2 } \equiv \lnot ( \varphi _ { 1 } \varphi _ { 2 } )$ (xor). Given a propositional Boolean formula $\varphi$ , the satisfiability problem asks if there exists a Boolean assignment $\Pi : \mathcal { V } \mapsto \mathbb { B }$ for every literal in $\varphi$ such that $\varphi$ evaluates to true. For example, consider the following propositional formula, given in conjunctive normal form (CNF): $( x _ { 1 } \lor x _ { 2 } \lor \neg x _ { 3 } ) \land ( \neg x _ { 1 } \lor x _ { 3 } )$ . A possible satisfying assignment for this formula would be $\{ ( x _ { 1 } , t r u e ) , ( x _ { 2 } , f a l s e ) , ( x _ { 3 } , t r u e ) \} .$ . We allow a satisfying assignment to be partial, i.e., if the truth value of a propositions can be arbitrary, it will be omitted. For example, $\{ ( x _ { 1 } , t r u e ) , ( x _ { 3 } , t r u e ) \}$ would be a satisfying partial assignment for the formula above. We define a minimal unsatisfiable core of an unsatisfiable formula $\varphi$ , given in CNF, as an unsatisfiable subset of clauses $\varphi _ { c o r e }$ of $\varphi$ , such that every proper subset of clauses of $\varphi _ { c o r e }$ is still satisfiable.
|
| 84 |
+
|
| 85 |
+
We, again, generated 1 million random formulas. For the generation of propositional formulas, the specified node distribution puts equal weight on $\wedge , \vee$ , and $\neg$ operators and half as much weight on the derived operators and $\oplus$ individually. In contrast to previous work (Selsam et al., 2019), which is restricted to formulas in CNF, we allow an arbitrary formula structure and derived operators.
|
| 86 |
+
|
| 87 |
+
A satisfying assignment is represented as an alternating sequence of propositions and truth values, given as 0 and 1. The sequence $a 0 b 1 c 0$ , for example, represents the partial assignment $\{ ( a , f a l s e ) , ( b , t r u e ) , ( c , f a l s e ) \}$ , meaning that the truth values of propositions $d$ and $e$ can be chosen arbitrarily (note that we allow five propositions). We used pyaiger (Vazquez-Chanlatte, 2018), which builds on Glucose 4 (Audemard & Simon, 2018) as its underlying SAT solver. We construct the partial assignments with a standard method in SAT solving: We query the SAT solver for a minimal unsatisfiable core of the negation of the formula. To give the interested reader an idea of the level of difficulty of the dataset, the following table shows three random examples from our training set PropRandom35. The first line shows the formula and the assignment in mathematical notation. The second line shows the syntactic representation (in Polish notation):
|
| 88 |
+
|
| 89 |
+
<table><tr><td rowspan=1 colspan=1>propositional formula</td><td rowspan=1 colspan=1>satisfying partial assignment</td></tr><tr><td rowspan=1 colspan=1>((d△-e)∧(-aV-e))←→((-④(-b↔-e))v((e④(b^d))④-(-cv(-a←e))))<->&&d!e|!a!e|xor!b<->!b!exorxore&bd!|!c<->!ae</td><td rowspan=1 colspan=1>{(a,0),(b,0),(c,1),(d,1),(e,0))a0b0cldle0</td></tr><tr><td rowspan=1 colspan=1>(cVe)v(-a>-b)Ilce<->!a!b</td><td rowspan=1 colspan=1>{c,1)}c1</td></tr><tr><td rowspan=1 colspan=1>-((bve)④((-av(-d>-e))v(-bν(((-a>b)>-b)>d))))!xor!bell!a<->!d!e!I!b&&&!ab!b!d</td><td rowspan=1 colspan=1>{(d,1),(e,1)}dle1</td></tr></table>
|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
Figure 2: Overview of our main experimental results: the performance of our best performing models on our different datasets. The percentage of a dark green bar refers to the syntactic accuracy, the percentage of a light green bar to the semantic accuracy without the syntactic accuracy, and the incorrect predictions are visualized in orange.
|
| 93 |
+
|
| 94 |
+
To test the Transformer on even more challenging formulas, we constructed a dataset of CNF formulas using the generation script of Selsam et al. (2019) from their publicly available implementation. A random CNF formula is built by adding clauses until the addition of a further clause would lead to an unsatisfiable formula. We used the parameters $p _ { g e o } = 0 . 9$ and $p _ { k 2 } = 0 . 7 5$ to generate formulas that contain up to 15 variables and have a maximum size of 250. We call this dataset PropCNF 250.
|
| 95 |
+
|
| 96 |
+
# 4 EXPERIMENTAL SETUP
|
| 97 |
+
|
| 98 |
+
We have implemented the Transformer architecture (Vaswani et al., 2017). Our implementation processes the input and output sequences token-by-token. We trained on a single GPU (NVIDIA P100 or V100). All training has been done with a dropout rate of 0.1 and early stopping on the validation set. Note that the embedding size will automatically be floored to be divisible by the number of attention heads. The training of the best models took up to 50 hours. For the output decoding, we utilized a beam search (Wu et al., 2016), with a beam size of 3 and an $\alpha$ of 1.
|
| 99 |
+
|
| 100 |
+
Since the solution of a logical formula is not necessarily unique, we use two different measures of accuracy to evaluate the generalization to the semantics of the logics: we distinguish between the syntactic accuracy, i.e., the percentage where the Transformers prediction syntactically matches the output of our generator and the semantic accuracy, i.e., the percentage where the Transformer produced a different solution. We also differentiate between incorrect predictions and syntactically invalid outputs which, in fact, happens only in $0 . 1 \%$ of the cases in LTLUnsolved254 .
|
| 101 |
+
|
| 102 |
+
In general, our best performing models used 8 layers, 8 attention heads, and an FC size of 1024. We used a batch size of 400 and trained for $4 5 0 K$ steps (130 epochs) for our specification pattern dataset, and a batch size of 768 and trained for $5 0 K$ steps (48 epochs) for our random formula dataset. A hyperparameter study can be found in Appendix C.
|
| 103 |
+
|
| 104 |
+
# 5 EXPERIMENTAL RESULTS
|
| 105 |
+
|
| 106 |
+
In this section, we describe our experimental results. First, we show that a Transformer can indeed solve the task of providing a solution, i.e., a trace for a linear-time temporal logical (LTL) formula. For this, we describe the results from training on the dataset LTLPattern126 of specification patterns that are commonly used in the context of verification. Secondly, we show two generalization properties that the Transformer evinces on logic reasoning tasks: 1) the generalization to larger formulas (even so large that our data generator timed out) and 2) the generalization to the semantics of the logic. We strengthen this observation by considering a different dataset of random LTL formulas. Thirdly, we provide results for a model trained on a different logic and with a different data generator. We thereby demonstrate that the generalization behaviors of the Transformer are not specific to LTL and the LTL solver implemented with spot that we used to generate the data. An overview of our training results is displayed in Figure 2.
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 3: Predictions of our best performing model, trained on LTLUnsolved254 , on 5704 specification patterns for which spot timed out $( > 6 0 s )$ . Semantic accuracy is displayed in green; incorrect traces in orange; syntactically invalid traces in red.
|
| 110 |
+
|
| 111 |
+
5.1 SOLVING LINEAR-TIME TEMPORAL LOGICAL FORMULAS
|
| 112 |
+
|
| 113 |
+
We trained a Transformer on our specification on LTLPattern126 . Figure 1 in the introduction displays the performance of our best model on this dataset. We observed a syntactic accuracy of $6 9 . 1 \%$ and a semantic accuracy of $9 6 . 8 \%$ . With this experiment we can already deduce that it seems easier for the Transformer to learn the underlying semantics of LTL than to learn the particularities of the generator. Further we can see that as the formula length grows, the syntactic accuracy begins to drop. However, that drop is much smaller in the semantic accuracy—the model still mostly predicts correct traces for long formulas.
|
| 114 |
+
|
| 115 |
+
As a challenging benchmark, we tested our best performing model on LTLUnsolved254 . It predicted correct solutions in $8 3 \%$ of the cases, taking on average $1 5 s$ on a single CPU. The syntactic accuracy is $0 \%$ as there was no output produced by spot within the timeout. The results of the experiments are visualized in Figure 3. Note that this does not mean that our Transformer models necessariy outperform classical algorithms across the board. However, since verifying solutions to LTL formulas is much easier than finding solutions $( \mathbf { A C } ^ { 1 } ( \log \mathrm { D C F L } )$ vs PSPACE), this experiment shows that the predictions of a deep neural network can be a valuable extension to the verification tool box.
|
| 116 |
+
|
| 117 |
+
# 5.2 GENERALIZATION PROPERTIES
|
| 118 |
+
|
| 119 |
+
To prove that the generalization to the semantics is independent of the data generation, we also trained a model on a dataset of randomly generated formulas. The unshaded part of Figure 4 displays the performance of our best model on the LTLRandom35 dataset. The Transformers were solely trained on formulas of size less or equal to 35. We observe that in this range the exact syntactic accuracy decreases when the formulas grow in size. The semantic accuracy, however, stays, again, high. The model achieves a syntactic accuracy of $8 3 . 8 \%$ and a semantic accuracy of ${ \dot { 9 } } 8 . 5 \%$ on LTLRandom35, i.e., in $1 4 . 7 \%$ of the cases, the Transformer deviates from our automaton-based data generator. The evolution of the syntactic and the semantic accuracy during training can be found in Appendix D.
|
| 120 |
+
|
| 121 |
+
To show that the generalization to larger formulas is independent from the data generation method, we also tested how well the Transformer generalizes to randomly generated LTL formulas of a size it has never seen before. We used our model trained on LTLRandom35 and observed the performance on LTLRandom50. The model preserves the semantic generalization, displayed in the shaded part of Figure 4. It outputs exact syntactic matches in $6 7 . 6 \%$ of the cases and achieves a semantic accuracy of $9 2 . 2 \%$ . For the generalization to larger formulas we utilized a positional encoding based on the tree representation of the formula (Shiv & Quirk, 2019). When using the standard positional encoding instead, the accuracy drops, as expected, significantly. A visualization of this experiments can be found in Appendix E.
|
| 122 |
+
|
| 123 |
+
In a further experiment, we tested the out-of-distribution (OOD) generalization of the Transformer on the trace generation task. We generated a new dataset LTLRandom126 to match the formula sizes and the vocabulary of LTLPattern126. A model trained on LTLRandom126 achieves a semantic accuracy of $2 4 . 7 \%$ (and a syntactic accuracy of only $1 . 0 \%$ ) when tested on LTLPattern126. Vice versa, a model trained on LTLPattern126 achieves a semantic accuracy of $3 8 . 5 \%$ (and a semantic accuracy of only $0 . 5 \%$ ) when tested on LTLRandom126. Testing the models OOD increases the gap between syntactic and semantic correctness dramatically. This underlines that the models learned the nature of the LTL semantics rather than the generator process. Note that the two distributions are very different.
|
| 124 |
+
|
| 125 |
+
Following these observations, we also tested the performance of our models on other patterns from the literature. We observe a higher semantic accuracy for our model trained on random formulas and a higher gap between semantic and syntactic accuracy for our model trained on pattern formulas:
|
| 126 |
+
|
| 127 |
+
<table><tr><td>Patterns</td><td>Number of Patterns</td><td>Trained on</td><td>Syn. Acc.</td><td>Sem. Acc.</td></tr><tr><td>dac (Dwyer et al., 1998) eh (Etessami & Holzmann,2000) hkrss (Holeek et al., 2004)</td><td>55 11 49</td><td>LTLRandom126 LTLRandom126 LTLRandom126</td><td>49.1% 81.8% 71.4%</td><td>81.8% 90.9% 83.7%</td></tr><tr><td>p (Pelanek,2007) eh (Etessami & Holzmann,2000) hkrss (Holecek et al.,2004) p (Pelanek,2007)</td><td>20 11 49 20</td><td>LTLRandom126 LTLPattern126 LTLPattern126 LTLPattern126</td><td>65.0% 0.0% 14.3% 10.0%</td><td>90.0% 36.4% 49.0% 60.0%</td></tr></table>
|
| 128 |
+
|
| 129 |
+
In a last experiment on LTL, we tested the performance of our models on handcrafted formulas. We observed that formulas with multiple until statements that describe overlapping intervals were the most challenging. This is no surprise as these formulas are the source of PSPACE-hardness of LTL.
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\begin{array} { c c } { { \begin{array} { r l } { - a \mathcal { U } b \wedge a \mathcal { U } \neg b } \end{array} } } & { { \begin{array} { r l } { ( a \wedge \neg b ) ( b ) ( t r u e ) ^ { \omega } } } & { { } } \\ { \& \mathrm { a : b : b : \left\{ 1 \right\} } } \end{array} } \end{array}
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
While the above formula can be solved by most models, when scaling this formula to four overlapping until intervals, all of our models fail: For example, a model trained on LTLRandom35 predicted the trace $( a \wedge b \wedge c ) ( a \wedge \neg b \wedge \neg c ) ( b \wedge c ) ( t r u e ) ^ { \omega }$ , which does not satisfy the LTL formula.
|
| 136 |
+
|
| 137 |
+
<table><tr><td>(aub^c) ^ (au-b∧c) ^ (aub^-c) ^ (au-b^ -c) )(a∧b∧c)(a∧-b∧-c)(b∧c)(true)ä</td></tr><tr><td>&&&Ua&bcUa&!bcUa&b!cUa&!b!c &&abc;&&a!b!c;&bc;1</td></tr></table>
|
| 138 |
+
|
| 139 |
+
# 5.3 PREDICTING ASSIGNMENTS FOR PROPOSITIONAL LOGIC
|
| 140 |
+
|
| 141 |
+
To show that the generalization to the semantic is not a specific property of LTL, we trained a Transformer to solve the assignment generation problem for propositional logic, which is a substantially different logical problem.
|
| 142 |
+
|
| 143 |
+
As a baseline for our generalization experiments on propositional logic, we trained and tested a Transformer model with the following hyperparameter on PropRandom35:
|
| 144 |
+
|
| 145 |
+
<table><tr><td>Embedding size</td><td>Layers</td><td>Heads</td><td>FC size</td><td>Batch Size Train Steps</td><td>Syn. Acc. Sem. Acc.</td></tr><tr><td>enc:128, dec:64</td><td>6</td><td>6</td><td>512 1024</td><td>50K</td><td>58.1% 96.5%</td></tr></table>
|
| 146 |
+
|
| 147 |
+
We observe a striking $3 8 . 4 \%$ gap between predictions that were syntactical matches of our DPLLbased generator and correct predictions of the Transformer. Only ${ \dot { 3 } } . 5 \%$ of the time, the Transformer outputs an incorrect assignment. Note that we allow the derived operators $\oplus$ and in these experiments, which succinctly represent complicated logical constructs.
|
| 148 |
+
|
| 149 |
+
The formula $b \lor \neg ( a \land d )$ occurs in our dataset PropRandom35 and its corresponding assignment is $\{ ( a , 0 ) \}$ . The Transformer, however, outputs $\mathtt { d 0 }$ , i.e., it goes with the assignment of setting $d$ to false, which is also a correct solution. A visualization of this example can be found in Appendix F. When the formulas get larger, the solutions where the Transformer differs from the DPLL algorithm accumulate. Consider, for example, the formula $\lnot b \lor ( e b \lor c \lor \lnot d ) \lor ( c \land ( b \oplus ( a \oplus \lnot d ) ) \lnot ( \lnot c $ $d ) \wedge ( a ( b \oplus ( b \oplus e ) ) )$ ), which is also in the dataset PropRandom35. The generator suggests the assignment $\{ ( a , 1 ) , ( c , 1 ) , ( d , 0 ) \}$ . The Transformer, however, outputs $e 0$ , i.e., the singleton assignment of setting $e$ to false, which turns out to be a (very small) solution as well.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 4: Syntactic and semantic accuracy of our best performing model (only trained on LTLRandom35 ) on LTLRandom50 . Dark green is syntactically correct; light green is semantically correct, orange is incorrect.
|
| 153 |
+
|
| 154 |
+
We achieved stable training in this experiment by setting the decoder embedding size to either 64 or even 32. Keeping the decoder embedding size at 128 led to very unstable training.
|
| 155 |
+
|
| 156 |
+
We also tested whether the generalization to the semantics is preserved when the Transformer encounters propositional formulas of a larger size than it ever saw during training. We, again, utilized the tree positional encoding. When challenged with formulas of size 35 to 50, our best performing model trained on PropRandom35 achieves a syntactic accuracy of $3 5 . 8 \%$ and a semantic accuracy of $8 6 . 1 \%$ . In comparison, without the tree positional encoding, the Transformer achieves a syntactic match of only $2 9 . 0 \%$ and an overall accuracy of only $7 5 . 7 \%$ . Note that both positional encodings work equally well when not considering larger formulas.
|
| 157 |
+
|
| 158 |
+
In a last experiment, we tested how the Transformer performs on more challenging propositional formulas in CNF. We thus trained a model on PropCNF 250, where it achieved a semantic accuracy of $6 5 . 1 \%$ and a syntactic accuracy of $5 6 . 6 \%$ . We observe a slightly lower gap compared to our LTL experiments. The Transformer, however, still deviates even on such formulas from the generator.
|
| 159 |
+
|
| 160 |
+
# 6 CONCLUSION
|
| 161 |
+
|
| 162 |
+
We trained a Transformer to predict solutions to linear-time temporal logical (LTL) formulas. We observed that our trained models evince powerful generalization properties, namely, the generalization to the semantics of the logic, and the generalization to larger formulas than seen during training. We showed that these generalizations do not depend on the underlying logical problem nor on the data generator. Regarding the performance of the trained models, we observed that they can compete with classical algorithms for generating solutions to LTL formulas. We built a test set that contained only formulas that were generated out of practical verification patterns, on which even our data generator timed out. Our best performing model, although it was trained on much smaller formulas, predicts correct traces $8 3 \%$ of the time.
|
| 163 |
+
|
| 164 |
+
The results of this paper suggest that deep learning can already augment combinatorial approaches in automatic verification and the broader formal methods community. With the results of this paper, we can, for example, derive novel algorithms for trace generation or satisfiability checking of LTL that first query a Transformer for trace predictions. These predictions can be checked efficiently. Classical methods can serve as a fall back or check partial solutions providing guidance to the Transformer. The potential that arises from the advent of deep learning in logical reasoning is immense. Deep learning holds the promise to empower researchers in the automated reasoning and formal methods communities to make bigger jumps in the development of new automated verification methods, but also brings new challenges, such as the acquisition of large amounts of data.
|
| 165 |
+
|
| 166 |
+
# ACKNOWLEDGEMENTS
|
| 167 |
+
|
| 168 |
+
We thank Christian Szegedy, Jesko Hecking-Harbusch, and Niklas Metzger for their valuable feedback on an earlier version of this paper.
|
| 169 |
+
|
| 170 |
+
# REFERENCES
|
| 171 |
+
|
| 172 |
+
Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. Learning to represent programs with graphs. arXiv preprint arXiv:1711.00740, 2017.
|
| 173 |
+
|
| 174 |
+
Gilles Audemard and Laurent Simon. On the glucose SAT solver. Int. J. Artif. Intell. Tools, 27 (1):1840001:1–1840001:25, 2018. doi: 10.1142/S0218213018400018. URL https://doi. org/10.1142/S0218213018400018.
|
| 175 |
+
|
| 176 |
+
Mislav Balunovic, Pavol Bielik, and Martin Vechev. Learning to solve smt formulas. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 10317– 10328. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/ 8233-learning-to-solve-smt-formulas.pdf.
|
| 177 |
+
|
| 178 |
+
Kshitij Bansal, Sarah M Loos, Markus N Rabe, Christian Szegedy, and Stewart Wilcox. HOList: An environment for machine learning of higher-order theorem proving. In arXiv preprint arXiv:1904.03241, 2019.
|
| 179 |
+
|
| 180 |
+
S. Bhatia, P. Kohli, and R. Singh. Neuro-symbolic program corrector for introductory programming assignments. In 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE), pp. 60–70, May 2018. doi: 10.1145/3180155.3180219.
|
| 181 |
+
|
| 182 |
+
Jasmin Christian Blanchette, Cezary Kaliszyk, Lawrence C Paulson, and Josef Urban. Hammering towards QED. Journal of Formalized Reasoning, 9(1):101–148, 2016.
|
| 183 |
+
|
| 184 |
+
Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. 2020.
|
| 185 |
+
|
| 186 |
+
Paul Cairns. Informalising formal mathematics: Searching the mizar library with latent semantics. In International Conference on Mathematical Knowledge Management, pp. 58–72. Springer, 2004.
|
| 187 |
+
|
| 188 |
+
Tommaso Dreossi, Alexandre Donze, and Sanjit A Seshia. Compositional falsification of cyber- ´ physical systems with machine learning components. Journal of Automated Reasoning, 63(4): 1031–1053, 2019.
|
| 189 |
+
|
| 190 |
+
Alexandre Duret-Lutz, Alexandre Lewkowicz, Amaury Fauchille, Thibaud Michaud, Etienne Renault, and Laurent Xu. Spot 2.0—a framework for ltl and $\omega$ -automata manipulation. In International Symposium on Automated Technology for Verification and Analysis, pp. 122–129. Springer, 2016.
|
| 191 |
+
|
| 192 |
+
Matthew B. Dwyer, George S. Avrunin, and James C. Corbett. Property specification patterns for finite-state verification. In Mark A. Ardis and Joanne M. Atlee (eds.), Proceedings of the Second Workshop on Formal Methods in Software Practice, March 4-5, 1998, Clearwater Beach, Florida, USA, pp. 7–15. ACM, 1998. doi: 10.1145/298595.298598. URL https://doi.org/10. 1145/298595.298598.
|
| 193 |
+
|
| 194 |
+
Kousha Etessami and Gerard J. Holzmann. Optimizing buchi automata. In Catuscia Palamidessi ¨ (ed.), CONCUR 2000 - Concurrency Theory, 11th International Conference, University Park, PA, USA, August 22-25, 2000, Proceedings, volume 1877 of Lecture Notes in Computer Science, pp. 153–167. Springer, 2000. doi: 10.1007/3-540-44618-4\ 13. URL https://doi.org/10. 1007/3-540-44618-4_13.
|
| 195 |
+
|
| 196 |
+
Richard Evans, David Saxton, David Amos, Pushmeet Kohli, and Edward Grefenstette. Can neural networks understand logical entailment? arXiv preprint arXiv:1802.08535, 2018.
|
| 197 |
+
|
| 198 |
+
Patrick Fernandes, Miltiadis Allamanis, and Marc Brockschmidt. Structured neural summarization. arXiv preprint arXiv:1811.01824, 2018.
|
| 199 |
+
|
| 200 |
+
Thibault Gauthier, Cezary Kaliszyk, and Josef Urban. Tactictoe: Learning to reason with hol4 tactics. arXiv preprint arXiv:1804.00595, 2018.
|
| 201 |
+
|
| 202 |
+
Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri, and Martin Vechev. Ai2: Safety and robustness certification of neural networks with abstract interpretation. In 2018 IEEE Symposium on Security and Privacy (SP), pp. 3–18. IEEE, 2018.
|
| 203 |
+
|
| 204 |
+
Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1263–1272. JMLR. org, 2017.
|
| 205 |
+
|
| 206 |
+
Rahul Gupta, Soham Pal, Aditya Kanade, and Shirish Shevade. Deepfix: Fixing common C language errors by deep learning. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 207 |
+
|
| 208 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pp. 1026–1034, 2015. doi: 10.1109/ICCV.2015.123. URL https://doi.org/10.1109/ICCV.2015.123.
|
| 209 |
+
|
| 210 |
+
Vincent J. Hellendoorn, Charles Sutton, Rishabh Singh, and Petros Maniatis. Global relational models of source code. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ B1lnbRNtwr.
|
| 211 |
+
|
| 212 |
+
Jan Holecek, Tom ˇ a´s Kratochv ˇ ´ıla, Vojtech ˇ Reh ˇ ak, David ´ Safr ˇ anek, Pavel ´ Sime ˇ cek, et al. Verification ˇ results in liberouter project, 2004.
|
| 213 |
+
|
| 214 |
+
Daniel Huang, Prafulla Dhariwal, Dawn Song, and Ilya Sutskever. Gamepad: A learning environment for theorem proving. arXiv preprint arXiv:1806.00608, 2018.
|
| 215 |
+
|
| 216 |
+
Xiaowei Huang, Marta Kwiatkowska, Sen Wang, and Min Wu. Safety verification of deep neural networks. In International Conference on Computer Aided Verification, pp. 3–29. Springer, 2017.
|
| 217 |
+
|
| 218 |
+
IEEE-Commission et al. Ieee standard for property specification language (psl). IEEE Std 1850- 2005, 2005.
|
| 219 |
+
|
| 220 |
+
Cezary Kaliszyk and Josef Urban. Learning-assisted automated reasoning with flyspeck. Journal of Automated Reasoning, 53(2):173–213, 2014.
|
| 221 |
+
|
| 222 |
+
Cezary Kaliszyk, Franc¸ois Chollet, and Christian Szegedy. HolStep: A Machine Learning Dataset for Higher-order Logic Theorem Proving. In Proceedings of International Conference on Learning Representations (ICLR), 2017.
|
| 223 |
+
|
| 224 |
+
Guillaume Lample and Franc¸ois Charton. Deep learning for symbolic mathematics. In ICLR, 2020.
|
| 225 |
+
|
| 226 |
+
Gil Lederman, Markus N. Rabe, Edward A. Lee, and Sanjit A. Seshia. Learning heuristics for quantified boolean formulas through deep reinforcement learning. 2020. URL http://arxiv. org/abs/1807.08058.
|
| 227 |
+
|
| 228 |
+
Dennis Lee, Christian Szegedy, Markus N. Rabe, Sarah M. Loos, and Kshitij Bansal. Mathematical reasoning in latent space. 2020.
|
| 229 |
+
|
| 230 |
+
Jianwen Li, Lijun Zhang, Geguang Pu, Moshe Y. Vardi, and Jifeng He. LTL satisfiability checking revisited. In Cesar S ´ anchez, Kristen Brent Venable, and Esteban Zim ´ anyi (eds.), ´ 2013 20th International Symposium on Temporal Representation and Reasoning, Pensacola, FL, USA, September 26-28, 2013, pp. 91–98. IEEE Computer Society, 2013. doi: 10.1109/TIME.2013.19. URL https://doi.org/10.1109/TIME.2013.19.
|
| 231 |
+
|
| 232 |
+
Jianwen Li, Yinbo Yao, Geguang Pu, Lijun Zhang, and Jifeng He. Aalta: an ltl satisfiability checker over infinite/finite traces. In Proceedings of the 22nd ACM SIGSOFT international symposium on foundations of software engineering, pp. 731–734, 2014.
|
| 233 |
+
|
| 234 |
+
Wenda Li, Lei Yu, Yuhuai Wu, and Lawrence C. Paulson. Modelling high-level mathematical reasoning in mechanised declarative proofs. arXiv preprint arXiv:2006.09265, 2020.
|
| 235 |
+
|
| 236 |
+
Yaguang Li, Rose Yu, Cyrus Shahabi, and Yan Liu. Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. arXiv preprint arXiv:1707.01926, 2017.
|
| 237 |
+
|
| 238 |
+
Sarah Loos, Geoffrey Irving, Christian Szegedy, and Cezary Kaliszyk. Deep network guided proof search. In LPAR, 2017.
|
| 239 |
+
|
| 240 |
+
Jia Meng and Lawrence C Paulson. Lightweight relevance filtering for machine-generated resolution problems. Journal of Applied Logic, 7(1):41–57, 2009.
|
| 241 |
+
|
| 242 |
+
Matej Moravc´ık, Martin Schmid, Neil Burch, Viliam Lisy, Dustin Morrill, Nolan Bard, Trevor ´ Davis, Kevin Waugh, Michael Johanson, and Michael H. Bowling. Deepstack: Expert-level artificial intelligence in no-limit poker. CoRR, abs/1701.01724, 2017. URL http://arxiv. org/abs/1701.01724.
|
| 243 |
+
|
| 244 |
+
Aditya Paliwal, Sarah M. Loos, Markus N. Rabe, Kshitij Bansal, and Christian Szegedy. Graph representations for higher-order logic and theorem proving. In AAAI, 2020.
|
| 245 |
+
|
| 246 |
+
Radek Pelanek. BEEM: benchmarks for explicit model checkers. In Dragan Bosnacki and Stefan ´ Edelkamp (eds.), Model Checking Software, 14th International SPIN Workshop, Berlin, Germany, July 1-3, 2007, Proceedings, volume 4595 of Lecture Notes in Computer Science, pp. 263–267. Springer, 2007. doi: 10.1007/978-3-540-73370-6\ 17. URL https://doi.org/10.1007/ 978-3-540-73370-6_17.
|
| 247 |
+
|
| 248 |
+
Chris Piech, Jonathan Huang, Andy Nguyen, Mike Phulsuksombati, Mehran Sahami, and Leonidas Guibas. Learning program embeddings to propagate feedback on student code. In International Conference on Machine Learning, pp. 1093–1102, 2015.
|
| 249 |
+
|
| 250 |
+
Amir Pnueli. The temporal logic of programs. In 18th Annual Symposium on Foundations of Computer Science, Providence, Rhode Island, USA, 31 October - 1 November 1977, pp. 46–57, 1977. doi: 10.1109/SFCS.1977.32. URL https://doi.org/10.1109/SFCS.1977.32.
|
| 251 |
+
|
| 252 |
+
Stanislas Polu and Ilya Sutskever. Generative language modeling for automated theorem proving, 2020.
|
| 253 |
+
|
| 254 |
+
Markus N. Rabe, Dennis Lee, Kshitij Bansal, and Christian Szegedy. Mathematical reasoning via self-supervised skip-tree training. 2020.
|
| 255 |
+
|
| 256 |
+
Kristin Y Rozier and Moshe Y Vardi. Ltl satisfiability checking. In International SPIN Workshop on Model Checking of Software, pp. 149–167. Springer, 2007.
|
| 257 |
+
|
| 258 |
+
David Saxton, Edward Grefenstette, Felix Hill, and Pushmeet Kohli. Analysing mathematical reasoning abilities of neural models. CoRR, abs/1904.01557, 2019. URL http://arxiv.org/ abs/1904.01557.
|
| 259 |
+
|
| 260 |
+
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008.
|
| 261 |
+
|
| 262 |
+
Imanol Schlag, Paul Smolensky, Roland Fernandez, Nebojsa Jojic, Jurgen Schmidhuber, and Jian- ¨ feng Gao. Enhancing the transformer with explicit relational encoding for math problem solving. arXiv preprint arXiv:1910.06611, 2019.
|
| 263 |
+
|
| 264 |
+
Stephan Schulz. System description: E 1.8. In International Conference on Logic for Programming Artificial Intelligence and Reasoning, pp. 735–743. Springer, 2013.
|
| 265 |
+
|
| 266 |
+
Viktor Schuppan and Luthfi Darmawan. Evaluating ltl satisfiability solvers. In International Symposium on Automated Technology for Verification and Analysis, pp. 397–413. Springer, 2011.
|
| 267 |
+
|
| 268 |
+
Stefan Schwendimann. A new one-pass tableau calculus for pltl. In International Conference on Automated Reasoning with Analytic Tableaux and Related Methods, pp. 277–291. Springer, 1998.
|
| 269 |
+
|
| 270 |
+
Daniel Selsam and Nikolaj Bjørner. Guiding high-performance SAT solvers with unsat-core predictions. In Theory and Applications of Satisfiability Testing - SAT 2019 - 22nd International Conference, SAT 2019, Lisbon, Portugal, July 9-12, 2019, Proceedings, pp. 336– 353, 2019. doi: 10.1007/978-3-030-24258-9\ 24. URL https://doi.org/10.1007/ 978-3-030-24258-9_24.
|
| 271 |
+
|
| 272 |
+
Daniel Selsam, Matthew Lamm, Benedikt Bunz, Percy Liang, Leonardo de Moura, and David L. ¨ Dill. Learning a SAT solver from single-bit supervision. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HJMC_iA5tm.
|
| 273 |
+
|
| 274 |
+
Sanjit A. Seshia and Dorsa Sadigh. Towards verified artificial intelligence. CoRR, abs/1606.08514, 2016. URL http://arxiv.org/abs/1606.08514.
|
| 275 |
+
|
| 276 |
+
Sanjit A Seshia, Ankush Desai, Tommaso Dreossi, Daniel J Fremont, Shromona Ghosh, Edward Kim, Sumukh Shivakumar, Marcell Vazquez-Chanlatte, and Xiangyu Yue. Formal specification for deep neural networks. In International Symposium on Automated Technology for Verification and Analysis, pp. 20–34. Springer, 2018.
|
| 277 |
+
|
| 278 |
+
Vighnesh Leonardo Shiv and Chris Quirk. Novel positional encodings to enable tree-based transformers. In NeurIPS 2019, 2019. URL https://www.microsoft.com/en-us/research/publication/ novel-positional-encodings-to-enable-tree-based-transformers/.
|
| 279 |
+
|
| 280 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354–359, 2017.
|
| 281 |
+
|
| 282 |
+
Gagandeep Singh, Timon Gehr, Markus Puschel, and Martin Vechev. An abstract domain for cer- ¨ tifying neural networks. Proceedings of the ACM on Programming Languages, 3(POPL):1–30, 2019.
|
| 283 |
+
|
| 284 |
+
Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2014, Columbus, OH, USA, June 23-28, 2014, pp. 1701–1708, 2014. doi: 10.1109/CVPR.2014.220. URL https://doi.org/10.1109/CVPR.2014.220.
|
| 285 |
+
|
| 286 |
+
Josef Urban. MPTP–motivation, implementation, first experiments. Journal of Automated Reasoning, 33(3-4):319–339, 2004.
|
| 287 |
+
|
| 288 |
+
Josef Urban. Malarea: a metasystem for automated reasoning in large theories. ESARLT, 257, 2007.
|
| 289 |
+
|
| 290 |
+
Josef Urban and Jan Jakubuv. First neural conjecturing datasets and experiments. In ˚ Conference on Intelligent Computer Mathematics, 2020.
|
| 291 |
+
|
| 292 |
+
Josef Urban, Geoff Sutcliffe, Petr Pudlak, and Ji ´ ˇr´ı Vyskocil. Malarea sg1-machine learner for auto- ˇ mated reasoning with semantic guidance. In International Joint Conference on Automated Reasoning, pp. 441–456. Springer, 2008.
|
| 293 |
+
|
| 294 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pp. 5998–6008, 2017. URL http: //papers.nips.cc/paper/7181-attention-is-all-you-need.
|
| 295 |
+
|
| 296 |
+
Marcell Vazquez-Chanlatte. mvcisback/py-aiger, August 2018. URL https://doi.org/10. 5281/zenodo.1326224.
|
| 297 |
+
|
| 298 |
+
Ke Wang, Rishabh Singh, and Zhendong Su. Dynamic neural program embedding for program repair. In ICLR, 2018.
|
| 299 |
+
|
| 300 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. Google’s neural machine translation system: Bridging the gap between human and machine translation. CoRR, abs/1609.08144, 2016. URL http://arxiv.org/abs/1609.08144.
|
| 301 |
+
|
| 302 |
+
Yuhuai Wu, Albert Jiang, Jimmy Ba, and Roger Grosse. INT: An Inequality Benchmark for Evaluating Generalization in Theorem Proving. arXiv preprint arXiv:2007.02924, 2020.
|
| 303 |
+
|
| 304 |
+
Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S Yu. A comprehensive survey on graph neural networks. arXiv preprint arXiv:1901.00596, 2019.
|
| 305 |
+
|
| 306 |
+
Kaiyu Yang and Jia Deng. Learning to prove theorems via interacting with proof assistants. arXiv preprint arXiv:1905.09381, 2019.
|
| 307 |
+
|
| 308 |
+
# APPENDIX
|
| 309 |
+
|
| 310 |
+
# A LINEAR-TIME TEMPORAL LOGIC (LTL)
|
| 311 |
+
|
| 312 |
+
In this section, we provide the formal syntax and semantics of Linear-time Temporal Logic (LTL). The formal syntax of LTL is given by the following grammar:
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\varphi : = p \mid \neg \varphi \mid \varphi \land \varphi \mid \bigcirc \varphi \mid \varphi \mathcal { U } \varphi ,
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
where $p \in A P$ is an atomic proposition. Let $A P$ be a set of atomic propositions. A (explicit) trace $t$ is an infinite sequence over subsets of the atomic propositions. We define the set of traces $T R : = ( 2 ^ { A P } ) ^ { \omega }$ . We use the following notation to manipulate traces: Let $t ~ \in ~ T R$ be a trace and $i \in \mathbb N$ be a natural number. With $t [ i ]$ we denote the set of propositions at $i$ -th position of $t$ . Therefore, $t [ 0 ]$ represents the starting element of the trace. Let $j \in \mathbb N$ and $j \geq i$ . Then $t [ i , j ]$ denotes the sequence $t$ [i] $t [ i + 1 ] \ldots i [ j - 1 ] \ : t [ j ]$ and $t [ i , \infty ]$ denotes the infinite suffix of $t$ starting at position $i$ .
|
| 319 |
+
|
| 320 |
+
Let $p \in A P$ and $t \in T R$ . The semantics of an LTL formula is defined as the smallest relation $\vDash$ that satisfies the following conditions:
|
| 321 |
+
|
| 322 |
+
$\begin{array} { r l r l } & { t = p } & & { \mathrm { i f f } \qquad p \in t [ 0 ] } \\ & { t \mathbin { | = \neg { \varphi } } } & & { \mathrm { i f f } \qquad t \mathbin { | \neq \varphi } } \\ & { t \mathbin { | = \varphi _ { 1 } \wedge \varphi _ { 2 } \qquad } } & & { \mathrm { i f f } \qquad t \mathbin { | = \varphi _ { 1 } \mathrm { ~ a n d ~ } t | } \mathop { | = \varphi _ { 2 } } } \\ & { t \mathbin { | = \bigcirc \varphi } } & & { \mathrm { i f f } \qquad t [ 1 , \infty ] \mathbin { | = \varphi } } \\ & { t \mathbin { | = \varphi _ { 1 } \mathcal { U } \varphi _ { 2 } \qquad } } & & { \mathrm { i f f } \qquad \mathrm { t h e r e ~ e x i s t s ~ } i \ge 0 : t } \end{array}$ $i \geq 0 : t [ i , \infty ] \models \varphi _ { 2 }$ and for all $0 \le j < i$ we have $t [ j , \infty ] \ v = \varphi _ { 1 }$
|
| 323 |
+
|
| 324 |
+
There are several derived operators, such as $\bigcirc \varphi \equiv t r u e l l \varphi$ and $\sqcup \varphi \equiv \lnot \bigcirc \lnot \varphi . \bigotimes \varphi$ states that $\varphi$ will eventually hold in the future and $\sqsubset \varphi$ states that $\varphi$ holds globally. Operators can be nested: $\square \bigcirc \varphi$ , for example, states that $\varphi$ has to occur infinitely often.
|
| 325 |
+
|
| 326 |
+
# B SIZE DISTRIBUTION IN THE DATASETS
|
| 327 |
+
|
| 328 |
+
In this section, we provide insight into the size distribution of our datasets. Figure 5 shows the size distribution of the formulas in our dataset LTLPattern126 .
|
| 329 |
+
|
| 330 |
+
Figure 6 shows the size distribution of our generated formulas and their traces in the dataset LTLRandom35. Table 1 shows three randomly drawn example instances of the dataset LTLRandom35.
|
| 331 |
+
|
| 332 |
+
Lastly, Figure 7 shows the size distribution of formulas in our dataset LTLUnsolved 254.
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 5: Size distributions in the LTLPattern126 test set: on the $\mathbf { X }$ -axis is the size of the formulas; on the y-axis the number of formulas.
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 6: Size distributions in the LTLRandom35 training set: on the $\mathbf { X }$ -axis is the size of the formulas/traces; on the y-axis the number of formulas/traces.
|
| 339 |
+
|
| 340 |
+
Table 1: Three random examples from LTLRandom35 training set. The first line shows the LTL formula and the symbolic trace in mathematical notation. The second line shows the syntactic representation (in Polish notation):
|
| 341 |
+
|
| 342 |
+
<table><tr><td rowspan=1 colspan=1>LTL formula</td><td rowspan=1 colspan=1>satisfying symbolic trace</td></tr><tr><td rowspan=1 colspan=1>O((du c)uOOd) ^ O(b^ -(-duc))&XUUdcXXdX&b!U!dc</td><td rowspan=1 colspan=1>true (b^-c^ -d) (-c^d)d(true)ω1;&&b!c!d;&!cd;d;{1}</td></tr><tr><td rowspan=1 colspan=1>-O(Oe ^ (trueub) ^Oc)uc)!XU&&XeU1bXcc</td><td rowspan=1 colspan=1>true(-b^-c)(-b)w1;&!b!c;{!b}</td></tr><tr><td rowspan=1 colspan=1>O-((-c∧d)uOd)X!U&!cdXd</td><td rowspan=1 colspan=1>true (cV-d)(-d) (true)w1;|c!d;!d;{1}</td></tr></table>
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure 7: Size distributions in the LTLUnsolved254 test set: on the $\mathbf { X }$ -axis is the size of the formulas; on the y-axis the number of formulas.
|
| 346 |
+
|
| 347 |
+
# C HYPERPARAMETER ANALYSIS
|
| 348 |
+
|
| 349 |
+
Table 2 shows the effect of the most significant parameters on the performance of Transformers. The performance largely benefits from an increased number of layers, with 8 yielding the best results. Increasing the number further, even with much more training time, did not result in better or even led to worse results. A slightly less important role plays the number of heads and the dimension of the intermediate fully-connected feed-forward networks (FC). While a certain FC size is important, increasing it alone will not improve results. Changing the number of heads alone has also almost no impact on performance. Increasing both simultaneously, however, will result in a small gain.
|
| 350 |
+
|
| 351 |
+
Table 2: Syntactic accuracy and semantic accuracy of different Transformers, tested on LTLRandom35: Layers refer to the size of the encoder and decoder stacks; Heads refer to the number of attention heads; FC size refers to the size of the fully-connected neural networks inside the encoder and decoders.
|
| 352 |
+
|
| 353 |
+
<table><tr><td>Embedding size</td><td>Layers</td><td>Heads</td><td>FC size</td><td>Batch Size</td><td>Train Steps</td><td>Syn. Acc.</td><td>Sem. Acc.</td></tr><tr><td>128</td><td>3</td><td>4</td><td>512</td><td>512</td><td>45K</td><td>78.0%</td><td>97.1%</td></tr><tr><td>128</td><td>5</td><td>2</td><td>512</td><td>512</td><td>45K</td><td>80.4%</td><td>97.4%</td></tr><tr><td>128</td><td>5</td><td>4</td><td>256</td><td>512</td><td>45K</td><td>81.0%</td><td>97.4%</td></tr><tr><td>128</td><td>5</td><td>4</td><td>512</td><td>512</td><td>45K</td><td>82.0%</td><td>97.9%</td></tr><tr><td>128</td><td>5</td><td>4</td><td>1024</td><td>512</td><td>45K</td><td>80.3%</td><td>97.3%</td></tr><tr><td>128</td><td>5</td><td>6</td><td>1024</td><td>512</td><td>45K</td><td>81.8%</td><td>97.7%</td></tr><tr><td>128</td><td>5</td><td>8</td><td>512</td><td>512</td><td>45K</td><td>82.0%</td><td>97.8%</td></tr><tr><td>128</td><td>5</td><td>8</td><td>1024</td><td>512</td><td>45K</td><td>82.5%</td><td>97.9%</td></tr><tr><td>128</td><td>5</td><td>8</td><td>1500</td><td>512</td><td>45K</td><td>82.6%</td><td>97.8%</td></tr><tr><td>128</td><td>5</td><td>12</td><td>1024</td><td>512</td><td>45K</td><td>81.9%</td><td>97.5%</td></tr><tr><td>128</td><td>8</td><td>4</td><td>512</td><td>512</td><td>45K</td><td>83.2%</td><td>98.3%</td></tr><tr><td>128</td><td>8</td><td>8</td><td>1024</td><td>768</td><td>50K</td><td>83.8%</td><td>98.5 %</td></tr><tr><td>128</td><td>10</td><td>4</td><td>512</td><td>512</td><td>75K</td><td>82.9%</td><td>97.6%</td></tr><tr><td>256</td><td>5</td><td>4</td><td>512</td><td>512</td><td>45K</td><td>82.3%</td><td>97.9%</td></tr></table>
|
| 354 |
+
|
| 355 |
+
This seems reasonable, since more heads can provide more distinct information to the subsequent processing by the fully-connected feed-forward network. Increasing the embeddings size from 128 to 256 very slightly improves the syntactic accuracy. But likewise it also degrades the semantic accuracy, so we therefore stuck with the former setting.
|
| 356 |
+
|
| 357 |
+
# D ACCURACY DURING TRAINING
|
| 358 |
+
|
| 359 |
+
In Figure 8 we show the evolution of both the syntactic accuracy and the semantic accuracy during the training process. Note the significant difference right from the beginning. This demonstrates the importance of a suitable performance measure when evaluating machine learning algorithms on logical reasoning tasks.
|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
Figure 8: Syntactic accuracy (blue) and semantic accuracy (red) of our best performing model, evaluated on a subset of 5K samples of LTLRandom35 per epoch.
|
| 363 |
+
|
| 364 |
+
# E DIFFERENT POSITIONAL ENCODINGS
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 9: Performance of our best model (only trained on LTLRandom35) on LTLRandom50 with a standard positional encoding (top) and a tree positional encoding (bottom). The syntactic accuracy is displayed in green, the semantic accuracy in light green and the incorrect predictions in orange. The shaded area indicates the formula sizes the model was not trained on.
|
| 368 |
+
|
| 369 |
+
# F HANDCRAFTED EXAMPLES
|
| 370 |
+
|
| 371 |
+

|
| 372 |
+
Figure 10: Self-attention of the example propositional formula $b \lor \neg ( a \land d )$ in dataset PropRandom35 (left). Encoder-decoder-attention of the example LTL formula $( b \mathcal { U } a ) \wedge ( a \mathcal { U } \neg a )$ in dataset LTLRandom35 (right).
|
| 373 |
+
|
| 374 |
+
The LTL formula $( b \mathcal { U } a ) \wedge ( a \mathcal { U } \neg a )$ states that $b$ has to hold along the trace until $a$ holds and $a$ has to hold until $a$ does not hold anymore. The automaton-based generator suggests the trace $( \neg a \land$ b) $\textit { a } ( t r u e ) ^ { \omega }$ , i.e., to first satisfy the second until by immediately disallowing $a$ . The satisfaction of the first until is then postponed to the second position of trace, which forces $b$ to hold on the first position. The Transformer, however, chooses the following more general trace $a \left( \neg a \right) \left( t r u e \right) ^ { \omega }$ , by satisfying the until operators in order (see Figure 10).
|
md/train/eLfqMl3z3lq/eLfqMl3z3lq.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ADVERSARIAL SCORE MATCHING AND IMPROVED SAMPLING FOR IMAGE GENERATION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Denoising Score Matching with Annealed Langevin Sampling (DSM-ALS) has recently found success in generative modeling. The approach works by first training a neural network to estimate the score of a distribution, and then using Langevin dynamics to sample from the data distribution assumed by the score network. Despite the convincing visual quality of samples, this method appears to perform worse than Generative Adversarial Networks (GANs) under the Fréchet Inception Distance, a standard metric for generative models. We show that this apparent gap vanishes when denoising the final Langevin samples using the score network. In addition, we propose two improvements to DSM-ALS: 1) Consistent Annealed Sampling as a more stable alternative to Annealed Langevin Sampling, and 2) a hybrid training formulation, composed of both Denoising Score Matching and adversarial objectives. By combining these two techniques and exploring different network architectures, we elevate score matching methods and obtain results competitive with state-of-the-art image generation on CIFAR-10.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Song and Ermon (2019) recently proposed a novel method of generating samples from a target distribution through a combination of Denoising Score Matching (DSM) (Hyvärinen, 2005; Vincent, 2011; Raphan and Simoncelli, 2011) and Annealed Langevin Sampling (ALS) (Welling and Teh, 2011; Roberts et al., 1996). Since convergence to the distribution is guaranteed by the ALS, their approach (DSM-ALS) produces high-quality samples and guarantees high diversity. Though, this comes at the cost of requiring an iterative process during sampling, contrary to other generative methods. These generative methods can notably be used to diverse tasks like colorization, image restoration and image inpainting (Song and Ermon, 2019; Kadkhodaie and Simoncelli, 2020).
|
| 12 |
+
|
| 13 |
+
Song and Ermon (2020) further improved their approach by increasing the stability of score matching training and proposing theoretically sound choices of hyperparameters. They also scaled their approach to higher-resolution images and showed that DSM-ALS is competitive with other generative models. Song and Ermon (2020) observed that the images produced by their improved model were more visually appealing than the ones from their original work; however, the reported Fréchet Inception Distance (FID) (Heusel et al., 2017) did not correlate with this improvement.
|
| 14 |
+
|
| 15 |
+
Although DSM-ALS is gaining traction, Generative adversarial networks (GANs) (Goodfellow et al., 2014) remain the leading approach to generative modeling. GANs are a very popular class of generative models; they have been successfully applied to image generation (Brock et al., 2018; Karras et al., 2017; 2019; 2020) and have subsequently spawned a wealth of variants (Radford et al., 2015a; Miyato et al., 2018; Jolicoeur-Martineau, 2018; Zhang et al., 2019). The idea behind this method is to train a Discriminator $( D )$ to correctly distinguish real samples from fake samples generated by a second agent, known as the Generator $( G )$ . GANs excel at generating high-quality samples as the discriminator captures features that make an image plausible, while the generator learns to emulate them.
|
| 16 |
+
|
| 17 |
+
Still, GANs often have trouble producing data from all possible modes, which limits the diversity of the generated samples. A wide variety of tricks have been developed to address this issue in GANs (Kodali et al., 2017; Gulrajani et al., 2017; Arjovsky et al., 2017; Miyato et al., 2018; JolicoeurMartineau and Mitliagkas, 2019), though it remains an issue to this day. DSM-ALS, on the other hand, does not suffer from that problem since ALS allows for sampling from the full distribution captured by the score network. Nevertheless, the perceptual quality of DSM-ALS higher-resolution images has so far been inferior to that of GAN-generated images. Generative modeling has since seen some incredible work from Ho et al. (2020), who achieved exceptionally low (better) FID on image generation tasks. Their approach showcased a diffusion-based method (Sohl-Dickstein et al., 2015; Goyal et al., 2017) that shares close ties with DSM-ALS, and additionally proposed a convincing network architecture derived from Salimans et al. (2017).
|
| 18 |
+
|
| 19 |
+
In this paper, after introducing the necessary technical background in the next section, we build upon the work of Song and Ermon (2020) and propose improvements based on theoretical analyses both at training and sampling time. Our contributions are as follows:
|
| 20 |
+
|
| 21 |
+
• We propose Consistent Annealed Sampling (CAS) as a more stable alternative to ALS, correcting inconsistencies relating to the scaling of the added noise; • We show how to recover the expected denoised sample (EDS) and demonstrate its unequivocal benefits w.r.t the FID. Notably, we show how to resolve the mismatch observed in DSM-ALS between the visual quality of generated images and its high (worse) FID; We propose to further exploit the EDS through a hybrid objective function, combining GAN and Denoising Score Matching objectives, thereby encouraging the EDS of the score network to be as realistic as possible.
|
| 22 |
+
|
| 23 |
+
In addition, we show that the network architecture used used by Ho et al. (2020) significantly improves sample quality over the RefineNet (Lin et al., 2017a) architecture used by Song and Ermon (2020). In an ablation study performed on CIFAR-10 and LSUN-church, we demonstrate how these contributions bring DSM-ALS in range of the state-of-the-art for image generation tasks w.r.t. the FID. The code to replicate our experiments is publicly available at [Available in supplementary material].
|
| 24 |
+
|
| 25 |
+
# 2 BACKGROUND
|
| 26 |
+
|
| 27 |
+
# 2.1 DENOISING SCORE MATCHING
|
| 28 |
+
|
| 29 |
+
Denoising Score Matching (DSM) (Hyvärinen, 2005) consists of training a score network to approximate the gradient of the log density of a certain distribution $( \nabla _ { \pmb { x } } \log p ( \pmb { x } ) )$ , referred to as the score function. This is achieved by training the network to approximate a noisy surrogate of $p$ at multiple levels of Gaussian noise corruption (Vincent, 2011). The score network $s$ , parametrized by $\theta$ and conditioned on the noise level $\sigma$ , is tasked to minimize the following loss:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\frac { 1 } { 2 } \mathbb { E } _ { p ( \tilde { \pmb { x } } , \pmb { x } , \sigma ) } \left[ \left| \left| \sigma s _ { \theta } ( \tilde { \pmb { x } } , \sigma ) + \frac { \tilde { \pmb { x } } - \pmb { x } } { \sigma } \right| \right| _ { 2 } ^ { 2 } \right] ,
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
where $p ( \tilde { \pmb { x } } , \pmb { x } , \sigma ) = q _ { \sigma } ( \tilde { \pmb { x } } | \pmb { x } ) p ( \pmb { x } ) p ( \sigma )$ . We define further $q _ { \sigma } ( \tilde { { \pmb x } } | { \pmb x } ) = \mathcal { N } ( \tilde { { \pmb x } } | { \pmb x } , \sigma ^ { 2 } I )$ the corrupted data distribution, $p ( { \pmb x } )$ the training data distribution, and $p ( \sigma )$ the uniform distribution over a set $\{ \sigma _ { i } \}$ corresponding to different levels of noise. In practice, this set is defined as a geometric progression between $\sigma _ { 1 }$ and $\sigma _ { L }$ (with $L$ chosen according to some computational budget):
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\left\{ \sigma _ { i } \right\} _ { i = 1 } ^ { L } = \left\{ \gamma ^ { i } \sigma _ { 1 } \ { \left| \ { i \in \left\{ 0 , \ldots , L - 1 \right\} } , \gamma \triangleq { \frac { \sigma _ { 2 } } { \sigma _ { 1 } } } = \ldots = \left( { \frac { \sigma _ { L } } { \sigma _ { 1 } } } \right) ^ { \frac { 1 } { L - 1 } } < 1 \right. \right\} } .
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
Rather than having to learn a different score function for every $\sigma _ { i }$ , one can train an unconditional score network by defining $s _ { \theta } ( \tilde { \pmb { x } } , \sigma _ { i } ) = s _ { \theta } ( \tilde { \pmb { x } } ) / \sigma _ { i }$ , and then minimizing Eq. 1. While unconditional networks are less heavy computationally, it remains an open question whether conditioning helps performance. Li et al. (2019) and Song and Ermon (2020) found that the unconditional network produced better samples, while Ho et al. (2020) obtained better results than both of them using a conditional network. Additionally, the denoising autoencoder described in Lim et al. (2020) gives evidence supporting the benefits of conditioning when the noise becomes small (also see App. D and E for a theoretical discussion of the difference). While our experiments are conducted with unconditional networks, we believe our techniques can be straightforwardly applied to conditional networks; we leave that extension for future work.
|
| 42 |
+
|
| 43 |
+
Given a score function, one can use Langevin dynamics (or Langevin sampling) (Welling and Teh, 2011) to sample from the corresponding probability distribution. In practice, the score function is generally unknown and estimated through a score network trained to minimize Eq. 1. Song and Ermon (2019) showed that Langevin sampling has trouble exploring the full support of the distribution when the modes are too far apart and proposed Annealed Langevin Sampling (ALS) as a solution. ALS starts sampling with a large noise level and progressively anneals it down to a value close to 0, ensuring both proper mode coverage and convergence to the data distribution. Its precise description is shown in Algorithm 1.
|
| 44 |
+
|
| 45 |
+
# Algorithm 1 Annealed Langevin Sampling
|
| 46 |
+
|
| 47 |
+
# Algorithm 2 Consistent Annealed Sampling
|
| 48 |
+
|
| 49 |
+
Require: .
|
| 50 |
+
1: Initialize $_ { \textbf { \em x } }$
|
| 51 |
+
2: for $i \gets 1$ to $L$ do
|
| 52 |
+
3: $\alpha _ { i } \epsilon \sigma _ { i } ^ { 2 } / \sigma _ { L } ^ { 2 }$
|
| 53 |
+
4: for $n _ { \sigma }$ steps do
|
| 54 |
+
5: Draw $\bar { z } \sim \mathcal { N } ( 0 , I )$
|
| 55 |
+
6: ${ \pmb x } { \pmb x } + \alpha _ { i } s _ { \theta } ( { \pmb x } , \sigma _ { i } ) + \sqrt { 2 \alpha _ { i } } z$ return x
|
| 56 |
+
Require: $s _ { \theta } , \{ \sigma _ { i } \} _ { i = 1 } ^ { L } , \gamma , \epsilon , \sigma _ { L + 1 } = 0$
|
| 57 |
+
1: Initialize x
|
| 58 |
+
2: $\beta \sqrt { 1 - ( 1 - \epsilon / \sigma _ { L } ^ { 2 } ) ^ { 2 } / \gamma ^ { 2 } }$
|
| 59 |
+
3: for $i \gets 1$ to $L$ do
|
| 60 |
+
4: αi ← σ2/σ2
|
| 61 |
+
5: Draw z ∼ N (0, I)
|
| 62 |
+
6: ${ \pmb x } { \pmb x } + \alpha _ { i } s _ { \theta } ( { \pmb x } , \sigma _ { i } ) + \beta \sigma _ { i + 1 } { \pmb z }$ return x
|
| 63 |
+
|
| 64 |
+
# 2.3 EXPECTED DENOISED SAMPLE (EDS)
|
| 65 |
+
|
| 66 |
+
A little known fact from Bayesian literature is that one can recover a denoised sample from the score function using the Empirical Bayes mean (Robbins, 1955; Miyasawa, 1961; Raphan and Simoncelli, 2011):
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
s ^ { * } ( \tilde { x } , \sigma ) = \frac { H ^ { * } ( \tilde { x } , \sigma ) - \tilde { x } } { \sigma ^ { 2 } } ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $H ^ { * } ( \tilde { \pmb { x } } , \sigma ) \triangleq \mathbb { E } _ { \pmb { x } \sim q _ { \sigma } ( \pmb { x } | \tilde { \pmb { x } } ) } [ \pmb { x } ]$ is the expected denoised sample given a noisy sample (or Empirical Bayes mean), conditioned on the noise level. A different way of reaching the same result is through the closed-form of the optimal score function, as presented in Appendix D. The corresponding result for unconditional score function is presented in Appendix E for completeness.
|
| 73 |
+
|
| 74 |
+
The EDS corresponds to the expected real image given a corrupted image; it can be thought of as what the score network believes to be the true image concealed within the noisy input. It has also been suggested that denoising the samples (i.e., taking the EDS) at the end of the Langevin sampling improves their quality (Saremi and Hyvarinen, 2019; Li et al., 2019; Kadkhodaie and Simoncelli, 2020). In Section 4, we provide further evidence that denoising the final Langevin sample brings it closer to the assumed data manifold. In particular, we show that the Fréchet Inception Distance (FID) consistently decreases (improves) after denoising. Finally, in Section 5, we build a hybrid training objective using the properties of the EDS discussed above.
|
| 75 |
+
|
| 76 |
+
There are interesting links to be made between ALS and the RED algorithm (Romano et al., 2017; Reehorst and Schniter, 2018). The RED algorithm attempts to find the maximum a posteriori probability (MAP) denoised sample (i.e., the most plausible real data) given a noisy sample. It does so by solving an optimization problem to obtain a sample close to the noisy sample for which the EDS is a fixed point (denoising the sample does not change it because it is a real sample). Thus, just like ALS, the RED algorithm generates plausible real data given a score network. However, this algorithm does not ensure that we sample from the distribution and obtain full mode coverage. Thus, ALS’s key benefit is ensuring that we sample from the full support of the distribution.
|
| 77 |
+
|
| 78 |
+
# 3 CONSISTENT SCALING OF THE NOISE
|
| 79 |
+
|
| 80 |
+
In this section, we present inconsistencies in ALS relating to the noise scaling and introduce Consistent Annealed Sampling (CAS) as an alternative.
|
| 81 |
+
|
| 82 |
+
One can think of the ALS algorithm as a sequential series of Langevin Dynamics (inner loop in Algorithm 1) for decreasing levels of noise (outer loop). If allowed an infinite number of steps $n _ { \sigma }$ the sampling process will properly produce samples from the data distribution.
|
| 83 |
+
|
| 84 |
+
In ALS, the score network is conditioned on geometrically decreasing noise $( \sigma _ { i } )$ . In the unconditional case, this corresponds to dividing the score network by the noise level (i.e., $s _ { \theta } ( \tilde { \pmb { x } } , \sigma _ { i } ) = s _ { \theta } ( \tilde { \pmb { x } } ) / \sigma _ { i } )$ Thus, in both conditional and unconditional cases, we make the assumption that the noise of the sample at step $i$ will be of variance $\sigma _ { i } ^ { 2 }$ , an assumption upon which the quality of the estimation of the score depends. While choosing a geometric progression of noise levels seems like a reasonable (though arbitrary) schedule to follow, we show that ALS does not ensure such schedule.
|
| 85 |
+
|
| 86 |
+
Assume we have the true score function $s ^ { * }$ and begin sampling using a real image with some added zero-centered Gaussian noise of standard deviation $\sigma _ { 0 } = 5 0$ . In Figure 1a, we illustrate how the intensity of the noise in the sample evolves through ALS and CAS, our proposed sampling, for a given sampling step size $\epsilon$ and a geometric schedule in this idealized scenario. We note that, although a large $n _ { \sigma }$ approaches the real geometric curve, it will only reach it at the limit $n _ { \sigma } \to \infty$ and $\epsilon 0$ ). Most importantly, Figure 1b highlights how even when the annealing process does converge, the progression of the noise is never truly geometric; we prove this formally in Proposition 1.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 1: Standard deviation during idealized sampling using a perfect score function $s ^ { * }$ . The black curve in (a) corresponds to the true geometric progression, as demonstrated in Proposition 2.
|
| 90 |
+
|
| 91 |
+
Proposition 1. Let $s ^ { * }$ be the optimal score function from Eq. 3. Following the sampling described in Algorithm $\cdot$ , the variance of the noise component in the sample $_ { \textbf { \em x } }$ will remain greater than $\sigma _ { t } ^ { 2 }$ at every step $t$ .
|
| 92 |
+
|
| 93 |
+
The proof is presented in Appendix F. In particular, for $n _ { \sigma } < \infty$ , sampling has not fully converged and the remaining noise is carried over to the next iteration of Langevin Sampling. It also follows that for any $s _ { \theta }$ different from the optimal $s ^ { * }$ , the actual noise at every iteration is expected to be even higher than for the best possible score function $s ^ { * }$ .
|
| 94 |
+
|
| 95 |
+
# 3.2 ALGORITHM
|
| 96 |
+
|
| 97 |
+
We propose Consistent Annealed Sampling (CAS) as a sampling method that ensures the noise level will follow a prescribed schedule for any sampling step size $\epsilon$ and number of steps $L$ . Algorithm 2 illustrates the process for a geometric schedule. Note that for a different schedule, $\beta$ will instead depend on the step $t$ , as in the general case, $\gamma _ { t }$ is defined as $\sigma _ { t + 1 } / \sigma _ { t }$ .
|
| 98 |
+
|
| 99 |
+
Proposition 2. Let $s ^ { * }$ be the optimal score function from Eq. 3. Following the sampling described in Algorithm 2, the variance of the noise component in the sample $_ { \textbf { \em x } }$ will consistently be equal to $\sigma _ { t } ^ { 2 }$ at every step t.
|
| 100 |
+
|
| 101 |
+
The proof is presented in Appendix G. Importantly, Proposition 2 holds no matter how many steps $L$ we take to decrease the noise geometrically. For ALS, $n _ { \sigma }$ corresponds to the number of steps per level of noise. It plays a similar role in CAS: we simply dilate the geometric series of noise levels used during training by a factor of $n _ { \sigma }$ , such that $L _ { \mathrm { s a m p l i n g } } = ( L _ { \mathrm { t r a i n i n g } } - 1 ) n _ { \sigma } + 1$ . Note that the proposition only holds when the initial sample is a corrupted image (i.e., ${ \pmb x } _ { 0 } = { \pmb T } + \sigma _ { 0 } { \pmb z } _ { 0 } )$ . However, by defining $\sigma _ { 0 }$ as the maximum Euclidean distance between all pairs of training data points (Song and Ermon, 2020), the noise becomes in practice much greater than the true image; sampling with pure noise initialization (i.e., $\pmb { x } _ { 0 } = \sigma _ { 0 } \pmb { z } _ { t }$ ) becomes indistinguishable from sampling with data initialization.
|
| 102 |
+
|
| 103 |
+
# 4 BENEFITS OF THE EDS ON SYNTHETIC DATA AND IMAGE GENERATION
|
| 104 |
+
|
| 105 |
+
As previously mentioned, it has been suggested that one can obtain better samples (closer to the assumed data manifold) by taking the EDS of the last Langevin sample. We provide further evidence of this with synthetic data and standard image datasets.
|
| 106 |
+
|
| 107 |
+
It can first be observed that the sampling steps correspond to an interpolation between the previous point and the EDS, followed by the addition of noise.
|
| 108 |
+
|
| 109 |
+
Proposition 3. Given a noise-conditional score function, the update rules from Algorithm 1 and Algorithm 2 are respectively equivalent to the following update rules:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\begin{array} { l l } { { x ( 1 - \eta ) x + \eta H ( { \bf x } , \sigma _ { i } ) + \sqrt { 2 \eta } \sigma _ { i } z } } & { { \qquad \mathrm { f o r } z \sim \mathcal { N } ( 0 , I ) \mathrm { a n d } \eta = \frac { \epsilon } { \sigma _ { L } ^ { 2 } } } } \\ { { { \displaystyle x ( 1 - \eta ) { \bf x } + \eta H ( { \bf x } , \sigma _ { i } ) + \beta \sigma _ { i + 1 } z } } } & { { } } \end{array}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
The demonstration is in Appendix H. This result is equally true for an unconditional score network, with the distinction that $\eta$ would no longer be independent of $\sigma _ { i }$ but rather linearly proportional to it.
|
| 116 |
+
|
| 117 |
+
Intuitively, this implies that the sampling steps slowly move the current sample towards a moving target (the EDS). If the sampling behaves appropriately, we expect the final sample $_ { \textbf { \em x } }$ to be very close to the EDS, i.e., $\pmb { x } \approx H ( \pmb { x } , \sigma _ { L } )$ . However, if the sampling step size is inappropriate, or if the EDS does not stabilize to a fixed point near the end of the sampling, these two quantities may be arbitrarily far from one another. As we will show, the FIDs from Song and Ermon (2020) suffer from such distance.
|
| 118 |
+
|
| 119 |
+
From Proposition 3, we see that CAS shares some similarities with the algorithm by Kadkhodaie and Simoncelli (2020). While the weight we give to the denoiser $( \eta )$ decreases geometrically (by its linearity in $\sigma$ ), their schedule appears to be much steeper. They also estimate the residual noise in their samples by the $l _ { 2 }$ norm instead of determining it through a schedule, as CAS strives to do. As a note, we had found weak evidence during development that estimating the residual noise worsened the FID.
|
| 120 |
+
|
| 121 |
+
The equivalence showed in Proposition 3 suggests instead to take the expected denoised sample at the end of the Langevin sampling as the final sample; this would be equivalent to the update rule ${ \pmb x } H ( { \pmb x } , { \pmb \sigma } _ { L } )$ at the last step. Synthetic 2D examples shown in Figure 2 demonstrate the immediate benefits of this technique.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 2: Langevin sampling on synthetic 2D experiments. Circles are real data points, crosses are generated data points. On both datasets, taking the EDS brings the samples much closer to the real data manifold.
|
| 125 |
+
|
| 126 |
+

|
| 127 |
+
Figure 3: Partial estimate of FID (lower is better) as a function of the sampling step size on CIFAR-10, with $n _ { \sigma } = 1$ . The interactions between consistent sampling and denoising are shown.
|
| 128 |
+
|
| 129 |
+
We train a score network on CIFAR-10 (Krizhevsky et al., 2009) and report the FID from both ALS and CAS as a function of the sampling step size and of denoising in Figure 3. The first observation to be made is just how critical denoising is to the FID score for ALS, even as its effect cannot be perceived by the human eye. For CAS, we note that the score remains small for a much wider range of sampling step sizes when denoising. Alternatively, the sampling step size must be very carefully tuned to obtain results close to the optimal.
|
| 130 |
+
|
| 131 |
+
Figure 3 also shows that, with CAS, the FID of the final sample is approximately equal to the FID of the denoised samples for small sampling step sizes. Furthermore, we see a smaller gap in FID between denoised and non-denoised for larger sampling step sizes than ALS. This suggests that consistent sampling is resulting in the final sample being closer to the assumed data manifold (i.e., $\pmb { x } \approx H _ { \theta } ( \pmb { x } , \sigma _ { L } ) )$ .
|
| 132 |
+
|
| 133 |
+
Interestingly, when Song and Ermon (2020) improved their score matching method, they could not explain why the FID of their new model did not improve even though the generated images looked better visually. To resolve that matter, they proposed the use of a new metric (Zhou et al., 2019) that did not have this issue. As shown in Figure 3, denoising resolves this mismatch.
|
| 134 |
+
|
| 135 |
+
# 5 ADVERSARIAL FORMULATION
|
| 136 |
+
|
| 137 |
+
The score network is trained to recover an uncorrupted image from a noisy input minimizing the $l _ { 2 }$ distance between the two. However, it is well known from the image restoration literature that $l _ { 2 }$ does not correlate well with human perception of image quality (Zhang et al., 2012; Zhao et al., 2016). One way to take advantage of the EDS would be to encourage the score network to produce an EDS that is more realistic from the perspective of a discriminator. Intuitively, this would incentivize the score network to produce more discernible features at inference time.
|
| 138 |
+
|
| 139 |
+
We propose to do so by training the score network to simultaneously minimize the score-matching loss function and maximize the probability of denoised samples being perceived as real by a discriminator. We use alternating gradient descent to sequentially train a discriminator for a determined number of steps at every score function update.
|
| 140 |
+
|
| 141 |
+
In our experiments, we selected the Least Squares GAN (LSGAN) (Mao et al., 2017) formulation as it performed best (see Appendix B for details). For an unconditional score network, the objective functions are as follows:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\underset { \phi } { \operatorname* { m a x } } \ \mathbb { E } _ { p ( \pmb { x } ) } \left[ ( D _ { \phi } ( \pmb { x } ) - 1 ) ^ { 2 } \right] + \mathbb { E } _ { p ( \tilde { \pmb { x } } , \pmb { x } , \sigma ) } \left[ ( D _ { \phi } ( H _ { \theta } ( \tilde { \pmb { x } } , \sigma ) + 1 ) ^ { 2 } \right]
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
\operatorname* { m i n } _ { \theta } \ \mathbb { E } _ { p ( \tilde { \mathbf { x } } , \mathbf { x } , \sigma ) } \left[ \left( D _ { \phi } ( H _ { \theta } ( \tilde { \mathbf { x } } , \sigma ) ) - 1 \right) ^ { 2 } + \frac { \lambda } { 2 } \left\| \sigma s _ { \theta } ( \tilde { \mathbf { x } } , \sigma ) + \frac { \tilde { \mathbf { x } } - \mathbf { x } } { \sigma } \right\| _ { 2 } ^ { 2 } \right] ,
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
where $H _ { \boldsymbol \theta } ( \tilde { \mathbf { x } } , \sigma ) = s _ { \boldsymbol \theta } ( \tilde { \mathbf { x } } , \sigma ) \sigma ^ { 2 } + \tilde { { \boldsymbol { x } } }$ is the EDS derived from the score network. Eq. 4 is the objective function of the LSGAN discriminator, while Eq. 5 is the adversarial objective function of the score network derived from Eq. 1 and from the LSGAN objective function.
|
| 152 |
+
|
| 153 |
+
We note the similarities between these objective functions and those of an LSGAN adversarial autoencoder (Makhzani et al., 2015; Tolstikhin et al., 2017; Tran et al., 2018), with the distinction of using a denoising autoencoder $H$ as opposed to a standard autoencoder. We can highlight this difference by reformulating Eq. 5 as:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { p ( \tilde { \alpha } , \boldsymbol { \mathbf { x } } , \boldsymbol { \sigma } ) } \left[ ( D _ { \phi } ( H _ { \theta } ( \tilde { \boldsymbol { \mathbf { x } } } , \boldsymbol { \sigma } ) ) - 1 ) ^ { 2 } + \frac { \lambda } { 2 \sigma ^ { 2 } } \left. H _ { \theta } ( \tilde { \boldsymbol { \mathbf { x } } } , \boldsymbol { \sigma } ) - \boldsymbol { \mathbf { x } } \right. _ { 2 } ^ { 2 } \right] ,
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
As GANs favor quality over diversity, there is a concern that this hybrid objective function might decrease the diversity of samples produced by the ALS. In Section 6.1, we first study image generation improvements brought by this method and then address the diversity concerns with experiments on the 3-StackedMNIST (Metz et al., 2016) dataset in Section 6.2.
|
| 160 |
+
|
| 161 |
+
# 6 EXPERIMENTS
|
| 162 |
+
|
| 163 |
+
# 6.1 ABLATION STUDY
|
| 164 |
+
|
| 165 |
+
We ran experiments on CIFAR-10 (Krizhevsky et al., 2009) and LSUN-churches (Yu et al., 2015) with the score network architecture used by Song and Ermon (2020). We also ran similar experiments with an unconditional version of the network architecture by Ho et al. (2020), given that their approach is similar to Song and Ermon (2019) and they obtain very small FIDs. For the hybrid adversarial score matching approach, we used an unconditional BigGAN discriminator (Brock et al., 2018). We compared three factors in an ablation study: adversarial training, Consistent Annealed Sampling and denoising.
|
| 166 |
+
|
| 167 |
+
Details on how the experiments were conducted are found in Appendix B. Unsuccessful experiments with large images are also discussed in Appendix C. See also Appendix I for a discussion pertaining to the use of the Inception Score (Heusel et al., 2017), a popular metric for generative models.
|
| 168 |
+
|
| 169 |
+
Results for CIFAR-10 and LSUN-churches with Song and Ermon (2019) score network architecture are respectively shown in Table 1 and 2. Results for CIFAR-10 with Ho et al. (2020) score network architecture are shown in Table 3.
|
| 170 |
+
|
| 171 |
+
Table 1: [Non-denoised / Denoised FID] from 10k samples on CIFAR-10 $( 3 2 \mathbf { x } 3 2 )$ with Song and Ermon (2019) score network architecture
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Sampling</td><td>Non-adversarial</td><td>Adversarial</td></tr><tr><td> non-consistent (ng = 1)</td><td>36.3 / 13.3</td><td>30.0 / 11.8</td></tr><tr><td>non-consistent (ng = 5)</td><td>33.7 / 10.9</td><td>26.4 /9.5</td></tr><tr><td>consistent (ng = 1)</td><td>14.7 / 12.3</td><td>11.9 / 10.8</td></tr><tr><td>consistent (ng = 5)</td><td>12.7 / 11.2</td><td>9.9 /9.7</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Table 2: [Non-denoised / Denoised FID] from $1 0 \mathrm { k }$ samples on LSUN-Churches (64x64) with Song and Ermon (2019) score network architecture
|
| 176 |
+
|
| 177 |
+
<table><tr><td>Sampling</td><td>Non-adversarial</td><td>Adversarial</td></tr><tr><td>non-consistent (ng = 1)</td><td>43.2 /40.3</td><td>40.9 /36.7</td></tr><tr><td>non-consistent (ng = 5)</td><td>42.0 / 39.2</td><td>40.0 /35.8</td></tr><tr><td>consistent (ng = 1)</td><td>41.5 / 40.7</td><td>38.2 /36.7</td></tr><tr><td>consistent (ng = 5)</td><td>39.5 / 39.1</td><td>36.3 /35.4</td></tr></table>
|
| 178 |
+
|
| 179 |
+
We always observe an improvement in FID from denoising and by increasing $n _ { \sigma }$ from 1 to 5. We observe an improvement from using the adversarial approach with Song and Ermon (2019) network architecture, but not on denoised samples with the Ho et al. (2020) network architecture. We hypothesize that this is a limitation of the architecture of the discriminator since, as far as we know, no variant of BigGAN achieves an FID smaller than 6. Nevertheless, it remains advantageous for more simple architectures, as shown in Table 1 and 2. We observe that consistent sampling outperforms non-consistent sampling on the CIFAR-10 task at $n _ { \sigma } = 1$ , the quickest way to sample.
|
| 180 |
+
|
| 181 |
+
Table 3: [Non-denoised / Denoised FID] from 10k samples on CIFAR-10 (32x32) with Ho et al. (2020) unconditional score network architecture
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Sampling</td><td>Non-adversarial</td><td>Adversarial</td></tr><tr><td> non-consistent (ng = 1)</td><td>25.3 / 7.5</td><td>21.6 / 7.5</td></tr><tr><td>non-consistent (ng = 5)</td><td>20.0 / 5.6</td><td>17.7 / 6.1</td></tr><tr><td>consistent (ng = 1)</td><td>7.8/7.1</td><td>7.7/7.1</td></tr><tr><td>consistent (ng = 5)</td><td>6.2 / 6.1</td><td>6.1 / 6.5</td></tr></table>
|
| 184 |
+
|
| 185 |
+
We calculated the FID of the non-consistent denoised models from $5 0 \mathrm { k }$ samples in order to compare our method with the recent work from Ho et al. (2020). We obtained a score of 3.65 for the nonadversarial method and 4.02 for the adversarial method on the CIFAR-10 task when sharing their architecture; these scores are close to their reported 3.17. Although not explicit in their approach, Ho et al. (2020) denoised their final sample. This suggests that taking the EDS and using an architecture akin to theirs were the two main reasons for outperforming Song and Ermon (2020). Of note, our method only trains the score network for $3 0 0 \mathrm { k }$ iterations, while Ho et al. (2020) trained their networks for more than 1 million iterations to achieve similar results.
|
| 186 |
+
|
| 187 |
+
# 6.2 NON-ADVERSARIAL AND ADVERSARIAL SCORE NETWORKS HAVE EQUALLY HIGHDIVERSITY
|
| 188 |
+
|
| 189 |
+
To assess the diversity of generated samples, we evaluate our models on the 3-Stacked MNIST generation task (Metz et al., 2016) (128k images of 28x28), consisting of numbers from the MNIST dataset (LeCun et al., 1998) superimposed on 3 different channels. We trained non-adversarial and adversarial score networks in the same way as the other models. The results are shown in Table 4.
|
| 190 |
+
|
| 191 |
+
We see that each of the 1000 modes is covered, though the KL divergence is still inferior to PACGAN (Lin et al., 2018), meaning that the mode proportions are not perfectly uniform. Blindness to mode proportions is thought to be a fundamental limitation of score-based methods (Wenliang, 2020). Nevertheless, these results confirm a full mode coverage on a task where most GANs struggle and, most importantly, that using a hybrid objective does not hurt the diversity of the generated samples.
|
| 192 |
+
|
| 193 |
+
Table 4: As in Lin et al. (2018), we generated $2 6 \mathrm { k }$ samples and evaluated the mode coverage and KL divergence based on the predicted modes from a pre-trained MNIST classifier.
|
| 194 |
+
|
| 195 |
+
<table><tr><td rowspan="2">3-Stacked MNIST</td><td colspan="3"></td></tr><tr><td>Modes (Max 1000)</td><td></td><td>KL</td></tr><tr><td>DCGAN (Radford etal., 2015b)</td><td>99.0</td><td></td><td>3.40</td></tr><tr><td>ALI (Dumoulin et al., 2016)</td><td></td><td>16.0</td><td>5.40</td></tr><tr><td>Unrolled GAN (Metz et al., 2016)</td><td></td><td>48.7</td><td>4.32</td></tr><tr><td>VEEGAN (Srivastava et al., 2017)</td><td></td><td>150.0</td><td>2.95</td></tr><tr><td>PacDCGAN2 (Lin et al., 2017b)</td><td></td><td>1000.0</td><td>0.06</td></tr><tr><td>WGAN-GP (Kumar et al., 2019; Gulrajani et al., 2017)</td><td></td><td>959.0</td><td>0.73</td></tr><tr><td>PresGAN (Dieng et al., 2019)</td><td></td><td>999.6</td><td>0.115</td></tr><tr><td>MEG (Kumar et al., 2019)</td><td></td><td>1000.0</td><td>0.03</td></tr><tr><td>Non-adversarial DSM (ours)</td><td></td><td>1000.0</td><td>1.36</td></tr><tr><td>Adversarial DSM (ours)</td><td></td><td>1000.0</td><td>1.49</td></tr></table>
|
| 196 |
+
|
| 197 |
+
# 7 CONCLUSION
|
| 198 |
+
|
| 199 |
+
We proposed Consistent Annealed Sampling as an alternative to Annealed Langevin Sampling, which ensures the expected geometric progression of the noise and brings the final samples closer to the data manifold. We showed how to extract the expected denoised sample and how to use it to further improve the final Langevin samples. We proposed a hybrid approach between GAN and score matching. With experiments on synthetic and standard image datasets; we showed that these approaches generally improved the quality/diversity of the generated samples.
|
| 200 |
+
|
| 201 |
+
We found equal diversity (coverage of all 1000 modes) for the adversarial and non-adversarial variant of the difficult StackedMNIST problem. Since we also observed better performance (from lower FIDs) in our other adversarial models trained on images, we conclude that making score matching adversarial increases the quality of the samples without decreasing diversity. These findings imply that score matching performs better than most GANs and on-par with state-of-the-art GANs. Furthermore, our results suggest that hybrid methods, combining multiple generative techniques together, are a very promising direction to pursue.
|
| 202 |
+
|
| 203 |
+
As future work, these models should be scaled to larger batch sizes on high-resolution images, since GANs have been shown to produce outstanding high-resolution images at very large batch sizes (2048 or more). We also plan to further study the theoretical properties of CAS by considering its corresponding stochastic differential equation.
|
| 204 |
+
|
| 205 |
+
# REFERENCES
|
| 206 |
+
|
| 207 |
+
Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. In Advances in Neural Information Processing Systems, pages 11918–11930, 2019.
|
| 208 |
+
|
| 209 |
+
Aapo Hyvärinen. Estimation of non-normalized statistical models by score matching. Journal of Machine Learning Research, 6(Apr):695–709, 2005.
|
| 210 |
+
|
| 211 |
+
Pascal Vincent. A connection between score matching and denoising autoencoders. Neural computation, 23(7):1661–1674, 2011.
|
| 212 |
+
|
| 213 |
+
Martin Raphan and Eero P Simoncelli. Least squares estimation without priors or supervision. Neural computation, 23(2):374–420, 2011.
|
| 214 |
+
|
| 215 |
+
Max Welling and Yee W Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 681–688, 2011.
|
| 216 |
+
|
| 217 |
+
Gareth O Roberts, Richard L Tweedie, et al. Exponential convergence of langevin distributions and their discrete approximations. Bernoulli, 2(4):341–363, 1996.
|
| 218 |
+
|
| 219 |
+
Zahra Kadkhodaie and Eero P Simoncelli. Solving linear inverse problems using the prior implicit in a denoiser. arXiv preprint arXiv:2007.13640, 2020.
|
| 220 |
+
|
| 221 |
+
Yang Song and Stefano Ermon. Improved techniques for training score-based generative models. arXiv preprint arXiv:2006.09011, 2020.
|
| 222 |
+
|
| 223 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pages 6626–6637, 2017.
|
| 224 |
+
|
| 225 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2672–2680. Curran Associates, Inc., 2014. URL http://papers. nips.cc/paper/5423-generative-adversarial-nets.pdf.
|
| 226 |
+
|
| 227 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018.
|
md/train/enoVQWLsfyL/enoVQWLsfyL.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# VIEWMAKER NETWORKS: LEARNING VIEWS FOR UNSUPERVISED REPRESENTATION LEARNING
|
| 2 |
+
|
| 3 |
+
Alex Tamkin, Mike Wu, Noah Goodman
|
| 4 |
+
Department of Computer Science
|
| 5 |
+
Stanford University
|
| 6 |
+
Stanford, CA 94305, USA
|
| 7 |
+
{atamkin, wumike, ngoodman}@stanford.edu
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Many recent methods for unsupervised representation learning train models to be invariant to different “views,” or distorted versions of an input. However, designing these views requires considerable trial and error by human experts, hindering widespread adoption of unsupervised representation learning methods across domains and modalities. To address this, we propose viewmaker networks: generative models that learn to produce useful views from a given input. Viewmakers are stochastic bounded adversaries: they produce views by generating and then adding an $\ell _ { p }$ -bounded perturbation to the input, and are trained adversarially with respect to the main encoder network. Remarkably, when pretraining on CIFAR-10, our learned views enable comparable transfer accuracy to the welltuned SimCLR augmentations—despite not including transformations like cropping or color jitter. Furthermore, our learned views significantly outperform baseline augmentations on speech recordings $^ { + 9 }$ points on average) and wearable sensor data $+ 1 7$ points on average). Viewmaker views can also be combined with handcrafted views: they improve robustness to common image corruptions and can increase transfer performance in cases where handcrafted views are less explored. These results suggest that viewmakers may provide a path towards more general representation learning algorithms—reducing the domain expertise and effort needed to pretrain on a much wider set of domains. Code is available at https://github.com/alextamkin/viewmaker.
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Figure 1: Viewmaker networks generate complex and diverse input-dependent views for unsupervised learning. Examples shown are for CIFAR-10. Original image in center with pink border.
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
Unsupervised representation learning has made significant recent strides, including in computer vision, where view-based methods have enabled strong performance on benchmark tasks (Wu et al., 2018; Oord et al., 2018; Bachman et al., 2019; Zhuang et al., 2019; Misra & Maaten, 2020; He et al., 2020; Chen et al., 2020a). Views here refer to human-defined data transformations, which target capabilities or invariances thought to be useful for transfer tasks. In particular, in contrastive learning of visual representations, models are trained to maximize the mutual information between different views of an image, including crops, blurs, noise, and changes to color and contrast (Bachman et al.,
|
| 19 |
+
|
| 20 |
+
2019; Chen et al., 2020a). Much work has investigated the space of possible image views (and their compositions) and understanding their effects on transfer learning (Chen et al., 2020a; Wu et al., 2020; Tian et al., 2019; Purushwalkam & Gupta, 2020)
|
| 21 |
+
|
| 22 |
+
The fact that views must be hand designed is a significant limitation. While views for image classification have been refined over many years, new views must be developed from scratch for new modalities. Making matters worse, even within a modality, different domains may have different optimal views (Purushwalkam & Gupta, $\textcircled { 2 0 2 0 }$ . Previous studies have investigated the properties of good views through the lens of mutual information (Tian et al., 2020; Wu et al., 2020), but a broadly-applicable approach for learning views remains unstudied.
|
| 23 |
+
|
| 24 |
+
In this work, we present a general method for learning diverse and useful views for contrastive learning. Rather than searching through possible compositions of existing view functions $\mathbb { ( C u b u k ) }$ et al., 2018; Lim et al., 2019), which may not be available for many modalities, our approach produces views with a generative model, called the viewmaker network, trained jointly with the encoder network. This flexibility enables learning a broad set of possible view functions, including input-dependent views, without resorting to hand-crafting or expert domain knowledge. The viewmaker network is trained adversarially to create views which increase the contrastive loss of the encoder network. Rather than directly outputting views for an image, the viewmaker instead outputs a stochastic perturbation that is added to the input. This perturbation is projected onto an $\ell _ { p }$ sphere, controlling the effective strength of the view, similar to methods in adversarial robustness. This constrained adversarial training method enables the model to reduce the mutual information between different views while preserving useful input features for the encoder to learn from.
|
| 25 |
+
|
| 26 |
+
In summary, we contribute:
|
| 27 |
+
|
| 28 |
+
1. Viewmaker networks: to our knowledge the first modality-agnostic method to learn views for unsupervised representation learning
|
| 29 |
+
2. On image data, where expert-designed views have been extensively optimized, our viewmaker-models achieve comparable transfer performance to state of the art contrastive methods while being more robust to common corruptions.
|
| 30 |
+
3. On speech data, our method significantly outperforms existing human-defined views on a range of speech recognition transfer tasks.
|
| 31 |
+
4. On time-series data from wearable sensors, our model significantly outperforms baseline views on the task of human activity recognition (e.g., cycling, running, jumping rope).
|
| 32 |
+
|
| 33 |
+
# 2 RELATED WORK
|
| 34 |
+
|
| 35 |
+
Unsupervised representation learning Learning useful representations from unlabeled data is a fundamental problem in machine learning (Pan & Yang, 2009; Bengio et al., 2013). A recently successful framework for unsupervised representation learning for images involves training a model to be invariant to various data transformations (Bachman et al., 2019; Misra & Maaten, 2020), although the idea has much earlier roots (Becker & Hinton, 1992; Hadsell et al., 2006; Dosovitskiy et al., 2014). This idea has been expanded by a number of contrastive learning approaches which push embeddings of different views, or transformed inputs, closer together, while pushing other pairs apart (Tian et al., 2019; He et al., 2020; Chen et al., $\boxed { 2 0 2 0 \mathrm { a } } \boxed { \mathrm { b } } \boxed { \mathrm { c } }$ , as well as non-contrastive approaches which do not explicitly push apart unmatched views (Grill et al., 2020; Caron et al., 2020) Related but more limited setups have been explored for speech, where data augmentation strategies are less explored (Oord et al., 2018; Kharitonov et al., 2020).
|
| 36 |
+
|
| 37 |
+
Understanding and designing views Several works have studied the role of views in contrastive learning, including from a mutual-information perspective $\mathrm { ( W u ~ e t ~ a l . } , \mathbb { Z } 0 2 0 )$ , in relation to specific transfer tasks $( \overbrace { [ 1 \mathrm { a n ~ e t ~ a l . } ] } ^ { \sim } , \overbrace { 2 0 1 9 } )$ , with respect to different kinds of invariances $( \mathbf { \mathbb { P u r u s h w a l k a m \& } } ]$ $\overline { { \mathrm { G u p t a } } } , \overline { { \vert 2 0 2 0 \vert } }$ , or via careful empirical studies $\mathrm { ( } \mathrm { C h e n \ e t \ a l . } \mathrm { , } \mathrm { 2 0 2 0 a } \mathrm { ) }$ . Outside of a contrastive learning framework, Gontijo-Lopes et al. $\underline { { ( 2 0 2 0 ) } }$ study how data augmentation aids generalization in vision models. Much work has explored different handcrafted data augmentation methods for supervised learning of images (Hendrycks et al., 2020; Lopes et al., 2019; Perez & Wang, 2017; Yun et al., 2019; Zhang et al., 2017), speech (Park et al., 2019; Kovacs et al., 2017; T ´ oth et al., 2018; Kharitonov et al., ´ 2020), or in feature space (DeVries & Taylor, 2017).
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 2: Diagram of our method. The viewmaker network is trained to produce stochastic adversarial views restricted to an $\ell _ { 1 }$ sphere around the input.
|
| 41 |
+
|
| 42 |
+
Adversarial methods Our work is related to and inspired by work on adversarial methods, including the $\ell _ { p }$ balls studied in adversarial robustness (Szegedy et al., 2013; Madry et al., 2017; Raghunathan et al., 2018) and training networks with adversarial objectives (Goodfellow et al., 2014; Xiao et al., $\overline { { \boxed { 2 0 1 8 } } }$ . Our work is also connected to the vicinal risk minimization principle (Chapelle et al., 2001) and can be interpreted as producing amortized virtual adversarial examples (Miyato et al., $\boxed { 2 0 1 8 }$ . Previous adversarial view-based pretraining methods add adversarial noise on top of existing handcrafted views $\mathrm { ( K i m ~ e t ~ a l . ) } \mathrm { [ 2 0 2 0 ] } $ or require access to specific transfer tasks during pretraining (Tian et al., 2020). In contrast, our method is more general: it is neither specialized to a particular downstream task, nor requires neither human-defined view families. Outside of multi-view learning paradigms, adversarial methods have also seen use for representation learning in GANs (Donahue et al., 2016; Donahue & Simonyan, 2019) or in choosing harder negative samples $\mathrm { \textregistered B o s e ~ e t ~ a l . } \mathrm { \textnot { B } } ^ { \mathrm { \scriptsize { B } } \mathrm { { o } } 1 8 \mathrm { \textmu } }$ as well as for data augmentation (Antoniou et al., 2017; Volpi et al., 2018; Bowles et al., 2018). Adversarial networks that perturb inputs have also been investigated to improve GAN training (Sajjadi et al., 2018) and to remove “shortcut” features (e.g., watermarks) for self-supervised pretext tasks (Minderer et al., 2020).
|
| 43 |
+
|
| 44 |
+
Learning views Outside of adversarial approaches, our work is related to other studies that seek to learn data augmentation strategies by composing existing human-designed augmentations (Ratner et al., 2017; Cubuk et al., 2018; Zhang et al., 2019; Ho et al., 2019; Lim et al., 2019; Cubuk et al., 2020) or by modeling variations specific to the data distribution (Tran et al., 2017; Wong & Kolter, 2020). By contrast, our method requires no human-defined view functions, does not require first pretraining a generative model, and can generate perturbations beyond naturally-occurring variation observed in the training data (e.g. brightness or contrast), potentially conferring robustness benefits, as we explore in Section 4.3.
|
| 45 |
+
|
| 46 |
+
# 3 METHOD
|
| 47 |
+
|
| 48 |
+
In contrastive learning, the objective is to push embeddings of positive views (derived from the same input) close together, while pushing away embeddings of negative views (derived from different inputs). We focus mainly on the simple, yet performant, SimCLR contrastive learning algorithm $\mathbb { C } \mathrm { h e n }$ $\boxed { \mathrm { e t ~ a l . } } \boxed { 2 0 2 0 \mathrm { a } }$ , but we also consider a memory bank-based algorithm $\mathtt { ( W u ~ e t ~ a l . } ] \mathtt { \tilde { 2 } O l 8 } $ in Section 4. As our method is agnostic to the specific pretraining loss used, it is naturally compatible with other view-based algorithms such as MoCo $\pmb { \mathrm { ( f l e ~ e t ~ a l . ) } } \widetilde { \pmb { 2 0 2 0 } } \}$ , BYOL $\mathrm { ( } \overline { { \mathrm { G r i l l ~ e t ~ a l . } } } \mathrm { , } \overline { { 2 0 2 0 } } \mathrm { ) }$ , and SwAV (Caron et al., 2020) by similarly substituting the data transformation pipeline with a viewmaker network.
|
| 49 |
+
|
| 50 |
+
Formally, given a batch of $N$ pairs of positive views $( i , j )$ the SimCLR loss is
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
{ \mathcal { L } } = { \frac { 1 } { 2 N } } \sum _ { k = 1 } ^ { N } [ \ell ( 2 k - 1 , 2 k ) + \ell ( 2 k , 2 k - 1 ) ] { \mathrm { ~ w h e r e ~ } } \ell ( i , j ) = - \log { \frac { \exp ( s _ { i , j } / \tau ) } { \sum _ { k = 1 } ^ { 2 N } { \mathbb { 1 } } _ { [ k \neq i ] } \exp ( s _ { i , k } / \tau ) } }
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
and $s _ { a , b }$ is the cosine similarity of the embeddings of views $a$ and $b$ .
|
| 57 |
+
|
| 58 |
+
We generate views by perturbing examples with a viewmaker network $V$ , trained jointly with the main encoder network $M$ . There are three attributes desirable for useful perturbations, each of which motivates an aspect of our method:
|
| 59 |
+
|
| 60 |
+
1. Challenging: The perturbations should be complex and strong enough that an encoder must develop useful representations to perform the self-supervised task. We accomplish this by generating perturbations with a neural network that is trained adversarially to increase the loss of the encoder network. Specifically, we use a neural network that ingests the input $X$ and outputs a view $X + V ( X )$ .
|
| 61 |
+
|
| 62 |
+
2. Faithful: The perturbations must not make the encoder task impossible, being so strong that they destroy all features of the input. For example, perturbations should not be able to zero out the input, making learning impossible. We accomplish this by constraining the perturbations to an $\ell _ { p }$ sphere around the original input. $\ell _ { p }$ constraints are common in the adversarial robustness literature where perturbations are expected to be indistinguishable. In our experiments, we find the best results are achieved with an $\ell _ { 1 }$ sphere, which grants the viewmaker a distortion budget that it can spend on a small perturbation for a large part of the input or a more extreme perturbation for a smaller portion.
|
| 63 |
+
|
| 64 |
+
3. Stochastic: The method should be able to generate a variety of perturbations for a single input, as the encoder objective requires contrasting two different views of an input against each other. To do this, we inject random noise into the viewmaker, such that the model can learn a stochastic function that produces a different perturbed input each forward pass.
|
| 65 |
+
|
| 66 |
+
Figure $\bigstar$ summarizes our method. The encoder and viewmaker are optimized in alternating steps to minimize and maximize $\mathcal { L }$ , respectively. We use an image-to-image neural network as our viewmaker network, with an architecture adapted from work on style transfer $\left( \mathrm { J o h n s o n e t a l . } \right) \left[ \mathrm { 2 0 1 6 } \right)$ See the Appendix for more details. This network ingests the input image and outputs a perturbation that is constrained to an $\ell _ { 1 }$ sphere. The sphere’s radius is determined by the volume of the input tensor times a hyperparameter $\epsilon$ , the distortion budget, which determines the strength of the applied perturbation. This perturbation is added to the input image and optionally clamped in the case of images to ensure all pixels are in $[ 0 , 1 ]$ . Algorithm 1 describes this process precisely.
|
| 67 |
+
|
| 68 |
+
Input: Viewmaker network $V$ , $C \times W \times H$ image X, $\ell _ { 1 }$ distortion budget ✏, noise
|
| 69 |
+
Output: Perturbed $C \times W \times H$ image $X$
|
| 70 |
+
$P V ( X , \delta ) \ / ,$ / generate perturbation
|
| 71 |
+
$\begin{array} { r } { P \gets \frac { \epsilon C W H } { | P | _ { 1 } } P \gets | / \langle } \end{array}$ project to $\ell _ { 1 }$ sphere
|
| 72 |
+
$X X + P / /$ apply perturbation
|
| 73 |
+
$X \gets \mathrm { c l a m p } ( X , 0 , 1 ) / /$ clamp (images only)
|
| 74 |
+
|
| 75 |
+
# 4 IMAGES
|
| 76 |
+
|
| 77 |
+
We begin by applying the viewmaker to contrastive learning for images. In addition to SimCLR (Chen et al., 2020a), we also consider a memory bank-based instance discrimination framework (Wu et al., 2018, henceforth InstDisc).
|
| 78 |
+
|
| 79 |
+
We pretrain ResNet-18 $\mathbb { ( H e \ e t \ a l . ) } \mathbb { 2 0 1 5 } )$ models on CIFAR-10 (Krizhevsky, 2009) for 200 epochs with a batch size of 256. We train a viewmaker-encoder system with a distortion budget of $\epsilon = 0 . 0 5$ . We tried distortion budgets $\epsilon \in \lbrace 0 . 1 , 0 . 0 5 , 0 . 0 2 \rbrace$ and found 0.05 to work best; however, we anticipate that further tuning would yield additional gains. As we can see in Figure $^ { 1 , }$ the learned views are diverse, consisting of qualitatively different kinds of perturbations and affecting different parts of the input. We compare the resulting encoder representations with a model trained with the expert views used for SimCLR, comprised of many human-defined transformations targeting different kinds of invariances useful for image classification: cropping-and-resizing, blurring, horizontal flipping, color dropping, and shifts in brightness, contrast, saturation, and hue (Chen et al., 2020a).
|
| 80 |
+
|
| 81 |
+
# 4.1 TRANSFER RESULTS ON IMAGE CLASSIFICATION TASKS
|
| 82 |
+
|
| 83 |
+
We evaluate our models on CIFAR-10, as well as eleven transfer tasks including MetaDataset $\underline { { ( \Pi \dot { } \mathbf { i } ) } }$ antafillou et al., 2019), MSCOCO (Lin et al., 2014), MNIST (LeCun et al., 1998), and FashionMNIST (Xiao et al., 2017). We use the standard linear evaluation protocol, which trains a logistic regression on top of representations from a frozen model. We apply the same views as in pretraining, freezing the final viewmaker when using learned views; we apply no views during validation. Table $\bigtriangledown$ shows our results, indicating comparable overall performance with SimCLR and InstDisc, all without the use of human-crafted view functions. This performance is noteworthy as our $\ell _ { 1 }$ views cannot implement cropping-and-rescaling, which was shown to be the most important view function in Chen et al. $\textcircled { 1 2 0 2 0 2 }$ . We speculate that the ability of the viewmaker to implement partial masking of an image may enable a similar kind of spatial information ablation as cropping.
|
| 84 |
+
|
| 85 |
+
Table 1: Our learned views (Ours) enable comparable transfer performance to expert views (Expt) on CIFAR-10. Suite of transfer tasks using pretrained representations from CIFAR-10 for both the SimCLR and InstDisc pretraining setups. Numbers are percent accuracy with the exception of CelebA which is F1. FaMNIST stands for FashionMNIST.
|
| 86 |
+
|
| 87 |
+
<table><tr><td></td><td colspan="2">SimCLR</td><td colspan="2">InstDisc</td><td></td><td colspan="2">SimCLR</td><td colspan="2">InstDisc</td></tr><tr><td>Dataset</td><td>Expt</td><td>Ours</td><td>Expt</td><td>Ours</td><td>Dataset</td><td>Expt</td><td>Ours</td><td>Expt</td><td>Ours</td></tr><tr><td>CIFAR-10</td><td>86.2</td><td>84.5</td><td>82.4</td><td>80.1</td><td>MNIST</td><td>97.1</td><td>98.7</td><td>98.7</td><td>98.9</td></tr><tr><td>MSCOCO</td><td>49.9</td><td>50.4</td><td>48.6</td><td>50.2</td><td>FaMNIST</td><td>88.3</td><td>91.5</td><td>89.2</td><td>91.4</td></tr><tr><td>CelebA (F1)</td><td>51.0</td><td>51.8</td><td>57.0</td><td>53.7</td><td>CUBirds</td><td>11.2</td><td>8.7</td><td>13.7</td><td>9.4</td></tr><tr><td>LSUN</td><td>56.2</td><td>55.0</td><td>56.0</td><td>55.6</td><td>VGGFlower</td><td>53.3</td><td>53.6</td><td>61.5</td><td>54.8</td></tr><tr><td>Aircraft</td><td>32.5</td><td>31.7</td><td>37.7</td><td>33.5</td><td>TrafficSign</td><td>96.6</td><td>94.9</td><td>98.9</td><td>94.3</td></tr><tr><td>DTD</td><td>30.4</td><td>28.8</td><td>29.8</td><td>29.8</td><td>Fungi</td><td>2.2</td><td>2.0</td><td>2.6</td><td>2.1</td></tr></table>
|
| 88 |
+
|
| 89 |
+
# 4.1.1 COMPARISON TO RANDOM $\ell _ { 1 }$ NOISE
|
| 90 |
+
|
| 91 |
+
Is random noise sufficient to produce domain-agnostic views? To assess how important adversarial training is to the quality of the learned representations, we perform an ablation where we generate views by adding Gaussian noise normalized to the same $\epsilon = 0 . 0 5$ budget as used in the previous section. Transfer accuracy on CIFAR-10 is significantly hurt by this ablation, reaching $5 2 . 0 1 \%$ for a SimCLR model trained with random noise views compared to $\mathbf { 8 4 . 5 0 \% }$ for our method, demonstrating the importance of adversarial training to our method.
|
| 92 |
+
|
| 93 |
+
# 4.1.2 THE IMPORTANCE OF INTER-PATCH MUTUAL INFORMATION AND CROPPING VIEWS
|
| 94 |
+
|
| 95 |
+
Cropping-and-resizing has been identified as a crucial view function when pretraining on ImageNet (Chen et al., 2020a). However, what properties of a pretraining dataset make cropping useful? We hypothesize that such a dataset must have images whose patches have high mutual information. In other words, there must be some way for the model to identify that different patches of the same image come from the same image. While this may be true for many object or scene recognition datasets, it may be false for other important pretraining datasets, including medical or satellite imagery, where features of interest are isolated to particular parts of the image.
|
| 96 |
+
|
| 97 |
+
To investigate this hypothesis, we modify the CIFAR-10 dataset to reduce the inter-patch mutual information by replacing each 16x16 corner of the image with the corner from another image in the training dataset (see Figure $\perp$ for an example). Thus, random crops on this dataset, which we call CIFAR-10-Corners, will often contain completely unrelated information. When pretrained on CIFAR-10-Corners, expert views achieve $6 3 . 3 \%$ linear evaluation accuracy on the original CIFAR10 dataset, while viewmaker views achieve $6 8 . 8 \%$ . This gap suggests that viewmaker views are less reliant on inter-patch mutual information than the expert views.
|
| 98 |
+
|
| 99 |
+
# 4.2 COMBINING VIEWMAKER AND HANDCRAFTED VIEWS
|
| 100 |
+
|
| 101 |
+
Can viewmakers improve performance in cases where some useful handcrafted views have already been identified? $\boxed { \mathrm { C h e n ~ e t ~ a l . } } \textcircled { 2 0 2 0 a } )$ show that views produced through cropping are significantly improved by a suite of color-based augmentations, which they argue prevents the network from relying solely on color statistics to perform the contrastive task. Here, we show that viewmaker networks also enable strong gains when added on top of cropping and horizontal flipping views when pretraining on CIFAR-10—without any domain-specific knowledge. Alone, this subset of
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 3: Our learned views are still able to yield useful information even when the inter-patch mutual information in a dataset is low, as in Figure 3b.
|
| 105 |
+
|
| 106 |
+
<table><tr><td>Views</td><td>Clean</td><td>Corrupted</td><td>Diff</td></tr><tr><td>Ours</td><td>84.5</td><td>71.4</td><td>-13.1</td></tr><tr><td>SimCLR*</td><td>86.2</td><td>77.1</td><td>-9.1</td></tr><tr><td>Combined*</td><td>86.3</td><td>79.8</td><td>-6.5</td></tr></table>
|
| 107 |
+
|
| 108 |
+
(a) Accuracy on CIFAR-10 and CIFAR-10-C. ⇤Overlap with CIFAR-10-C corruptions.
|
| 109 |
+
|
| 110 |
+

|
| 111 |
+
(b) Accuracy gain on CIFAR-10-C by from adding our learned views atop expert views.
|
| 112 |
+
|
| 113 |
+
Figure 4: Performance of different views on CIFAR-10-C corruptions. Our learned views enable solid performance in the face of unseen corruptions despite not explicitly including any blurring, contrast, or brightness transformations during training, unlike the expert views. Adding our learned views on top of SimCLR yields additional gains in robust accuracy, especially on different kinds of noise corruptions and glass blurring.
|
| 114 |
+
|
| 115 |
+
handcrafted augmentations achieves $7 3 . 2 \%$ linear evaluation accuracy on CIFAR-10. Combining these views with learned viewmaker perturbations $\epsilon = 0 . 0 5$ ) achieves $8 3 . 1 \% \big \Updownarrow$ This suggests that viewmakers can significantly improve representation learning even in cases where some domainspecific views have already been developed.
|
| 116 |
+
|
| 117 |
+
# 4.3 ROBUSTNESS TO COMMON CORRUPTIONS
|
| 118 |
+
|
| 119 |
+
Image classification systems should behave robustly even when the data distribution is slightly different from that seen during training. Does using a viewmaker improve robustness against common types of corruptions not experienced at train time? To answer this, we evaluate both learned views, expert views, and their composition on the CIFAR-10-C dataset (Hendrycks & Dietterich, 2019) which assesses robustness to corruptions like snow, pixelation, and blurring. In this setting, corruptions are applied only at test time, evaluating whether the classification system is robust to some types of corruptions to which humans are robust.
|
| 120 |
+
|
| 121 |
+
When considering methods in isolation, SimCLR augmentations result in less of an accuracy drop from clean to corrupted data compared to our learned views, as shown in Table $4 \mathrm { a } .$ This gap is expected, as the expert views overlap significantly with the CIFAR-10-C corruptions: both include blurring, brightness, and contrast transformations. Interestingly, however, when we train a viewmaker network while also applying expert augmentations (“Combined,” Table $\mathrm { 4 a ) }$ , we can further improve the robust accuracy, with notable gains on noise and glass blur corruptions (Figure $\textcircled { 4 6 }$ This is noteworthy, as our learned views have no explicit overlap with the CIFAR-10-C corruptions, unlike the expert augmentations $\cdot ^ { 2 }$ In the Combined setting, we use a distortion budget of $\epsilon = 0 . 0 1$ , which we find works better than $\epsilon = 0 . 0 5$ , likely because combining the two augmentations at their full strength would make the learning task too difficult.
|
| 122 |
+
|
| 123 |
+
Table 2: Our learned views significantly outperform existing views for speech transfer tasks. Linear evaluation accuracy for SimCLR models trained on LibriSpeech. Left: ResNet- $1 8 +$ Librispeech 100 hour, Right: ResNet- $5 0 +$ Librispeech $9 6 0 \mathrm { { h r } }$ . “Time” refers to view functions applied in the time domain (Kharitonov et al., $\boxed { 2 0 2 0 }$ , while “Spec.” refers to view functions applied directly to the spectrogram (Park et al., 2019). 0.05 and 0.1 denote viewmaker distortion bounds $\epsilon$ .
|
| 124 |
+
|
| 125 |
+
<table><tr><td rowspan="2">ResNet-18,100hr</td><td colspan="2">Expert</td><td colspan="2">Ours (ε)</td></tr><tr><td>Time</td><td>Spec.</td><td>0.05</td><td>0.1</td></tr><tr><td>LibriSpeech Sp. ID</td><td>97.1</td><td>91.6</td><td>88.3</td><td>84.0</td></tr><tr><td>VoxCeleb1 Sp. ID</td><td>5.7</td><td>7.8</td><td>12.1</td><td>9.1</td></tr><tr><td>AudioMNIST</td><td>31.7</td><td>63.9</td><td>93.3</td><td>87.9</td></tr><tr><td>Google Commands</td><td>27.1</td><td>31.9</td><td>47.4</td><td>41.6</td></tr><tr><td>Fluent Actions</td><td>29.4</td><td>32.0</td><td>41.6</td><td>37.9</td></tr><tr><td>Fluent Objects</td><td>37.1</td><td>40.3</td><td>47.6</td><td>47.6</td></tr><tr><td>Fluent Locations</td><td>59.7</td><td>63.3</td><td>66.5</td><td>68.3</td></tr></table>
|
| 126 |
+
|
| 127 |
+
<table><tr><td>ResNet-50,960hr</td><td>Spec.</td><td>0.05</td></tr><tr><td>LibriSpeech Sp. ID</td><td>95.9</td><td>90.0</td></tr><tr><td>VoxCeleb1 Sp.ID AudioMNIST</td><td>8.6</td><td>10.7</td></tr><tr><td></td><td>80.2</td><td>88.0</td></tr><tr><td>Google Commands</td><td>28.3</td><td>32.6</td></tr><tr><td>Fluent Actions</td><td>30.5</td><td>42.5</td></tr><tr><td>Fluent Objects</td><td>36.2</td><td>50.8</td></tr><tr><td>Fluent Locations</td><td>62.0</td><td>68.9</td></tr></table>
|
| 128 |
+
|
| 129 |
+
These results suggest that learned views are a promising avenue for improving robustness in selfsupervised learning models.
|
| 130 |
+
|
| 131 |
+
# 5 SPEECH
|
| 132 |
+
|
| 133 |
+
Representation learning on speech data is an emerging and important research area, given the large amount of available unlabeled data and the increasing prevalence of speech-based human-computer interaction (Latif et al., 2020). However, compared to images, there is considerably less work on self-supervised learning and data augmentations for speech data. Thus, it is a compelling setting to investigate whether viewmaker augmentations are broadly applicable across modalities.
|
| 134 |
+
|
| 135 |
+
# 5.1 SELF-SUPERVISED LEARNING SETUP
|
| 136 |
+
|
| 137 |
+
We adapt the contrastive learning setup from SimCLR (Chen et al., 2020a). Training proceeds largely the same as for images, but the inputs are 2D log mel spectrograms. We consider both view functions applied in the time-domain before the STFT, including noise, reverb, pitch shifts, and changes in loudness (Kharitonov et al., $\boxed { 2 0 2 0 }$ , as well as spectral views, which involve masking or noising different parts of the spectrogram (Park et al., 2019). To generate learned views, we pass the spectrogram as input to the viewmaker. We normalize the spectrogram to mean zero and variance one before passing it through the viewmaker, and do not clamp the resulting perturbed spectrogram. See the Appendix for more details. We train on the Librispeech dataset (Panayotov et al., 2015) for 200 epochs, and display some examples of learned views in the Appendix.
|
| 138 |
+
|
| 139 |
+
# 5.2 SPEECH CLASSIFICATION RESULTS
|
| 140 |
+
|
| 141 |
+
We evaluate on three speech classification datasets: Fluent Speech Commands (Lugosch et al., $\bigstar$ Google Speech Commands $\left( \mathrm { W a r d e n } \right) , \left[ 2 0 1 8 \right)$ , and spoken digit classification (Becker et al., 2018), as well as speaker classification on VoxCeleb $( \mathrm { I N a g r a n i e t a l . } \mathrm { \bar { 2 0 1 7 } } )$ and Librispeech (Panayotov et al., $\boxed { 2 0 1 5 }$ , all using the linear evaluation protocol for 100 epochs. In Table $\bigtriangledown$ we report results with both the same distortion budget $\epsilon = 0 . 0 5$ as in the image domain, as well as a larger $\epsilon = 0 . 1$ , for comparison. Both versions significantly outperform the preexisting waveform and spectral augmentations, with a $+ 9$ percentage point improvement on average for the ResNet-18 $\acute { \epsilon } = 0 . 0 5 )$ ) viewmaker model over the best expert views. The gains for real-world tasks such as command identification are compelling. One notable exception is the task of LibriSpeech speaker identification. Since LibriSpeech is the same dataset the model was pretrained on, and this effect is not replicated on VoxCeleb1, the other speaker classification dataset, we suspect the model may be picking up on dataset-specific artifacts (e.g. background noise, microphone type) which may make the speaker
|
| 142 |
+
|
| 143 |
+
Table 3: Our learned views significantly outperform existing views for activity recognition on wearable sensor data. Our method learns superior representations across a large range of distortion budgets $\epsilon$ , although budgets that are too strong prevent learning. Linear evaluation accuracy for ResNet18 models trained on Pamap2 with SimCLR. “Spectral” refers to view functions applied directly to the spectrogram (Park et al., 2019).
|
| 144 |
+
|
| 145 |
+
<table><tr><td></td><td colspan="2">Spectral</td><td colspan="5">Ours (e)</td></tr><tr><td>Dataset</td><td>With Noise</td><td>Without Noise</td><td>0.02</td><td>0.05</td><td>0.2</td><td>0.5</td><td>2.0</td></tr><tr><td>Pamap2</td><td>71.0</td><td>74.6</td><td>83.0</td><td>87.4</td><td>88.6</td><td>91.3</td><td>9.1</td></tr></table>
|
| 146 |
+
|
| 147 |
+
ID task artificially easier. An interesting possibility is that the worse performance of viewmaker views may result from the model being able to identify and ablate such spurious correlations in the spectrograms.
|
| 148 |
+
|
| 149 |
+
# 6 WEARABLE SENSOR DATA
|
| 150 |
+
|
| 151 |
+
To further validate that our method for learning views is useful across different modalities, we consider time-series data from wearable sensors. Wearable sensor data has a broad range of applications, including health care, entertainment, and education (Lara & Labrador, 2012). We specifically consider whether viewmaker views improve representation learning for the task of human activity recognition (HAR), for example identifying whether a user is jumping rope, running, or cycling.
|
| 152 |
+
|
| 153 |
+
# 6.1 SELF-SUPERVISED LEARNING SETUP
|
| 154 |
+
|
| 155 |
+
We consider the Pamap2 dataset (Reiss & Stricker, 2012), a dataset of 12 different activities performed by 9 participants. Each activity contains 52 different time series, including heart rate, accelerometer, gyroscope, and magnetometer data collected from sensors on the ankle, hand, and chest (all sampled at $1 0 0 \mathrm { H z }$ , except heart rate, which is sampled at approximately 9Hz). We linearly interpolate missing data, then take random 10s windows from subject recordings, using the same train/validation/test splits as prior work $( \mathbb { M o y a R u e d a e t a l . } ) \lbrack 2 0 1 8 \rbrack )$ . To create inputs for our model, we generate a multi-channel image composed of one 32x32 log spectrogram for each sensor timeseries window. Unlike speech data, we do not use the mel scale when generating the spectrogram. We then normalize the training and validation datasets by subtracting the mean and then dividing by the standard deviation of the training dataset.
|
| 156 |
+
|
| 157 |
+
We train with both our learned views and the spectral views (Park et al., 2019) that were most successful in the speech domain (for multi-channel spectral masking, we apply the same randomly chosen mask to all channels). We also compare against a variant of these views with spectrogram noise removed, which we find improves this baseline’s performance.
|
| 158 |
+
|
| 159 |
+
# 6.2 SENSOR-BASED ACTIVITY RECOGNITION RESULTS
|
| 160 |
+
|
| 161 |
+
We train a linear classifier on the frozen encoder representations for 50 epochs, reporting accuracy on the validation set. We sample 10k examples for each training epoch and 50k examples for validation. Our views significantly outperform spectral masking by 12.8 percentage points when using the same $\epsilon = 0 . 0 5$ as image and speech, and by 16.7 points when using a larger $\epsilon = 0 . 5$ (Table 3). We also find that a broad range of distortion budgets produces useful representations, although overly-aggressive budgets prevent learning (Table $\textcircled { 3 }$ . These results provide further evidence that our method for learning views has broad applicability across different domains.
|
| 162 |
+
|
| 163 |
+
# 6.3 SEMI-SUPERVISED EXPERIMENTS
|
| 164 |
+
|
| 165 |
+
An especially important setting for self-supervised learning is domains where labeled data is scarce or costly to acquire. Here, we show that our method can enable strong performance when labels for only a single participant (Participant 1) out of seven are available. We compare simple supervised learning on Participant 1’s labels against linear evaluation of our best pretrained model, which was trained on unlabeled data from all 7 participants. The model architectures and training procedures are otherwise identical to the previous section. As Figure $\sharp$ shows, pretraining with our method on unlabeled data enables significant gains over pure supervised learning when data is scarce, and even slightly outperforms the hand-crafted views trained on all 7 participants (cf. Table 3).
|
| 166 |
+
|
| 167 |
+
Table 4: Our method enables superior results in a semi-supervised setting where labels for data from only one participant are available. Validation accuracy for activity recognition on Pamap2. Supervised Learning refers to training a randomly initialized model on the labeled data until convergence. Pretrain & Transfer refers to training a linear classifier off of the best pretrained model above. 1 or 7 Participants refers to the number of participants comprising the training set.
|
| 168 |
+
|
| 169 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="2">Supervised Learning</td><td colspan="2">Pretrain (Ours)& Transfer</td></tr><tr><td>1 Participant</td><td>7 Participants</td><td>1 Participant</td><td>7 Participants</td></tr><tr><td>Pamap2</td><td>58.3</td><td>97.1</td><td>75.1</td><td>91.3</td></tr></table>
|
| 170 |
+
|
| 171 |
+
# 7 CONCLUSION
|
| 172 |
+
|
| 173 |
+
We introduce a method for learning views for unsupervised learning, demonstrating its effectiveness through strong performance on image, speech, and wearable sensor modalities. Our novel generative model—viewmaker networks—enables us to efficiently learn views as part of the representation learning process, as opposed to relying on domain-specific knowledge or costly trial and error. There are many interesting avenues for future work. For example, while the $\ell _ { 1 }$ constraint is simple by design, there may be other kinds of constraints that enable richer spaces of views and better performance. In addition, viewmaker networks may find use in supervised learning, for the purposes of data augmentation or improving robustness. Finally, it is interesting to consider what happens as the viewmaker networks increase in size: do we see performance gains or robustnessaccuracy trade-offs (Raghunathan et al., 2019)? Ultimately, our work is a step towards more general self-supervised algorithms capable of pretraining on arbitrary data and domains.
|
| 174 |
+
|
| 175 |
+
# ACKNOWLEDGEMENTS
|
| 176 |
+
|
| 177 |
+
We would like to thank Dan Yamins, Chengxu Zhuang, Shyamal Buch, Jesse Mu, Jared Davis, Aditi Raghunathan, Pranav Rajpurkar, Margalit Glasgow, and Jesse Michel for useful discussions and comments on drafts. AT is supported by an Open Phil AI Fellowship. MW is supported by the Stanford Interdisciplinary Graduate Fellowship as the Karr Family Fellow.
|
| 178 |
+
|
| 179 |
+
# REFERENCES
|
| 180 |
+
|
| 181 |
+
Nasir Ahmed, T Natarajan, and Kamisetty R Rao. Discrete cosine transform. IEEE transactions on Computers, 100(1):90–93, 1974.
|
| 182 |
+
|
| 183 |
+
Antreas Antoniou, Amos Storkey, and Harrison Edwards. Data augmentation generative adversarial networks, 2017.
|
| 184 |
+
|
| 185 |
+
Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems, pp. 15535–15545, 2019.
|
| 186 |
+
|
| 187 |
+
Suzanna Becker and Geoffrey E Hinton. Self-organizing neural network that discovers surfaces in random-dot stereograms. Nature, 355(6356):161–163, 1992.
|
| 188 |
+
|
| 189 |
+
Soren Becker, Marcel Ackermann, Sebastian Lapuschkin, Klaus-Robert M ¨ uller, and Wojciech ¨ Samek. Interpreting and explaining deep neural networks for classification of audio signals, 2018.
|
| 190 |
+
|
| 191 |
+
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013.
|
| 192 |
+
|
| 193 |
+
Lukas Biewald. Experiment tracking with weights and biases, 2020. URL https://www. wandb.com/. Software available from wandb.com.
|
| 194 |
+
Avishek Joey Bose, Huan Ling, and Yanshuai Cao. Adversarial contrastive estimation. arXiv preprint arXiv:1805.03642, 2018.
|
| 195 |
+
Christopher Bowles, Liang Chen, Ricardo Guerrero, Paul Bentley, Roger Gunn, Alexander Hammers, David Alexander Dickie, Maria Valdes Hern ´ andez, Joanna Wardlaw, and Daniel Rueckert. ´ Gan augmentation: Augmenting training data using generative adversarial networks, 2018.
|
| 196 |
+
Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. arXiv preprint arXiv:2006.09882, 2020.
|
| 197 |
+
Olivier Chapelle, Jason Weston, Leon Bottou, and Vladimir Vapnik. Vicinal risk minimization. In ´ Advances in neural information processing systems, pp. 416–422, 2001.
|
| 198 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020a.
|
| 199 |
+
Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big selfsupervised models are strong semi-supervised learners. arXiv preprint arXiv:2006.10029, 2020b.
|
| 200 |
+
Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020c.
|
| 201 |
+
Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv preprint arXiv:1805.09501, 2018.
|
| 202 |
+
Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pp. 702–703, 2020.
|
| 203 |
+
Terrance DeVries and Graham W. Taylor. Dataset augmentation in feature space, 2017.
|
| 204 |
+
Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. In Advances in Neural Information Processing Systems, pp. 10542–10552, 2019.
|
| 205 |
+
Jeff Donahue, Philipp Krahenb ¨ uhl, and Trevor Darrell. Adversarial feature learning. ¨ arXiv preprint arXiv:1605.09782, 2016.
|
| 206 |
+
Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In Advances in neural information processing systems, pp. 766–774, 2014.
|
| 207 |
+
WA Falcon. Pytorch lightning. GitHub. Note: https://github.com/PyTorchLightning/pytorchlightning, 3, 2019.
|
| 208 |
+
Raphael Gontijo-Lopes, Sylvia J Smullin, Ekin D Cubuk, and Ethan Dyer. Affinity and diversity: Quantifying mechanisms of data augmentation. arXiv preprint arXiv:2002.08973, 2020.
|
| 209 |
+
Ian Goodfellow. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016.
|
| 210 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 211 |
+
Jean-Bastien Grill, Florian Strub, Florent Altche, Corentin Tallec, Pierre H Richemond, Elena ´ Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
|
| 212 |
+
|
| 213 |
+
Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’06), volume 2, pp. 1735–1742. IEEE, 2006.
|
| 214 |
+
|
| 215 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition, 2015.
|
| 216 |
+
|
| 217 |
+
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9729–9738, 2020.
|
| 218 |
+
|
| 219 |
+
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019.
|
| 220 |
+
|
| 221 |
+
Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. arXiv preprint arXiv:2006.16241, 2020.
|
| 222 |
+
|
| 223 |
+
Daniel Ho, Eric Liang, Xi Chen, Ion Stoica, and Pieter Abbeel. Population based augmentation: Efficient learning of augmentation policy schedules. In International Conference on Machine Learning, pp. 2731–2741. PMLR, 2019.
|
| 224 |
+
|
| 225 |
+
Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling (eds.), Computer Vision – ECCV 2016, pp. 694–711, Cham, 2016. Springer International Publishing. ISBN 978-3- 319-46475-6.
|
| 226 |
+
|
| 227 |
+
Eugene Kharitonov, Morgane Riviere, Gabriel Synnaeve, Lior Wolf, Pierre-Emmanuel Mazar \` e,´ Matthijs Douze, and Emmanuel Dupoux. Data augmenting contrastive learning of speech representations in the time domain. arXiv preprint arXiv:2007.00991, 2020.
|
| 228 |
+
|
| 229 |
+
Minseon Kim, Jihoon Tack, and Sung Ju Hwang. Adversarial self-supervised contrastive learning, 2020.
|
| 230 |
+
|
| 231 |
+
Gyorgy Kov ¨ acs, L ´ aszl ´ o T ´ oth, Dirk Van Compernolle, and Sriram Ganapathy. Increasing the ro- ´ bustness of cnn acoustic models using autoregressive moving average spectrogram features and channel dropout. Pattern Recognition Letters, 100:44–50, 2017.
|
| 232 |
+
|
| 233 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
|
| 234 |
+
|
| 235 |
+
Oscar D Lara and Miguel A Labrador. A survey on human activity recognition using wearable sensors. IEEE communications surveys & tutorials, 15(3):1192–1209, 2012.
|
| 236 |
+
|
| 237 |
+
Siddique Latif, Rajib Rana, Sara Khalifa, Raja Jurdak, Junaid Qadir, and Bjorn W Schuller. Deep ¨ representation learning in speech processing: Challenges, recent advances, and future trends. arXiv preprint arXiv:2001.00378, 2020.
|
| 238 |
+
|
| 239 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 240 |
+
|
| 241 |
+
Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. Fast autoaugment. In Advances in Neural Information Processing Systems, pp. 6665–6675, 2019.
|
| 242 |
+
|
| 243 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ European conference on computer vision, pp. 740–755. Springer, 2014.
|
| 244 |
+
|
| 245 |
+
Raphael Gontijo Lopes, Dong Yin, Ben Poole, Justin Gilmer, and Ekin D Cubuk. Improving robustness without sacrificing accuracy with patch gaussian augmentation. arXiv preprint arXiv:1906.02611, 2019.
|
| 246 |
+
|
| 247 |
+
Loren Lugosch, Mirco Ravanelli, Patrick Ignoto, Vikrant Singh Tomar, and Yoshua Bengio. Speech model pre-training for end-to-end spoken language understanding, 2019.
|
| 248 |
+
|
| 249 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 250 |
+
|
| 251 |
+
Matthias Minderer, Olivier Bachem, Neil Houlsby, and Michael Tschannen. Automatic shortcut removal for self-supervised representation learning. arXiv preprint arXiv:2002.08822, 2020.
|
| 252 |
+
|
| 253 |
+
Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6707–6717, 2020.
|
| 254 |
+
|
| 255 |
+
Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 41(8):1979–1993, 2018.
|
| 256 |
+
|
| 257 |
+
Fernando Moya Rueda, Rene Grzeszick, Gernot A Fink, Sascha Feldhorst, and Michael Ten Hom- ´ pel. Convolutional neural networks for human activity recognition using body-worn sensors. In Informatics, volume 5, pp. 26. Multidisciplinary Digital Publishing Institute, 2018.
|
| 258 |
+
|
| 259 |
+
Arsha Nagrani, Joon Son Chung, and Andrew Zisserman. Voxceleb: a large-scale speaker identification dataset, 2017.
|
| 260 |
+
|
| 261 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 262 |
+
|
| 263 |
+
Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2009.
|
| 264 |
+
|
| 265 |
+
Vassil Panayotov, Guoguo Chen, Daniel Povey, and Sanjeev Khudanpur. Librispeech: An asr corpus based on public domain audio books. pp. 5206–5210, 04 2015. doi: 10.1109/ICASSP.2015. 7178964.
|
| 266 |
+
|
| 267 |
+
Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. Specaugment: A simple data augmentation method for automatic speech recognition. arXiv preprint arXiv:1904.08779, 2019.
|
| 268 |
+
|
| 269 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. In Advances in neural information processing systems, pp. 8026–8037, 2019.
|
| 270 |
+
|
| 271 |
+
Luis Perez and Jason Wang. The effectiveness of data augmentation in image classification using deep learning. arXiv preprint arXiv:1712.04621, 2017.
|
| 272 |
+
|
| 273 |
+
Senthil Purushwalkam and Abhinav Gupta. Demystifying contrastive self-supervised learning: Invariances, augmentations and dataset biases. arXiv preprint arXiv:2007.13916, 2020.
|
| 274 |
+
|
| 275 |
+
Aditi Raghunathan, Jacob Steinhardt, and Percy Liang. Certified defenses against adversarial examples. arXiv preprint arXiv:1801.09344, 2018.
|
| 276 |
+
|
| 277 |
+
Aditi Raghunathan, Sang Michael Xie, Fanny Yang, John C Duchi, and Percy Liang. Adversarial training can hurt generalization. arXiv preprint arXiv:1906.06032, 2019.
|
| 278 |
+
|
| 279 |
+
Alexander J Ratner, Henry Ehrenberg, Zeshan Hussain, Jared Dunnmon, and Christopher Re. Learn- ´ ing to compose domain-specific transformations for data augmentation. In Advances in neural information processing systems, pp. 3236–3246, 2017.
|
| 280 |
+
|
| 281 |
+
Attila Reiss and Didier Stricker. Introducing a new benchmarked dataset for activity monitoring. In 2012 16th International Symposium on Wearable Computers, pp. 108–109. IEEE, 2012.
|
| 282 |
+
|
| 283 |
+
Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computerassisted intervention, pp. 234–241. Springer, 2015.
|
| 284 |
+
|
| 285 |
+
Mehdi SM Sajjadi, Giambattista Parascandolo, Arash Mehrjou, and Bernhard Scholkopf. Tempered ¨ adversarial networks. arXiv preprint arXiv:1802.04374, 2018.
|
| 286 |
+
|
| 287 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
|
| 288 |
+
|
| 289 |
+
Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
|
| 290 |
+
|
| 291 |
+
Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning. arXiv preprint arXiv:2005.10243, 2020.
|
| 292 |
+
|
| 293 |
+
Laszl ´ o T´ oth, Gy ´ orgy Kov ¨ acs, and Dirk Van Compernolle. A perceptually inspired data augmenta- ´ tion method for noise robust cnn acoustic models. In International Conference on Speech and Computer, pp. 697–706. Springer, 2018.
|
| 294 |
+
|
| 295 |
+
Toan Tran, Trung Pham, Gustavo Carneiro, Lyle Palmer, and Ian Reid. A bayesian data augmentation approach for learning deep models, 2017.
|
| 296 |
+
|
| 297 |
+
Eleni Triantafillou, Tyler Zhu, Vincent Dumoulin, Pascal Lamblin, Utku Evci, Kelvin Xu, Ross Goroshin, Carles Gelada, Kevin Swersky, Pierre-Antoine Manzagol, and Hugo Larochelle. Metadataset: A dataset of datasets for learning to learn from few examples, 2019.
|
| 298 |
+
|
| 299 |
+
Riccardo Volpi, Hongseok Namkoong, Ozan Sener, John Duchi, Vittorio Murino, and Silvio Savarese. Generalizing to unseen domains via adversarial data augmentation, 2018.
|
| 300 |
+
|
| 301 |
+
Pete Warden. Speech commands: A dataset for limited-vocabulary speech recognition, 2018.
|
| 302 |
+
|
| 303 |
+
Eric Wong and J. Zico Kolter. Learning perturbation sets for robust machine learning, 2020.
|
| 304 |
+
|
| 305 |
+
Mike Wu, Chengxu Zhuang, Milan Mosse, Daniel Yamins, and Noah Goodman. On mutual information in contrastive learning for visual representations. arXiv preprint arXiv:2005.13149, 2020.
|
| 306 |
+
|
| 307 |
+
Zhirong Wu, Yuanjun Xiong, Stella Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance-level discrimination. arXiv preprint arXiv:1805.01978, 2018.
|
| 308 |
+
|
| 309 |
+
Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples with adversarial networks, 2018.
|
| 310 |
+
|
| 311 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
|
| 312 |
+
|
| 313 |
+
Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE International Conference on Computer Vision, pp. 6023–6032, 2019.
|
| 314 |
+
|
| 315 |
+
Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
|
| 316 |
+
|
| 317 |
+
Xinyu Zhang, Qiang Wang, Jian Zhang, and Zhao Zhong. Adversarial autoaugment. arXiv preprint arXiv:1912.11188, 2019.
|
| 318 |
+
|
| 319 |
+
Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local aggregation for unsupervised learning of visual embeddings. In Proceedings of the IEEE International Conference on Computer Vision, pp. 6002–6012, 2019.
|
md/train/kLwjnXCh2hm/kLwjnXCh2hm.md
ADDED
|
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hierarchical Prototype Networks for Continual Graph Representation Learning
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Despite significant advances in graph representation learning, little attention has been paid to graph data in which new categories of nodes (e.g., new research areas in citation networks or new types of products in co-purchasing networks) and their associated edges are continuously emerging. The key challenge is to incorporate the feature and topological information of new nodes in a continuous and effective manner such that performance over existing nodes is uninterrupted. To this end, we present Hierarchical Prototype Networks (HPNs) which can adaptively extract different levels of abstract knowledge in the form of prototypes to represent continually expanded graphs. Specifically, we first leverage a set of Atomic Feature Extractors (AFEs) to generate basic features which can encode both the elemental attribute information and the topological structure of the target node. Next, we develop HPNs by adaptively selecting relevant AFEs and represent each node with three-levels of prototypes, i.e., atomic-level, node-level, and class-level. In this way, whenever a new category of nodes is given, only the relevant AFEs and prototypes at each level will be activated and refined, while others remain uninterrupted. Finally, we provide the theoretical analysis on memory consumption bound and the continual learning capability of HPNs. Extensive empirical studies on eight different public datasets justify that HPNs are memory efficient and can achieve state-of-the-art performance on different continual graph representation learning tasks.
|
| 11 |
+
|
| 12 |
+
# 21 1 Introduction
|
| 13 |
+
|
| 14 |
+
22 Graph representation learning aims to pursue a meaningful vector representation of each node so as
|
| 15 |
+
23 to facilitate downstream applications such as node classification, link prediction, etc. Traditional
|
| 16 |
+
24 methods are developed based on graph statistics [23] or hand-crafted features [3, 16]. Recently,
|
| 17 |
+
25 a great amount of attention has been paid to graph neural networks (GNNs), such as graph con
|
| 18 |
+
26 volutional network (GCNs) [12], GraphSAGE [10], Graph Attention Networks (GATs) [31], and
|
| 19 |
+
27 their extensions [34, 6, 41, 14, 7, 24, 38]. This is because they can jointly consider the feature and
|
| 20 |
+
28 topological information of each node. Most of these approaches, however, focus on static graphs and
|
| 21 |
+
29 cannot generalize to the case when new categories of nodes are emerging.
|
| 22 |
+
|
| 23 |
+
In many real world applications, different categories of nodes and their associated edges (in the form of subgraphs) are often continuously emerging in existing graphs. For instance, in a citation network [27, 32, 20], papers describing new research areas will gradually appear in the citation graph; in a co-purchasing network such as Amazon [4], new types of products will continuously be updated to the graph. Given these facts, how to incorporate the feature and topological information of new nodes in a continuous and effective manner such that performance over existing nodes is uninterrupted is a critical problem to investigate.
|
| 24 |
+
|
| 25 |
+
37 To address this issue, various types of continual learning approaches can be considered. Existing
|
| 26 |
+
38 continual learning techniques fall into three main categories, i.e., regularization-based methods that
|
| 27 |
+
39 penalize (or reward) their model objectives so as to maintain satisfactory performance on previous
|
| 28 |
+
40 tasks [11, 9, 26], e.g., Learning without Forgetting (LwF) [15] and Elastic Weight Consolidation
|
| 29 |
+
41 (EWC) [13]; memory-replay based methods that constantly feed a model with representative data
|
| 30 |
+
42 or exemplars of previous tasks to prevent them from being forgotten [18, 28, 2, 5, 8], e.g., Gradient
|
| 31 |
+
43 Episodic Memory (GEM) [18]; and parametric isolation based methods that adaptively introduce
|
| 32 |
+
44 new parameters for new tasks and avoid the existing parameters of previous tasks being drastically
|
| 33 |
+
45 changed [25, 36, 35, 33]. Although these approaches exhibited promising performance in mitigating
|
| 34 |
+
46 the problem of catastrophic forgetting in different applications, e.g., image classification, action
|
| 35 |
+
47 recognition, and reinforcement learning, they are not suitable for continual graph representation
|
| 36 |
+
48 learning since both the feature information and topological structure of the target node need to be
|
| 37 |
+
49 considered appropriately.
|
| 38 |
+
50 More recently, Zhou et al. [39] proposed to store a set of representative experience nodes in a buffer
|
| 39 |
+
51 and replay them along with new tasks (categories) to prevent forgetting existing tasks (categories).
|
| 40 |
+
52 The buffer, however, only stores node features and ignores the topological information of graphs.
|
| 41 |
+
53 Liu et al. [17] developed topology-aware weight preserving (TWP) that can preserve the topological
|
| 42 |
+
54 information of existing graphs. However, its design hinders the capability of learning topology on
|
| 43 |
+
55 new tasks (categories). Note that continual graph representation learning is essentially different from
|
| 44 |
+
56 dynamic graph works which mainly concern time dependent graphs in which nodes and (or) edges
|
| 45 |
+
57 change over time [37, 21, 40, 19]. Therefore, the methods developed for dynamic graphs cannot be
|
| 46 |
+
58 directly applied to this task.
|
| 47 |
+
59 A desired learning system for continual graph representation learning is to continuously grasp
|
| 48 |
+
60 knowledge from new categories of emerging nodes and capture their topological structures without
|
| 49 |
+
61 interfering with the learned knowledge over existing graphs. To this end, we present a completely
|
| 50 |
+
62 novel framework, i.e., Hierarchical Prototype Networks (HPNs), to continuously extract different
|
| 51 |
+
63 levels of abstract knowledge (in the form of prototypes) from graph data such that new knowledge
|
| 52 |
+
64 will be accommodated while earlier experience can still be well retained. Within this framework,
|
| 53 |
+
65 representation learning is simultaneously conducted to avoid catastrophic forgetting, instead of
|
| 54 |
+
66 considering these two objectives separately. Specifically, based on the assumption that each node
|
| 55 |
+
67 can be decomposed into basic atomic characteristics belonging to a set of attributes (e.g., gender,
|
| 56 |
+
68 nationality, hobby, etc.) and the relationship between a pair of nodes can be categorized into different
|
| 57 |
+
69 types (e.g., trust or distrust in a social network), we develop the Atomic Feature Extractors (AFEs)
|
| 58 |
+
70 to decompose each node into two sets of atomic embeddings, i.e., atomic node embeddings which
|
| 59 |
+
71 encode the node feature information and atomic structure embeddings which encode its relations to
|
| 60 |
+
72 neighboring nodes within multi-hop. Next, we present Hierarchical Prototype Networks to adaptively
|
| 61 |
+
73 select, compose, and store representative embeddings with three levels of prototypes, i.e., atomic
|
| 62 |
+
74 level, node-level, and class-level. Given a new node, only the relevant AFEs and prototypes in each
|
| 63 |
+
75 level will be activated and refined, while others are uninterrupted. Eventually, each node can be
|
| 64 |
+
76 represented with a tri-level prototypes which encode its feature as well as structure information from
|
| 65 |
+
77 different abstract levels and can be used for downstream tasks such as node classification. Finally, we
|
| 66 |
+
78 provide the theoretical analysis for the memory consumption upper bound of HPNs and its continual
|
| 67 |
+
79 learning capability. To summarize, the main contributions of our work include:
|
| 68 |
+
|
| 69 |
+
• We present a novel framework, i.e., Hierarchical Prototype Networks (HPNs), to continuously extract different levels of abstract knowledge (in the form of prototypes) from the graph data such that new knowledge will be accommodated while earlier experience can be well retained.
|
| 70 |
+
• We provide the theoretical analysis for the memory consumption upper bound of HPNs and its continual learning capability.
|
| 71 |
+
• Our experiment results on eight different public datasets demonstrate that the proposed HPNs not only achieve state-of-the-art performance, exhibiting good continual learning capability, but also use less parameters (more efficient). For instance, on OGB-Products dataset that contains more than 2 million nodes and 47 categories of nodes, HPNs achieves around $8 0 \%$ accuracy with only thousands of parameters.
|
| 72 |
+
|
| 73 |
+
# 91 2 Hierarchical Prototype Networks
|
| 74 |
+
|
| 75 |
+
92 In this section, we first state the problem we aim to study and the notations. Then we present
|
| 76 |
+
93 Hierarchical Prototype Networks (HPNs) that consist of two core modules, i.e., Atomic Feature
|
| 77 |
+
94 Extractor (AFEs) and Hierarchical Prototype Networks (HPNs), as shown in Figure 1. AFEs serve to
|
| 78 |
+
95 extract a set of atomic features from the given graph, and the HPNs aim to select, compose, and store
|
| 79 |
+
96 the representative features in the form of different levels of prototypes. During the training stage,
|
| 80 |
+
97 each node will only refine the relevant AFEs and prototypes of the model without interfering with the
|
| 81 |
+
98 irrelevant parts (i.e., to avoid catastrophic forgetting). In the test stage, the model will activate the
|
| 82 |
+
99 relevant AFEs and prototypes to perform the inference.
|
| 83 |
+
|
| 84 |
+

|
| 85 |
+
Figure 1: The framework of HPNs. On the left, subgraphs from different tasks come in sequentially. Given a node $v$ . $\overset { \cdot } { u } _ { k } ^ { j }$ denotes the $j$ -th sampled node from $k$ -hop neighbors. In the middle, node $v$ and the sampled neighbors are fed into the selected AFEs to get atomic embeddings, which are either matched to existing A-prototypes or used as new A-prototypes. The selected A-prototypes are further matched to a $\Nu _ { - }$ and a C-prototype for the hierarchical representation, which is finally fed into the classifier to perform node classification.
|
| 86 |
+
|
| 87 |
+
# 2.1 Problem Statement and Notations
|
| 88 |
+
|
| 89 |
+
We study continual learning on graphs that have new categories of nodes and associated edges (in the form of subgraphs) emerging in a continuous manner. In the context of continual learning, assuming we have a sequence of $p$ tasks $\{ \mathcal { T } ^ { i } | i = 1 , . . . , p \}$ , in which each task $\mathcal { T } ^ { i }$ aims to learn a satisfied representation for a new subgraph $\mathcal { G } _ { i }$ consisting of nodes belonging to some new categories. A desired model should maintain its performance on all previous tasks after being successively trained on the sequence of $p$ tasks from ${ \mathcal { T } } ^ { \hat { 1 } }$ to $\mathcal { T } ^ { p }$ .
|
| 90 |
+
|
| 91 |
+
For simplicity, we omit the subscripts in this section. Full notations will be used in the theoretical analysis. Each graph $\mathcal { G }$ consists of a node set $\mathbb { V } = \{ v _ { i } | i = 1 , . . . , N \}$ with $N$ nodes and an edge set $\mathbb { E } = \dot { \{ ( v _ { i } , v _ { j } ) \} }$ denoting the connections of nodes in $\mathbb { V }$ . Each node $v _ { i }$ can be represented as a feature vector $\mathbf { x } ( v _ { i } ) \in \mathbb { R } ^ { d _ { v } }$ that encodes node attributes, e.g., gender, nationality, hobby, etc. The set of $l$ -hop neighboring nodes of $v _ { i }$ is defined as $\mathcal { N } ^ { l } ( v _ { i } )$ , with $\mathcal { N } ^ { 0 } ( v _ { i } ) = \{ v _ { i } \}$ .
|
| 92 |
+
|
| 93 |
+
# 2.2 Atomic Feature Extractors
|
| 94 |
+
|
| 95 |
+
113 Based on the assumption that different nodes can be decomposed into basic atomic characteristics
|
| 96 |
+
114 belonging to a set of attributes (e.g., gender, nationality, hobby, etc.) and the relations between a
|
| 97 |
+
115 pair of nodes can also be categorized into different types (e.g., trust or distrust in a social network),
|
| 98 |
+
116 we develop Atomic Feature Extractors (AFEs) to consider two different sets of atomic embeddings,
|
| 99 |
+
117 i.e., atomic node embeddings which encode the node features and atomic structure embeddings
|
| 100 |
+
118 that encode its relations to neighbors within multi-hop. Specifically, to ensure that each node can
|
| 101 |
+
119 be represented as different combinations of a subset of atomic features, AFEs are designed as
|
| 102 |
+
120 learnable linear transformations $\mathrm { A F E } _ { \mathrm { n o d e } } = \{ \mathbf { A } _ { i } \in \mathbb { R } ^ { d _ { v } \times d _ { a } } | i \in \{ 1 , . . . , l _ { a } \} \}$ and $\mathrm { A F E } _ { \mathrm { s t r u c t } } = \{ \mathbf { R } _ { j } \in$
|
| 103 |
+
121 $\mathbb { R } ^ { d _ { v } \times d _ { r } } | j \in \{ 1 , . . . , l _ { r } \} \}$ where $\mathbf { A } _ { i }$ and ${ \bf R } _ { j }$ are real matrices to encode atomic node and structure
|
| 104 |
+
122 information, respectively. $l _ { a }$ and $l _ { r }$ denotes the cardinality of $\mathrm { A F E _ { n o d e } }$ and $\mathrm { A F E _ { s t r u c t } }$ , respectively.
|
| 105 |
+
123 Given a node $v$ , a set of atomic node embeddings is obtained by applying $\mathrm { A F E _ { n o d e } }$ to the feature
|
| 106 |
+
124 vector ${ \bf x } ( v )$ :
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathbb { E } _ { A } ^ { \mathrm { n o d e } } ( v ) = \{ \mathbf { x } ^ { T } ( v ) \mathbf { A } _ { i } | \mathbf { A } _ { i } \in \mathrm { A F E } _ { \mathrm { n o d e } } \} .
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
125 To obtain atomic structure embeddings, the multi-hop neighboring nodes of $v$ have to be considered. 126 We first uniformly sample a fixed number of vertices from 1-hop up to $h$ -hop neighborhood, i.e., 127 $\mathcal { N } _ { s u b } ( v ) \subseteq \quad \bigcup \quad \bar { \mathcal { N } } ^ { l } ( v )$ . Then these selected nodes are embedded via projection matrices in $l { \in } \{ 1 , { \ldots } , h \}$
|
| 113 |
+
|
| 114 |
+
128 $\mathrm { A F E _ { s t r u c t } }$ to encode different types of interactions with the target node $v$ :
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\begin{array} { r } { \mathbb { E } _ { A } ^ { \mathrm { s t r u c t } } ( v ) = \{ \mathbf { x } ^ { T } ( u ) \mathbf { R } _ { i } | \mathbf { R } _ { i } \in \mathrm { A F E } _ { \mathrm { s t r u c t } } , u \in \mathcal { N } _ { s u b } \} . } \end{array}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
129 Finally, the complete atomic feature set of target node $v$ is:
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\mathbb { E } _ { A } ( v ) = \mathbb { E } _ { A } ^ { \mathrm { n o d e } } ( v ) \cup \mathbb { E } _ { A } ^ { \mathrm { s t r u c t } } ( v ) .
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
130 Note that $\mathbf { A } _ { i }$ and $\mathbf { R } _ { i }$ are designed to generate different types of atomic features. To ensure that, we
|
| 127 |
+
131 impose a divergence loss on AFEs to ensure they are be uncorrelated with each other and thus can
|
| 128 |
+
132 map features to different subspaces:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\mathcal { L } _ { d i v } = \sum _ { i \neq j } \mathbf { A } _ { i } ^ { T } \mathbf { A } _ { j } + \sum _ { i \neq j } \mathbf { R } _ { i } ^ { T } \mathbf { R } _ { j } .
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
# 2.3 Hierarchical Prototype Networks
|
| 135 |
+
|
| 136 |
+
134 With the atomic features extracted based on AFEs, hierarchical prototype networks (HPNs) will select,
|
| 137 |
+
135 compose, and store representative features in the form of different levels of prototypes as shown in
|
| 138 |
+
136 Figure 1. This is mainly achieved by refining existing prototypes and creating new prototypes only
|
| 139 |
+
137 when necessary. Specifically, HPNs will produce three different levels of prototypes, i.e., atomic
|
| 140 |
+
138 level prototypes (A-prototypes), node-level prototypes (N-prototypes), and class-level prototypes
|
| 141 |
+
139 (C-prototypes). From atomic-level to class-level, the prototypes denote abstract knowledge of the
|
| 142 |
+
140 graph at different scales which is analog to the feature maps of convolutional neural networks at
|
| 143 |
+
141 different layers.
|
| 144 |
+
142 We first introduce how HPNs can refine existing prototypes. For each task that contains certain
|
| 145 |
+
143 categories of nodes, instead of using all atomic embeddings generated by existing AFEs, HPNs only
|
| 146 |
+
144 select a small and fixed number of AFEs from both $\mathrm { A F E _ { n o d e } }$ and $\mathrm { A F E _ { s t r u c t } }$ which are more relevant
|
| 147 |
+
145 to the given task. In this way, only the relevant AFEs are refined while others remain uninterrupted.
|
| 148 |
+
146 Specifically, as shown in Figure 1, given a node from an incoming subgraph, each AFE is used to
|
| 149 |
+
147 generate an embedding. Those AFEs with embeddings that are closedeemed as more confident ones and chosen. Formally, we first obtain $\mathbb { E } _ { A } ^ { \mathrm { n o d e } } ( v )$ ing and $\mathbb { E } _ { A } ^ { \mathrm { s t r u c t } } ( v )$ pes arevia Eq.
|
| 150 |
+
149 (1) and Eq. (2), respectively. Then, we calculate the maximum cosine similarity between atomic
|
| 151 |
+
150 embeddings of each AFE $\left( \mathbf { e } _ { i } \right)$ and the A-prototypes as:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\mathrm { S i m M A X } _ { i } ^ { \mathrm { i d } } = \operatorname* { m a x } _ { \mathbf { p } } ( \frac { \mathbf { e } _ { i } ^ { T } \mathbf { p } } { \| \mathbf { e } _ { i } \| _ { 2 } \| \mathbf { p } \| _ { 2 } } ) , \mathbf { e } _ { i } \in \mathbb { E } _ { A } ^ { \mathrm { i d } } ( v ) , \mathbf { p } \in \mathbb { P } _ { A } ,
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
151 where $\mathsf { i d } \in \{ \mathrm { n o d e } , \mathrm { s t r u c t } \} ,$ $i$ ranges from 1 to $l _ { a }$ (or $l _ { r , }$ ), and $\mathbb { P } _ { A }$ is the atomic prototype set containing
|
| 158 |
+
152 all A-prototypes. After that, we sort the AFEs in a descending order according to $\mathrm { S i m M A X } _ { i } ^ { \mathrm { i d } }$ as
|
| 159 |
+
153 $\mathrm { A F E _ { n o d e } ^ { s o r t } } = \left\{ \mathbf { A } _ { i ^ { \prime } } \in \mathbb { R } ^ { d _ { v } \times d _ { a } } | i ^ { \prime } \in \{ 1 , . . . , l _ { a } \} \right\}$ and $\mathrm { A F E } _ { \mathrm { s t r u c t } } ^ { \mathrm { s o r t } } = \{ \mathbf { R } _ { j ^ { \prime } } \in \mathbb { R } ^ { d _ { v } \times \bar { d } _ { r } } | j ^ { \prime } \in \{ 1 , . . . , \bar { l } _ { r } \} \}$
|
| 160 |
+
154 Finally, we select the top $l _ { a } ^ { \prime }$ and top $l _ { r } ^ { \prime }$ ranked AFEs from these two sets as $\mathrm { A F E } _ { \mathrm { n o d e } } ^ { \mathrm { s e l e c t } }$ and AFEselectstruct ,
|
| 161 |
+
155 respectively. and are fixed hyperparameters with and . The atomic embeddings
|
| 162 |
+
156 generated by these selected AFEs are denoted as $\mathbb { E } _ { A } ^ { \mathrm { s e l e c t } } ( v )$ .
|
| 163 |
+
157 Based on $\mathbb { E } _ { A } ^ { \mathrm { s e l e c t } } ( v )$ , HPNs then starts to distill representative features, which is conducted by refining
|
| 164 |
+
158 existing prototypes and creating new prototypes simultaneously. A matching process is first conducted
|
| 165 |
+
159 between the $\bar { \mathbb { E } } _ { A } ^ { \mathrm { s e l e c t } } ( v )$ and $\mathbb { P } _ { A }$ to recognize the atomic features that are compatible with exiting A
|
| 166 |
+
160 prototypes and those ones to be accommodated with new A-prototypes. Formally, we measure the
|
| 167 |
+
161 cosine similarity between elements in $\mathbb { E } _ { A } ^ { \mathrm { s e l e c t } } ( v )$ and elements in $\mathbb { P } _ { A }$ as
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\mathrm { S i m } _ { E \to A } ( v ) = \{ \frac { \mathbf { e } _ { i } ^ { T } \mathbf { p } } { \| \mathbf { e } _ { i } \| _ { 2 } \| \mathbf { p } \| _ { 2 } } | \mathbf { e } _ { i } \in \mathbb { E } _ { A } ^ { \mathrm { s e l e c t } } ( v ) , \mathbf { p } \in \mathbb { P } _ { A } \} .
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
162 The atomic embeddings that are compatible with existing A-prototypes are these ones with cosine
|
| 174 |
+
163 similarity not less than a certain threshold $t _ { A }$ to have at least one existing A-prototype, i.e.,
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\mathbb { E } _ { o l d } ( v ) = \{ \mathbf { e } _ { i } | \quad \exists \mathbf { p } \in \mathbb { P } _ { A } \quad s . t . \quad \frac { \mathbf { e } _ { i } ^ { T } \mathbf { p } } { \| \mathbf { e } _ { i } \| _ { 2 } \| \mathbf { p } \| _ { 2 } } \geqslant t _ { A } \} .
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
164 $\mathbb { E } _ { o l d } ( v )$ collects a set of atomic embeddings satisfying the previous condition and can be used to
|
| 181 |
+
165 refine $\mathbb { P } _ { A }$ . To this end, a distance loss $\mathcal { L } _ { d i s }$ is computed to enhance the cosine similarity between
|
| 182 |
+
166 each $\mathbf { e } _ { i } \in \mathbb { E } _ { o l d } ( v )$ and its corresponding A-prototype $\mathbf { p } _ { i } \in \mathbb { P } _ { A }$ , i.e.,
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
\mathcal { L } _ { d i s } = - \sum _ { \mathbf { e } _ { i } \in \mathbb { E } _ { o l d } ( v ) } \frac { \mathbf { e } _ { i } ^ { T } \mathbf { p } _ { i } } { \Vert \mathbf { e } _ { i } \Vert _ { 2 } \Vert \mathbf { p } _ { i } \Vert _ { 2 } }
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
167 By minimizing $\mathcal { L } _ { d i s }$ , not only the existing A-prototypes in $\mathbb { P } _ { A }$ will get refined, the atomic embeddings
|
| 189 |
+
168 will also be closer to ‘standard’ A-prototypes.
|
| 190 |
+
|
| 191 |
+
# Algorithm 1: Learning Procedure for HPNs.
|
| 192 |
+
|
| 193 |
+
Input :Task sequence: $\{ \mathcal { T } _ { 1 } , . . . , \mathcal { T } _ { p } \}$ , HPNs
|
| 194 |
+
|
| 195 |
+
1 for $\tau 1$ to $p$ do
|
| 196 |
+
|
| 197 |
+
2 Get the data of the current task: V, E, $\mathbf { X } ( \mathbb { V } ) = \{ \mathbf { x } ( v ) | v \in \mathbb { V } \}$ .
|
| 198 |
+
3 Select $\mathrm { A F E _ { n o d e } ^ { s e l e c t } }$ and AFEselectstruct .
|
| 199 |
+
4 Compute $\mathcal { L } = \mathrm { H P N s } ( \mathbb { V } , \mathbf { X } ( \mathbb { V } ) , \mathbb { E } )$ .
|
| 200 |
+
5 $\mathcal { L } = \mathrm { H P N s } ( \mathbb { V } , \mathbf { X } ( \mathbb { V } ) , \mathbb { E } )$ .
|
| 201 |
+
6 Optimize $\mathcal { L }$ .
|
| 202 |
+
|
| 203 |
+
Output :updated HPNs
|
| 204 |
+
|
| 205 |
+
169 Next, we discuss how to deal with the atomic embeddings that are not close to any existing prototypes,
|
| 206 |
+
|
| 207 |
+
171 Contrary to $\mathbb { E } _ { o l d } ( v )$ , atomic embeddings in $\mathbb { E } _ { n e w } ( v )$ are regarded as new atomic features of the
|
| 208 |
+
172 corresponding AFEs. In this case, new prototypes should be generated to accommodate them.
|
| 209 |
+
|
| 210 |
+
173 Considering that very similar embeddings may exist in $\mathbb { E } _ { n e w } ( v )$ and cause HPNs to create redundant prototypes, we first filter 174 $\mathbb { E } _ { n e w } ( v )$ into $\mathbb { E } _ { n e w } ^ { \prime } ( v )$ to keep only the representative ones such that
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
\forall \mathbf { e } _ { i } , \mathbf { e } _ { j } \in \mathbb { E } _ { n e w } ^ { \prime } ( v ) , \frac { \mathbf { e } _ { i } ^ { T } \mathbf { e } _ { j } } { \lVert \mathbf { e } _ { i } \rVert _ { 2 } \lVert \mathbf { e } _ { j } \rVert _ { 2 } } < t _ { A } .
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
Then, 175 $\mathbb { E } _ { n e w } ^ { \prime } ( v )$ is included into $\mathbb { P } _ { A }$ as new A-prototypes, which will be further refined in the future.
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\mathbb { P } _ { A } = \mathbb { P } _ { A } \cup \mathbb { E } _ { n e w } ^ { \prime } ( v ) .
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
176 After generating new prototypes, the matching will be conducted to get a new $\mathrm { S i m } _ { E A } ( v )$ in which
|
| 223 |
+
177 each element is not less than $t _ { A }$ . Then each element in $\mathbb { E } _ { A } ^ { \mathrm { s e l e c t } } ( v )$ is assigned a closest A-prototype
|
| 224 |
+
178 according to $\mathrm { S i m } _ { E A } ( v )$ , and each node is associated with a set of atomic prototypes $\mathbb { A } ( v )$ .
|
| 225 |
+
179 To map $\mathbb { A } ( v )$ to high level prototypes so as to obtain hierarchical prototype representations. $\mathbb { A } ( v )$ is
|
| 226 |
+
180 firstly mapped to a N-prototype denoting the overall features of $v$ . We assume that $_ \mathrm { N }$ -prototypes lie
|
| 227 |
+
181 in a $d _ { n }$ dimensional space and a fully connected layer is applied to transform $\mathbb { A } ( v )$ into the new space
|
| 228 |
+
182 $\begin{array} { r } { \mathbb { E } _ { N } ( v ) = \mathrm { F C } _ { A N } ( \mathbf { a } _ { 1 } \oplus \dots \oplus \mathbf { a } _ { l _ { a } ^ { \prime } + l _ { r } ^ { \prime } } ) , \forall \mathbf { a } _ { i } \in \mathbb { A } ( v ) } \end{array}$ , where $\oplus$ denotes the concatenation operator.
|
| 229 |
+
183 With $\mathbb { E } _ { N } ( v )$ , we then find a matching $\mathbf { N }$ -prototype or establish a new one, which is similar to the
|
| 230 |
+
184 process at atomic level except that the threshold is set as $t _ { N }$ , instead of $t _ { A }$ . Learning class-level
|
| 231 |
+
185 prototypes from node-level prototypes is same except that we set the matching threshold as $t _ { C }$ .
|
| 232 |
+
186 Finally, the hierarchical prototype representations of the target node is contained in the following set
|
| 233 |
+
|
| 234 |
+
$$
|
| 235 |
+
\mathbb { P } _ { H } ( v ) = \mathbb { A } ( v ) \cup \mathbb { N } ( v ) \cup \mathbb { C } ( v ) .
|
| 236 |
+
$$
|
| 237 |
+
|
| 238 |
+
187 Note that $\mathbb { A } ( v )$ contains multiple A-prototypes denoting atomic features of $v$ from different aspects.
|
| 239 |
+
188 $\mathbb { N } ( v )$ and $\mathbb { C } ( v )$ only contain one $\mathbf { N } .$ -prototype and one C-prototype, representing the overall character
|
| 240 |
+
189 istics of $v$ and the common characteristics shared by the community containing $v$ , respectively.
|
| 241 |
+
|
| 242 |
+
# 2.4 Learning Objective
|
| 243 |
+
|
| 244 |
+
191 The obtained hierarchical prototypes for each node are first concatenated into a unified vector and
|
| 245 |
+
192 then pass through a fully connected layer FC to obtain a $c$ (the number of classes) dimensional
|
| 246 |
+
193 feature vector, i.e., $\mathrm { F C } ( \mathbf { h } _ { 1 } \oplus \cdots \oplus \mathbf { h } _ { l _ { a } ^ { \prime } + l _ { r } ^ { \prime } + 2 } ) , \forall \mathbf { h } _ { i } \in \mathbb { P } _ { H } ( v )$ . In this paper, we aim to perform node
|
| 247 |
+
194 classification. Therefore, based on the $c$ dimensional feature vector and the softmax function $\sigma ( \cdot )$ ,
|
| 248 |
+
195 we can estimate the label with $\hat { y } _ { i } = \sigma ( \mathbf { F C ( h _ { 1 } } \oplus \cdots \oplus \mathbf { h } _ { l _ { a } ^ { \prime } + l _ { r } ^ { \prime } + 2 } ) ) _ { i }$ where $i$ is the index of class. To
|
| 249 |
+
196 perform node classification, with the output predictions $\hat { y } _ { i }$ and the target label $y _ { i } \in \{ 1 , 2 , . . . , c \}$ , the
|
| 250 |
+
197 corresponding classification loss is given by
|
| 251 |
+
|
| 252 |
+
$$
|
| 253 |
+
\mathcal { L } _ { c l s } = \sum _ { i = 1 } ^ { c } - y _ { i } \log ( \hat { y _ { i } } ) ,
|
| 254 |
+
$$
|
| 255 |
+
|
| 256 |
+
198199 which is essentially the cross entropy loss function. Note that besides node classification, $\mathbb { P } _ { H } ( v )$ may
|
| 257 |
+
200 also be used for other tasks based on different objective functions. In this paper, we focus on node
|
| 258 |
+
201 classification and the overall loss of HPNs is:
|
| 259 |
+
|
| 260 |
+
$$
|
| 261 |
+
\mathcal { L } = \mathcal { L } _ { d i s } + \mathcal { L } _ { d i v } + \mathcal { L } _ { c l s } .
|
| 262 |
+
$$
|
| 263 |
+
|
| 264 |
+
202 During the training stage, subgraphs with different tasks (containing different categories of nodes) are
|
| 265 |
+
203 continuously fed to HPNs. Note that unlike topology-aware weight preserving (TWP) method [17],
|
| 266 |
+
204 HPNs do not require task indicator for training and test, and therefore is more practical for real-world
|
| 267 |
+
205 continual graph representation learning applications.
|
| 268 |
+
|
| 269 |
+
# 2.5 Theoretical Analysis
|
| 270 |
+
|
| 271 |
+
In this subsection, we provide the theoretical upper bound for the memory consumption and analyze how the model configuration would affect HPNs’ capacity in dealing with different tasks. Both theoretical results are justified and analyzed in the experiments. Only the main results are provided here, while the detailed proof and analysis are given in Appendix.
|
| 272 |
+
|
| 273 |
+
11 We first show that the numbers of different prototypes are upper bounded by the number of atomic
|
| 274 |
+
12 feature extractors and the dimension of the prototypes. Specifically, we have:
|
| 275 |
+
13 Theorem 1 (Upper bounds for numbers of prototypes). Given the notations defined in HPNs, the
|
| 276 |
+
14 upper bound for the number of A-prototypes $n _ { a }$ can be given by
|
| 277 |
+
|
| 278 |
+
$$
|
| 279 |
+
n _ { A } \leqslant ( l _ { a } + l _ { r } ) \operatorname* { m a x } _ { N } S ( d _ { a } , N , 1 - t _ { A } ) ,
|
| 280 |
+
$$
|
| 281 |
+
|
| 282 |
+
215 and the upper bounds for the number of N-prototypes and the $C$ -prototypes are:
|
| 283 |
+
|
| 284 |
+
$$
|
| 285 |
+
n _ { N } \leqslant \operatorname* { m a x } _ { N } S ( d _ { n } , N , 1 - t _ { N } ) \quad a n d \quad n _ { C } \leqslant \operatorname* { m a x } _ { N } S ( d _ { c } , N , 1 - t _ { C } )
|
| 286 |
+
$$
|
| 287 |
+
|
| 288 |
+
216 where $S ( n , N , t )$ is the spherical code defined on a n dimensional hypersphere (details in Appendix).
|
| 289 |
+
|
| 290 |
+
217 Theorem 1 provides an upper bound for the memory consumption of HPNs. In our experiments, we
|
| 291 |
+
218 show that the number of parameters for most baseline methods are even higher than this upper bound.
|
| 292 |
+
219 Besides memory consumption, the more important problem for a continual learning model is the
|
| 293 |
+
220 capability to maintain memory on previously learned tasks. Based on our model design, we formulate
|
| 294 |
+
221 this as: whether learning new tasks affect the representations the model generates for old task data.
|
| 295 |
+
222 We give explicit definitions on tasks and task distances based on set theory (in Appendix), then
|
| 296 |
+
223 construct a bound to indicate what configuration would the model have to ensure this capability.
|
| 297 |
+
224 Theorem 2 (Task distance preserving). For HPNs trained on consecutive tasks $\mathcal { T } ^ { p }$ and $\mathcal { T } ^ { p + 1 }$ .
|
| 298 |
+
225 If $l _ { a } d _ { a } + l _ { r } d _ { r } \geqslant ( l _ { r } + 1 ) { \bar { d } } _ { v }$ and W is column full rank, then as long as $t _ { A } ~ < ~ \lambda _ { \mathrm { m i n } } ( l _ { r } ~ +$
|
| 299 |
+
226 $\begin{array} { r l } { { 1 } ) \mathbf { d i s t } ( \mathbb { V } _ { p } , \mathbb { V } _ { p + 1 } ) } & { { } } \end{array}$ , learning on $\mathcal { T } ^ { p + 1 }$ will not modify representations HPNs generate for data from
|
| 300 |
+
227 $\mathcal { T } ^ { p }$ , i.e. catastrophic forgetting is avoided.
|
| 301 |
+
228 In Theorem 2, $\lambda _ { i }$ is eigenvalues of the $\mathbf { W } ^ { T } \mathbf { W }$ , where W is a matrix constructed via AFEs (details in
|
| 302 |
+
229 Appendix). $d _ { v }$ , $d _ { a }$ and $d _ { r }$ are dimensions of data and two kinds of atomic embeddings. The bound in
|
| 303 |
+
230 this theorem is not tight, as the tight bound would be dependant on the specific dataset properties.
|
| 304 |
+
231 But this informs us that either the number of AFEs or the dimension of the prototypes has to be large
|
| 305 |
+
232 enough to ensure that data from two tasks can be well separated in the representation space.
|
| 306 |
+
|
| 307 |
+
According to Theorem 1, the upper bound of the memory consumption is dependent on $S ( d _ { a } , N , t _ { A } )$ , $S ( d _ { n } , N , t _ { N } )$ , and $S ( d _ { c } , N , t _ { C } )$ . As $S ( n , N , t )$ grows fast with $n$ , we prefer larger number of AFEs with smaller prototype dimensions. We also empirically demonstrate this in Section 3.6. Besides, the upper bound proposed in Theorem 1 is explicitly computed and compared to experimental results.For both theorems, proofs and detailed explanations are included in Appendix.
|
| 308 |
+
|
| 309 |
+
# 3 Experiments
|
| 310 |
+
|
| 311 |
+
In the experiments, we answer the following six questions: (1) Whether HPNs can outperform state-of-the-art approaches? (2) How does each component of HPNs contribute to its performance? (3) Whether HPNs can memorize previous tasks after learning each new task? (4) Are HPNs sensitive to the hyperparameters? (5) Whether the theoretical results can be empirically verified? (6) Whether the learned prototypes can be interpreted via visualization?
|
| 312 |
+
|
| 313 |
+
# 3.1 Datasets
|
| 314 |
+
|
| 315 |
+
To assess the effectiveness of the proposed HPNs, we consider 8 datasets which include 3 citation networks (Cora [27], Citeseer[27], OGB-Arxiv [32, 20]), 3 web page networks (Wisconsin, Cornell, Texas) [22], 1 actor co-occurence network (Actor) [22], and 1 product co-purchasing networks (OGB-Products [4]). Detailed statistics about these datasets are provided in the Appendix.
|
| 316 |
+
|
| 317 |
+
Among these datasets, the results of 4 datasets, i.e., Cora, Citeseer, OGB-Arxiv (169,343 nodes, 1,166,243 edges), and OGB-Products (2,449,029 nodes, 61,859,140 edges), are reported in the paper and the results of other 4 datasets are available in the Appendix.
|
| 318 |
+
|
| 319 |
+
# 3.2 Experimental Setup and Evaluation Metrics
|
| 320 |
+
|
| 321 |
+
To perform continual graph representation learning with new categories of nodes continuously emerging, we adopt a class-incremental scheme for all datasets. Each new task brings a subgraph with new categories of nodes and associated edges, e.g., task 1 contains classes 1 and 2, task 2 contains new classes 3 and 4, etc. Each model is trained on a sequence of tasks, and the performance will be evaluated on all previous tasks. Specifically, we adopt accuracy mean (AM) and forgetting mean (FM) as metrics for evaluation. After learning on all tasks, the AM and FM are computed as the average accuracy and the average accuracy decrease on all previous tasks. Negative FM indicates the existence of forgetting , zero FM denotes no forgetting and positive FM denotes positive knowledge transfer between tasks. For HPNs, we set $d _ { a } = d _ { n } = d _ { c } = 1 6 \AA$ , $l _ { a } = l _ { r } = 2 2$ , and $h = 2$ . The threshold $t _ { A }$ , $t _ { N }$ , and $t _ { C }$ are selected by cross validation on $\{ 0 . 0 1 , 0 . 0 5 , 0 . 1 , 0 . 1 5 , 0 . 2 , 0 . 2 5 , 0 . 3 , 0 . 3 5 , 0 . 4 \}$ . The experiments on the important hyperparameters are provided in Section 3.6. All experiments are run on an Nvidia Titan Xp GPU. Full implementation details are in Appendix, and the code is available in supplementary materials.
|
| 322 |
+
|
| 323 |
+
Table 1: Performance comparisons between HPNs and baselines on 4 different datasets.
|
| 324 |
+
|
| 325 |
+
<table><tr><td rowspan="2">C.L.T.</td><td rowspan="2">Base</td><td colspan="2">Cora</td><td colspan="2">Citeseer</td><td colspan="2">OGB-Arxiv</td><td colspan="2">OGB-Products</td></tr><tr><td>AM/%</td><td>FM/%</td><td>AM/%</td><td>FM /%</td><td>AM/%</td><td>FM /%</td><td>AM/%</td><td>FM /%</td></tr><tr><td rowspan="3">None</td><td>GCN GAT</td><td>63.5±1.9 71.9±3.8</td><td>-42.3±0.4 -33.1±2.3</td><td>64.5±3.9 66.8±0.9</td><td>-7.7±1.6 -19.6±0.3</td><td>56.8±4.3 54.3±3.5</td><td>-19.8±3.2 -21.76± 4.6</td><td>45.2±5.6 44.9±6.9</td><td>-27.8±7.1 -30.3±5.2</td></tr><tr><td>GIN</td><td>68.3±2.3</td><td>-35.4±3.4</td><td>57.7±2.3</td><td>-36.4±0.3</td><td>53.2± 6.5</td><td>-23.59 ±8.1</td><td>43.1±7.4</td><td>-31.4±8.8</td></tr><tr><td></td><td></td><td></td><td>54.4±4.2</td><td></td><td>72.1±2.4</td><td>-9.1±1.9</td><td></td><td>-8.4±0.4</td></tr><tr><td rowspan="3">EWC [13]</td><td>GCN GAT</td><td>63.1±1.2 72.2±1.5</td><td>-42.7±1.6 -32.2±1.6</td><td>65.7±2.5</td><td>-30.3±0.9 -19.7±2.3</td><td>73.2 ±1.1</td><td>-10.8 ±2.1</td><td>66.7±0.5 67.9±1.0</td><td>-9.65±1.3</td></tr><tr><td>GIN</td><td>69.6±2.6</td><td></td><td>57.9±3.4</td><td></td><td>74.1 ±1.7</td><td>-8.3 ±2.0</td><td></td><td>-13.6±1.5</td></tr><tr><td></td><td></td><td>-28.5±2.8</td><td></td><td>-36.3±2.4</td><td></td><td></td><td>67.3±2.3</td><td></td></tr><tr><td rowspan="3">LwF [15]</td><td>GCN</td><td>76.1±1.4</td><td>-21.3±2.4</td><td>67.0±0.2</td><td>-8.3±2.7</td><td>69.9 ± 3.9</td><td>-12.1±2.8</td><td>66.3±2.5</td><td>-11.8±3.4</td></tr><tr><td>GAT</td><td>70.8±2.8</td><td>-34.6±4.1</td><td>66.1±4.1</td><td>-18.9±1.5</td><td>68.9±4.4</td><td>-13.6±3.3</td><td>65.1±4.1</td><td>-13.2±2.9</td></tr><tr><td>GIN</td><td>74.1±2.7</td><td>-23.3±0.8</td><td>63.1±1.9</td><td>-16.5±2.2</td><td>71.4 ±4.8</td><td>-15.9±5.6</td><td>65.9±4.0</td><td>-10.7±3.1</td></tr><tr><td rowspan="3">GEM [18]</td><td>GCN</td><td>75.7±3.0</td><td>-6.5±4.4</td><td>41.8±2.6</td><td>-31.9±1.4</td><td>75.4±1.7</td><td>-13.6±0.5</td><td>71.3±1.7</td><td>-10.5±0.9</td></tr><tr><td>GAT</td><td>69.8±3.0</td><td>-26.1±2.6</td><td>71.3±2.2</td><td>+9.0±1.5</td><td>76.6 ±0.7</td><td>-11.3±0.4</td><td>70.4±0.8</td><td>-10.9±1.6</td></tr><tr><td>GIN</td><td>80.2±3.3</td><td>-2.0±4.2</td><td>49.7±0.5</td><td>-24.5±0.9</td><td>77.3 ±2.1</td><td>-11.2±1.6</td><td>76.5±3.3</td><td>-7.2±2.5</td></tr><tr><td rowspan="3">MAS [1]</td><td>GCN</td><td>65.5±1.9</td><td>-21.4±3.7</td><td>59.5±3.1</td><td>-0.1±2.4</td><td>69.8 ±0.4</td><td>-18.8±0.9</td><td>62.0±1.1</td><td>-17.9±1.9</td></tr><tr><td>GAT</td><td>84.7±0.7</td><td>-5.6±2.0</td><td>69.1±1.1</td><td>-4.8±3.3</td><td>70.6 ±1.3</td><td>-16.7 ±1.6</td><td>64.4±2.3</td><td>-14.5±3.2</td></tr><tr><td>GIN</td><td>76.7±2.6</td><td>-4.0±3.6</td><td>65.2±3.9</td><td>+0.0±2.0</td><td>65.3±2.9</td><td>-17.0±2.3</td><td>61.4±3.8</td><td>-20.9±2.9</td></tr><tr><td rowspan="3">ERGN. [39]</td><td>GCN</td><td>63.5±2.4</td><td>-42.3±0.7</td><td>54.2±3.9</td><td>-30.3±1.9</td><td>63.3±1.7</td><td>-18.1±0.9</td><td>60.7±2.8</td><td>-26.6±3.3</td></tr><tr><td>GAT</td><td>71.1±2.5</td><td>-34.3±1.0</td><td>65.5±0.3</td><td>-20.4±3.9</td><td>63.5±2.4</td><td>-19.5±1.9</td><td>61.3±1.7</td><td>-25.1±0.8</td></tr><tr><td>GIN</td><td>68.3±0.4</td><td>-35.4±0.4</td><td>57.7±3.1</td><td>-36.4±1.3</td><td>69.2± 1.8</td><td>-11.8±1.4</td><td>61.8±4.7</td><td>-23.4±7.9</td></tr><tr><td rowspan="3">TWP [17]</td><td>GCN</td><td>68.9±0.9</td><td>-5.7±1.5</td><td>60.5±3.8</td><td>-0.3±4.4</td><td>75.6±0.3</td><td>-10.4±0.5</td><td>69.9±0.4</td><td></td></tr><tr><td>GAT</td><td>81.3±3.2</td><td>-14.4±1.5</td><td>69.8±1.5</td><td>-8.9±2.6</td><td>75.8±0.5</td><td>-5.9±0.3</td><td>69.3±2.3</td><td>-9.0±1.1 -8.9±1.5</td></tr><tr><td>GIN</td><td>73.7±3.2</td><td>-3.9 ±2.6</td><td>68.9±0.7</td><td>-2.4±1.9</td><td>76.6±1.8</td><td>-11.3±1.1</td><td>69.9±1.4</td><td>-10.3±2.7</td></tr><tr><td rowspan="3">Join.</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>GCN</td><td>93.7±0.5</td><td>0.0±0.0</td><td>78.9 ±0.4</td><td>0.0±0.0</td><td>77.2±0.8</td><td>0.0±0.0</td><td>72.9±1.2</td><td>0.0±0.0</td></tr><tr><td>GAT</td><td>93.9 ± 0.9</td><td>0.0±0.0</td><td>79.3 ± 0.8</td><td>0.0±0.0</td><td>81.8±0.3</td><td>0.0±0.0</td><td>73.7±2.4</td><td>0.0±0.0</td></tr><tr><td></td><td>GIN</td><td>93.2 ±1.2</td><td>0.0±0.0</td><td>78.7 ±0.9</td><td>0.0±0.0</td><td>82.3±1.9</td><td>0.0±0.0</td><td>77.9±2.1</td><td>0.0±0.0</td></tr><tr><td colspan="2">HPNs</td><td colspan="3">+0.6±1.0</td><td>-0.6±0.7</td><td>85.8± 0.7 +0.6±0.9</td><td>80.1±0.8</td><td>+2.9±1.0</td></tr><tr><td rowspan="9">2</td><td rowspan="9">AM</td><td rowspan="9">93.7±1.5</td><td></td><td>79.0±0.9</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>0.85</td><td>FM</td><td>0.02 100 0.01</td><td></td><td>3.5</td></tr><tr><td></td><td></td><td>1.5</td><td></td></tr><tr><td>6</td><td></td><td></td><td></td></tr><tr><td>10</td><td>[%] W 0.00 90 -0.01</td><td></td><td></td></tr><tr><td>5</td><td></td><td></td><td></td></tr><tr><td>#AFEs</td><td>tA (c)</td><td></td><td>tA</td></tr><tr><td>(b)</td><td></td><td></td><td>(d)</td></tr></table>
|
| 326 |
+
|
| 327 |
+
# 3.3 Comparisons with Baseline Methods
|
| 328 |
+
|
| 329 |
+
We compare HPNs with various baseline methods. Experience Replay based GNN (ERGNN) [39] and Topology-aware Weight Preserving (TWP) [17] are developed for continual graph representation learning. The others approaches, including Elastic Weight Consolidation (EWC) [13], Learning without Forgetting (LwF) [15], Gradient Episodic Memory (GEM) [18], and Memory Aware Synapses (MAS) [1]) are popular continual learning methods for Euclidean data. All the baselines are imple
|
| 330 |
+
|
| 331 |
+
Table 2: Ablation study on prototypes of different levels of prototypes over Cora.
|
| 332 |
+
|
| 333 |
+
<table><tr><td></td><td></td><td></td><td>Conf.|A-p.|N-p.|C-p.|</td><td>AM%</td><td>FM%</td></tr><tr><td>1</td><td>—<</td><td></td><td>一</td><td>89.2±1.3</td><td>-0.1±0.5</td></tr><tr><td>2lI</td><td></td><td></td><td></td><td>91.7±1.1</td><td>-0.2±0.8</td></tr><tr><td></td><td></td><td></td><td></td><td>3|√|√|√|93.7±1.5</td><td>+0.6±1.0</td></tr></table>
|
| 334 |
+
|
| 335 |
+
Table 3: Ablation study on different loss terms over Cora.
|
| 336 |
+
|
| 337 |
+
<table><tr><td></td><td></td><td></td><td>Conf.| Lets|Ldiv|Ldis</td><td>AM%</td><td>FM%</td></tr><tr><td></td><td></td><td></td><td></td><td>92.4±1.3</td><td>+0.8±0.7</td></tr><tr><td>2</td><td></td><td><_</td><td></td><td>92.9±1.1</td><td>+0.3±1.0</td></tr><tr><td>3√</td><td></td><td></td><td>√</td><td>92.8±0.9</td><td>+0.0±1.2</td></tr><tr><td></td><td></td><td>4|<I√I√I</td><td></td><td>93.7±1.5</td><td>+0.6±1.0</td></tr></table>
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 3: Left: dynamics of ARS for continual learning tasks on OGB-Arxiv. Middle: impact of $t _ { A }$ on the number of prototypes in HPNs over Cora. Right: dynamics of memory consumption of HPNs on OGB-Products.
|
| 341 |
+
|
| 342 |
+
Table 4: Final parameter amount for models trained on OGB-Products
|
| 343 |
+
|
| 344 |
+
<table><tr><td></td><td>None</td><td>EWC</td><td>LwF</td><td>GEM</td><td>MAS</td><td>ERGNN</td><td>TWP</td><td>Joint</td><td>HPNs</td></tr><tr><td>GCN</td><td>2.336</td><td>46,720</td><td>4,672</td><td>2,202,336</td><td>2,336</td><td>6.738</td><td>9,344</td><td>2,336</td><td></td></tr><tr><td>GAT</td><td>20.032</td><td>400,640</td><td>40.064</td><td>2,220,032</td><td>20.032</td><td>24,432</td><td>80,128</td><td>20.032</td><td>4,908</td></tr><tr><td>GIN</td><td>2,352</td><td>47,040</td><td>4,704</td><td>2,202,352</td><td>2,352</td><td>6,752</td><td>9,408</td><td>2.352</td><td></td></tr></table>
|
| 345 |
+
|
| 346 |
+
272 mented based on three popular backbone models, i.e., Graph Convolutional Networks (GCNs) [12],
|
| 347 |
+
273 Graph Attentional Networks (GATs) [31], and Graph Isomorphism Network (GIN) [34].
|
| 348 |
+
74 Note that Joint training (Join.) in Table 1 does not represent continual learning. It allows a model to
|
| 349 |
+
75 access data of all tasks at any time and thus is often used as an upper bound for continual learning.[29].
|
| 350 |
+
|
| 351 |
+
In Table 1, we observe that regularization based approaches, e.g., EWC and TWP, generally obtain lower forgetting, but the accuracy (AM) is limited by the constraints. However, the forgetting problem of regularization based methods will become increasingly severe when the number of tasks is relatively large, as shown in Section 3.5. Memory replay based methods such as GEM achieve better performance without using any constraint. However, the memory consumption is higher (Section 3.7). HPNs significantly outperform all baselines without inheriting their limitations. Compared to regularization based methods, HPNs do not impose constraints to limit the model’s expressiveness, therefore the performance is much better. Compared to memory replay based methods, HPNs do not only perform better but also are memory efficient as shown in Section 3.7. Joint training (Join.) achieves comparable performance to HPNs on small datasets but is significantly worse on large OGB datasets. This is because joint training (Join.) is a multi-task setting, inter-task interference may cause negative transfer, which is not obvious on small datasets with only a few tasks but becomes prominent on large datasets with tens of tasks. In HPNs, different tasks can choose different combinations of the parameters and thus task interference is dramatically alleviated.
|
| 352 |
+
|
| 353 |
+
# 3.4 Ablation Study
|
| 354 |
+
|
| 355 |
+
We conduct ablation studies on different levels of prototypes and different combinations of three loss terms. In Table 2, we show the performance of HPNs when A-, N-, and C-Prototypes are gradually added (Cora dataset). We notice both AM and FM of HPNs increase when higher level prototypes are considered. This suggests that high level prototypes can enhance the model’s performance and robustness against forgetting.The effect of different combinations of loss terms are shown in Table 3. The first three rows show that adding $\mathcal { L } _ { d i v }$ or $\mathcal { L } _ { d i s }$ with $\mathcal { L } _ { c l s }$ may slightly improve the performance. By jointly considering these three terms, the performance (AM) can be further improved. This is because $\mathcal { L } _ { d i v }$ pushes different AFEs away from each other and $\mathcal { L } _ { d i s }$ makes the prototypes of each AFE be more close to its output. Jointly considering $\mathcal { L } _ { d i v }$ and $\mathcal { L } _ { d i s }$ with $\mathcal { L } _ { c l s }$ can make the prototype space better separated as shown in Section 3.8.
|
| 356 |
+
|
| 357 |
+
# 3.5 Learning Dynamics
|
| 358 |
+
|
| 359 |
+
For continual learning, it is important to memorize previous tasks after learning each new task. To measure this, instead of directly measuring the average accuracy on previous tasks which may mix up the accuracy change caused by forgetting and task differences, we develop a new metric, i.e., average retaining score (ARS), to address this problem. Specifically, after learning on a task $\mathcal { T } ^ { i }$ , the ratio between the model’s accuracy on a previous task $\scriptstyle { \dot { T } } ^ { i - m }$ and its accuracy on $\mathcal { T } ^ { i - m }$ after it had been just learned on $\mathcal { T } ^ { i - m }$ is defined as the retaining ratio. Then the ARS is the average retaining ratio of all previous tasks after learning a new task.
|
| 360 |
+
|
| 361 |
+
9 Figure 3(left) shows the ARS change of HPNs and two baselines. GAT represents the models without 10 continual learning techniques. TWP+GAT is the best baseline in terms of forgetting. GAT forgets quickly, while TWP significantly alleviates the forgetting problem for GAT. But as more tasks come 12 in, the forgetting of TWP $^ +$ GAT increases. As different tasks require different parameters, TWP+GAT (regularization based) is seeking a trade off between old and new tasks. With more new tasks, $\mathrm { T W P + G A T }$ tends to gradually adapt to new tasks and forget old ones. On contrary, HPNs maintain the ARS very well. This is because HPNs learn prototypes to denote the common basic features and learning new tasks does not hurt the parameters for old tasks. New tasks can be handled with new combinations of the existing basic prototypes. If necessary, new prototypes can be established for more expressiveness.
|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
Figure 4: Visualization of hierarchical prototype representations of nodes in the test set of Cora.
|
| 365 |
+
|
| 366 |
+
# 3.6 Parameter Sensitivity
|
| 367 |
+
|
| 368 |
+
As discussed in Section 2.5, the number of AFEs and the prototype dimensions are key factors in determining the continual learning capability and memory consumption. Here, we conduct experiments with different number of AFEs and prototype dimensions to justify the theoretical results. We keep the dimensions of different prototypes equal and the number of two types of AFEs equal for simplicity.
|
| 369 |
+
|
| 370 |
+
As shown in Figure 2(a) and (b), larger dimensions and the number of AFEs yield better AM and FM, which is consistent with Theorem 2. Besides, AM is mostly determined by the number of AFEs since HPNs compose prototypes with different AFEs to represent each target node. The number of possible combinations determines its expressiveness. Considering the above results and the bound (Theorem 1) for the number of prototypes, using large number of AFEs and small dimension can ensure both high performance and low memory usage, as verified in Section 3.7.
|
| 371 |
+
|
| 372 |
+
We also evaluate the effectiveness of HPNs when prototype thresholds vary from 0.01 to 0.4. Here, we set $t _ { A } = t _ { N } = t _ { C }$ for simplicity. In Figure 2(c) and (d), we observe that the performance (AM and FM) of HPNs are generally stable when $t _ { A }$ varies and slightly better when $t _ { A }$ is between 0.2 and 0.3. This is because when $t _ { A }$ is too small or too large, we will have too many or too less prototypes (consistent with Theorem 1) as shown in Figure 3(middle), which may cause the problem of overfitting or underfiting.
|
| 373 |
+
|
| 374 |
+
# 3.7 Memory Consumption
|
| 375 |
+
|
| 376 |
+
We compare memory consumption of different methods, as well as a explicitly theoretical memory upper bound, with the baselines on OGB-Products (the largest dataset). We also show the actual memory consumption of HPNs in the process of continual learning.
|
| 377 |
+
|
| 378 |
+
In Table 4, even on the dataset with millions of nodes and 23 tasks, HPNs can accommodate all tasks with a small amount of parameters. Besides, the dynamic change of parameter amount is shown in Figure 3(right). The red dashed line denotes the theoretical upper bound (6,163), and the computation details are included in Appendix. In Figure 3(right), we notice the actual memory usage of HPNs is much lower than the upper bound. Moreover, even the upper bound is among the lowest for memory consumption compared to baselines. The model we use here is the same as the one in Section 3.3
|
| 379 |
+
|
| 380 |
+
# 3.8 Visualization
|
| 381 |
+
|
| 382 |
+
To show that HPNs can generate interpretable prototype representations, we apply t-SNE [30] to visualize the node representations of the Cora dataset (test set) after learning each task. As shown in Figure 4, each task contains two classes corresponding to (red, blue), (green, salmon), and (purple, orange), as new tasks come in gradually, the representations are consistently well separated, which will be beneficial for downstream tasks.
|
| 383 |
+
|
| 384 |
+
# 4 Conclusion
|
| 385 |
+
|
| 386 |
+
In this paper, we proposed Hierarchical Prototype Networks (HPNs), to continuously extract different levels of abstract knowledge (in the form of prototypes) from streams of tasks on graph representation learning. The performance of HPNs is both theoretically and experimentally justified. In the future, we will apply HPNs to more application scenarios like link prediction, multi-label classification, anomaly detection, etc.
|
| 387 |
+
|
| 388 |
+
References
|
| 389 |
+
[1] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Conference on Computer Vision (ECCV), pages 139–154, 2018.
|
| 390 |
+
[2] Rahaf Aljundi, Min Lin, Baptiste Goujaud, and Yoshua Bengio. Gradient based sample selection for online continual learning. In Advances in Neural Information Processing Systems, pages 11816–11825, 2019.
|
| 391 |
+
[3] Smriti Bhagat, Graham Cormode, and S Muthukrishnan. Node classification in social networks. In Social network data analytics, pages 115–148. Springer, 2011.
|
| 392 |
+
[4] K. Bhatia, K. Dahiya, H. Jain, P. Kar, A. Mittal, Y. Prabhu, and M. Varma. The extreme classification repository: Multi-label datasets and code, 2016.
|
| 393 |
+
[5] Lucas Caccia, Eugene Belilovsky, Massimo Caccia, and Joelle Pineau. Online learned continual compression with adaptive quantization modules. In International Conference on Machine Learning, pages 1240–1250. PMLR, 2020.
|
| 394 |
+
[6] Jie Chen, Tengfei Ma, and Cao Xiao. Fastgcn: fast learning with graph convolutional networks via importance sampling. arXiv preprint arXiv:1801.10247, 2018.
|
| 395 |
+
[7] Ming Chen, Zhewei Wei, Zengfeng Huang, Bolin Ding, and Yaliang Li. Simple and deep graph convolutional networks. In International Conference on Machine Learning, pages 1725–1735. PMLR, 2020.
|
| 396 |
+
[8] Aristotelis Chrysakis and Marie-Francine Moens. Online continual learning from imbalanced data. In International Conference on Machine Learning, pages 1952–1961. PMLR, 2020.
|
| 397 |
+
[9] Mehrdad Farajtabar, Navid Azizan, Alex Mott, and Ang Li. Orthogonal gradient descent for continual learning. In International Conference on Artificial Intelligence and Statistics, pages 3762–3773. PMLR, 2020.
|
| 398 |
+
[10] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in neural information processing systems, pages 1024–1034, 2017.
|
| 399 |
+
[11] Heechul Jung, Jeongwoo Ju, Minju Jung, and Junmo Kim. Less-forgetting learning in deep neural networks. arXiv preprint arXiv:1607.00122, 2016.
|
| 400 |
+
[12] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 401 |
+
[13] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521–3526, 2017.
|
| 402 |
+
[14] Guohao Li, Matthias Muller, Ali Thabet, and Bernard Ghanem. Deepgcns: Can gcns go as deep as cnns? In Proceedings of the IEEE International Conference on Computer Vision, pages 9267–9276, 2019.
|
| 403 |
+
[15] Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017.
|
| 404 |
+
[16] David Liben-Nowell and Jon Kleinberg. The link-prediction problem for social networks. Journal of the American society for information science and technology, 58(7):1019–1031, 2007.
|
| 405 |
+
[17] Huihui Liu, Yiding Yang, and Xinchao Wang. Overcoming catastrophic forgetting in graph neural networks. arXiv preprint arXiv:2012.06002, 2020.
|
| 406 |
+
[18] David Lopez-Paz and Marc’Aurelio Ranzato. Gradient episodic memory for continual learning. In Advances in neural information processing systems, pages 6467–6476, 2017.
|
| 407 |
+
[19] Yao Ma, Ziyi Guo, Zhaocun Ren, Jiliang Tang, and Dawei Yin. Streaming graph neural networks. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 719–728, 2020.
|
| 408 |
+
[20] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. arXiv preprint arXiv:1310.4546, 2013.
|
| 409 |
+
[21] Giang Hoang Nguyen, John Boaz Lee, Ryan A Rossi, Nesreen K Ahmed, Eunyee Koh, and Sungchul Kim. Continuous-time dynamic network embeddings. In Companion Proceedings of the The Web Conference 2018, pages 969–976, 2018.
|
| 410 |
+
[22] Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. Geom-gcn: Geometric graph convolutional networks. arXiv preprint arXiv:2002.05287, 2020.
|
| 411 |
+
[23] Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 701–710, 2014.
|
| 412 |
+
[24] Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Dropedge: Towards deep graph convolutional networks on node classification. In International Conference on Learning Representations, 2019.
|
| 413 |
+
[25] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.
|
| 414 |
+
[26] Gobinda Saha and Kaushik Roy. Gradient projection memory for continual learning. In International Conference on Learning Representation, 2021.
|
| 415 |
+
[27] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina EliassiRad. Collective classification in network data. AI magazine, 29(3):93–93, 2008.
|
| 416 |
+
[28] Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. Continual learning with deep generative replay. In Advances in neural information processing systems, pages 2990–2999, 2017.
|
| 417 |
+
[29] Gido M Van de Ven and Andreas S Tolias. Three scenarios for continual learning. arXiv preprint arXiv:1904.07734, 2019.
|
| 418 |
+
[30] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(11), 2008.
|
| 419 |
+
[31] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua ´ Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017.
|
| 420 |
+
[32] Kuansan Wang, Zhihong Shen, Chiyuan Huang, Chieh-Han Wu, Yuxiao Dong, and Anshul Kanakia. Microsoft academic graph: When experts are not enough. Quantitative Science Studies, 1(1):396–413, 2020.
|
| 421 |
+
[33] Mitchell Wortsman, Vivek Ramanujan, Rosanne Liu, Aniruddha Kembhavi, Mohammad Rastegari, Jason Yosinski, and Ali Farhadi. Supermasks in superposition. arXiv preprint arXiv:2006.14769, 2020.
|
| 422 |
+
[34] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018.
|
| 423 |
+
[35] Jaehong Yoon, Saehoon Kim, Eunho Yang, and Sung Ju Hwang. Scalable and order-robust continual learning with additive parameter decomposition. In International Conference on Learning Representation, 2020.
|
| 424 |
+
[36] Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. Lifelong learning with dynamically expandable networks. arXiv preprint arXiv:1708.01547, 2017.
|
| 425 |
+
[37] Wenchao Yu, Wei Cheng, Charu C Aggarwal, Kai Zhang, Haifeng Chen, and Wei Wang. Netwalk: A flexible deep embedding approach for anomaly detection in dynamic networks. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 2672–2681, 2018.
|
| 426 |
+
[38] Xikun Zhang, Chang Xu, and Dacheng Tao. On dropping clusters to regularize graph convolutional neural networks. 2020.
|
| 427 |
+
[39] Fan Zhou, Chengtai Cao, Ting Zhong, Kunpeng Zhang, Goce Trajcevski, and Ji Geng. Continual graph learning. arXiv preprint arXiv:2003.09908, 2020.
|
| 428 |
+
[40] Lekui Zhou, Yang Yang, Xiang Ren, Fei Wu, and Yueting Zhuang. Dynamic network embedding by modeling triadic closure process. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
|
| 429 |
+
[41] Difan Zou, Ziniu Hu, Yewen Wang, Song Jiang, Yizhou Sun, and Quanquan Gu. Layerdependent importance sampling for training deep and large graph convolutional networks. In Advances in Neural Information Processing Systems, pages 11247–11256, 2019.
|
| 430 |
+
|
| 431 |
+
# Checklist
|
| 432 |
+
|
| 433 |
+
1. For all authors...
|
| 434 |
+
|
| 435 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 436 |
+
(b) Did you describe the limitations of your work? [Yes] In Conclusion, and in the theoretical part of Appendix.
|
| 437 |
+
(c) Did you discuss any potential negative societal impacts of your work? [No] Our work solves the continual graph representation learning problem. As far as we know, there is no potential negative societal impacts of our work.
|
| 438 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 439 |
+
|
| 440 |
+
2. If you are including theoretical results...
|
| 441 |
+
|
| 442 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] Details are included in Appendix. (b) Did you include complete proofs of all theoretical results? [Yes] Proofs are in Appendix
|
| 443 |
+
|
| 444 |
+
3. If you ran experiments...
|
| 445 |
+
|
| 446 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Code is included in the supplementary materials.
|
| 447 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Details are included in Appendix.
|
| 448 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] In all tables and in Figure 2
|
| 449 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] Relevant details are included in Appendix
|
| 450 |
+
|
| 451 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 452 |
+
|
| 453 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 454 |
+
(b) Did you mention the license of the assets? [Yes] We mentioned this in the dataset detail part in Appendix.
|
| 455 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] The code of our model is included in the supplementary materials.
|
| 456 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] We mentioned this in the dataset detail part in Appendix.
|
| 457 |
+
|
| 458 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] We mentioned this in the dataset detail part in Appendix.
|
| 459 |
+
|
| 460 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 461 |
+
|
| 462 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 463 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 464 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/qWtmNpgjD5K/qWtmNpgjD5K.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Impossibility results for fair representations
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 With the growing awareness to fairness in machine learning and the realization
|
| 11 |
+
2 of the central role that data representation has in data processing tasks, there is
|
| 12 |
+
3 an obvious interest in notions of fair data representations. We provide a formal
|
| 13 |
+
4 framework for examining the fairness of data representations through the lens of
|
| 14 |
+
5 their effect on decisions (mainly classification) made based on data represented that
|
| 15 |
+
6 way. Using that framework, we prove that several desiderata for fair representations
|
| 16 |
+
7 cannot be achieved. While some of our conclusions are intuitive, we formulate
|
| 17 |
+
8 (and prove) crisp statements of such impossibilities, often contrasting impressions
|
| 18 |
+
9 conveyed by many recent works on fair representations.
|
| 19 |
+
|
| 20 |
+
# 10 1 Introduction
|
| 21 |
+
|
| 22 |
+
11 Automated decision making has become more and more successful over the last few decades and
|
| 23 |
+
12 has therefore been used in an increasing number of domains, either as stand alone, or to support
|
| 24 |
+
13 human decision makers. This includes many sensitive domains which significantly impact people’s
|
| 25 |
+
14 livelihoods, such as loan applications, university admissions, recidivism predictions, or insurance rate
|
| 26 |
+
15 settings. It has been found that many such decision tools have, often unintentionally, biases against
|
| 27 |
+
16 minority groups, and therefore lead to discrimination. In response to these concerns, the machine
|
| 28 |
+
17 learning research community has been devoting effort to developing clear notions of fair decision
|
| 29 |
+
18 making, and coming up with algorithms for implementing fair machine learning.
|
| 30 |
+
20 A common approach to address the important issue of fair algorithmic decision making is through fair
|
| 31 |
+
21 data representation. The idea is that some regulator or a responsible data curator transforms collected
|
| 32 |
+
22 data to a format (or representation), that can then be used for solving downstream classification tasks
|
| 33 |
+
23 providing guarantees of fairness. This approach was proposed by the seminal paper of Zemel et
|
| 34 |
+
24 al. [15]. In their words: "our intermediate representation can be used for other classification tasks
|
| 35 |
+
25 (i.e., transfer learning is possible)"... "We further posit that such an intermediate representation is
|
| 36 |
+
26 fundamental to progress in fairness in classification, since it is composable and not ad hoc; once
|
| 37 |
+
27 such a representation is established, it can be used in a blackbox fashion to turn any classification
|
| 38 |
+
28 algorithm into a fair classifier, by simply applying the classifer to the sanitized representation of
|
| 39 |
+
29 the data". Many followup papers aim to realize this paradigm, solving technical and algorithmic
|
| 40 |
+
30 issues [10, 6, 11, 14, 3] (to mention just a few). The main contribution of this paper is showing that,
|
| 41 |
+
31 basically, it is impossible to achieve this goal. Namely, no data representation can guarantee that for
|
| 42 |
+
32 every classification task a classifier trained on data under the given representation will be fair for
|
| 43 |
+
33 that task. This impossibility applies even if one restricts the downstream tasks in question to share
|
| 44 |
+
34 the same labeling rule, or for fairness notions like Odds Equality, to share the same marginal data
|
| 45 |
+
35 distribution with the data on which the representation was trained. Our results answer negatively the
|
| 46 |
+
36 main two questions posed in the discussion section of Creager et al. [3].
|
| 47 |
+
37 While many papers in this domain propose algorithmic solutions to fairness related issues, the main
|
| 48 |
+
38 contributions of this paper are conceptual. We believe that, to a much larger extent than many other
|
| 49 |
+
39 facets of machine learning, fundamental concepts of fairness in machine learning require better
|
| 50 |
+
40 understanding. Some basic questions are still far from being satisfactorily elucidated; What should
|
| 51 |
+
41 be considered fair decision making? (various mutually incompatible notions have been proposed, but
|
| 52 |
+
42 how to pick between them for a given real life application is far from being clarified). What is a fair
|
| 53 |
+
43 data representation? To what extent should accuracy or other practical utilities be compromised for
|
| 54 |
+
44 achieving fairness goals? and so on. The answers to these questions are not generic. They vary with
|
| 55 |
+
45 the principles and the goals guiding the agents involved (decision makers, subjects of such a decision,
|
| 56 |
+
46 policy regulators, etc.), as well as with what can be assumed regarding the underlying learning setup.
|
| 57 |
+
47 We view these as the primary issues facing the field, deserving explicit research attention (in addition
|
| 58 |
+
48 to the more commonly discussed algorithmic and optimization aspects). This is a theoretical work,
|
| 59 |
+
49 our discussion is grounded in definitions and proofs rather than heuristics and experimental results.
|
| 60 |
+
|
| 61 |
+
# 50 1.1 What is fair representation?
|
| 62 |
+
|
| 63 |
+
51 The term ‘fair data representation’ encompasses a wide range of different meanings. When word
|
| 64 |
+
52 embeddings results in smaller distance between the vectors representing ‘woman’ and ‘nurse’ relative
|
| 65 |
+
53 to the distance between the representations of ‘woman’ and ‘doctor’ and the other way around for
|
| 66 |
+
54 ‘man’, is it an indication of bias in the representation or is it just a faithful reflection of a bias in
|
| 67 |
+
55 society? Rather than delving into such issues, we discuss an arguably more concrete facet of data
|
| 68 |
+
56 representation; We examine representation fairness from the perspective of its effect on the fairness
|
| 69 |
+
57 of classification rules that agents using data represented that way may come up with. Such a view
|
| 70 |
+
58 takes into consideration two setup characteristics:
|
| 71 |
+
9 The objective of the agent using the data We distinguish three types of classification prediction
|
| 72 |
+
0 agents (formal definitions of these aspects of fairness are provided in section 3.2):
|
| 73 |
+
|
| 74 |
+
Malicious - driven by a bias against a group of subjects. To protect against such an agent, a fair representation (or feature set) should be such that every classifier based on data represented that way is fair. This is apparently the most common approach to fair representations in the literature e.g., [15, 10].
|
| 75 |
+
|
| 76 |
+
Accuracy Driven - focusing on traditional measures of learning efficiency, ignoring fairness considerations. A representation is accuracy-driven fair if every loss minimizing classifier based on that representation is fair.
|
| 77 |
+
|
| 78 |
+
Fairness Driven - aiming to find a decision rule that is fair while maintaining meaningful accuracy. A representation is fairness-driven fair if there exists a loss minimizing (or an approximate minimizer) classifier based on that representation is fair.
|
| 79 |
+
|
| 80 |
+
71 The notion of group fairness applied to the classification decisions The wide range of group fair
|
| 81 |
+
72 ness notions (for classification) can be taxonomized along several dimensions: Does the
|
| 82 |
+
73 notion depend on the ground truth classification or only on the agents decision (like demo
|
| 83 |
+
74 graphic parity)? Is perfectly accurate decision (matching the ground truth classification)
|
| 84 |
+
75 always considered fair (like in odds equality)? Does the fairness notion depend on unobserv
|
| 85 |
+
76 able features (like intention or causality)? In this work we focus on fairness notions that
|
| 86 |
+
77 are ground-truth-dependent, view the ground truth classification as fair and depend only on
|
| 87 |
+
78 observable features. The decision which notion of fairness one wishes to abide by depends
|
| 88 |
+
79 on societal goals and may vary from one task to another and is outside the scope of this
|
| 89 |
+
80 paper. Just the same, let us briefly explain why the requirements listed above are natural in
|
| 90 |
+
81 many situations.
|
| 91 |
+
|
| 92 |
+
The dependence on the ground truth classification is almost inevitable from a utilitarian perspective - taking into account the probability that a student succeed or fail when making acceptance decisions should not be considered unfair. Put more formally, whenever there is any correlation between membership and the ground truth classification, any classifier that is fair w.r.t. a notion that ignored the ground truth (like demographic parity) is bound to suffer prediction error proportional to that correlation.
|
| 93 |
+
|
| 94 |
+
Viewing perfectly accurate decisions as fair can be viewed as a distinction between notions that do or do not try to inflict affirmative action. It makes a lot of sense in tasks like conviction in a crime - if you convict all criminals and no one else, you should not be accused on unfairness.
|
| 95 |
+
|
| 96 |
+
Relying only on observable features fosters objectivity and allows scrutiny of the decisions made. Our running example of such a notion is odds equality [8], however our results hold as well for other common notions of fairness that meet the above conditions (like Calibrations Within Groups [9]).
|
| 97 |
+
|
| 98 |
+
# 1.2 Our results
|
| 99 |
+
|
| 100 |
+
We prove the following inherent limitations of notions of fair representations (under the above taxonomy):
|
| 101 |
+
|
| 102 |
+
1. The impossibility to be task-independent. There is a host of literature proposing methods of coming up with data representation that guarantees the fairness of classifier based on that representation (e.g., [18, 3, 10, 12]). We elaborate on these works in our Previous Work section. Contrasting the impression conveyed by many such papers, we show that the ability to guarantee multi-task fairness is inherently limited. Much of that work addresses Demographic parity (DP). We prove that if two tasks have different marginal data distributions (that is, the distribution of unlabeled instances) and different success rates of the protected group, then no representation can guarantee that any non-trivial classifier trained on it satisfies DP for both. We show that the only classifiers that are guaranteed to satisfy any significant level of DP fairness w.r.t. all marginal distributions are the redundant constant functions. From a practical point of view, since DP fairness of some decision (say, acceptance to some university program) requires the ratio of positive decisions between groups to match the ratio of applicants from those groups, a representation that guarantees DP fairness cannot be a priory constructed - it must have access to the distribution of groups among applicants for that specific program. Furthermore, we prove that for every fixed marginal data distribution, if two ground truth classifications differ with non-zero probability over it, there can be no data representation that enjoys Odds Equality fairness and accuracy with respect to both tasks over that shared marginal distribution (except for the redundant case where the success rates of both groups are equal for both tasks). These results answer negatively the main two open problems posed in the Discussion section of [3].
|
| 103 |
+
|
| 104 |
+
2. The impossibility to evaluate the fairness contribution of a given feature devoid of the other features used (again, for each agent objective and several common group fairness notions).
|
| 105 |
+
|
| 106 |
+
3. The inherent dependence of the effect on fairness of adding/deleting a feature on the type of agent using the representation (on top of the above mentioned dependence on other features), even when the feature in question does not correlate with membership in the protected group.
|
| 107 |
+
|
| 108 |
+
(These come on top of the obvious dependence on the notion of fair classification sought).
|
| 109 |
+
|
| 110 |
+
Concerning potential negative societal impact: We cannot foresee any potential negative societal impact of our work. The main message of this paper is a cautionary statement. We alert potential users that approaches based on task independent fair representations cannot guarantee the fairness of arbitrary predictors based on them. As such, we are only guarding against potential negative impact of previously published work.
|
| 111 |
+
|
| 112 |
+
Our paper is organized as follows: Section 2 gives an overview of the related work. Section 3 introduces our setup including our taxonomy for fair representations. Section 4 contains our main results on the impossibility of generic fairness of a representation. Section 5 addressed the impossibility of defining the fairness effect of a single feature without considering the other components of a representation. Section 6 briefly shows the impossibility of having fair representations w.r.t. Predictive Rate Parity. Section 7 is our concluding remarks.
|
| 113 |
+
|
| 114 |
+
136 We defer proofs to the appendix.
|
| 115 |
+
|
| 116 |
+
# 37 2 Related Work
|
| 117 |
+
|
| 118 |
+
Since our paper goes against messages conveyed by many previous papers, we wish to address in detail more related works than space here allows. We therefore provide a more elaborate section on previous work in the supplementary material.
|
| 119 |
+
|
| 120 |
+
Much of the recent work on fair representation for learning classifiers focuses on algorithms. (and demonstrating the viability of those algorithms though experimental results) [15, 10, 17, 1, 16]. As explained before, our focus is different. We discuss what should be considered fair representation in
|
| 121 |
+
|
| 122 |
+
144 that context, what is the scope of such notions and what are the inherent limitations of defining such
|
| 123 |
+
145 representations.
|
| 124 |
+
146 Almost all the work on fair representations focuses on the demographic parity (DP) notion of fairness
|
| 125 |
+
147 [6, 10, 15, 14]. Not having to take ground truth into account makes this notion independent of the
|
| 126 |
+
148 classification task carrying both advantages and limitations. However, any positive result in these
|
| 127 |
+
149 papers assumes that the marginal data distribution is available to the designer of the fair representation.
|
| 128 |
+
150 Such an assumption severely restricts the applicability of such representations. To achieve DP fairness,
|
| 129 |
+
151 a classifier has to induce success ratio between the two groups that match the ratio between these
|
| 130 |
+
152 groups in the input data. However, that ratio, say a set of applicants for a bank loan or to some
|
| 131 |
+
153 university program varies from one application to another and cannot be determined a priori. Our
|
| 132 |
+
154 results on this inherent limitation of fair representation for DP (see section 4) do not seem to have
|
| 133 |
+
155 been stated before.
|
| 134 |
+
156 When the data marginal distribution is fixed, and available to the designer of a representation, DP
|
| 135 |
+
157 fairness is possible. However, in such a setup, we show that fairness with respect to notions of fairness
|
| 136 |
+
158 that do rely on the correct ground truth, such as equalized odds (EO) [8], cannot be guaranteed for
|
| 137 |
+
159 arbitrary tasks (see Section 4). This fact also has not been explicitly stated (and proved) before,
|
| 138 |
+
160 although it seems that some of the previous work worried about it. Instead, previous work either
|
| 139 |
+
161 focus only on DP fairness, or, when it comes to discuss other notions of fairness, the algorithms that
|
| 140 |
+
162 design the representations are assumed to have access to task specific labeled data (e.g. [16, 2, 14, 5],
|
| 141 |
+
163 which defies the goal of having a fixed representation that guarantees fairness for many tasks.
|
| 142 |
+
164 The effect of the motivation of the decision maker using the representation on the fairness of the
|
| 143 |
+
165 resulting decision rule has been considered by Madras et al. [10] and Zhang et al. [16]. These papers
|
| 144 |
+
166 identify two motivations. The first is malicious, which is the intent to discriminate without regard
|
| 145 |
+
167 for accuracy. The second is accuracy-driven, which is the intent to maximize accuracy. We address
|
| 146 |
+
168 these effects as part of our taxonomy of notions of fair representations. Additionally, we discuss
|
| 147 |
+
169 fairness-driven agents that aim to achieve fairness while maintaining some level of accuracy.
|
| 148 |
+
170 A natural question that arises in this context is about the inherent trade-offs between fairness and
|
| 149 |
+
171 accuracy. When the notion of fairness is demographic parity, such trade-offs are clearly expected -
|
| 150 |
+
172 they surface whenever there exists correlation between membership in the protected group and the
|
| 151 |
+
173 ground truth classification. Zhao et al. [18] and Mcnamara et al. [11] analyze such scenarios and
|
| 152 |
+
174 demonstrate situations in which there exists a more accurate and more fair classifier based on an
|
| 153 |
+
175 original representation than any classifier built using a learnt representation.
|
| 154 |
+
176 The question of feature deletion has also been considered in real world examples, such as in the "ban
|
| 155 |
+
177 the box" policy which disallowed employers using criminal history in hiring decisions [4]. The effect
|
| 156 |
+
178 of allowing or disallowing features on fairness has been studied before, for example in Grgic-Hlaca et
|
| 157 |
+
179 al. [7]. However in previous works, the effect of a feature on fairness, has been discussed in isolation.
|
| 158 |
+
180 In contrast, we show that fairness of a feature should not be considered in isolation, but should also
|
| 159 |
+
181 take into account the remaining features available.
|
| 160 |
+
|
| 161 |
+
# 182 3 Formal Setup
|
| 162 |
+
|
| 163 |
+
183 We consider a binary classification problem with label set $\{ 0 , 1 \}$ over a domain $X$ of instances we
|
| 164 |
+
184 wish to classify, e.g. individuals applying for a loan. We assume the task to be given by some
|
| 165 |
+
185 distribution $P$ over $X \times \{ 0 , 1 \}$ from which instances are sampled i.i.d. We denote the ground-truth
|
| 166 |
+
186 labeling rule as $t : X \to [ 0 , 1 ]$ . We will think of the label 1 as denoting ‘qualified’ and the label 0 as
|
| 167 |
+
187 ‘unqualified’ and $t ( x ) = P [ y = 1 | x ]$ . For concreteness, we focus here on the case of deterministic
|
| 168 |
+
188 labeling (that is $t : X \{ 0 , 1 \}$ ). Most of our discussion can readily be extended to the probabilistic
|
| 169 |
+
189 labeling case. In a slight abuse of notation we will sometimes use $t ( w )$ to indicate the label coordinate
|
| 170 |
+
190 of an instance $w \in \bar { X } \times \{ 0 , 1 \}$
|
| 171 |
+
|
| 172 |
+
A data representation is determined by a mapping $F : X Z$ , for some set $Z$ , and the learner only sees $F ( x )$ for any instance $x$ (both in the training and the test/decision stages).We denote the hypothesis class of all feature based decision rules as $\mathcal { H } _ { F } = \{ h : Z \{ 0 , 1 \} \}$ . As a loss function we consider a weighted sum of false positives and false negatives, i.e.
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
l ^ { \alpha } ( h , x , y ) = \left\{ { \begin{array} { l r } { \alpha , } & { i f h ( x ) = 0 , y = 1 } \\ { 1 - \alpha , } & { i f h ( x ) = 1 , y = 0 } \\ { 0 , } & { o t h e r w i s e } \end{array} } \right.
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
for some weight 191 $\alpha \in ( 0 , 1 )$ . We denote the true risk with respect to this loss as $L _ { P } ^ { \alpha }$ and the empirical risk as 192 $L _ { S } ^ { \alpha }$ .
|
| 179 |
+
|
| 180 |
+
# 3.1 Notions of group fairness
|
| 181 |
+
|
| 182 |
+
For our fairness analysis we assume the population $X$ to be partitioned into two subpopulation $A$ and $D$ (namely, we restrict our discussion the case of one binary protected attribute). We sometimes use a function notation $G : X \{ A , D \}$ to indicate the group-membership of an instance. Of course in reality there are often many protected attributes with more than two values. However, as our goal is to show limitations and impossibility results for fair representation learning, it suffices to only consider one binary protected attribute – the same impossibilities readily follow for the more complex settings.
|
| 183 |
+
|
| 184 |
+
We now define two widely used notions of group-fairness that we will refer to throughout the paper, namely, equalized odds and demographic parity. In the following we will denote with $X _ { g , l }$ the subset of $X$ with label $l$ and group membership $g$ , i.e. $X _ { g , l } = X \cap t ^ { - 1 } ( l ) \cap G ^ { - 1 } ( g )$ .
|
| 185 |
+
|
| 186 |
+
03 Definition 1 (Group fairness; Equalized odds) The notion of group-fairness we will focus on in
|
| 187 |
+
204 this paper is the ground-truth-dependent notion of odds equality as introduced by $I ^ { g } { \cal I }$ .
|
| 188 |
+
|
| 189 |
+
A classifier h is considered fair w.r.t. to odds equality $( L ^ { E O } )$ and a distribution $P$ if for $x \sim P$ we have the statistical independence $h ( x ) \perp \perp G ( x ) | t ( x )$ . For $g \in \{ A , D \}$ let the false positive rate and the false negative rate be defined as $F P R _ { g } ( h , t , P ) = \mathbb { P } _ { x \sim P } [ h ( x ) = 1 | x \in X _ { g , 0 } ]$ and $F N R _ { g } ( h , t , P ) = \mathbb { P } _ { x \sim P } [ h ( x ) = 0 | x \in X _ { g , 1 } ]$ respectively. The $E O$ unfairness is given then by the sum of differences in false positive rate and false negative rate between groups:
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
L _ { P } ^ { E O } ( h ) = \frac { 1 } { 2 } | F N R _ { A } - F N R _ { D } | + \frac { 1 } { 2 } | F P R _ { A } - F P R _ { D } | .
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
205 If we say a classifier is fair, without referring to any particular group-fairness notion, we mean
|
| 196 |
+
206 fairness w.r.t. equalized odds.
|
| 197 |
+
|
| 198 |
+
Definition 2 (Demographic parity) $A$ classifier $h$ is considered fair w.r.t. to demographic parity $( L ^ { D P } )$ and a distribution $P$ if $h ( x )$ ⊥⊥ $G ( x )$ . The respective unfairness is given by difference in positive classification rates between groups
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
\dot { L } _ { P } ^ { D P } ( h ) = | \bar { \mathbb { P } } _ { x \sim P } [ h ( x ) = 1 | G ( x ) = A ] \stackrel { \sim } { - } \mathbb { P } _ { x \sim P } [ h ( x ) = 1 | G ( x ) = D ] | .
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
# 3.2 The role of the agent’s objective
|
| 205 |
+
|
| 206 |
+
We will phrase our definitions of representation fairness in terms of a general group fairness notion $L ^ { f a i r }$ with unfairness measure $L _ { P } ^ { f a \bar { i } r }$ .
|
| 207 |
+
|
| 208 |
+
We start by considering a malicious decision maker who tries to actively discriminate against one group. To protect against this kind of decision maker, we need to give a guarantee such that based on the feature set it is not possible to discriminate against one group. This corresponds to the notion of adversarial fairness.
|
| 209 |
+
|
| 210 |
+
Definition 3 (Adversarial fairness) A representation $F$ is considered to be adversarial fair w.r.t. the the adversarial unfairness of a representation distribution and group fairness objective $L ^ { f a i r }$ $F$ by , if every classifier $U _ { a d v } ( F ) = \operatorname* { m a x } _ { h \in \mathcal { H } _ { F } } L _ { P } ^ { f a i r } ( h )$ $h \in \mathcal { H } _ { F }$ is group-fair. We define .
|
| 211 |
+
|
| 212 |
+
Furthermore, we consider an accuracy-driven decision maker, who aims to label instances correctly and is agnostic about fairness. For this kind of decision maker, we only need to make sure that optimizing for correct classification results in a fair classifier. The following definition ensures that the Bayes optimal classifier for a representation is fair.
|
| 213 |
+
|
| 214 |
+
225 Definition 4 (Accuracy-driven fairness) $A$ representation $F$ is considered to be accuracy-driven fair w.r.t. the fairness objective 226 $L ^ { f a i r }$ and distribution $P$ , if for every threshold $\alpha \in ( 0 , 1 )$ , every classifier 227 $h \in \mathcal { H } _ { F }$ with $\begin{array} { r } { L _ { P } ^ { \alpha } ( h ) = \operatorname* { m i n } _ { h \in \mathcal { H } _ { F } } L _ { P } ^ { \alpha } ( h ) } \end{array}$ is group-fair. The accuracy-driven unfairness for a par228 ticular threshold parameter $\alpha$ is given by $\begin{array} { r } { U _ { a c c } ^ { \alpha } ( \mathcal { F } ) = \operatorname* { m a x } \{ L _ { P } ^ { f a i r } ( h ) : h \in \arg \operatorname* { m i n } _ { h \in \mathcal { H } _ { F } } L _ { P } ^ { \alpha } ( h ) \} . } \end{array}$ 229 The general accuracy-driven unfairness is given by $U _ { a c c } ( \mathcal { F } ) = \operatorname* { m a x } _ { \alpha \in [ 0 , 1 ] } U _ { a c c } ^ { \alpha } ( \mathcal { F } )$ .
|
| 215 |
+
|
| 216 |
+
230 We note that in cases where the decision maker does not have access to the distribution $P$ , but
|
| 217 |
+
231 only to a labelled sample, this requirement is might not sufficient for guaranteeing that an accuracy
|
| 218 |
+
232 driven decision maker arrives at a fair decision. In the Appendix we propose another fairness notion
|
| 219 |
+
233 $\lambda$ -robustness) that formalizes the desired fairness guarantee for this scenario.
|
| 220 |
+
|
| 221 |
+
Lastly, we also consider a fairness-driven decision maker who actively tries to find a fair and 5 accurate decision rule, while maintaining some accuracy guarantees. For such a decision maker a representation should allow for fair and accurate decision rules. If a representation fulfills this requirement, we call it fairness-enabling.
|
| 222 |
+
|
| 223 |
+
Definition 5 $( \epsilon , \eta )$ -fairness-enabling representation) A representation $F$ is considered to be $( \epsilon , \eta )$ -fairness-enabling w.r.t. a fairness objective $L ^ { f a i r }$ , if there exists a classifier $\textit { h } \in \mathcal { H } _ { F }$ that such that $L _ { P } ^ { \alpha } ( h ) \leq \epsilon$ and $L _ { P } ^ { f a i r } ( h ) \leq \eta$ .
|
| 224 |
+
|
| 225 |
+
Our discussion focuses primarily on the case of malicious and indifferent decision makers. These notions of fair representation can be defined with respect to any group-fairness notion. In our paper we will mainly focus on the equalized odds notion of fairness [8]. We also note that all the above definitions can be given with respect to a fixed model $\mathcal { H }$ in a continuous space.
|
| 226 |
+
|
| 227 |
+
# 245 4 Can there be a generic fair representation?
|
| 228 |
+
|
| 229 |
+
246 We address the existence of a multi-task fair representation. We prove that for the adversarial agent
|
| 230 |
+
247 scenario (which is the setup that most fairness representation previous work is concerned with),
|
| 231 |
+
48 it is impossible to have generic non-trivial fair representations - no useful representation can
|
| 232 |
+
249 guarantee fairness for all "downstream" classification that are based on that representation (even if
|
| 233 |
+
250 the ground truth classification remains unchanged and only the marginal may change between tasks).
|
| 234 |
+
|
| 235 |
+
We start by considering scenarios in which only the marginals shift between two tasks, e.g. two openings for different jobs, requiring similar skills, for which different pools of people would apply. Such a distribution shift can likely affect one group more than another and would thus affect the classification rates of both groups differently. We show that we cannot guarantee fairness of a fixed data presentation for general shifts of this kind, even for the simplest case of demographic parity.
|
| 236 |
+
|
| 237 |
+
Claim: 1 Pick any domain set $X$ and any partition of $X$ into non-empty subsets $A , D$ . For every non-constant function $f : X \{ 0 , 1 \}$ there exists a probability distribution $P$ over $X$ such that $f$ is arbitrarily $D P$ -unfair w.r.t. $P$ (say, $\tilde { L _ { P } ^ { D P } } ( h ) > 0 . 9 )$ .
|
| 238 |
+
|
| 239 |
+
In particular, when a shift in marginal occurs between tasks, fairness for previous tasks does not imply a fairness guarantee for a new task.
|
| 240 |
+
|
| 241 |
+
Proof: If $f$ is constant on any of the groups $A$ or $D$ then, since $f$ is not a constant over $X$ there is are points in the other group on which $f$ has the opposite value. Let $P$ assigns probability 0.5 to the group on which $f$ is constant and probability 0.5 to the set of points to which $f$ assigns the other value. Clearly $f$ fails $D P w . r . t .$ this $P$ . Otherwise, both values are assigned in both groups, so let $P$ assign probability 0.5 to $\{ x \in A : f ( x ) = 0 \}$ and probability 0.5 to $\{ x \in D : f ( x ) = 1 \}$ . Clearly, $f$ fails DP w.r.t. this $P$ .
|
| 242 |
+
|
| 243 |
+
Corollary 1 No data representation can guarantee the $D P$ fairness of any non-trivial classifier w.r.t. all possible data generating distributions (over any fixed domain set with any fixed partition into non-empty groups). That is, any non-constant representation $F ,$ cannot be adversarially fair with respect to $\check { L } ^ { D P }$ and any arbitrary task $P$ .
|
| 244 |
+
|
| 245 |
+
271 Claim: 2 Pick any domain set $X$ and any partition of $X$ into non-empty subsets $A , D$ . For every
|
| 246 |
+
272 non-constant function $f : X \to \{ 0 , 1 \}$ and every classifier $h : X \to \{ 0 , 1 \}$ such that $h \neq f$
|
| 247 |
+
273 274 $L _ { P , f } ^ { E O } > 0 . 9$ a probability distribution . $P$ over $X$ such that $h$ is arbitrarily $E O$ -unfair w.r.t. $P , f$ , say
|
| 248 |
+
|
| 249 |
+
275 Corollary 2 No data representation can guarantee EO fairness of any non-constant predictor based on that representation for all "downstream" classification learning tasks. That is, any non-constant representation $F ,$ cannot be adversarially fair with respect to $L ^ { E O }$ and any arbitrary task $P$ . This holds even if one restricts the claim to tasks sharing a fixed marginal data distribution.
|
| 250 |
+
|
| 251 |
+
We will now look at a slightly more restricted setting and analyse the case of multi-task learning, where instead of asking for a representation that is fair for every task, we only consider fairness with respect to a fixed (finite) set of tasks that we want to learn. We find that for the adversarial case, even this less ambitious goal is not achievable for generic tasks and the equalized odds notion of fairness.
|
| 252 |
+
|
| 253 |
+
We say a distribution 283 $P$ has equal success rates if $\begin{array} { r } { \frac { P ( X _ { A , 1 } ) } { P ( A ) } = \frac { P ( X _ { D , 1 } ) } { P ( D ) } } \end{array}$ .
|
| 254 |
+
|
| 255 |
+
Lemma 1 Let $P _ { 1 }$ and $P _ { 2 }$ be the distributions defining two different tasks with the same marginal $P _ { X } = P _ { 1 , X } = P _ { 2 , X }$ such that at least one of the tasks does not have equal success rates. Let $h _ { 1 } , h _ { 2 } : X \to \{ 0 , 1 \}$ be such that $L _ { P _ { 1 } } ( h _ { 1 } ) = \bar { L _ { P _ { 2 } } } ( h _ { 2 } ) = 0$ , and assume that tasks are non-negligibly different (namely, $\dot { L } _ { P _ { 1 } } ( h _ { 2 } ) \neq 0 ,$ ). Then, it cannot be the case that both $h _ { 1 }$ and $h _ { 2 }$ are $E O$ fair w.r.t. both $P _ { 1 }$ and $P _ { 2 }$ .
|
| 256 |
+
|
| 257 |
+
The proof (in the appendix) has a similar flavour as the proof of incompetability of different fairness notions of [9].
|
| 258 |
+
|
| 259 |
+
Theorem 1 There can be no data representation $F$ such that for some $P _ { 1 } , P _ { 2 }$ as above, the following criteria simultaneously hold:
|
| 260 |
+
|
| 261 |
+
1. $\mathcal { F }$ is adversarially fair w.r.t. $P _ { 1 }$ and $E O$
|
| 262 |
+
|
| 263 |
+
2. $\mathcal { F }$ is adversarially fair w.r.t. $P _ { 2 }$ and $E O$
|
| 264 |
+
|
| 265 |
+
3. $\mathcal { F }$ allows for perfect accuracy w.r.t. to $P _ { 1 }$ and $P _ { 2 }$ , i.e. there are $h _ { 1 } , h _ { 2 }$ both expressible over the representation $F$ , such that $L _ { P _ { 1 } } ( h _ { 1 } ) = L _ { P _ { 2 } } ( h _ { 2 } ) = 0$ .
|
| 266 |
+
|
| 267 |
+
7 This result follows directly from Lemma 1. Therefore, if the goal is to prevent discrimination from a possibly adversarial decision maker, while also enabling accurate prediction, each task requires its task-specific feature representation.
|
| 268 |
+
|
| 269 |
+
# 300 5 Fairness of a feature set vs. fairness of a feature
|
| 270 |
+
|
| 271 |
+
In this section we discuss feature deletion and its impact on the fairness of a representation. For this we assume our representation $F$ to consist of finitely many features $f _ { i } : X \to Y _ { i }$ i.e. for every $x \in X : F ( x ) \overset { \cdot } { = } \left( f _ { 1 } ( x ) , \ldots , f _ { n } ( x ) \right)$ and $Z = Y _ { 1 } \times \ldots \times Y _ { n }$ . We limit our discussion to cases where all $Y _ { i }$ are finite. While this assumption facilitates our analysis, we do not expect our results to be different in the cases of continuous features. We will denote the set of features as $F = \{ f _ { 1 } , \ldots , f _ { n } \}$ and will denote by $U _ { a d v } ( \mathcal { F } )$ and $U _ { a c c } ^ { \alpha } ( \mathcal { F } )$ the adversarial and accuracy-driven fairness of the representation induced by the feature set $\mathcal { F }$ respectively. We show that it is in general not possible to determine the effect a single feature has on the fairness of a representation without considering the full representation. This is the case even if our considered feature is not correlated with the protected attribute.
|
| 272 |
+
|
| 273 |
+
# 5.1 Opposing effects of a feature for accuracy-driven fairness of a representation
|
| 274 |
+
|
| 275 |
+
We start our discussion with accuracy-driven fairness w.r.t. equalized odds. In this case we show that the deletion of a feature $f$ can lead to an increase in accuracy-driven unfairness for some set of other given features $\mathcal { F }$ and that the deletion of the same feature $f$ can lead to a decrease in accuracy-driven unfairness for another set of other available features ${ \mathcal { F } } ^ { \prime }$ . This implies that the fairness of the feature $f$ cannot be evaluated without context. We show that this phenomena holds for a general class of 317 features that satisfy some non-triviality properties (That on the one hand do not reveal too much 318 information about group membership and labels (non-committing), and on the other hand does not 319 reveal identity when label and group information is given ( $k$ -anonymity [13])). The exact definitions 320 of these properties can be found in the appendix.
|
| 276 |
+
|
| 277 |
+
Theorem 2 (Context-relevance for fairness of features) For every 6-anonymous non-committing feature 322 $f$ , there exists a probability function $P$ over $X$ and feature sets $\mathcal { F }$ and ${ \mathcal { F } } ^ { \prime }$ such that:
|
| 278 |
+
|
| 279 |
+
• The accuracy-driven fairness w.r.t $L ^ { E O }$ , $P$ and $\alpha = 0 . 5$ of ${ \mathcal { F } } \cup \{ f \}$ is greater than that of $\mathcal { F }$ , i.e.
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
U _ { a c c } ^ { \alpha } ( \mathcal { F } \cup \{ f \} ) < U _ { a c c } ^ { \alpha } ( \mathcal { F } )
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
Thus, deleting $f$ in this context will increase unfairness.
|
| 286 |
+
|
| 287 |
+
• The accuracy-driven fairness w.r.t $L ^ { E O }$ , $P$ and $\alpha = 0 . 5$ of $\mathcal { F } ^ { \prime } \cup \{ f \}$ is less than that of ${ \mathcal { F } } ^ { \prime }$ , i.e.
|
| 288 |
+
|
| 289 |
+
$$
|
| 290 |
+
U _ { a c c } ^ { \alpha } ( { \mathcal { F } } ^ { \prime } \cup \{ f \} ) > U _ { a c c } ^ { \alpha } ( { \mathcal { F } } ^ { \prime } )
|
| 291 |
+
$$
|
| 292 |
+
|
| 293 |
+
Thus, deleting $f$ in this context will decrease unfairness.
|
| 294 |
+
|
| 295 |
+
This phenomenon can happen even if $\{ f \}$ is adversarially fair w.r.t. to $P$ and equalized odds.
|
| 296 |
+
|
| 297 |
+
# 5.2 The fairness of a feature for different notions of fairness
|
| 298 |
+
|
| 299 |
+
We will now briefly discuss the effect of a single feature on fairness for the cases of a malicious or a fairness-driven decision makers. In contrast to the accuracy-driven case, adding features has a monotone effect on the fairness of a fairness-driven and the malicious decision maker. As Theorem 3, adding any feature in the malicious case, will only give the decision maker more information and thus give the decision maker more chances of discrimination. Similarly in the fairness driven case, any feature will only give the decision maker another option for fair decision making (Theorem 4). However, the quantitative effect of adding a feature on the unfairness can still range from having no effect to achieving perfect fairness/unfairness for both the fairness-driven and the malicious case. As in the accuracy-driven case, we will show (Theorem 4 and Theorem 3) that it is impossible to evaluate the quantitative effect of a feature on the fairness of a representation without considering the context of other available features.
|
| 300 |
+
|
| 301 |
+
Theorem 3 1. For every distribution $P$ and feature $f$ , there exists a feature set $\mathcal { F }$ , such that adding $f$ will not impact the fairness of the distribution, e.g. $U _ { a d v } ( \mathcal { F } ) = U _ { a d v } ( \mathcal { F } \cup \{ f \} )$ .
|
| 302 |
+
|
| 303 |
+
2. There exist distributions $P$ , features $f$ and ${ \mathcal { F } } ^ { \prime }$ , such that $U _ { a d v } ( \mathcal { F } ^ { \prime } ) = 0$ and $U _ { a d v } ( \{ f \} ) = 0$ but $U _ { a d v } ( { \mathcal { F } } ^ { \prime } \cup \{ f \} ) = 1$ .
|
| 304 |
+
|
| 305 |
+
Theorem 4 1. For any feature $f$ and any featureset $\mathcal { F }$ we have $U _ { a d v } ( \mathcal { F } ) \leq U _ { a d v } ( \mathcal { F } \cup \{ f \} )$ . Similarly, if the representation $\mathcal { F }$ is $( \epsilon , \eta )$ -fairness-enabling, the representation ${ \mathcal { F } } \cup \{ f \}$ is also $( \epsilon , \eta )$ -fairness-enabling.
|
| 306 |
+
|
| 307 |
+
2. For every distribution $P$ and every feature $f$ , there exists a feature set $\mathcal { F }$ , such that ${ \mathcal { F } } \cup \{ f \}$ is $( \eta , \epsilon )$ -fairness-enabling, if and only if $\mathcal { F }$ is $( \epsilon , \eta )$ -fairness-enabling. Furthermore, there exists a distribution $P$ , a feature $f$ and $a$ feature set ${ \mathcal { F } } ^ { \prime }$ , such that both ${ \mathcal { F } } ^ { \prime }$ and $\{ f \}$ are not $( \epsilon , \eta )$ -fairness-enabling for any $\begin{array} { r } { \epsilon , \eta < \frac { 1 } { 2 } } \end{array}$ , but such that $\mathcal { F } ^ { \prime } \cup \{ f \}$ is $( 0 , 0 )$ -fairness-enabling.
|
| 308 |
+
|
| 309 |
+
While this section focused on fairness with respect to equalized odds, we note that many of these results can be replicated for other notions of fairness. For a more general version of Theorem 3, which takes into account other fairness notions, like demographic parity, we will refer the reader to the Appendix.
|
| 310 |
+
|
| 311 |
+
# 6 Impossibility of adversarially fair representations with respect to predictive rate parity
|
| 312 |
+
|
| 313 |
+
We now show that not all acceptable notions of group fairness always allow a adversarially fair representation, even in a single-task setting. One such notion is predictive rate parity.
|
| 314 |
+
|
| 315 |
+
Definition 6 (Predictive rate parity $( P R P ) ) A$ classifier $h$ is considered PRP fair w.r.t. to a marginal data distribution $P$ and true classification $t$ if the random variable $t ( x )$ is independent of the group membership, $G ( x )$ given the classification $h ( x )$ . We denote this fairness objective with $L ^ { P r e d }$ .
|
| 316 |
+
|
| 317 |
+
This theorem results from the fact that the classifier which maps every instance to label 1 is not fair w.r.t. to $L ^ { P r e d }$ if $P$ does not have equal success rates. The quantitative version of predictive rate parity as well as a more general version of Theorem 5, giving a characterization of adversarial fairness in the case of equal success rates can be found in the appendix.
|
| 318 |
+
|
| 319 |
+
# 370 7 Conclusion
|
| 320 |
+
|
| 321 |
+
In this paper we introduced a general taxonomy of notions of fair representation, taking into consideration both different objectives of decision makers using the representation, and different group fairness notions. Within this taxonomy we showed several impossibility results about fair representation learning.
|
| 322 |
+
|
| 323 |
+
Our main result addressed the existence of generic fair representations and of fair transfer learning. We show that even seemingly task-independent fairness notions like demographic parity are vulnerable to shifts in marginals between tasks. We conclude the impossibility of having generic data representations that guarantee (even just) DP fairness with respects to tasks whose marginal distributions are not considered when designing the representation. Furthermore, we show that it is impossible to have an adversarially fair representation with respect to several tasks and the equalized odds notion of fairness, if those tasks do not all fulfill statistical parity. These insights stand in contrast to the impression arising from recent papers [10] that claim to learned transferable fair decisions.
|
| 324 |
+
|
| 325 |
+
We also considered the question of "fairness of a feature", which has been used in legal scenarios. We showed that for notions of decision-making fairness other than demographic parity, the fairness of a single feature is an ill defined notion. Namely, the impact of a feature on the fairness of a decision cannot be determined without considering the other features of the representation.
|
| 326 |
+
|
| 327 |
+
Lastly, we show that some fairness notions, like predictive rate parity, do not always allow an adversarially fair representation, even if it is just for a single task.
|
| 328 |
+
|
| 329 |
+
# References
|
| 330 |
+
|
| 331 |
+
[1] Tameem Adel, Isabel Valera, Zoubin Ghahramani, and Adrian Weller. One-network adversarial fairness. In AAAI, 2019.
|
| 332 |
+
[2] Alex Beutel, Jilin Chen, Zhe Zhao, and Ed H. Chi. Data decisions and theoretical implications when adversarially learning fair representations. CoRR, abs/1707.00075, 2017.
|
| 333 |
+
[3] Elliot Creager, David Madras, Joern-Henrik Jacobsen, Marissa Weis, Kevin Swersky, Toniann Pitassi, and Richard Zemel. Flexibly fair representation learning by disentanglement. In ICML, 2019.
|
| 334 |
+
[4] Jennifer L Doleac and Benjamin Hansen. Does “ban the box” help or hurt low-skilled workers? statistical discrimination and employment outcomes when criminal histories are hidden. Technical report, National Bureau of Economic Research, 2016.
|
| 335 |
+
[5] Flávio du Pin Calmon, Dennis Wei, Bhanukiran Vinzamuri, Karthikeyan Natesan Ramamurthy, and Kush R. Varshney. Optimized pre-processing for discrimination prevention. In Advances in Neural Information Processing Systems 30.
|
| 336 |
+
[6] Harrison Edwards and Amos J. Storkey. Censoring representations with an adversary. In ICLR, 2016.
|
| 337 |
+
[7] Nina Grgic-Hlaca, Muhammad Bilal Zafar, Krishna P. Gummadi, and Adrian Weller. Beyond distributive fairness in algorithmic decision making: Feature selection for procedurally fair learning. In AAAI, 2018.
|
| 338 |
+
[8] Moritz Hardt, Eric Price, and Nathan Srebro. Equality of opportunity in supervised learning. In NIPS, 2016.
|
| 339 |
+
[9] Jon M. Kleinberg, Sendhil Mullainathan, and Manish Raghavan. Inherent trade-offs in the fair determination of risk scores. CoRR, abs/1609.05807, 2016.
|
| 340 |
+
[10] David Madras, Elliot Creager, Toniann Pitassi, and Richard Zemel. Learning adversarially fair and transferable representations. In ICML, 2018.
|
| 341 |
+
[11] Daniel McNamara, Cheng Soon Ong, and Robert C Williamson. Costs and benefits of fair representation learning. In Proceedings of the 2019 AAAI/ACM Conference on AI, Ethics, and Society, pages 263–270, 2019.
|
| 342 |
+
[12] Luca Oneto, Michele Donini, Andreas Maurer, and Massimiliano Pontil. Learning fair and transferable representations. arXiv preprint arXiv:1906.10673, 2019.
|
| 343 |
+
[13] Pierangela Samarati and Latanya Sweeney. Protecting privacy when disclosing information: k-anonymity and its enforcement through generalization and suppression. Technical report, 1998.
|
| 344 |
+
[14] Jiaming Song, Pratyusha Kalluri, Aditya Grover, Shengjia Zhao, and Stefano Ermon. Learning controllable fair representations. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 2164–2173, 2019.
|
| 345 |
+
[15] Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork. Learning fair representations. In ICML, 2013.
|
| 346 |
+
[16] Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. Mitigating unwanted biases with adversarial learning. In AAAI/ACM Conference on AI, Ethics, and Society, 2018.
|
| 347 |
+
[17] Han Zhao, Amanda Coston, Tameem Adel, and Geoffrey J. Gordon. Conditional learning of fair representations. CoRR, abs/1910.07162, 2019.
|
| 348 |
+
[18] Han Zhao and Geoffrey J. Gordon. Inherent tradeoffs in learning fair representations. CoRR, abs/1906.08386, 2019.
|
| 349 |
+
|
| 350 |
+
# Checklist
|
| 351 |
+
|
| 352 |
+
1. For all authors...
|
| 353 |
+
|
| 354 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We provide theorems with proofs for all claims made in the introduction and appendix
|
| 355 |
+
(b) Did you describe the limitations of your work? [Yes] The introduction clearly details the scope of our paper
|
| 356 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] We discuss potential negative societal impacts at the end of the introduction.
|
| 357 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 358 |
+
|
| 359 |
+
2. If you are including theoretical results...
|
| 360 |
+
|
| 361 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] Every result clearly states the assumptions used. In one instance (Theorem 2) we refer to a detailed definition of the assumptions in the appendix.
|
| 362 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] Many of them were refered to the appendix
|
| 363 |
+
|
| 364 |
+
3. If you ran experiments...
|
| 365 |
+
|
| 366 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [N/A]
|
| 367 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [N/A]
|
| 368 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [N/A]
|
| 369 |
+
|
| 370 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [N/A]
|
| 371 |
+
|
| 372 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 373 |
+
|
| 374 |
+
(a) If your work uses existing assets, did you cite the creators? [N/A]
|
| 375 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 376 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 377 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 378 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 379 |
+
|
| 380 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 381 |
+
|
| 382 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 383 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 384 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/qrwe7XHTmYb/qrwe7XHTmYb.md
ADDED
|
@@ -0,0 +1,480 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GSHARD: SCALING GIANT MODELS WITH CONDITIONAL COMPUTATION AND AUTOMATIC SHARDING
|
| 2 |
+
|
| 3 |
+
Dmitry Lepikhin lepikhin@google.com
|
| 4 |
+
|
| 5 |
+
HyoukJoong Lee hyouklee@google.com
|
| 6 |
+
|
| 7 |
+
Yuanzhong Xu yuanzx@google.com
|
| 8 |
+
|
| 9 |
+
Dehao Chen dehao@google.com
|
| 10 |
+
|
| 11 |
+
Orhan Firat orhanf@google.com
|
| 12 |
+
|
| 13 |
+
Yanping Huang huangyp@google.com
|
| 14 |
+
|
| 15 |
+
Maxim Krikun krikun@google.com
|
| 16 |
+
|
| 17 |
+
Noam Shazeer noam@google.com
|
| 18 |
+
|
| 19 |
+
Zhifeng Chen zhifengc@google.com
|
| 20 |
+
|
| 21 |
+
# ABSTRACT
|
| 22 |
+
|
| 23 |
+
Neural network scaling has been critical for improving the model quality in many real-world machine learning applications with vast amounts of training data and compute. Although this trend of scaling is affirmed to be a sure-fire approach for better model quality, there are challenges on the path such as the computation cost, ease of programming, and efficient implementation on parallel devices. In this paper we demonstrate conditional computation as a remedy to the above mentioned impediments, and demonstrate its efficacy and utility. We make extensive use of GShard, a module composed of a set of lightweight annotation APIs and an extension to the XLA compiler to enable large scale models with up to trillions of parameters. GShard and conditional computation enable us to scale up multilingual neural machine translation Transformer model with Sparsely-Gated Mixture-ofExperts. We demonstrate that such a giant model with 600 billion parameters can efficiently be trained on 2048 TPU v3 cores in 4 days to achieve far superior quality for translation from 100 languages to English compared to the prior art.
|
| 24 |
+
|
| 25 |
+
# 1 INTRODUCTION
|
| 26 |
+
|
| 27 |
+
Scaling neural networks brings dramatic quality gains over a wide array of machine learning problems such as computer vision, language understanding and neural machine translation (Devlin et al., 2018; Mahajan et al., 2018; Arivazhagan et al., 2019; Huang et al., 2019; Brown et al., 2020b). This general tendency motivated recent studies to scrutinize the factors playing a critical role in the success of scaling, including the amounts of training data, the model size, and the computation being utilized as found by past studies (Advani & Saxe, 2017; Hestness et al., 2019; Geiger et al., 2020). While the final model quality was found to have a power-law relationship with these factors (Hestness et al., 2017; Kaplan et al., 2020), the significant quality gains brought by larger models also came with various practical challenges. Training efficiency, which we define as the amount of compute and time used to achieve a superior model quality against the best system existed, is oftentimes left out.
|
| 28 |
+
|
| 29 |
+
In this study, we strive for improving the model quality while being training efficiently. We built a 600 billion parameters sequence-to-sequence Transformer model with Sparsely-Gated Mixture-of-Experts layers, which enjoys sub-linear computation cost and $O ( 1 )$ compilation time. We trained this model with 2048 TPU v3 devices for 4 days on a multilingual machine translation task and achieved far superior translation quality compared to prior art when translating 100 languages to English with a single non-ensemble model. We conducted experiments with various model sizes and found that the translation quality increases as the model gets bigger, yet the total wall-time to train only increases sub-linearly with respect to the model size, as illustrated in Figure 1. To train such an extremely large model, we relied on the following key design choices.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
Figure 1: Multilingual translation quality (average $\Delta$ BLEU comparing to bilingual baselines) improved as MoE model size grows up to 600B, while the end-to-end training cost (in terms of TPU v3 core-year) only increased sublinearly. Increasing the model size from 37.5B to 600B (16x), results in computation cost increase from 6 to 22 years (3.6x). The 600B parameters model that achieved the best translation quality was trained with 2048 TPU v3 cores for 4 days, a total cost of 22 TPU v3 core-years. In contrast, training all 100 bilingual baseline models would have required 29 TPU v3 core-years. Our best quality dense single Transformer model (2.3B parameters) achieving $\Delta$ BLEU of 6.1, was trained with GPipe for a total of 235.5 TPU v3 core-years.
|
| 33 |
+
|
| 34 |
+
Conditional computation First, model architecture should be designed to keep the computation and communication requirements sublinear in the model capacity. Conditional computation enables us to satisfy training and inference efficiency by having a sub-network activated on the per-input basis. Shazeer et al. (2017) has shown that scaling RNN model capacity by adding Sparsely Gated Mixture-of-Experts (MoE) layers allowed to achieve improved results with sub-linear cost. We therefore present our approach to extend Transformer architecture with MoE layers in this study.
|
| 35 |
+
|
| 36 |
+
GShard Annotation Second, the model description should be separated from the partitioning implementation and optimization. This separation of concerns let model developers focus on the network architecture and flexibly change the partitioning strategy, while the underlying system applies semantic-preserving transformations and implements efficient parallel execution. To this end we propose a module, GShard, which only requires the user to annotate a few critical tensors in the model with partitioning policies. It consists of a set of simple APIs for annotations, and a compiler extension in XLA for automatic parallelization. Model developers write models as if there is a single device with huge memory and computation capacity, and the compiler automatically partitions the computation for the target based on the user annotations and their own heuristics.
|
| 37 |
+
|
| 38 |
+
# 2 MODEL
|
| 39 |
+
|
| 40 |
+
The Transformer (Vaswani et al., 2017) architecture has been widely used for natural language processing. We scale Transformer with conditional computation by replacing every other feedforward layer with a sparsely activated Position-wise Mixture of Experts (MoE) layer (Shazeer et al., 2017), with a variant of top-2 gating in both the encoder and the decoder (Figure 2). Each subword token in the training example activates a sub-network of the MoE Transformer during both training and inference. The size of the sub-network is roughly independent of the number of experts per MoE Layer, allowing sublinear scaling of the computation cost.
|
| 41 |
+
|
| 42 |
+
# 2.1 POSITION-WISE MIXTURE-OF-EXPERTS LAYER
|
| 43 |
+
|
| 44 |
+
The Mixture-of-Experts (MoE) layers used in our model differ from Shazeer et al. (2017)’s in the sparse gating function and the auxiliary loss being used. A MoE layer for Transformer consists of $E$ feed-forward networks $\mathrm { F F N } _ { 1 } \dots \mathrm { F F N } _ { E }$ , each of which outputs $w o _ { e } \cdot \mathrm { R e L U } ( w i _ { e } \cdot x _ { s } )$ , where $x _ { s }$ is the input token to the MoE layer, $w i$ and wo being the input and output projection matrices for the feed-forward layer (an expert) with shapes $[ M , H ]$ and $[ H , M ]$ , respectively. The output of a MoE layer is the combination of the expert outputs $\begin{array} { r } { \sum _ { e = 1 } ^ { E } \mathcal { G } _ { s , e } \cdot \mathrm { F F N } _ { e } ( x _ { s } ) } \end{array}$ , where the vector $\mathcal { G } _ { s , E }$ is computed by a gating function $\mathrm { G A T E } ( \cdot )$ . We choose to let each token dispatched to at most two experts. The corresponding gating entries $\mathcal { G } _ { s , e }$ become non-zeros, representing how much an expert contributes to the final network output.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
Figure 2: Illustration of scaling of MoE Transformer Encoder Layers. Decoder modification is similar. (a) Standard Transformer. (b) Replacing every other feed forward layer with a MoE layer (c) The MoE layer is sharded across multiple devices, while all other layers are replicated.
|
| 48 |
+
|
| 49 |
+
The gating function $\mathrm { G A T E } ( \cdot )$ is critical to the MoE layer, which is modeled by a softmax activation function to indicate the weights of each expert in processing incoming tokens. We designed a novel efficient gating function with the following mechanisms (details illustrated in Algorithm 1).
|
| 50 |
+
|
| 51 |
+
Load balancing Naively picking top- $k$ experts from the softmax probability distribution leads to load imbalance problem for training as shown in Shazeer et al. (2017). Most tokens would have been dispatched to a small number of experts, leaving other experts insufficiently trained. To ensure the load is balanced, we enforce that the number of tokens processed by one expert is below some uniform threshold called expert capacity. Assuming $N$ total tokens in a batch and at most two experts per token, then the expert capacity $C$ is set to be $O ( N / E )$ . GATE(·) keeps a running counter $c _ { e }$ for how many tokens are dispatched to an expert. When both experts selected by a token already exceed their capacity, the token is considered as an overflowed token, where $\mathcal { G } _ { s , E }$ degenerates into a zero vector. Such tokens will be passed on to the next layer via residual connections. The introduction of the fixed expert capacity instead of loading balancing functions in Shazeer et al. (2017) allows us to run parallel execution of gating function as described blow.
|
| 52 |
+
|
| 53 |
+
Local dispatching for parallel gating Load balancing required the token assignments of one expert dependent on assignments of the other experts. The original gating function proposed by (Shazeer et al., 2017) had to be implemented sequentially, especially under the static shape constraints on TPUs. In our study, we distributed thousands of experts over thousands of devices, a sequential implementation of the gating function would keep most of the devices idle most of the time. Instead, we propose a new $\mathrm { G A T E } ( \cdot )$ function that partitions all tokens in a training batch evenly into $G$ local groups, i.e., each group contains $S = N / G$ tokens for local dispatching. All local groups are processed independently in parallel. Each group is given a fractional capacity of each expert, $C = 2 N / ( G \cdot E )$ , to ensure that at most this many tokens are dispatched to an expert. In general, increasing the expect capacity $C$ decreases the number of overflowed tokens thus improves the model quality. Since $G \times C$ is a constant, however, the higher capacity leads to smaller number of groups which hurts the training throughput by limiting the number of parallel gating execution. In this way, we can ensure that expert capacity is still enforced and the overall load is balanced. With fixed expert capacity and local dispatching, we are able to speed up the gating function by $O ( G )$ times.
|
| 54 |
+
|
| 55 |
+
Auxiliary loss Following Shazeer et al. (2017), we define a new differentiable auxiliary loss term $\ell _ { a u x }$ to enforce the load balancing. It is added to the overall loss function of the model $\mathcal { L } = \ell _ { o r i } + k * \ell _ { a u x }$ with a constant multiplier $k$ , where $\ell _ { a u x }$ is defined in line (13) of algorithm 1, and the term $c _ { e } / S$ represents the fraction of input routed to each expert. We replace the mean square $( c _ { e } / S ) ^ { 2 }$ with
|
| 56 |
+
|
| 57 |
+
# Algorithm 1: Group-level top-2 gating with auxiliary loss
|
| 58 |
+
|
| 59 |
+
Data: $x _ { S }$ , a group of tokens of size $S$ Data: $C$ , Expert capacity allocated to this group Result: $\mathcal { G } _ { S , E }$ , group combine weights Result: $\ell _ { a u x }$ , group auxiliary loss (1) for $e \gets 1$ to $E$ do (2) $\begin{array} { l } { c _ { e } \gets 0 } \\ { g _ { S , e } \gets s o f t m a x ( w g \cdot x _ { S } ) } \\ { m _ { e } \gets \frac { 1 } { S } \sum _ { s = 1 } ^ { S } g _ { s , e } } \end{array}$ $\triangleright$ gating decisions per expert (3) . gates per token per expert, wg are trainable weights (4) . mean gates per expert (5) end (6) for $s \gets 1$ to $S$ do (7) $| \begin{array} { l } { \begin{array} { l } { g 1 , e 1 , g 2 , e 2 = t o p _ { - } 2 ( \{ g _ { s , e } | e = 1 \cdots E \} ) } \\ { g 1 g 1 / ( g 1 + g 2 ) } \\ { c c _ { e 1 } } \\ { \mathbf { i f } c _ { e 1 } < C \mathbf { \ t h e n } } \\ { | \begin{array} { l } { \mathcal { G } _ { s , e 1 } g 1 } \\ { \mathbf { e n d } } \end{array} } \end{array} } \end{array} $ . top-2 gates and expert indices (8) . normalized $g 1$ (9) . position in e1 expert buffer (10) (11) . e1 expert combine weight for $x _ { s }$ (12) (13) $\triangleright$ incrementing e1 expert decisions count (14) end (15 ) $\begin{array} { r } { \ell _ { a u x } = \frac { 1 } { E } \sum _ { e = 1 } ^ { E } \frac { c _ { e } } { S } \cdot m _ { e } } \end{array}$ (16) for $s \gets 1$ to $S$ do (17) $\begin{array} { r l } { | } & { { } g 1 , e 1 , g 2 , e 2 = t o p _ { - } 2 ( \{ g _ { s , e } | e = 1 \cdots E \} ) } \end{array}$ . top-2 gates and expert indices (18) $g 2 g 2 / ( g 1 + g 2 )$ . normalized $g 2$ (19) rnd ← uniform(0, 1) . dispatch to second-best expert with probability $\propto 2 \cdot g 2$ (20) $c \gets c _ { e 2 }$ $\triangleright$ position in $e 2$ expert buffer (21) if $c < C \land 2 \cdot g 2 > r n d$ then (22) $| \quad g _ { s , e 2 } \gets g 2$ . $e 2$ expert combine weight for $x _ { s }$ (23) end (24) $c _ { e 2 } c + 1$ (25) end
|
| 60 |
+
|
| 61 |
+
differentiable approximation $m _ { e } ( c _ { e } / S )$ , which can provide better numerical stability since it can be optimized with gradient descent.
|
| 62 |
+
|
| 63 |
+
Random routing Intuitively, the output $y _ { s }$ is a weighted average of what selected experts return. If the weight for the 2nd expert is very small, we can simply ignore the 2nd expert to conserve the overall expert capacity. Hence, in addition to respecting the expert capacity constraint, GATE(·) dispatches to the 2nd-best expert with the probability proportional to its weight $g _ { 2 }$ . We observed much less overflowed tokens thus better accuracy with random routing for models at the small scale. We then adopted this approach for our experiments at large scales.
|
| 64 |
+
|
| 65 |
+
# 2.2 HIGHLY PARALLEL IMPLEMENTATION USING GSHARD
|
| 66 |
+
|
| 67 |
+
To implement the model in Section 2.1 efficiently on a cluster of devices, we first express the model in terms of linear algebra operations, which are highly tailored and optimized in our software stack TensorFlow (Abadi et al., 2016) and the hardware platform (TPU).
|
| 68 |
+
|
| 69 |
+
Our model implementation (Algorithm 2) views the whole accelerator cluster as a single device and expresses its core algorithm in a few tensor operations independent of the setup of the cluster. We extensively used tf.einsum, the Einstein summation notation (Einstein, 1923), to concisely express the model. Top2Gating in Algorithm 2 computes the union of all group-local $\mathcal { G } _ { S , E }$ described in the gating Algorithm 1. combine_weights is a 4-D tensor with shape $[ G , S , E , C ]$ , whose element value becomes non-zero when the input token $s$ in group $g$ is sent to expert $e$ at capacity buffer position $c$ For a specific $g$ and $s$ , a slice combine_weight[g, $s , : , : J$ contains at most two non-zero values. Binary dispatch_mask is produced from combine_weights by simply setting all non-zero values to 1.
|
| 70 |
+
|
| 71 |
+
To scale the computation to a cluster with $D$ devices, we choose the number of groups $G$ and the number of experts $E$ proportional to $D$ . With $C E = O ( 2 S )$ and the number of tokens per group $S$ independent of $D$ , the model dimension $M$ and the feed-forward hidden dimension $H$ , the total number of floating point operations (FLOPS) per device in Algorithm 2:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { r l } & { \begin{array} { l l } { F L O P S _ { \mathrm { S o f m a x } } + F L O P S _ { \mathrm { T o p 2 G a t i n g } } + F L O P S _ { \mathrm { D i s p a t e h l C o m b i n e } } + F L O P S _ { \mathrm { F F N } } } \\ { = O ( G S M E ) / D + O ( G S E C ) / D } & { + O ( G S M E C ) / D } \\ { = O ( D M ) } & { + O ( 2 ) } \end{array} } & { \begin{array} { l l } { + O ( 2 M ) } & { } \\ { + O ( 2 M ) } & { + O ( 2 H M ) } \end{array} } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Algorithm 2: Forward pass of the Positions-wise MoE layer. The underscored letter (e.g., G and E) indicates the dimension along which a tensor will be partitioned.
|
| 78 |
+
|
| 79 |
+
1 gates $=$ softmax(einsum("GSM,ME $- >$ GSE", inputs, wg))
|
| 80 |
+
2 combine_weights, dispatch_mask $=$ Top2Gating(gates)
|
| 81 |
+
3 dispatched_inputs $=$ einsum("GSEC,GSM->EGCM", dispatch_mask, inputs)
|
| 82 |
+
4 $\mathrm { ~ \textit ~ { ~ h ~ } ~ } =$ einsum("EGCM,EMH->EGCH", dispatched_inputs, wi)
|
| 83 |
+
5 $\mathrm { ~ \textit ~ { ~ h ~ } ~ } =$ relu(h)
|
| 84 |
+
6 expert_outputs $=$ einsum("EGCH,EHM->GECM", h, wo)
|
| 85 |
+
7 outputs $=$ einsum("GSEC,GECM->GSM", combine_weights, expert_outputs)
|
| 86 |
+
|
| 87 |
+
The per device flops for softmax is proportional to $D$ , but in our experiments $D \leq 2 H$ for up to 16K devices so it is less than that of FFN. Consequently the total per-device $F L O P S$ could be considered independent of $D$ , satisfying sublinear scaling design requirements. In addition to the computation cost, dispatching and combining token embedding using AllToAll operators consumed√ $O ( \sqrt { D } )$ cross-device communication cost on our 2D TPU cluster. We will discuss the cost analysis and micro-benchmarks for such communication overheads in Appendix section A.3.3.
|
| 88 |
+
|
| 89 |
+
Due to the daunting size and computation demand of tensors in Algorithm 1 when we scale the number of tokens $N$ to millions and the number of experts $E$ to thousands, we have to parallelize the algorithm over many devices. To express parallelism, tensors in the linear algebra computation are annotated with sharding information using GShard APIs to selectively specify how they should be partitioned across a cluster of devices. For example, the underscored letters in Algorithm 2 specified along which dimension the tensors are partitioned. This sharding information is propagated to the compiler so that the compiler can automatically apply transformations for parallel execution. Please refer to appendix A.2 for more detailed description of the GShard module.
|
| 90 |
+
|
| 91 |
+
We express the annotated version of Algorithm 2 as below. The input tensor is split along the first dimension and the gating weight tensor is replicated. After computing the dispatched expert inputs, we apply split to change the sharding from the group $( G )$ dimension to the expert $( E )$ dimension.
|
| 92 |
+
|
| 93 |
+
1 # Partition inputs along the first (group G) dim across D devices.
|
| 94 |
+
2 + inputs $=$ split(inputs, 0, D)
|
| 95 |
+
3 # Replicate the gating weights across all devices
|
| 96 |
+
4 + wg $=$ replicate(wg)
|
| 97 |
+
5 gates $=$ softmax(einsum("GSM,ME $- >$ GSE", inputs, wg))
|
| 98 |
+
6 combine_weights, dispatch_mask $=$ Top2Gating(gates)
|
| 99 |
+
7 dispatched_inputs $=$ einsum("GSEC,GSM->EGCM", dispatch_mask, inputs)
|
| 100 |
+
8 # Partition dispatched inputs along expert (E) dim.
|
| 101 |
+
9 + dispatched_inputs $=$ split(dispatched_inputs, 0, D)
|
| 102 |
+
10 $\mathrm { ~ \textit ~ { ~ h ~ } ~ } =$ einsum("EGCM,EMH->EGCH", dispatched_inputs, wi)
|
| 103 |
+
|
| 104 |
+
where split(tensor, $d , D )$ annotates tensor to be partitioned along the $d$ dimension over D devices, and replicate(tensor) annotates tensor to be replicated across partitions. The invocations of GShard APIs such as split or replicate only adds sharding information to the tensor and does not change its logical shape. Moreover, users are not required to annotate every tensor in the program. Annotations are typically only required on a few important operators like Einsums in our model and the compiler uses iterative data-flow analysis to infer sharding for the rest of the tensors.
|
| 105 |
+
|
| 106 |
+
# 3 MASSIVELY MULTILINGUAL, MASSIVE MACHINE TRANSLATION (M4)
|
| 107 |
+
|
| 108 |
+
We chose multilingual neural machine translation (MT) (Firat et al., 2016; Johnson et al., 2017; Aharoni et al., 2019) to validate our design for efficient training with GShard. Multilingual MT, which is an inherently multi-task learning problem, aims at building a single neural network for the goal of translating multiple language pairs simultaneously. This extends the line of work Huang et al. (2019); Arivazhagan et al. (2019); Shazeer et al. (2017) towards a universal machine translation model (Bapna & Firat, 2020), a single model that can translate between more than hundred languages.
|
| 109 |
+
|
| 110 |
+
In this section, we advocate how conditional computation (Bengio et al., 2013; Davis & Arel, 2013) with sparsely gated mixture of experts fits into the above detailed desiderata and show its efficacy by scaling neural machine translation models, while keeping the training time of such massive networks practical. E.g. a 600B GShard model for M4 can process 1T tokens (source side tokens after sub-word segmentation) in 250k training steps under 4 days. We experiment with increasing the model capacity by adding more layers and more experts into the model and study the factors playing role in convergence, model quality and training efficiency. Further, we demonstrate how conditional computation can speed up the training and how sparsely gating each token through the network can efficiently be learned without any prior knowledge on task or language relatedness, exemplifying the capability of learning the gating decision directly from the data.
|
| 111 |
+
|
| 112 |
+
We focus on improving the translation quality (measured in terms of BLEU score Papineni et al. (2002)) from all 100 languages to English. This resulted in approximately 13 billion training examples to be used for model training. Our baselines are separate bilingual Neural Machine Translation models for each language pair (e.g. a single model for German-to-English), tuned depending on the available training data per-language1. Rather than displaying individual BLEU scores for each language pair, we follow the convention of placing the baselines along the $x$ -axis at zero, and report the $\Delta$ BLEU trendline of each massively multilingual model trained with GShard (see Figure 3). The $x$ -axis in Figure 3 is sorted from left-to-right in the decreasing order of amount of available training data, where the left-most side corresponds to high-resourced languages, and low-resourced languages on the right-most side respectively. We also include a variant of dense 96 layer Transformer EncoderDecoder network T(96L) trained with GPipe pipeline parallelism on the same dataset as another baseline, which took over 6 weeks to convergence on 2048 TPU v3 cores 2.
|
| 113 |
+
|
| 114 |
+
We varied the depth of the transformer network (L) and the number of experts (E) to scale the model. For depth, we tested three different options, 12 (original Transformer depth, which consists of 6 encoder and 6 decoder layers), 36 and 60 layers. For the number of experts that replaces every other feed-forward layer, we also tested three options, namely 128, 512 and 2048 experts. Note that, the number of devices used for training, is fixed to be equal to the number of experts per-layer for simplicity. Please also see the detailed description in Table 1 for model configurations. During training, we use float32 for both model weights and activations in order to ensure training stability. We also ran additional scalability experiments with MoE(2048E, 60L) with bfloat16 activations with more than one trillion model weights. We are still working on the model convergence and hence did not include the results from this trillion weight model for the sake of reproducibility.
|
| 115 |
+
|
| 116 |
+
# 3.1 RESULTS
|
| 117 |
+
|
| 118 |
+
For each experiment (rows of the Table 1), we trained the corresponding MoE Transformer model until it has seen 1 trillion $( 1 0 ^ { 1 2 } )$ tokens. The model checkpoint at this point is used in the model evaluation. We did not observe any over-fitting patterns by this point in any experiment. Instead, we observed that the training loss continued to improve if we kept training longer. We evaluated BLEU scores that the models achieved for all language pairs on a held-out test set in Figure 3.
|
| 119 |
+
|
| 120 |
+
Here we discuss the implication of each experiment on languages that have large amounts of training data (high resourced), as well as languages with limited data (low-resource). In order to improve the quality for both high- and low-resource languages simultaneously within a single model, scaled models must mitigate capacity bottleneck issue by allocating enough capacity to high-resource tasks, while amplifying the positive transfer towards low-resource tasks by facilitating sufficient parameter sharing. We loosely relate the expected learning dynamics of such systems with the long-standing memorization and generalization dilemma, which is recently studied along the lines of width vs depth scaling efforts (Cheng et al., 2016). Not only do we expect our models to generalize better to the held-out test sets, we also expect them to exhibit high transfer capability across languages as another manifestation of generalization performance Lampinen & Ganguli (2018).
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 3: Translation quality comparison of multilingual MoE Transformer models trained with GShard and monolingual baselines. MoE(128E, 12L) represents the model with 12 layers and 128 experts per layer. Positions along the $x$ -axis represent languages, raging from high- to low-resource. $\Delta$ BLEU represents the quality gain of a single multilingual model compared to a monolingual Transformer model trained and tuned for a specific language. MoE Transformer models trained with GShard are reported with solid trend-lines. Dashed trend-line represents a single 96 layer multilingual Transformer model T(96L) trained with GPipe on same dataset. Each trend-line is smoothed by a sliding window of 10 for clarity. (Best seen in color)
|
| 124 |
+
|
| 125 |
+
Deeper Models Bring Consistent Quality Gains Across the Board. We first investigate the relationship between the model depth and the model quality for both high- and low-resource languages. With an increasing number of per-layer experts for each experiment (128, 512 and 2048), we tripled the depth of the network for each expert size, from 12 to 36. Fig. 3 show that when the number of experts per-layer is fixed, increasing the depth (L) alone brings consistent gains for both low and high resourced languages (upwards $\Delta$ shift along the $y$ -axis), almost with a constant additive factor every time we scale the depth from 12L to 36L (2-to-3 BLEU points on average in Table 1).
|
| 126 |
+
|
| 127 |
+
Relaxing the Capacity Bottleneck Grants Pronounced Quality Gains. We also consider three models with identical depths (12L), with increasing number of experts per-layer: 128, 512 and 2048. As we increase the number of experts per-layer from 128 to 512, we notice a large jump in model quality, $+ 3 . 3$ average BLEU score across 100 languages. However again by four folds scaling of the number of experts per-layer, from 512 to 2048, yields only $+ 1 . 3$ average BLEU scores. Despite the significant quality improvement, this drop in gains hints the emergence of diminishing returns.
|
| 128 |
+
|
| 129 |
+
Given the over 100 languages considered, the multilingual model has a clear advantage on improving the low-resource tasks. On the contrary, for high-resource languages the increased number of tasks limits per-task capacity within the model, resulting in lower translation quality compared to a models trained on a single language pair. We observed in our experiments that this capacity bottleneck on task interference for high resourced languages can be relaxed by increasing the number of experts per-layer,. Interestingly increasing the depth does not help as much if the capacity bottleneck is not relaxed. For 12 layer models increase in the expert number yields larger gains for high resourced languages as opposed to earlier revealed diminishing returns for low-resourced languages. While adding more experts relaxes the capacity bottleneck, at the same time it reduces the amount of transfer due to a reduction of the shared sub-networks. Notably, $\Delta$ BLEU gains for MoE(512E, 36L) exceed ones with higher capacity, but shallower MoE(2048E, 12L). While a comparison of proportionally smaller models, shows that MoE(128E, 36L) is suboptimal compared to MoE(512E, 12L). One can conclude that scaling depth brings most quality gains only after capacity bottleneck is resolved.
|
| 130 |
+
|
| 131 |
+
Deep-Dense Models are Better at Positive Transfer towards Low-Resource Tasks. Lastly we look into the impact of the depth on low-resourced tasks as a loose corollary to our previous experiment. We include a dense model with 96 layers T(96L) trained with GPipe on the same data into our analysis. We compare T(96L) with the shallow MoE(128E, 12L) model. While the gap between the two models measured to be almost constant for the majority of the high-to-mid resourced languages, the gap grows in favor of the dense-deep T(96L) model as we get into the low-resourced regime. Following our previous statement, as the proportion of the shared sub-networks across tasks increase, which is $100 \%$ for dense T(96L), the bandwidth for transfer gets maximized and results in a comparably better quality against its shallow counterpart. The same transfer quality to the low-resourced languages can be also achieved with MoE(128E, 36L) which has 37 billion parameters.
|
| 132 |
+
|
| 133 |
+
Table 1: Performance of MoE models with different number of experts and layers.
|
| 134 |
+
|
| 135 |
+
<table><tr><td rowspan=2 colspan=1>Model</td><td rowspan=2 colspan=1>Cores</td><td rowspan=2 colspan=1>Steps/sec.</td><td rowspan=2 colspan=1>Batch sz(Tokens)</td><td rowspan=2 colspan=1>TPU coreyears</td><td rowspan=2 colspan=1>Trainingdays</td><td rowspan=2 colspan=1>BLEUavg.</td><td rowspan=1 colspan=3>Billion tokens tocross-entropy of</td></tr><tr><td rowspan=1 colspan=1>0.7</td><td rowspan=1 colspan=1>0.6</td><td rowspan=1 colspan=1>0.5</td></tr><tr><td rowspan=5 colspan=1>MoE(2048E,36L)MoE(2048E,12L)MoE(512E,36L)MoE(512E,12L)MoE(128E,36L)MoE(128E,12L)</td><td rowspan=5 colspan=1>20482048512512128128</td><td rowspan=1 colspan=1>0.72</td><td rowspan=1 colspan=1>4M</td><td rowspan=1 colspan=1>22.4</td><td rowspan=1 colspan=1>4.0</td><td rowspan=1 colspan=1>44.3</td><td rowspan=1 colspan=1>82</td><td rowspan=1 colspan=1>175</td><td rowspan=1 colspan=1>542</td></tr><tr><td rowspan=4 colspan=1>2.151.053.280.672.16</td><td rowspan=4 colspan=1>4M1M1M1M1M</td><td rowspan=3 colspan=1>7.515.54.96.1</td><td rowspan=1 colspan=1>1.4</td><td rowspan=1 colspan=1>41.3</td><td rowspan=2 colspan=1>17666141</td><td rowspan=4 colspan=1>4841704861074-</td><td rowspan=2 colspan=1>17805671</td></tr><tr><td rowspan=2 colspan=1>11.03.517.3</td><td rowspan=1 colspan=1>43.740.0</td></tr><tr><td rowspan=1 colspan=1>39.0</td><td rowspan=2 colspan=1>321995</td><td rowspan=2 colspan=1>11</td></tr><tr><td rowspan=1 colspan=1>1.9</td><td rowspan=1 colspan=1>5.4</td><td rowspan=1 colspan=1>36.7</td></tr><tr><td rowspan=1 colspan=1>T(96L)</td><td rowspan=1 colspan=1>2048</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>4M</td><td rowspan=1 colspan=1>~235.5</td><td rowspan=1 colspan=1>~42</td><td rowspan=1 colspan=1>36.9</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>Bilingual Baseline</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>~29</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>30.8</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td></tr></table>
|
| 136 |
+
|
| 137 |
+
We conjecture that, increasing the depth might potentially increase the extent of transfer to lowresource tasks hence generalize better along that axis. But we also want to highlight that the models in comparison have a disproportionate training resource requirements. We again want to promote the importance of training efficiency, which is the very topic we studied next.
|
| 138 |
+
|
| 139 |
+
# 3.2 TRAINING EFFICIENCY
|
| 140 |
+
|
| 141 |
+
To measure the training efficiency. we first keep track of the number of tokens being processed to reach a certain training loss and second we keep track of the wall-clock time for a model to process certain number of tokens. We focus on measuring the training time to fixed training loss targets3 while varying other factors. We left systems performance analysis in appendex A.3.
|
| 142 |
+
|
| 143 |
+
Deeper models converge faster with fewer examples. It has been shown that, deeper models are better at sample efficiency, reaching better training/test error given the same amount of training examples (Huang et al., 2019; Shoeybi et al., 2019), commonly attributed to the acceleration effect of over-parametrization (Arora et al., 2018). We empirically test the hypothesis again using GShard with MoE Transformers and share trade-offs for models that are not only deep, but also sparsely activated.
|
| 144 |
+
|
| 145 |
+
For this purpose, we compare number of tokens being processed by each model to reach a preset training loss. A general trend we observe from Table 1 is that, MoE Transformer models with 3 times the depth need 2 to 3 times fewer tokens to reach the preset training loss thresholds. For example MoE(128E, 12L) takes 3 times the number of tokens to reach 0.7 training cross-entropy compared to MoE(128E, 36L). We observe a similar trend for models with 512 and 2048 experts.
|
| 146 |
+
|
| 147 |
+
Another intriguing observation from Table 1, is again related to the presence of capacity bottleneck. Comparing the models with same depth, we notice a significant drop in the number of tokens required to reach training loss of 0.7, as we transition from 128 to 512 number of experts. Practically that is where we observed the capacity bottleneck was residing. After this phase shift, models with ample capacity tend to exhibit similar sample efficiency characteristics.
|
| 148 |
+
|
| 149 |
+
Model with 600B parameters trained under 4 days achieved the best quality. Next we delve deeper into the interaction between model size and wall-clock time spent for training. We monitor number of TPU cores being used, training steps per-second, total number of tokens per batch, TPU core years4, and actual wall-clock time spent in days for training (see Table 1 columns respectively). One of the largest models we trained, MoE(2048E, 36L) with 600 billion parameters, utilized 2048 TPU cores for 4 days. This model achieves the best translation quality in terms of average BLEU, but also takes a total of 22.4 TPU years to train. While we have not seen any signs that the quality improvements plateau as we scale up our models, we strive for finding cost-effective solutions for scaling. Results in Table 1 again validates scaling with conditional computation is way more practical compared to dense scaling. Given the same number of TPU cores used by MoE(2048E, 36L), the dense scaling variant, T(96L), appears to be taking more than ten times to train (235 TPU core years), while trailing behind in terms of model quality compared to models trained with GShard.
|
| 150 |
+
|
| 151 |
+
# 4 RELATED WORK
|
| 152 |
+
|
| 153 |
+
Model parallelism partitions computation of neural network to build very large models on a cluster of accelerators. For example, pipelining (Huang et al., 2019; Harlap et al., 2018) splits a large model’s layers into multiple stages, while operator-level partitioning (Shazeer et al., 2018; Jia et al., 2019) splits individual operators into smaller parallel operators. GShard used a type of operator-level partitioning to scale our model. Without the need to rewrite the model implementation on other frameworks, GShard only requires users to annotate how tensors are split on existing model code, while not worrying the correct reduction and data exchange over partitions, because that is handled by the compiler. GShard solved many practical problems when implementing SPMD transformation on a production compiler (XLA). For example, to our knowledge, it is the first work showing how we can partition unevenly-shaped, non-trivial ops that have spatial dimensions with complex static configurations (e.g., convolutions with static dilation and padding).
|
| 154 |
+
|
| 155 |
+
Conditional Computation Conditional computation (Bengio et al., 2015; Elbayad et al., 2020) postulates that examples should be routed within the network by activating an input dependent sub-network. Prior work (Bapna et al., 2020; Yang et al., 2019; Shazeer et al., 2017) have shown its promising applications in machine translation, language models and computer vision. The routing strategy can be any of the following: estimated difficulty of the example (Lugosch et al., 2020), available computation budget (Elbayad et al., 2020; Bapna et al., 2020), or more generally a learned criterion with sparsity induced mixture of experts (Shazeer et al., 2017). This paper extended sparsely gated mixture of experts to Transformers (Vaswani et al., 2017) and introduced novel gating function with efficient implementation on parallel devices.
|
| 156 |
+
|
| 157 |
+
Model scaling Within a single model family, simply making the network wider or deeper often improves the model quality empirically. E.g., deeper ResNets performed better (He et al., 2016b), bigger Transformer models achieved better translation quality (Vaswani et al., 2017), models with larger vocabulary, or embedding or feature crosses work better, too (Arivazhagan et al., 2019; Conneau et al., 2019). Across different model families, it has also been observed that bigger models with larger model capacities not only fit the training data better but also generalize better on test time (Zhang et al., 2017; Neyshabur et al., 2017; Huang et al., 2019). This observation motivated many research efforts to build much bigger neural networks than those typically used in deep learning research models or production models. Shazeer et al. (2017) showed that a recurrent language model with 69 billion parameters using mixture-of-expert layers achieved much lower test perplexity for the one billion words (LM1B) benchmark. Brown et al. (2020a) showed that a dense 175 billion parameters model is capable of exhibiting highly accurate few-shot performance on downstream NLP tasks.
|
| 158 |
+
|
| 159 |
+
# 5 CONCLUSION
|
| 160 |
+
|
| 161 |
+
Our results in this paper suggest that progressive scaling of neural networks yield consistent quality gains, validating that the quality improvements have not yet plateaued as we scale up our models. We applied GShard, a deep learning module that partitions computation at scale automatically, to scale up MoE Transformer with light weight sharding annotations in the model code. We demonstrated a 600B parameter multilingual neural machine translation model can efficiently be trained in 4 days achieving superior performance and quality compared to prior art when translating 100 languages to English with a single model. MoE Transformer models trained with GShard also excel at training efficiency, with a training cost of 22 TPU v3 core years compared to 29 TPU years used for training all 100 bilingual Transformer baseline models. Empirical results presented in this paper confirmed that scaling models by utilizing conditional computation not only improve the quality of real-world machine learning applications but also remained practical and sample efficient during training. Our proposed method presents a favorable scalability/cost trade-off and alleviates the need for modelspecific frameworks or tools for scaling giant neural networks.
|
| 162 |
+
|
| 163 |
+
# REFERENCES
|
| 164 |
+
|
| 165 |
+
2019 recent trends in GPU price per FLOPS. https://aiimpacts.org/2019-recenttrends-in-gpu-price-per-flops/. Accessed: 2020-06-05.
|
| 166 |
+
|
| 167 |
+
ONNX: Open Neural Network Exchange. https://github.com/onnx/onnx, 2019. Online; accessed 1 June 2020.
|
| 168 |
+
|
| 169 |
+
XLA: Optimizing Compiler for TensorFlow. https://www.tensorflow.org/xla, 2019. Online; accessed 1 June 2020.
|
| 170 |
+
|
| 171 |
+
Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for large-scale machine learning. In OSDI, volume 16, pp. 265–283, 2016.
|
| 172 |
+
|
| 173 |
+
Madhu S. Advani and Andrew M. Saxe. High-dimensional dynamics of generalization error in neural networks, 2017.
|
| 174 |
+
|
| 175 |
+
Roee Aharoni, Melvin Johnson, and Orhan Firat. Massively multilingual neural machine translation. CoRR, abs/1903.00089, 2019. URL http://arxiv.org/abs/1903.00089.
|
| 176 |
+
|
| 177 |
+
Naveen Arivazhagan, Ankur Bapna, Orhan Firat, Dmitry Lepikhin, Melvin Johnson, Maxim Krikun, Mia Xu Chen, Yuan Cao, George Foster, Colin Cherry, Wolfgang Macherey, Zhifeng Chen, and Yonghui Wu. Massively multilingual neural machine translation in the wild: Findings and challenges, 2019.
|
| 178 |
+
|
| 179 |
+
Sanjeev Arora, Nadav Cohen, and Elad Hazan. On the optimization of deep networks: Implicit acceleration by overparameterization. arXiv preprint arXiv:1802.06509, 2018.
|
| 180 |
+
|
| 181 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 182 |
+
|
| 183 |
+
Ankur Bapna and Orhan Firat. Exploring massively multilingual, massive neural machine translation. https://ai.googleblog.com/2019/10/exploring-massivelymultilingual.html, 2020.
|
| 184 |
+
|
| 185 |
+
Ankur Bapna, Naveen Arivazhagan, and Orhan Firat. Controlling computation versus quality for neural sequence models, 2020.
|
| 186 |
+
|
| 187 |
+
Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, James Bergstra, Ian Goodfellow, Arnaud Bergeron, Nicolas Bouchard, David Warde-Farley, and Yoshua Bengio. Theano: new features and speed improvements. arXiv preprint arXiv:1211.5590, 2012.
|
| 188 |
+
|
| 189 |
+
Emmanuel Bengio, Pierre-Luc Bacon, Joelle Pineau, and Doina Precup. Conditional computation in neural networks for faster models, 2015.
|
| 190 |
+
|
| 191 |
+
Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation, 2013.
|
| 192 |
+
|
| 193 |
+
Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020a.
|
| 194 |
+
|
| 195 |
+
Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020b.
|
| 196 |
+
|
| 197 |
+
Lynn Elliot Cannon. A Cellular Computer to Implement the Kalman Filter Algorithm. PhD thesis, USA, 1969. AAI7010025.
|
| 198 |
+
|
| 199 |
+
William Chan, Navdeep Jaitly, Quoc Le, and Oriol Vinyals. Listen, attend and spell: A neural network for large vocabulary conversational speech recognition. In 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4960–4964. IEEE, 2016.
|
| 200 |
+
|
| 201 |
+
Heng-Tze Cheng, Mustafa Ispir, Rohan Anil, Zakaria Haque, Lichan Hong, Vihan Jain, Xiaobing Liu, Hemal Shah, Levent Koc, Jeremiah Harmsen, and et al. Wide and deep learning for recommender systems. Proceedings of the 1st Workshop on Deep Learning for Recommender Systems - DLRS 2016, 2016. doi: 10.1145/2988450.2988454. URL http://dx.doi.org/10.1145/ 2988450.2988454.
|
| 202 |
+
|
| 203 |
+
Chung-Cheng Chiu, Tara N Sainath, Yonghui Wu, Rohit Prabhavalkar, Patrick Nguyen, Zhifeng Chen, Anjuli Kannan, Ron J Weiss, Kanishka Rao, Ekaterina Gonina, et al. State-of-the-art speech recognition with sequence-to-sequence models. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4774–4778. IEEE, 2018.
|
| 204 |
+
|
| 205 |
+
Dan Claudiu Cire¸san, Ueli Meier, Luca Maria Gambardella, and Jürgen Schmidhuber. Deep, big, simple neural nets for handwritten digit recognition. Neural computation, 22(12):3207–3220, 2010.
|
| 206 |
+
|
| 207 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. Unsupervised cross-lingual representation learning at scale, 2019.
|
| 208 |
+
|
| 209 |
+
Andrew Davis and Itamar Arel. Low-rank approximations for conditional feedforward computation in deep neural networks, 2013.
|
| 210 |
+
|
| 211 |
+
Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Marc’aurelio Ranzato, Andrew Senior, Paul Tucker, Ke Yang, et al. Large scale distributed deep networks. In Advances in neural information processing systems, pp. 1223–1231, 2012.
|
| 212 |
+
|
| 213 |
+
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.
|
| 214 |
+
|
| 215 |
+
Albert Einstein. Die grundlage der allgemeinen relativitätstheorie. In Das Relativitätsprinzip, pp. 81–124. Springer, 1923.
|
| 216 |
+
|
| 217 |
+
Maha Elbayad, Jiatao Gu, Edouard Grave, and Michael Auli. Depth-adaptive transformer. ArXiv, abs/1910.10073, 2020.
|
| 218 |
+
|
| 219 |
+
Orhan Firat, Kyunghyun Cho, and Yoshua Bengio. Multi-way, multilingual neural machine translation with a shared attention mechanism. Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2016. doi: 10.18653/v1/n16-1101. URL http://dx.doi.org/10.18653/v1/n16-1101.
|
| 220 |
+
|
| 221 |
+
Mario Geiger, Arthur Jacot, Stefano Spigler, Franck Gabriel, Levent Sagun, Stéphane d’ Ascoli, Giulio Biroli, Clément Hongler, and Matthieu Wyart. Scaling description of generalization with number of parameters in deep learning. Journal of Statistical Mechanics: Theory and Experiment, 2020(2):023401, Feb 2020. ISSN 1742-5468. doi: 10.1088/1742-5468/ab633c. URL http://dx.doi.org/10.1088/1742-5468/ab633c.
|
| 222 |
+
|
| 223 |
+
Aaron Harlap, Deepak Narayanan, Amar Phanishayee, Vivek Seshadri, Nikhil Devanur, Greg Ganger, and Phil Gibbons. Pipedream: Fast and efficient pipeline parallel dnn training. arXiv preprint arXiv:1806.03377, 2018.
|
| 224 |
+
|
| 225 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
|
| 226 |
+
|
| 227 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016b.
|
| 228 |
+
|
| 229 |
+
Joel Hestness, Sharan Narang, Newsha Ardalani, Gregory Diamos, Heewoo Jun, Hassan Kianinejad, Md. Mostofa Ali Patwary, Yang Yang, and Yanqi Zhou. Deep learning scaling is predictable, empirically, 2017.
|
| 230 |
+
|
| 231 |
+
Joel Hestness, Newsha Ardalani, and Gregory Diamos. Beyond human-level accuracy. Proceedings of the 24th Symposium on Principles and Practice of Parallel Programming, Feb 2019. doi: 10.1145/3293883.3295710. URL http://dx.doi.org/10.1145/3293883.3295710.
|
| 232 |
+
|
| 233 |
+
Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal processing magazine, 29(6):82–97, 2012.
|
| 234 |
+
|
| 235 |
+
Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Dehao Chen, Mia Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V Le, Yonghui Wu, and Zhifeng Chen. Gpipe: Efficient training of giant neural networks using pipeline parallelism. Advances in Neural Information Processing Systems 32, pp. 103–112, 2019.
|
| 236 |
+
|
| 237 |
+
Paolo Ienne, Thierry Cornu, and Gary Kuhn. Special-purpose digital hardware for neural networks: An architectural survey. Journal of VLSI signal processing systems for signal, image and video technology, 13(1):5–25, 1996.
|
| 238 |
+
|
| 239 |
+
Zhihao Jia, Matei Zaharia, and Alex Aiken. Beyond Data and Model Parallelism for Deep Neural Networks. In Proceedings of the Conference on Systems and Machine Learning (SysML), Palo Alto, CA, 2019.
|
| 240 |
+
|
| 241 |
+
Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda Viégas, Martin Wattenberg, Greg Corrado, and et al. Google’s multilingual neural machine translation system: Enabling zero-shot translation. Transactions of the Association for Computational Linguistics, 5:339–351, Dec 2017. ISSN 2307-387X. doi: 10.1162/tacl_a_00065. URL http://dx.doi.org/10.1162/tacl_a_00065.
|
| 242 |
+
|
| 243 |
+
Norman P Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, et al. In-datacenter performance analysis of a tensor processing unit. In Proceedings of the 44th Annual International Symposium on Computer Architecture, pp. 1–12, 2017.
|
| 244 |
+
|
| 245 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
|
| 246 |
+
|
| 247 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 248 |
+
|
| 249 |
+
Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In EMNLP, 2018.
|
| 250 |
+
|
| 251 |
+
Andrew K. Lampinen and Surya Ganguli. An analytic theory of generalization dynamics and transfer learning in deep linear networks, 2018.
|
| 252 |
+
|
| 253 |
+
Loren Lugosch, Derek Nowrouzezahrai, and Brett H. Meyer. Surprisal-triggered conditional computation with neural networks, 2020.
|
| 254 |
+
|
| 255 |
+
Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 181–196, 2018.
|
| 256 |
+
|
| 257 |
+
Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nathan Srebro. Exploring generalization in deep learning, 2017.
|
| 258 |
+
|
| 259 |
+
John Nickolls, Ian Buck, Michael Garland, and Kevin Skadron. Scalable parallel programming with cuda. Queue, 6(2):40–53, 2008.
|
| 260 |
+
|
| 261 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
|
| 262 |
+
|
| 263 |
+
Shoumik Palkar and Matei Zaharia. Optimizing data-intensive computations in existing libraries with split annotations. In Proceedings of the 27th ACM Symposium on Operating Systems Principles, pp. 291–305, 2019.
|
| 264 |
+
|
| 265 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002.
|
| 266 |
+
|
| 267 |
+
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.
|
| 268 |
+
|
| 269 |
+
Rajat Raina, Anand Madhavan, and Andrew Y Ng. Large-scale deep unsupervised learning using graphics processors. In Proceedings of the 26th annual international conference on machine learning, pp. 873–880, 2009.
|
| 270 |
+
|
| 271 |
+
Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, and Yuxiong He. Zero: Memory optimization towards training a trillion parameter models. arXiv preprint arXiv:1910.02054, 2019.
|
| 272 |
+
|
| 273 |
+
Jared Roesch, Steven Lyubomirsky, Logan Weber, Josh Pollock, Marisa Kirisame, Tianqi Chen, and Zachary Tatlock. Relay: a new ir for machine learning frameworks. Proceedings of the 2nd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages - MAPL 2018, 2018. doi: 10.1145/3211346.3211348. URL http://dx.doi.org/10.1145/ 3211346.3211348.
|
| 274 |
+
|
| 275 |
+
Nadav Rotem, Jordan Fix, Saleem Abdulrasool, Garret Catron, Summer Deng, Roman Dzhabarov, Nick Gibson, James Hegeman, Meghan Lele, Roman Levenstein, Jack Montgomery, Bert Maher, Satish Nadathur, Jakob Olesen, Jongsoo Park, Artem Rakhov, Misha Smelyanskiy, and Man Wang. Glow: Graph lowering compiler techniques for neural networks, 2018.
|
| 276 |
+
|
| 277 |
+
Noam Shazeer. Fast transformer decoding: One write-head is all you need. arXiv preprint arXiv:1911.02150, 2019.
|
| 278 |
+
|
| 279 |
+
Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. ArXiv, abs/1804.04235, 2018.
|
| 280 |
+
|
| 281 |
+
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
|
| 282 |
+
|
| 283 |
+
Noam Shazeer, Youlong Cheng, Niki Parmar, Dustin Tran, Ashish Vaswani, Penporn Koanantakool, Peter Hawkins, HyoukJoong Lee, Mingsheng Hong, Cliff Young, et al. Mesh-tensorflow: Deep learning for supercomputers. In Advances in Neural Information Processing Systems, pp. 10414– 10423, 2018.
|
| 284 |
+
|
| 285 |
+
Jonathan Shen, Ruoming Pang, Ron J Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, Rj Skerrv-Ryan, et al. Natural tts synthesis by conditioning wavenet on mel spectrogram predictions. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 4779–4783. IEEE, 2018.
|
| 286 |
+
|
| 287 |
+
Tianxiao Shen, Myle Ott, Michael Auli, and Marc’Aurelio Ranzato. Mixture models for diverse machine translation: Tricks of the trade. arXiv preprint arXiv:1902.07816, 2019.
|
| 288 |
+
|
| 289 |
+
Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using gpu model parallelism. arXiv preprint arXiv:1909.08053, 2019.
|
| 290 |
+
|
| 291 |
+
Yifan Sun, Nicolas Bohm Agostini, Shi Dong, and David Kaeli. Summarizing cpu and gpu design trends with product data. arXiv preprint arXiv:1911.11313, 2019.
|
| 292 |
+
|
| 293 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
|
| 294 |
+
|
| 295 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015.
|
| 296 |
+
|
| 297 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2017.
|
| 298 |
+
|
| 299 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
|
| 300 |
+
|
| 301 |
+
Yuanzhong Xu, HyoukJoong Lee, Dehao Chen, Hongjun Choi, Blake Hechtman, and Shibo Wang. Automatic cross-replica sharding of weight update in data-parallel training, 2020.
|
| 302 |
+
|
| 303 |
+
Brandon Yang, Gabriel Bender, Quoc V Le, and Jiquan Ngiam. Condconv: Conditionally parameterized convolutions for efficient inference. In Advances in Neural Information Processing Systems, pp. 1307–1318, 2019.
|
| 304 |
+
|
| 305 |
+
Chris Ying, Sameer Kumar, Dehao Chen, Tao Wang, and Youlong Cheng. Image classification at supercomputer scale, 2018.
|
| 306 |
+
|
| 307 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. 2017. URL https://arxiv.org/abs/ 1611.03530.
|
| 308 |
+
|
| 309 |
+
# A APPENDIX
|
| 310 |
+
|
| 311 |
+
# A.1 RELATED WORK
|
| 312 |
+
|
| 313 |
+
Neural networks Deep learning models have been very successful in advancing sub-fields of artificial intelligence. For years, the fields have been continuously reporting new state of the art results using varieties of model architectures for computer vision tasks (Krizhevsky et al., 2012; Szegedy et al., 2015; He et al., 2016a), for natural language understanding tasks (Sutskever et al., 2014; Bahdanau et al., 2014; Wu et al., 2016), for speech recognition and synthesis tasks (Hinton et al., 2012; Chan et al., 2016; Chiu et al., 2018; Oord et al., 2016; Shen et al., 2018). More recently, attention-based Transformer models further advanced state of the art of these fields (Vaswani et al., 2017; Devlin et al., 2018; Shen et al., 2019).
|
| 314 |
+
|
| 315 |
+
Hardware Neural networks demand non-negligible amounts of computation power. To address such a demand, special hardware (chips and networked machines) built for neural network training and inference can be dated back to 25 years ago (Ienne et al., 1996). Since late 2000s, researchers started to leverage GPUs to accelerate neural nets (Raina et al., 2009; Krizhevsky et al., 2012; Cire¸san et al., 2010). More recently, the industry also invested heavily in building more dedicated hardware systems chasing for more cost-effective neural network hardware (Jouppi et al., 2017). Because the core computation of neural networks (various forms of summation of multiplications: convolution, matrix multiplication, einsum) are highly parallelizable numerical calculations, these chips are equipped with huge number of floating processing units (FPUs). Hence, the compute power of these specially designed hardware grew dramatically. It is reported that GPU price per flops dropped a factor of ten in just the last 4 years (gpu) and flops per watts increased by 2 magnitude over the past 12 years (Sun et al., 2019). The widely available low-cost computation power is a major enabler for the success of neural networks.
|
| 316 |
+
|
| 317 |
+
Software Software systems supporting neural networks evolved together with the advancement of the underlying hardware (Dean et al., 2012; Bastien et al., 2012; Abadi et al., 2016; Paszke et al., 2017; Palkar & Zaharia, 2019). While the accelerators are highly parallel compute machines, they are significantly more difficult to program directly. The frameworks made building neural networks easier and abstracted away many hardware specific details from the practitioners. They in turn rely on lower-level libraries to drive special hardware (accelerators) efficiently. E.g., CUDA (Nickolls et al., 2008) for Nvidia’s GPUs, or XLA for Google’s TPUs (xla, 2019). These lower-level libraries are critical for achieving high efficiency using these special hardware.
|
| 318 |
+
|
| 319 |
+
Automated parallelism Because programming in a distributed heterogeneous environment is challenging, particularly for high-level practitioners, deep-learning frameworks attempt to alleviate the burden of their users from specifying how the distributed computation is done. For example, TensorFlow (Abadi et al., 2016) has support for data parallelism, and basic model parallelism with graph partitioning by per-node device assignment. Mesh TensorFlow (Shazeer et al., 2018) helps the user to build large models with SPMD-style per-operator partitioning, by rewriting the computation in a Python library on top of TensorFlow; in comparison, our approach partitions the graph in the compiler based on light-weight annotations without requiring the user to rewrite the model. FlexFlow (Jia et al., 2019) uses automated search to discover the optimal partition of operators in a graph for better performance; while it focuses on determining the partitioning policy, our SPMD partitioner focuses on the mechanisms to transform an annotated graph. Weight-update sharding (Xu et al., 2020) is another automatic parallelization transformation based on XLA, which mostly focuses on performance optimizations for TPU clusters, and conceptually can be viewed as a special case for GShard. Zero (Rajbhandari et al., 2019) presents a set of optimizations to reduce memory redundancy in parallel training devices, by partitioning weights, activations, and optimizer state separately, and it is able to scale models to 170 billion parameters; in comparison, GShard is more general in the sense that it does not distinguish these tensors, and all of those specific partitioning techniques can be supported by simply annotating the corresponding tensors, allowing us to scale to over 1 trillion parameters and explore more design choices.
|
| 320 |
+
|
| 321 |
+
# A.2 THE XLA SPMD PARTITIONER FOR GSHARD
|
| 322 |
+
|
| 323 |
+
This section describes the compiler infrastructure that automatically partitions a computation graph based on sharding annotations. Sharding annotations inform the compiler about how each tensor should be distributed across devices. The SPMD (Single Program Multiple Data) partitioner (or “partitioner” for simplicity) is a compiler component that transforms a computation graph into a single program to be executed on all devices in parallel. This makes the compilation time near constant regardless of the number of partitions, which allows us to scale to thousands of partitions. 5
|
| 324 |
+
|
| 325 |
+
We implemented the partitioner in the XLA compiler xla (2019). Multiple frontend frameworks including TensorFlow, JAX, PyTorch and Julia already have lowering logic to transform their graph representation to XLA HLO graph. XLA also has a much smaller set of operators compared to popular frontend frameworks like TensorFlow, which reduces the burden of implementing a partitioner without harming generality, because the existing lowering from frontends performs the heavy-lifting to make it expressive. Although we developed the infrastructure in XLA, the techniques we describe here can be applied to intermediate representations in other machine learning frameworks (e.g., ONNX onn (2019), TVM Relay Roesch et al. (2018), Glow IR Rotem et al. (2018)).
|
| 326 |
+
|
| 327 |
+
XLA models a computation as a dataflow graph where nodes are operators and edges are tensors flowing between operators. The core of the partitioner is per-operation handling that transforms a full-sized operator into a partition-sized operator according to the sharding specified on the input and output. When a computation is partitioned, various patterns of cross-device data transfers are introduced. In order to maximize the performance at large scale, it is essential to define a core set of communication primitives and optimize those for the target platform.
|
| 328 |
+
|
| 329 |
+
# A.2.1 SHARDING PROPAGATION
|
| 330 |
+
|
| 331 |
+
GShard only requires the user to annotate a few key tensors in the model, and the compiler will propagate them to all tensors on the graph in an optimization pass. This allows the user to reuse legacy model code by adding a small set of annotations.
|
| 332 |
+
|
| 333 |
+
The propagation pass is designed to be intuitive, and it mostly passes through shardings along shared dimensions between inputs and outputs. Typically, it requires annotations on model weights, and if sharding involves multiple dimensions, activations could also be annotated around core computation operators like Einsum which could have multiple possible outcomes of sharding propagation.
|
| 334 |
+
|
| 335 |
+
# A.2.2 PER-OPERATOR SPMD PARTITIONING
|
| 336 |
+
|
| 337 |
+
The core of the partitioner is the per-operator transformation from a full-sized operator into a partition-sized operator according to the specified sharding. While some operators (e.g., elementwise)
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 4: Comparison between MPMD and our proposed SPMD partitioning of a Dot operator $( [ M , K ] \times$ $[ K , N ] = [ M , { \bf \bar { N } } ] )$ across 4 devices. In this example, both operands are partitioned along the contracting dimension $K$ , where each device computes the local result and globally combines with an AllReduce. MPMD partitioning generates separate operators for each device, limiting its scalability, whereas SPMD partitioning generates one program to run on all devices. Note that the compilation time with our SPMD partitioning is not-dependent of the number of devices being used.
|
| 341 |
+
|
| 342 |
+
are trivial to support, we discuss several common cases where cross-partition communications are required.
|
| 343 |
+
|
| 344 |
+
To keep the discussion more relevant to the MoE model, this section focuses on Einsum partitioning to illustrate a few communication patterns. And to keep it simple for now, we assume that all tensors are evenly partitioned, which means the size of the dimension to partitition is a multiple of the partition count.
|
| 345 |
+
|
| 346 |
+
Einsum Case Study Einsum is the most critical operator in implementing the MoE model. They are represented as a Dot operation in XLA HLO, where each operand (LHS or RHS) consists of three types of dimensions:
|
| 347 |
+
|
| 348 |
+
• Batch dimensions are the embarrassingly parallel dimensions. The same set of batch dimensions must exist in all of LHS, RHS and the output, and each element in the output only depends on the corresponding batch in LHS and RHS. Contracting dimensions only exist in the operands. LHS and RHS must have the same set of contracting dimensions, and they are summed up and collapsed in the output. Non-contracting dimensions are also parallel dimensions that exist in one of the operands and the output. Each of LHS and RHS has its own set of non-contracting dimensions, which are inherited by the output.
|
| 349 |
+
|
| 350 |
+
Sharding propagation prioritizes choosing the same sharding on batch dimensions of LHS, RHS and output, because that would avoid any cross-partition communication. However, that is not always possible, and we need cross-partition communication in the following three cases.
|
| 351 |
+
|
| 352 |
+
• Resharding. In the MoE model we built, the expert dispatching logic (Line 3 in Algorithm 2) requires switching the partitioned dimension after an Einsum. Since resharding is efficient (Section A.3.2) with AllToAll, we first execute the Einsum locally, then reshard it to the desired dimension, as shown in Figure 5a.
|
| 353 |
+
• Accumulating partial results. If the inputs are partitioned along contracting dimensions, the local result is partial and we need to use an AllReduce to combine them and produce the final result, as shown in Figure 5b.
|
| 354 |
+
Slicing in a loop. For certain scenarios, we also implemented an algorithm similar to Cannon’s algorithm Cannon (1969), in order to limit the size of tensors on each partition. For example, if both operands are partitioned on a non-contracting dimension, we cannot compute the local Einsum directly since operands have different non-contracting dimensions.
|
| 355 |
+
|
| 356 |
+

|
| 357 |
+
(a) A partitioned Einsum operator. Colored letters ( $G$ and $E$ ) represent the partitioned dimension of each tensor. The partitioner decides to first execute a batch-parallel Einsum along the $G$ dimension, then reshard the result to the $E$ dimension.
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
(b) A simple Einsum (Matmul) partitioned on the contracting dimension.
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
Figure 5: Examples of Einsum partitioning with cross-device communication.
|
| 364 |
+
|
| 365 |
+
(c) An Einsum (Matmul) where we use collective-permute in a loop to compute one slice at a time. There is no full-sized tensor during the entire process.
|
| 366 |
+
|
| 367 |
+
Replicating one of the operands would not cause redundant computation, but it requires the replicated operand to fit in device memory. Therefore, if the size of the operand is too large, we instead keep both operands partitioned and use a loop to iterate over each slice of the result, and use CollectivePermute to communicate the input slices (Figure 5c).
|
| 368 |
+
|
| 369 |
+
Compiler optimizations The SPMD partitioner creates various data formatting operators in order to perform slicing, padding, concatenation, masking and halo exchange. To address the issue, we leverage XLA’s fusion capabilities on TPU, as well as code motion optimizations for slicing and padding, to largely hide the overhead of data formatting. As a result, the run-time overhead is typically negligible, even for convolutional networks where masking and padding are heavily used.
|
| 370 |
+
|
| 371 |
+
# A.2.3 GENERAL SHARDING API
|
| 372 |
+
|
| 373 |
+
In addition to the two common APIs (replicate() and split()) for sharding listed in Section 2.2, users or the compiler may use a more advanced sharding strategy to minimize data transfers.
|
| 374 |
+
|
| 375 |
+
shard(tensor, device_assignment) annotates tensor to be partitioned with the provided device assignment, and returns the annotated tensor. We use device assignment, a multi-dimensional integer array, to represent how the split is done. device_assignment has the same rank as the data tensor; its element count is the total number of partitions, and each element is the ID of the device that occupies the corresponding data slice. For example, a 3D tensor with shape [256, 1024, 8192] with device assignment shape [2, 1, 4] will have partition shape [128, 1024, 2048], and the order of elements in device assignment determines which slice each partition occupies.
|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
Figure 6: An example of two different device assignments based on the device topology. A 2D tensor is split by 2x4 partitions and the communication pattern is between partitions along the rows of the tensor. The numbers represent device ids.
|
| 379 |
+
|
| 380 |
+
Since data movement across devices critically affects the parallel execution performance, it is important to consider the target device topology as well as the communication between partitions of the tensor when assigning device ids in the device assignment for maximum performance. Figure 6 shows two different device assignments based on the device topology and the row-wise communication pattern on the tensor.
|
| 381 |
+
|
| 382 |
+
# A.3 PERFORMANCE AND MEMORY CONSUMPTION
|
| 383 |
+
|
| 384 |
+
This section discusses how well GShard achieves computation and memory efficiency on the TPU platform. Our measurement and analysis show that the device memory consumption is roughly constant when we increase the number of devices and experts, and the step time grows sublinearly, i.e., $1 . 7 \mathrm { x }$ execution time increase when we scale the model by 16x from 128 devices to 2048 devices. We also provide microbenchmarks and analyses for a variety of partitioned operators, which could guide use cases beyond this paper.
|
| 385 |
+
|
| 386 |
+
# A.3.1 MEMORY EFFICIENCY AND SCALABILITY
|
| 387 |
+
|
| 388 |
+
In the GShard model, there are mainly three types of memory usage, all of which have constant per-device sizes after SPMD partitioning, when the number of experts increases.
|
| 389 |
+
|
| 390 |
+
• Replicated weights (e.g. transformer feed-forward layers).
|
| 391 |
+
• Distributed weights (MoE feed-forward layers6).
|
| 392 |
+
• Activations (output of each layer that is used in both forward and backward pass).
|
| 393 |
+
|
| 394 |
+
The $O ( 1 )$ memory scaling is demonstrated in Figure 7, which shows the per-device memory usage distribution for different models. With a fixed number of layers, both weight memory and activation memory stay constant when the number of experts increases.
|
| 395 |
+
|
| 396 |
+
On this other hand, weight memory and activation memory both scale linearly with the number of layers. When the memory requirement exceeds available memory on each device, compiler-based rematerialization will automatically recompute part of the activations in the backward pass in order to reduce peak activation memory. This is why the activation size for MoE(2048E, 60L) is smaller than MoE(2048E, 36L). The overhead of rematerialization is also optimized, e.g. only $28 \%$ and $34 \%$ of the total cycles are spent on recomputation for 36L and 60L models respectively, and $0 \%$ for 12L and 24L since they fit in device memory without rematerialization.
|
| 397 |
+
|
| 398 |
+

|
| 399 |
+
Figure 7: Per-device memory consumption in gigabytes.
|
| 400 |
+
|
| 401 |
+

|
| 402 |
+
Figure 8: Measured vs roofline execution time breakdown. Only the forward pass is shown, and the backward pass has similar breakdown. “MoE dispatch and combine” represents cross-partition communication with AllToAll.
|
| 403 |
+
|
| 404 |
+
# A.3.2 RUNTIME EFFICIENCY AND SCALABILITY
|
| 405 |
+
|
| 406 |
+
Figure 8 shows the breakdown of execution time for an MoE layer and its adjacent Transformer layer. It also compares the achieved performance to a roofline, which is estimated by assuming compute-, memory-, or communication-bounded operations can achieve $100 \%$ of the peak FLOPS, memory bandwidth, or interconnect bandwidth. This is a very optimistic estimate as many operators are bounded by a mixed set of resources. At a smaller scale (128 experts), our model can achieve $> 7 0 \%$ of the roofline performance. The device time increases by $1 . 7 \mathrm { x }$ when we scale the model to 16x larger (2048 experts), and can still achieve $48 \%$ of the roofline performance.
|
| 407 |
+
|
| 408 |
+
Transformer layers and MoE feed-forward layer These are the dense parts of the model, which are designed to achieve peak TPU utilization. On each device, these computations also have a constant cost when we scale to more experts. Feed-forward layers and Transformer projections are mainly large matrix multiplications that utilize the TPU’s matrix unit well. These operations have achieved $> 8 5 \%$ peak FLOPS in our experiment. The attention operations are composed of mainly batch matmuls, which are bounded by memory bandwidth when sequence lengths are small. As a result, in our experiments attention operations only achieved $> 3 0 \%$ peak FLOPS.
|
| 409 |
+
|
| 410 |
+
Gate computation In Figure 8, “Gate Einsum” represents the first two and the last Einsums in Algorithm 2. The first Einsum is the projection that calculates per-expert input to softmax. It has an $O ( D )$ cost, but it is a very small part of the layer. The other two Einsums are dispatching tokens and combining expert results. They effectively implement Gather with one-hot matrices, which are more expensive, but with constant $O ( G C ) = O ( 1 )$ cost that is independent from the number of experts. The execution time of these Einsums increases by around $2 \mathbf { x }$ when we scale from 128 to 2048 experts (16x).
|
| 411 |
+
|
| 412 |
+
The remaining per-device gating computation involves many general-purpose computations like ArgMax and Cumsum, which are either memory-bound or even sequential in nature, thus not designed to utilize TPUs well. The majority of the time is spent on sequential Cumsum operations to invert one-hot matrices that represent selected experts for each token to one-hot matrices that represent selected tokens for each expert. The linear complexity of Cumsum is demonstrated in Figure 8. This part of the gating computation also has an $O ( D )$ cost, but fortunately, similar to the Einsum before softmax, it has a very small constant factor. It has negligible execution time with 128 experts, and takes less than $10 \%$ of the total time spent in the MoE and Transformer layers with 2048 experts.
|
| 413 |
+
|
| 414 |
+
The most significant part of gating is communication, shown as “MoE dispatch and combine” in√ Figure 8. These are AllToAll operators, and as we will discuss in Section A.3.3, their cost is $O ( \sqrt { D } )$ . When the number experts grows 16x from 128 to 2048, the execution time increases by about $3 . 7 5 \mathrm { x }$ , and their proportion of execution time in the MoE and Transformer increases from $16 \%$ to $36 \%$ .
|
| 415 |
+
|
| 416 |
+
A.3.3 COMMUNICATION MICROBENCHMARKS AND PER-OPERATOR SCALABILITY
|
| 417 |
+
|
| 418 |
+
In this section, we measure and analyze the performance scalability of the SPMD partitioner for basic operators, which can be used to guide use cases beyond the MoE model presented in this paper.
|
| 419 |
+
|
| 420 |
+
Performance scaling of communication primitives Two critical collective communication operators in the MoE model are AllReduce and AllToAll. AllReduce is used in accumulating partial results, and AllToAll is used in resharding (Section A.2.2). Figure 9 shows their performance scalability from 16 to 2048 partitions. AllReduce on TPU has an execution time independent from the number of devices Ying et al. (2018). The variance in Figure 9 is due to specifics of each topology, e.g., whether it is a square or a rectangle, and whether it is a torus or a mesh.
|
| 421 |
+
|
| 422 |
+
AllToAll, on the other hand, gets more expensive as the number of partitions grows, but in a sublinear√ manner. On our 2D TPU cluster, AllToAll cost is roughly $O ( \sqrt { D } )$ , where $D$ is the number of partitions. This is because with a fixed amount of data each partition sends (8MB or 32MB in Figure 9), the total amount of data that all partitions send is $d = O ( D )$ . Meanwhile, each data piece needs to travel $h = O ( { \sqrt { D } } )$ hops on average, and there are overall $l = O ( D )$ device-to-device links in the network. Therefore, if it is bandwidth-bound, the execution time of an AllToAll is
|
| 423 |
+
|
| 424 |
+
$$
|
| 425 |
+
t = { \frac { d h } { l } } = O ( { \frac { D { \sqrt { D } } } { D } } ) = O ( { \sqrt { D } } ) .
|
| 426 |
+
$$
|
| 427 |
+
|
| 428 |
+
Even if it is latency-bound, the execution time will still be $O ( h ) = O ( { \sqrt { D } } )$ . Comparing 2048 partitions and 16 partitions, while $D$ grows by 128 times, the execution time of AllToAll only increases by 9 times. This enables us to use resharding to efficiently implement cross-partition dispatching (Figure 5a).
|
| 429 |
+
|
| 430 |
+
AllGather and CollectivePermute are easier to analyze. AllGather’s output is $D$ larger than the input, and if we fix input size, then its communication cost is $O ( D )$ . CollectivePermute has a one-to-one communication pattern, and with reasonable device arrangement where the source-destination pairs are close, its cost is $O ( 1 )$ for a fixed input size.
|
| 431 |
+
|
| 432 |
+
Partitioned operator scalability We summarize the performance scalability for common operators using GShard in Table 2. It contains the Einsum/Matmul examples in Section A.2.2, and also other common operators like Convolution and Reduce. The table includes the local compute on each partition, as well as the required communication based on our analysis above.
|
| 433 |
+
|
| 434 |
+
Most operators in Table 2 have sublinear scalability in terms of both compute and communication, which is consistent with our performance measurement of the MoE model. The $O ( 1 )$ scaling of spatially partitioned convolutions also demonstrates the efficiency of GShard for image partitioning.
|
| 435 |
+
|
| 436 |
+
However, the last two Matmul operators in Table 2 have $O ( D )$ scaling of per-partition compute and communication, where they have unmatched sharding in the operands. This is not due to inefficiency in the partitioning algorithm, but because the total compute in the full operator is very large $( O ( D ^ { 2 } ) )$ .
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
Figure 9: Performance scaling of communication, AllReduce and AllToAll. Log scale on both axes. AllReduce√ cost is roughly $O ( 1 )$ , and AllToAll cost is roughly $O ( \sqrt { D } )$ , where $D$ is the number of partitions. We measure their performance with 8MB and 32MB data. For AllToAll, that means each partition initially has 8MB (or 32MB) data, then divides it to $D$ pieces, and sends each piece to a different receiving partition.
|
| 440 |
+
|
| 441 |
+
Table 2: Scalability of partitioned operators. Abbreviation for communication primitives: AR: AllReduce, AG: AllGather, $C P$ : CollectivePermute, AA: AllToAll. \*This is the dispatch Einsum in our model, where we set $C$ to $O ( 1 / D )$ . ${ } ^ { * * } I / O$ are the input/output feature dimensions, $B$ is the batch dimension, $X / Y$ are input spatial dimensions, and $x / y$ are the kernal spatial dimensions.
|
| 442 |
+
|
| 443 |
+
<table><tr><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>0(D)Dimensions</td><td rowspan=2 colspan=2>TotalCompute</td><td rowspan=1 colspan=2>Per-partition</td></tr><tr><td rowspan=1 colspan=1>Compute</td><td rowspan=1 colspan=1>Communication</td></tr><tr><td rowspan=1 colspan=1>Add(AA->A)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=2>O(D)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC->AC)</td><td rowspan=1 colspan=1>B</td><td rowspan=1 colspan=2>0(D)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(1) AR</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC->AC)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=2>0(D)</td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC->AC)</td><td rowspan=1 colspan=1>A,B</td><td rowspan=1 colspan=2>0(D)</td><td rowspan=1 colspan=1>0(D)</td><td rowspan=1 colspan=1>O(D)AG or CP</td></tr><tr><td rowspan=1 colspan=1>Matmul(AB,BC->AC)</td><td rowspan=1 colspan=1>AC</td><td rowspan=1 colspan=1>0(D²)</td><td rowspan=1 colspan=1>)</td><td rowspan=1 colspan=1>0(D)</td><td rowspan=1 colspan=1>O(D) AG or CP</td></tr><tr><td rowspan=1 colspan=1>Reduce(AB->A)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=1>0(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>Reduce(AB->B)</td><td rowspan=1 colspan=1>A</td><td rowspan=1 colspan=1>O(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(1) AR</td></tr><tr><td rowspan=1 colspan=1>Einsum(GSEC,GSM->EGCM)</td><td rowspan=1 colspan=1>G,E *</td><td rowspan=1 colspan=1>O(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(√D) AA</td></tr><tr><td rowspan=1 colspan=1>Convolution(BIXY,xyIO->BOXY)</td><td rowspan=1 colspan=1>X**</td><td rowspan=1 colspan=1>O(D)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0(1)</td><td rowspan=1 colspan=1>O(1) CP</td></tr></table>
|
| 444 |
+
|
| 445 |
+
Different partitioning strategies can be used for these cases, producing different communication primitives: replicating one operand will result in AllGather (requiring the replicated operand to fit in device memory), while slicing in a loop (Figure 5c) will result in CollectivePermute.
|
| 446 |
+
|
| 447 |
+
# A.4 DENSE MODEL SCALABILITY AND BENCHMARKS
|
| 448 |
+
|
| 449 |
+
GShard is not limited to sparse models. In this subsection we applied GShard to build large dense transformer with up to trillions of parameters. We open sourced our example implementation and provided a step by step instruction how to train it on the public cloud provider (https://github. com/tensorflow/lingvo/tree/master/lingvo/tasks/lm). We included the model details and performance benchmarks in Table 3. To the best of our knowledge, we provide the only open source implementation that can train transformer models with trillions of parameters efficiently on public cloud. GShard allows tensor partitioning with more than one dimension. For example, we split the activation tensors along both the batch and the model dimensions. This allows input batches with long sequence length (1024 in the benchmark) and global batch size smaller than the number of devices. The performance scales linearly from 64B to 1T. The communication bottleneck started to dominate when scaling further to 4T as compute/communication ratio is lower due to small batch size. Larger batch size is possible by scaling out the model to more TPU cores, or by enabling gradient accumulation. For the purpose of apple-to-apple comparison to other models, we did not include the above optimizations in the 4T model.
|
| 450 |
+
|
| 451 |
+
<table><tr><td rowspan=2 colspan=1>#ofparams</td><td rowspan=2 colspan=1>#oflayers</td><td rowspan=2 colspan=1>modeldim</td><td rowspan=1 colspan=1>hidden</td><td rowspan=1 colspan=1>seq</td><td rowspan=2 colspan=1>batchsize</td><td rowspan=2 colspan=1>MXUutil</td><td rowspan=2 colspan=1>k-tokens/sec</td></tr><tr><td rowspan=1 colspan=1>dim</td><td rowspan=1 colspan=1>length</td></tr><tr><td rowspan=1 colspan=1>64B</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>8192</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>48.4%</td><td rowspan=1 colspan=1>150.7</td></tr><tr><td rowspan=1 colspan=1>128B</td><td rowspan=1 colspan=1>64</td><td rowspan=1 colspan=1>8192</td><td rowspan=1 colspan=1>65536</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>512</td><td rowspan=1 colspan=1>48.5%</td><td rowspan=1 colspan=1>73.5</td></tr><tr><td rowspan=1 colspan=1>1T</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>16384</td><td rowspan=1 colspan=1>131072</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>47.2%</td><td rowspan=1 colspan=1>9.23</td></tr><tr><td rowspan=1 colspan=1>4T</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>32768</td><td rowspan=1 colspan=1>262144</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>28.8%</td><td rowspan=1 colspan=1>1.36</td></tr></table>
|
| 452 |
+
|
| 453 |
+
Table 3: Dense language models benchmarks on TPU v3-2048. The model parameters are sharded across 2048 TPU V3 cores. We measured the TPU matrix unit utilization and throughput for dense models with various configurations.
|
| 454 |
+
|
| 455 |
+
Details of dense Transformer sharding We use a 2D mesh of TPU devices of shape [X, Y]. X is used to shard the batch dimension of activation tensors, and Y is used to shard attention heads and the feed-forward hidden dimension. Activations’ head and hidden dimensions are sharded the same way along Y. To further reduce weight storage on each device, we additionally shard the model dimension of the weights along the X dimension. Weights will be partially unsharded on-demand with a subgrouped AllGather operator across devices along X. The parallelism pattern along $\mathbf { X }$ is conceptually equivalent to weight-update sharding Xu et al. (2020).
|
| 456 |
+
|
| 457 |
+
When we further increase the model size, activation storage becomes the bottleneck, because activations between transformer layers are only partially sharded in the device mesh on the batch dimension. So we further shard the model dimension of these activation tensors along Y, making them fully sharded across all devices. Such an activation tensor will be produced by a ReduceScatter operator, which is semantically AllReduce followed by a DynamicSlice but can be implemented more efficiently. The fully sharded activations will also be partially unsharded with AllGather in the next layer.
|
| 458 |
+
|
| 459 |
+
# A.5 DECODING WITH FLAT BEAM SEARCH
|
| 460 |
+
|
| 461 |
+
During decoding, we use beam search with length normalization similar to Wu et al. (2016). Decoding is auto-regressive and generates the target sequence one token at a time, so for an output of length $m$ the decoder layer stack is executed $m$ times, sequentially. In particular for each decoder MoE layer there are dispatch/combine operations, which require cross-device communication. Inference utilizes same cluster with same number of devices as training.
|
| 462 |
+
|
| 463 |
+
During beam search we flatten the beam hypotheses into a single sequence which contains all underlying tokens interleaved, and we modify decoder self-attention mask so that each hypothesis only has attention to appropriate positions in the joint flat sequence. We apply the same transformation to key/value tensors maintained by each decoder self-attention layer. This allows us to avoid reordering previously computed attention key/values after each beam expansion. Instead, we only reorder the $\bar { 0 } / 1$ mask representing the current active hypotheses. However, attention becomes $k$ times longer.
|
| 464 |
+
|
| 465 |
+
This trade-off can be positive or negative depending on implementation details. As explained in Shazeer (2019), memory bandwidth limits are important for incremental decoding with Transformer models. From this point of view, by flattening the beam we replace two operations with low compute/memory ratio (attention dot product and key/value reordering) with a single operation with a slightly higher compute/memory ratio (attention dot product over a longer sequence with more keys), but with the same total amount of memory it has to access.
|
| 466 |
+
|
| 467 |
+
# A.6 MACHINE TRANSLATION EXPERIMENTS DETAILS
|
| 468 |
+
|
| 469 |
+
In our Machine Translation experiments MoE Transformer models shared • Transformer model dimension $M = 1 0 2 4$ • Feed Forward and MoE hidden dimension $H = 8 1 9 2$ • Number of heads in multi-head attention $= 1 6$ • Attention key and value dimension $= 1 2 8$
|
| 470 |
+
|
| 471 |
+

|
| 472 |
+
Figure 10: Training loss curves from different model scales under low (upper graph) and high (lower graph) compute budget. Lower loss can be obtained by growing the model capacity until some budget-dependent maximum size, which increased with higher training budget. Given the same five TPU core years training budget, we observed that the 150B model hits the lowest training loss. But with 30 TPU core years, 600B achieved the lowest loss.
|
| 473 |
+
|
| 474 |
+
• Input, residual and attention dropout rate $= 0 . 1$ • The number of groups $G = 2 D$ , twice the number of devices. • The expert capacity $\begin{array} { r } { C = 2 \propto \frac { B \times L } { D \times E } } \end{array}$ .
|
| 475 |
+
|
| 476 |
+
We used the Adafactor (Shazeer & Stern, 2018) optimizer with $a$ ) factored second-moment estimation; $^ b$ ) first moment decay $\beta _ { 1 } = 0 . 0 ; c ,$ ) second moment decay $\beta _ { 2 } = 0 . 9 9$ with $1 - t ^ { - 0 . 8 }$ schedule; $d$ ) clipping threshold of 1.0; and $e$ ) 1.0 learning rate with square root decay after 10k training steps.
|
| 477 |
+
|
| 478 |
+
We used SentencePiece Kudo & Richardson (2018) subword tokenizer with a single multilingual vocabulary for source-side spanning 102 languages of size 64000, and English-only target-side vocabulary of size 32000.
|
| 479 |
+
|
| 480 |
+
In Figure 10, we compare the achieved loss of each model at different preset training budgets. We observed that lower loss can be obtained by growing the model capacity until some budget-dependent maximum size, which increased with higher training budget. For example, with a relatively low training budget of 5 TPU core years training budget, we observed models with larger capacity lead to even lower training loss up to 150B parameters. But with a high training budget of 30 TPU core years, 600B achieved the lower cost.
|
md/train/r1ecqn4YwB/r1ecqn4YwB.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/rJeW1yHYwH/rJeW1yHYwH.md
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INDUCTIVE REPRESENTATION LEARNING ON TEMPORAL GRAPHS
|
| 2 |
+
|
| 3 |
+
Da $\mathbf { X } \mathbf { u } ^ { * }$ , Chuanwei Ruan∗, Evren Korpeoglu , Sushant Kumar , Kannan Achan
|
| 4 |
+
Walmart Labs
|
| 5 |
+
Sunnyvale, CA 94086, USA
|
| 6 |
+
{Da.Xu,Chuanwei.Ruan,EKorpeoglu,SKumar4,KAchan}@walmartlabs.com
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
Inductive representation learning on temporal graphs is an important step toward salable machine learning on real-world dynamic networks. The evolving nature of temporal dynamic graphs requires handling new nodes as well as capturing temporal patterns. The node embeddings, which are now functions of time, should represent both the static node features and the evolving topological structures. Moreover, node and topological features can be temporal as well, whose patterns the node embeddings should also capture. We propose the temporal graph attention (TGAT) layer to efficiently aggregate temporal-topological neighborhood features as well as to learn the time-feature interactions. For TGAT, we use the self-attention mechanism as building block and develop a novel functional time encoding technique based on the classical Bochner’s theorem from harmonic analysis. By stacking TGAT layers, the network recognizes the node embeddings as functions of time and is able to inductively infer embeddings for both new and observed nodes as the graph evolves. The proposed approach handles both node classification and link prediction task, and can be naturally extended to include the temporal edge features. We evaluate our method with transductive and inductive tasks under temporal settings with two benchmark and one industrial dataset. Our TGAT model compares favorably to state-of-the-art baselines as well as the previous temporal graph embedding approaches.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
The technique of learning lower-dimensional vector embeddings on graphs have been widely applied to graph analysis tasks (Perozzi et al., 2014; Tang et al., 2015; Wang et al., 2016) and deployed in industrial systems (Ying et al., 2018; Wang et al., 2018a). Most of the graph representation learning approaches only accept static or non-temporal graphs as input, despite the fact that many graph-structured data are time-dependent. In social network, citation network, question answering forum and user-item interaction system, graphs are created as temporal interactions between nodes. Using the final state as a static portrait of the graph is reasonable in some cases, such as the proteinprotein interaction network, as long as node interactions are timeless in nature. Otherwise, ignoring the temporal information can severely diminish the modelling efforts and even causing questionable inference. For instance, models may mistakenly utilize future information for predicting past interactions during training and testing if the temporal constraints are disregarded. More importantly, the dynamic and evolving nature of many graph-related problems demand an explicitly modelling of the timeliness whenever nodes and edges are added, deleted or changed over time.
|
| 15 |
+
|
| 16 |
+
Learning representations on temporal graphs is extremely challenging, and it is not until recently that several solutions are proposed (Nguyen et al., 2018; Li et al., 2018; Goyal et al., 2018; Trivedi et al., 2018). We conclude the challenges in three folds. Firstly, to model the temporal dynamics, node embeddings should not be only the projections of topological structures and node features but also functions of the continuous time. Therefore, in addition to the usual vector space, temporal representation learning should be operated in some functional space as well. Secondly, graph topological structures are no longer static since the nodes and edges are evolving over time, which poses temporal constraints on neighborhood aggregation methods. Thirdly, node features and topological structures can exhibit temporal patterns. For example, node interactions that took place long ago may have less impact on the current topological structure and thus the node embeddings. Also, some nodes may possess features that allows them having more regular or recurrent interactions with others. We provide sketched plots for visual illustration in Figure 1.
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
Figure 1: Visual illustration for several complications from the temporal graphs. (A). The generation process of a temporal graph and its snapshots. It is obvious that the static graphs in the snapshots only reflect partial temporal information. (B). The final state of the temporal graph when projected to the time-independent 2-D plane. Other than the missing temporal information, the multi-edge situation arises as well. (C). When predicting the link between node A and C at time $t _ { 3 }$ , the message-passing paths should be subject to temporal contraints. The solid lines give the appropriate directions, and the dashed lines violates the temporal constraints.
|
| 20 |
+
|
| 21 |
+
Similar to its non-temporal counterparts, in the real-world applications, models for representation learning on temporal graphs should be able to quickly generate embeddings whenever required, in an inductive fashion. GraphSAGE (Hamilton et al., 2017a) and graph attention network (GAT) (Velickovi ˇ c et al., 2017) are capable of inductively generating embeddings for unseen nodes ´ based on their features, however, they do not consider the temporal factors. Most of the temporal graph embedding methods can only handle transductive tasks, since they require re-training or the computationally-expensive gradient calculations to infer embeddings for unseen nodes or node embeddings for a new timepoint. In this work, we aim at developing an architecture to inductively learn representations for temporal graphs such that the time-aware embeddings (for unseen and observed nodes) can be obtained via a single network forward pass. The key to our approach is the combination of the self-attention mechanism (Vaswani et al., 2017) and a novel functional time encoding technique derived from the Bochner’s theorem from classical harmonic analysis (Loomis, 2013).
|
| 22 |
+
|
| 23 |
+
The motivation for adapting self-attention to inductive representation learning on temporal graphs is to identify and capture relevant pieces of the temporal neighborhood information. Both graph convolutional network (GCN) (Kipf & Welling, 2016a) and $G A T$ are implicitly or explicitly assigning different weights to neighboring nodes (Velickovi ˇ c et al., 2017) when aggregating node features. The ´ self-attention mechanism was initially designed to recognize the relevant parts of input sequence in natural language processing. As a discrete-event sequence learning method, self-attention outputs a vector representation of the input sequence as a weighted sum of individual entry embeddings. Selfattention enjoys several advantages such as parallelized computation and interpretability (Vaswani et al., 2017). Since it captures sequential information only through the positional encoding, temporal features can not be handled. Therefore, we are motivated to replace positional encoding with some vector representation of time. Since time is a continuous variable, the mapping from the time domain to vector space has to be functional. We gain insights from harmonic analysis and propose a theoretical-grounded functional time encoding approach that is compatible with the self-attention mechanism. The temporal signals are then modelled by the interactions between the functional time encoding and nodes features as well as the graph topological structures.
|
| 24 |
+
|
| 25 |
+
To evaluate our approach, we consider future link prediction on the observed nodes as transductive learning task, and on the unseen nodes as inductive learning task. We also examine the dynamic node classification task using node embeddings (temporal versus non-temporal) as features to demonstrate the usefulness of our functional time encoding. We carry out extensive ablation studies and sensitivity analysis to show the effectiveness of the proposed functional time encoding and TGAT-layer.
|
| 26 |
+
|
| 27 |
+
# 2 RELATED WORK
|
| 28 |
+
|
| 29 |
+
Graph representation learning. Spectral graph embedding models operate on the graph spectral domain by approximating, projecting or expanding the graph Laplacian (Kipf & Welling, 2016a; Henaff et al., 2015; Defferrard et al., 2016). Since their training and inference are conditioned on the specific graph spectrum, they are not directly extendable to temporal graphs. Non-spectral approaches, such as GAT, GraphSAGE and MoNET, (Monti et al., 2017) rely on the localized neighbourhood aggregations and thus are not restricted to the training graph. GraphSAGE and GAT also have the flexibility to handle evolving graphs inductively. To extend classical graph representation learning approaches to the temporal domain, several attempts have been done by cropping the temporal graph into a sequence of graph snapshots (Li et al., 2018; Goyal et al., 2018; Rahman et al., 2018; Xu et al., 2019b), and some others work with temporally persistent node (edges) (Trivedi et al., 2018; Ma et al., 2018). Nguyen et al. (2018) proposes a node embedding method based on temporal random walk and reported state-of-the-art performances. However, their approach only generates embeddings for the final state of temporal graph and can not directly apply to the inductive setting.
|
| 30 |
+
|
| 31 |
+
Self-attention mechanism. Self-attention mechanisms often have two components: the embedding layer and the attention layer. The embedding layer takes an ordered entity sequence as input. Selfattention uses the positional encoding, i.e. each position $k$ is equipped with a vector $\mathbf { p } _ { k }$ (fixed or learnt) which is shared for all sequences. For the entity sequence $\mathbf { e } = ( e _ { 1 } , \ldots , e _ { l } )$ , the embedding layer takes the sum or concatenation of entity embeddings (or features) $( \mathbf { z } \in \mathbb { R } ^ { d } )$ ) and their positional encodings as input:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\mathbf { Z _ { e } } = \left[ \mathbf { z } _ { e _ { 1 } } + \mathbf { p } _ { 1 } , \dots , \mathbf { z } _ { e _ { 1 } } + \mathbf { p } _ { l } \right] ^ { \intercal } \in \mathbb { R } ^ { l \times d } , \mathrm { o r } \quad \mathbf { Z _ { e } } = \left[ \mathbf { z } _ { e _ { 1 } } | | \mathbf { p } _ { 1 } , \dots , \mathbf { z } _ { e _ { 1 } } | | \mathbf { p } _ { l } \right] ^ { \intercal } \in \mathbb { R } ^ { l \times ( d + d _ { \mathrm { p s } } ) } .
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $| |$ denotes concatenation operation and $d _ { \mathrm { p o s } }$ is the dimension for positional encoding. Selfattention layers can be constructed using the scaled dot-product attention, which is defined as:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\operatorname { A t t n } \ ( \mathbf { Q } , \mathbf { K } , \mathbf { V } ) = \operatorname { s o f t m a x } \Big ( \frac { \mathbf { Q } \mathbf { K } ^ { \intercal } } { \sqrt { d } } \Big ) \mathbf { V } ,
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\mathbf { Q }$ denotes the ’queries’, $\mathbf { K }$ the ’keys’ and $\mathbf { V }$ the ’values’. In Vaswani et al. (2017), they are treated as projections of the output $\mathbf { Z } _ { \mathbf { e } } \colon \mathbf { Q } = \mathbf { Z } _ { \mathbf { e } } \mathbf { W } _ { Q } , \quad \mathbf { K } = \mathbf { Z } _ { \mathbf { e } } \mathbf { W } _ { K } , \quad \mathbf { V } = \mathbf { Z } _ { \mathbf { e } } \mathbf { W } _ { V } .$ , where $\mathbf { W } _ { Q }$ , ${ \bf W } _ { K }$ and $\mathbf { W } _ { V }$ are the projection matrices. Since each row of $\mathbf { Q }$ , $\mathbf { K }$ and $\mathbf { V }$ represents an entity, the dot-product attention takes a weighted sum of the entity ’values’ in $\mathbf { V }$ where the weights are given by the interactions of entity ’query-key’ pairs. The hidden representation for the entity sequence under the dot-product attention is then given by $h _ { \mathbf { e } } = \mathrm { A t t n } ( \mathbf { Q } , \mathbf { K } , \mathbf { V } )$ .
|
| 44 |
+
|
| 45 |
+
# 3 TEMPORAL GRAPH ATTENTION NETWORK ARCHITECTURE
|
| 46 |
+
|
| 47 |
+
We first derive the mapping from time domain to the continuous differentiable functional domain as the functional time encoding such that resulting formulation is compatible with self-attention mechanism as well as the backpropagation-based optimization frameworks. The same idea was explored in a concurrent work ( $\mathrm { { X u } }$ et al., 2019a). We then present the temporal graph attention layer and show how it can be naturally extended to incorporate the edge features.
|
| 48 |
+
|
| 49 |
+
# 3.1 FUNCTIONAL TIME ENCODING
|
| 50 |
+
|
| 51 |
+
Recall that our starting point is to obtain a continuous functional mapping $\Phi : T \mathbb { R } ^ { d _ { T } }$ from time domain to the $d _ { T }$ -dimensional vector space to replace the positional encoding in (1). Without loss of generality, we assume that the time domain can be represented by the interval starting from origin: $\hat { T } = [ 0 , \hat { t } _ { \mathrm { m a x } } ]$ , where $t _ { \mathrm { m a x } }$ is determined by the observed data. For the inner-product selfattention in (2), often the ’key’ and ’query’ matrices $( \mathbf { K } , \mathbf { Q } )$ are given by identity or linear projection of $\mathbf { Z _ { e } }$ defined in (1), leading to terms that only involve inner-products between positional (time) encodings. Consider two time points $t _ { 1 } , t _ { 2 }$ and inner product between their functional encodings $\left. \Phi ( t _ { 1 } ) , \mathbf { \bar { \Phi } } ( t _ { 2 } ) \right.$ . Usually, the relative timespan, rather than the absolute value of time, reveals critical temporal information. Therefore, we are more interested in learning patterns related to the timespan of $| t _ { 2 } - t _ { 1 } |$ , which should be ideally expressed by $\left. \Phi ( t _ { 1 } ) , \Phi ( t _ { 2 } ) \right.$ to be compatible with self-attention.
|
| 52 |
+
|
| 53 |
+
Formally, we define the temporal kernel $K : T \times T \mathbb { R }$ with $\mathcal { K } ( t _ { 1 } , t _ { 2 } ) : = \left. { \Phi ( t _ { 1 } ) , \Phi ( t _ { 2 } ) } \right.$ and $\mathcal { K } ( t _ { 1 } , t _ { 2 } ) = \psi ( t _ { 1 } - t _ { 2 } ) , \forall t _ { 1 } , t _ { 2 } \in T$ for some $\psi : [ - t _ { \mathrm { m a x } } , t _ { \mathrm { m a x } } ] \mathbb { R }$ . The temporal kernel is then translation-invariant, since $\mathcal { K } ( t _ { 1 } + c , t _ { 2 } + c ) = \psi ( t _ { 1 } - t _ { 2 } ) = \mathcal { K } ( t _ { 1 } , t _ { 2 } )$ for any constant $c$ . Generally speaking, functional learning is extremely complicated since it operates on infinite-dimensional spaces, but now we have transformed the problem into learning the temporal kernel $\kappa$ expressed by $\Phi$ . Nonetheless, we still need to figure out an explicit parameterization for $\Phi$ in order to conduct efficient gradient-based optimization. Classical harmonic analysis theory, i.e. the Bochner’s theorem, motivates our final solution. We point out that the temporal kernel $\kappa$ is positive-semidefinite (PSD) and continuous, since it is defined via Gram matrix and the mapping $\Phi$ is continuous. Therefore, the kernel $\kappa$ defined above satisfy the assumptions of the Bochner’s theorem, which we state below.
|
| 54 |
+
|
| 55 |
+
Theorem 1 (Bochner’s Theorem). A continuous, translation-invariant kernel ${ \mathcal { K } } ( \mathbf { x } , \mathbf { y } ) = \psi ( \mathbf { x } - \mathbf { y } )$ on $\mathbb { R } ^ { d }$ is positive definite if and only if there exists a non-negative measure on $\mathbb { R }$ such that $\psi$ is the Fourier transform of the measure.
|
| 56 |
+
|
| 57 |
+
Consequently, when scaled properly, our temporal kernel $\kappa$ have the alternate expression:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
{ \cal K } ( t _ { 1 } , t _ { 2 } ) = \psi ( t _ { 1 } , t _ { 2 } ) = \int _ { \mathbb { R } } e ^ { i \omega ( t _ { 1 } - t _ { 2 } ) } p ( \omega ) d \omega = \mathbb { E } _ { \omega } [ \xi _ { \omega } ( t _ { 1 } ) \xi _ { \omega } ( t _ { 2 } ) ^ { * } ] ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $\xi _ { \omega } ( t ) = e ^ { i \omega t }$ . Since the kernel $\kappa$ and the probability measure $p ( \omega )$ are real, we extract the real part of (3) and obtain:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\begin{array} { r } { K ( t _ { 1 } , t _ { 2 } ) = \mathbb { E } _ { \omega } \big [ \cos ( \omega ( t _ { 1 } - t _ { 2 } ) ) \big ] = \mathbb { E } _ { \omega } \big [ \cos ( \omega t _ { 1 } ) \cos ( \omega t _ { 2 } ) + \sin ( \omega t _ { 1 } ) \sin ( \omega t _ { 2 } ) \big ] . } \end{array}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
The above formulation suggests approximating the expectation by the Monte Carlo integral 008), i.e. $\begin{array} { r } { \mathcal { K } ( t _ { 1 } , t _ { 2 } ) \approx \frac { 1 } { d } \sum _ { i = 1 } ^ { d } \cos ( \omega _ { i } t _ { 1 } ) \cos ( \omega _ { i } t _ { 2 } ) + \sin ( \omega _ { i } t _ { 1 } ) \sin ( \omega _ { i } t _ { 2 } ) } \end{array}$ , with $\omega _ { 1 } , \ldots , \omega _ { d } \stackrel { \mathrm { i . i . d } } { \sim } p ( \omega )$ $\mathbb { R } ^ { d }$
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
t \mapsto \Phi _ { d } ( t ) : = { \sqrt { \frac { 1 } { d } } } { \big [ } \cos ( \omega _ { 1 } t ) , \sin ( \omega _ { 1 } t ) , \ldots , \cos ( \omega _ { d } t ) , \sin ( \omega _ { d } t ) { \big ] } ,
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
and it is easy to show that $\left. \Phi _ { d } ( t _ { 1 } ) , \Phi _ { d } ( t _ { 2 } ) \right. \approx K ( t _ { 1 } , t _ { 2 } )$ . As a matter of fact, we prove the stochastic uniform convergence of $\left. \Phi _ { d } ( t _ { 1 } ) , \Phi _ { d } ( t _ { 2 } ) \right.$ to the underlying $\displaystyle \kappa ( t _ { 1 } , t _ { 2 } )$ and shows that it takes only a reasonable amount of samples to achieve proper estimation, which is stated in Claim 1.
|
| 76 |
+
|
| 77 |
+
Claim 1. Let $p ( \omega )$ be the corresponding probability measure stated in Bochner’s Theorem for kernel function $\kappa$ . Suppose the feature map $\Phi$ is constructed as described above using samples $\{ \omega _ { i } \} _ { i = 1 } ^ { d }$ , then we only need $\begin{array} { r } { d = \Omega \big ( \frac { 1 } { \epsilon ^ { 2 } } \log \frac { \sigma _ { p } ^ { 2 } t _ { \mathrm { m a x } } } { \epsilon } \big ) } \end{array}$ samples to have
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\operatorname* { s u p } _ { t _ { 1 } , t _ { 2 } \in T } \left| \Phi _ { d } ( t _ { 1 } ) ^ { ' } \Phi _ { d } ( t _ { 2 } ) - K ( t _ { 1 } , t _ { 2 } ) \right| < \epsilon w i t h a n y p r o b a b i l i t y f o r \forall \epsilon > 0 ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $\sigma _ { p } ^ { 2 }$ is the second momentum with respect to $p ( \omega )$
|
| 84 |
+
|
| 85 |
+
The proof is provided in supplement material.
|
| 86 |
+
|
| 87 |
+
By applying Bochner’s theorem, we convert the problem of kernel learning to distribution learning, i.e. estimating the $p ( \omega )$ in Theorem 1. A straightforward solution is to apply the reparameterization trick by using auxiliary random variables with a known marginal distribution as in variational autoencoders (Kingma & Welling, 2013). However, the reparameterization trick is often limited to certain distributions such as the ’local-scale’ family, which may not be rich enough for our purpose. For instance, when $p ( \omega )$ is multimodal it is difficult to reconstruct the underlying distribution via direct reparameterizations. An alternate approach is to use the inverse cumulative distribution function (CDF) transformation. Rezende & Mohamed (2015) propose using parameterized normalizing flow, i.e. a sequence of invertible transformation functions, to approximate arbitrarily complicated CDF and efficiently sample from it. Dinh et al. (2016) further considers stacking bijective transformations, known as affine coupling layer, to achieve more effective CDF estimation. The above methods learns the inverse CDF function $\overline { { F _ { \theta } ^ { - 1 } } } ( . )$ parameterized by flow-based networks and draw samples from the corresponding distribution. On the other hand, if we consider an non-parameterized approach for estimating distribution, then learning $F ^ { - 1 } ( . )$ and obtain $d$ samples from it is equivalent to directly optimizing the $\{ \omega _ { 1 } , \ldots , \omega _ { d } \}$ in (4) as free model parameters. In practice, we find these two approaches to have highly comparable performances (see supplement material). Therefore we focus on the non-parametric approach, since it is more parameter-efficient and has faster training speed (as no sampling during training is required).
|
| 88 |
+
|
| 89 |
+
The above functional time encoding is fully compatible with self-attention, thus they can replace the positional encodings in (1) and their parameters are jointly optimized as part of the whole model.
|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
Figure 2: The architecture of the $l ^ { t h }$ TGAT layer with $k = 3$ attention heads for node $v _ { 0 }$ at time $t$ .
|
| 93 |
+
|
| 94 |
+
# 3.2 TEMPORAL GRAPH ATTENTION LAYER
|
| 95 |
+
|
| 96 |
+
We use $v _ { i }$ and $\mathbf { x } _ { i } \in \mathbb { R } ^ { d _ { 0 } }$ to denote node $i$ and its raw node features. The proposed TGAT architecture depends solely on the temporal graph attention layer (TGAT layer). In analogy to GraphSAGE and GAT, the TGAT layer can be thought of as a local aggregation operator that takes the temporal neighborhood with their hidden representations (or features) as well as timestamps as input, and the output is the time-aware representation for target node at any time point $t$ . We denote the hidden representation output for node $i$ at time $t$ from the ${ { l } ^ { t h } }$ layer as $\tilde { \mathbf { h } } _ { i } ^ { ( l ) } ( t )$ .
|
| 97 |
+
|
| 98 |
+
Similar to $G A T$ , we perform the masked self-attention to take account of the structural information (Velickovi ˇ c et al., 2017). For node ´ $v _ { 0 }$ at time $t$ , we consider its neighborhood $\mathcal { N } ( v _ { 0 } ; t ) = \{ v _ { 1 } , . . . , v _ { N } \}$ such that the interaction between $v _ { 0 }$ and $v _ { i } \ \in \mathcal { N } ( v _ { 0 } ; t )$ , which takes place at time $t _ { i }$ , is prior to $t ^ { 1 }$ . The input of TGAT layer is the neighborhood information ${ \textbf { Z } } =$ $\{ \tilde { \mathbf { h } } _ { 1 } ^ { ( l - 1 ) } ( t _ { 1 } ) , \ldots , \tilde { \mathbf { h } } _ { N } ^ { ( l - 1 ) } ( t _ { N } ) \}$ and the target node information with some time point layer, the inputs are just raw node features. The laye $( \tilde { \mathbf { h } } _ { 0 } ^ { ( l - 1 ) } ( t ) , t )$ $l = 1$ time-aware representation of target node $v _ { 0 }$ at time $t$ , denoted by $\tilde { \mathbf { h } } _ { 0 } ^ { ( l ) } ( t )$ , as its output. Due to the translation-invariant assumption for the temporal kernel, we can alternatively use $\{ t - t _ { 1 } , \ldots , t - t _ { N } \}$ as interaction times, since $| t _ { i } - t _ { j } | = { \big | } ( t - t _ { i } ) - ( t - t _ { j } ) { \big | }$ and we only care for the timespan.
|
| 99 |
+
|
| 100 |
+
In line with original self-attention mechanism, we first obtain the entity-temporal feature matrix as
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\mathbf { Z } ( t ) = \left[ \tilde { \mathbf { h } } _ { 0 } ^ { ( l - 1 ) } ( t ) | | \Phi _ { d _ { T } } ( 0 ) , \tilde { \mathbf { h } } _ { 1 } ^ { ( l - 1 ) } ( t _ { 1 } ) | | \Phi _ { d _ { T } } ( t - t _ { 1 } ) , . . . , \tilde { \mathbf { h } } _ { N } ^ { ( l - 1 ) } ( t _ { N } ) | | \Phi _ { d _ { T } } ( t - t _ { N } ) \right] ^ { \top } ( \mathrm { o r ~ u s e ~ s u m } )
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
and forward it to three different linear projections to obtain the ’query’, ’key’ and ’value’:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathbf { q } ( t ) = \left[ \mathbf { Z } ( t ) \right] _ { 0 } \mathbf { W } _ { Q } , \mathbf { K } ( t ) = \left[ \mathbf { Z } ( t ) \right] _ { 1 : N } \mathbf { W } _ { K } , \mathbf { V } ( t ) = \left[ \mathbf { Z } ( t ) \right] _ { 1 : N } \mathbf { W } _ { V } ,
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\mathbf { W } _ { Q } , \mathbf { W } _ { K } , \mathbf { W } _ { V } \ \in \ \mathbb { R } ^ { ( d + d _ { T } ) \times d _ { h } }$ are the weight matrices that are employed to capture the interactions between time encoding and node features. For notation simplicity, in the following discussion we treat the dependence of the intermediate outputs on target time $t$ as implicit. The attention weights $\{ \alpha _ { i } \} _ { i = 1 } ^ { N }$ of the softmax function output in (2) is given by: $\alpha _ { i } ~ =$ $\begin{array} { r l } { \exp \big ( \mathbf { q } ^ { \mathsf { T } } \mathbf { K } _ { i } \big ) / \Big ( \sum _ { q } \exp \big ( \mathbf { q } ^ { \mathsf { T } } \mathbf { K } _ { q } \big ) \Big ) } & { { } } \end{array}$ . The attention weight $\alpha _ { i }$ reveals how node $i$ attends to the features of node $v _ { 0 }$ within the topological structure defined as $\mathcal { N } ( v _ { 0 } ; t )$ after accounting for their interaction time with $v _ { 0 }$ . The self-attention therefore captures the temporal interactions with both node features and topological features and defines a local temporal aggregation operator on graph. The hidden representation for any node $v _ { i } \in \mathcal { N } ( v _ { 0 } ; t )$ is given by: $\alpha _ { i } \mathbf { V } _ { i }$ . The mechanism can be effectively shared across all nodes for any time point. We then take the row-wise sum from the above dot-product self-attention output as the hidden neighborhood representations, i.e.
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathbf { h } ( t ) = \mathrm { A t t n } \big ( \mathbf { q } ( t ) , \mathbf { K } ( t ) , \mathbf { V } ( t ) \big ) \in \mathbb { R } ^ { d _ { h } } .
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
To combine neighbourhood representation with the target node features, we adopt the same practice from GraphSAGE and concatenate the neighbourhood representation with the target node’s feature vector $\mathbf { z } _ { 0 }$ . We then pass it to a feed-forward neural network to capture non-linear interactions between the features as in (Vaswani et al., 2017):
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\begin{array} { r l } & { \widetilde { \mathbf { h } } _ { 0 } ^ { ( l ) } ( t ) = \mathrm { F F N } \Big ( \mathbf { h } ( t ) | | \mathbf { x } _ { 0 } \Big ) \equiv \mathrm { R e L U } \Big ( [ \mathbf { h } ( t ) | | \mathbf { x } _ { 0 } ] \mathbf { W } _ { 0 } ^ { ( l ) } + \mathbf { b } _ { 0 } ^ { ( l ) } \Big ) \mathbf { W } _ { 1 } ^ { ( l ) } + \mathbf { b } _ { 1 } ^ { ( l ) } , } \\ & { \mathbf { W } _ { 0 } ^ { ( l ) } \in \mathbb { R } ^ { ( d _ { h } + d _ { 0 } ) \times d _ { f } } , \mathbf { W } _ { 1 } ^ { ( l ) } \in \mathbb { R } ^ { d _ { f } \times d } , \mathbf { b } _ { 0 } ^ { ( l ) } \in \mathbb { R } ^ { d _ { f } } , \mathbf { b } _ { 1 } ^ { ( l ) } \in \mathbb { R } ^ { d } , } \end{array}
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $\tilde { \mathbf { h } } _ { 0 } ^ { ( l ) } ( t ) \in \mathbb { R } ^ { d }$ is the final output representing the time-aware node embedding at time $t$ for the target node. Therefore, the TGAT layer can be implemented for node classification task using the semi-supervised learning framework proposed in Kipf & Welling (2016a) as well as the link prediction task with the encoder-decoder framework summarized by Hamilton et al. (2017b).
|
| 125 |
+
|
| 126 |
+
Velickovi ˇ c et al. (2017) suggests that using ´ multi-head attention improves performances and stabilizes training for GAT. For generalization purposes, we also show that the proposed TGAT layer can be easily extended to the multi-head setting. Consider the dot-product self-attention outputs from a total of $k$ different heads, i.e. $\mathbf { h } ^ { ( i ) } \equiv \mathrm { A t t n } ^ { ( i ) } \left( \mathbf { q } ( t ) , \mathbf { K } ( t ) , \mathbf { V } ( t ) \right)$ , $i = 1 , \ldots , k$ . We first concatenate the $k$ neighborhood representations into a combined vector and then carry out the same procedure:
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\tilde { \mathbf { h } } _ { 0 } ^ { ( l ) } ( t ) = \mathrm { F F N } \Big ( \mathbf { h } ^ { ( 1 ) } ( t ) | | \dots | | \mathbf { h } ^ { ( k ) } ( t ) | | \mathbf { x } _ { 0 } \Big ) .
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
Just like GraphSAGE, a single TGAT layer aggregates the localized one-hop neighborhood, and by stacking $L$ TGAT layers the aggregation extends to $L$ hops. Similar to $G A T ,$ , out approach does not restrict the size of neighborhood. We provide a graphical illustration of our TGAT layer in Figure 2.
|
| 133 |
+
|
| 134 |
+
# 3.3 EXTENSION TO INCORPORATE EDGE FEATURES
|
| 135 |
+
|
| 136 |
+
We show that the TGAT layer can be naturally extended to handle edge features in a messagepassing fashion. Simonovsky & Komodakis (2017) and Wang et al. (2018b) modify classical spectral-based graph convolutional networks to incorporate edge features. Battaglia et al. (2018) propose general graph neural network frameworks where edges features can be processed. For temporal graphs, we consider the general setting where each dynamic edge is associated with a feature vector, i.e. the interaction between $v _ { i }$ and $v _ { j }$ at time $t$ induces the feature vector $\mathbf { x } _ { i , j } ( t )$ . To propagate edge features during the TGAT aggregation, we simply extend the $\mathbf { Z } ( t )$ in (6) to:
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\mathbf { Z } ( t ) = \left[ \ldots , \tilde { \mathbf { h } } _ { i } ^ { ( l - 1 ) } ( t _ { i } ) | | \mathbf { x } _ { 0 , i } ( t _ { i } ) | | \Phi _ { d _ { T } } ( t - t _ { i } ) , \ldots \right] \mathrm { ~ ( o r ~ u s e ~ s u m m a t i o n ) , }
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
such that the edge information is propagated to the target node’s hidden representation, and then passed on to the next layer (if exists). The remaining structures stay the same as in Section 3.2.
|
| 143 |
+
|
| 144 |
+
# 3.4 TEMPORAL SUB-GRAPH BATCHING
|
| 145 |
+
|
| 146 |
+
Stacking $L$ TGAT layers is equivalent to aggregate over the $L$ -hop neighborhood. For each $L$ -hop sub-graph that is constructed during the batch-wise training, all message passing directions must be aligned with the observed chronological orders. Unlike the non-temporal setting where each edge appears only once, in temporal graphs two node can have multiple interactions at different time points. Whether or not to allow loops that involve the target node should be judged case-bycase. Sampling from neighborhood, or known as neighborhood dropout, may speed up and stabilize model training. For temporal graphs, neighborhood dropout can be carried uniformly or weighted by the inverse timespan such that more recent interactions has higher probability of being sampled.
|
| 147 |
+
|
| 148 |
+
# 3.5 COMPARISONS TO RELATED WORK
|
| 149 |
+
|
| 150 |
+
The functional time encoding technique and TGAT layer introduced in Section 3.1 and 3.2 solves several critical challenges, and the TGAT network intrinsically connects to several prior methods.
|
| 151 |
+
|
| 152 |
+
• Instead of cropping temporal graphs into a sequence of snapshots or constructing timeconstraint random walks, which inspired most of the current temporal graph embedding methods, we directly learn the functional representation of time. The proposed approach is motivated by and thus fully compatible with the well-established self-attention mechanism. Also, to the best of our knowledge, no previous work has discussed the temporal-feature interactions for temporal graphs, which is also considered in our approach.
|
| 153 |
+
|
| 154 |
+
• The TGAT layer is computationally efficient compared with RNN-based models, since the masked self-attention operation is parallelizable, as suggested by Vaswani et al. (2017). The per-batch time complexity of the TGAT layer with $k$ heads and $l$ layers can be expressed as $\bar { O } \big ( ( k \tilde { N } ) ^ { l } \big )$ where $\bar { \tilde { N } }$ is the average neighborhood size, which is comparable to GAT. When using multi-head attention, the computation for each head can be parallelized as well.
|
| 155 |
+
|
| 156 |
+
• The inference with TGAT is entirely inductive. With an explicit functional expression $\tilde { h } ( t )$ for each node, the time-aware node embeddings can be easily inferred for any timestamp via a single network forward pass. Similarity, whenever the graph is updated, the embeddings for both unseen and observed nodes can be quickly inferred in an inductive fashion similar to that of GraphSAGE, and the computations can be parallelized across all nodes.
|
| 157 |
+
|
| 158 |
+
• GraphSAGE with mean pooling (Hamilton et al., 2017a) can be interpreted as a special case of the proposed method, where the temporal neighborhood is aggregated with equal attention coefficients. GAT is like the time-agnostic version of our approach but with a different formulation for self-attention, as they refer to the work of Bahdanau et al. (2014). We discuss the differences in detail in the Appendix. It is also straightforward to show our connections with the menory networks (Sukhbaatar et al., 2015) by thinking of the temporal neighborhoods as memory. The techniques developed in our work may also help adapting GAT and GraphSAGE to temporal settings as we show in our experiments.
|
| 159 |
+
|
| 160 |
+
# 4 EXPERIMENT AND RESULTS
|
| 161 |
+
|
| 162 |
+
We test the performance of the proposed method against a variety of strong baselines (adapted for temporal settings when possible) and competing approaches, for both the inductive and transductive tasks on two benchmark and one large-scale industrial dataset.
|
| 163 |
+
|
| 164 |
+
# 4.1 DATASETS
|
| 165 |
+
|
| 166 |
+
Real-world temporal graphs consist of time-sensitive node interactions, evolving node labels as well as new nodes and edges. We choose the following datasets which contain all scenarios.
|
| 167 |
+
|
| 168 |
+
Reddit dataset.2 We use the data from active users and their posts under subreddits, leading to a temporal graph with 11,000 nodes, $\sim 7 0 0 { , } 0 0 0$ temporal edges and dynamic labels indicating whether a user is banned from posting. The user posts are transformed into edge feature vectors.
|
| 169 |
+
|
| 170 |
+
Wikipedia dataset.3 We use the data from top edited pages and active users, yielding a temporal graph $\sim 9 { , } 3 0 0$ nodes and around 160,000 temporal edges. Dynamic labels indicate if users are temporarily banned from editing. The user edits are also treated as edge features.
|
| 171 |
+
|
| 172 |
+
Industrial dataset. We choose 70,000 popular products and 100,000 active customers as nodes from the online grocery shopping website4 and use the customer-product purchase as temporal edges ${ \sim } 2$ million). The customers are tagged with labels indicating if they have a recent interest in dietary products. Product features are given by the pre-trained product embeddings (Xu et al., 2020).
|
| 173 |
+
|
| 174 |
+
We do the chronological train-validation-test split with $7 0 \% - 1 5 \% - 1 5 \%$ according to node interaction timestamps. The dataset and preprocessing details are provided in the supplement material.
|
| 175 |
+
|
| 176 |
+
# 4.2 TRANSDUCTIVE AND INDUCTIVE LEARNING TASKS
|
| 177 |
+
|
| 178 |
+
Since the majority of temporal information is reflected via the timely interactions among nodes, we choose to use a more revealing link prediction setup for training. Node classification is then treated as the downstream task using the obtained time-aware node embeddings as input.
|
| 179 |
+
|
| 180 |
+
Table 1: Transductive learning task results for predicting future edges of nodes that have been observed in training data. All results are converted to percentage by multiplying by 100, and the standard deviations computed over ten runs (in parenthesis). The best and second-best results in each column are highlighted in bold font and underlined. GraphSAGE is short for GraphSAGE-LSTM.
|
| 181 |
+
|
| 182 |
+
<table><tr><td rowspan="2">Dataset Metric</td><td colspan="2">Reddit</td><td colspan="2">Wikipedia</td><td colspan="2">Industrial</td></tr><tr><td>Accuracy</td><td>AP</td><td>Accuracy</td><td>AP</td><td> Accuracy</td><td>AP</td></tr><tr><td>GAE</td><td>74.31 (0.5)</td><td>93.23 (0.3)</td><td>72.85 (0.7)</td><td>91.44 (0.1)</td><td>68.92 (0.3)</td><td>81.15 (0.2)</td></tr><tr><td>VAGE</td><td>74.19 (0.4)</td><td>92.92 (0.2)</td><td>78.01 (0.3)</td><td>91.34 (0.3)</td><td>67.81 (0.4)</td><td>80.87 (0.3)</td></tr><tr><td>DeepWalk</td><td>71.43 (0.6)</td><td>83.10 (0.5)</td><td>76.67 (0.5)</td><td>90.71 (0.6)</td><td>65.87 (0.3)</td><td>80.93 (0.2)</td></tr><tr><td>Node2vec</td><td>72.53 (0.4)</td><td>84.58 (0.5)</td><td>78.09 (0.4)</td><td>91.48 (0.3)</td><td>66.64 (0.3)</td><td>81.39 (0.3)</td></tr><tr><td>CTDNE</td><td>73.76 (0.5)</td><td>91.41 (0.3)</td><td>79.42 (0.4)</td><td>92.17 (0.5)</td><td>67.81 (0.3)</td><td>80.95 (0.5)</td></tr><tr><td>GAT</td><td>92.14 (0.2)</td><td>97.33 (0.2)</td><td>87.34 (0.3)</td><td>94.73 (0.2)</td><td>69.58 (0.4)</td><td>81.51 (0.2)</td></tr><tr><td>GAT+T</td><td>92.47 (0.2)</td><td>97.62 (0.2)</td><td>87.57 (0.2)</td><td>95.14 (0.4)</td><td>70.15 (0.3)</td><td>82.66 (0.4)</td></tr><tr><td>GraphSAGE</td><td>92.31(0.2)</td><td>97.65 (0.2)</td><td>85.93 (0.3)</td><td>93.56 (0.3)</td><td>70.19 (0.2)</td><td>83.27 (0.3)</td></tr><tr><td>GraphSAGE+T</td><td>92.58 (0.2)</td><td>97.89 (0.3)</td><td>86.31 (0.3)</td><td>93.72 (0.3)</td><td>71.84 (0.3)</td><td>84.95(0.)</td></tr><tr><td>Const-TGAT</td><td>91.39 (0.2)</td><td>97.86 (0.2)</td><td>86.03 (0.4)</td><td>93.50 (0.3)</td><td>68.52 (0.2)</td><td>81.91 (0.3)</td></tr><tr><td>TGAT</td><td>92.92 (0.3)</td><td>98.12 (0.2)</td><td>88.14 (0.2)</td><td>95.34 (0.1)</td><td>73.28 (0.2)</td><td>86.32 (0.1)</td></tr></table>
|
| 183 |
+
|
| 184 |
+
Table 2: Inductive learning task results for predicting future edges of unseen nodes.
|
| 185 |
+
|
| 186 |
+
<table><tr><td rowspan="2">Dataset Metric</td><td colspan="2">Reddit</td><td colspan="2">Wikipedia</td><td colspan="2">Industrial</td></tr><tr><td> Accuracy</td><td>AP</td><td>Accuracy</td><td>AP</td><td>Accuracy</td><td>AP</td></tr><tr><td>GAT</td><td>89.86 (0.2)</td><td>95.37 (0.3)</td><td>82.36 (0.3)</td><td>91.27 (0.4)</td><td>68.28 (0.2)</td><td>79.93 (0.3)</td></tr><tr><td>GAT+T</td><td>90.44 (0.3)</td><td>96.31 (0.3)</td><td>84.82 (0.3)</td><td>93.57 (0.3)</td><td>69.51 (0.3)</td><td>81.68 (0.3)</td></tr><tr><td>GraphSAGE</td><td>89.43 (0.1)</td><td>96.27 (0.2)</td><td>82.43 (0.3)</td><td>91.09 (0.3)</td><td>67.49 (0.2)</td><td>80.54 (0.3)</td></tr><tr><td>GraphSAGE+T</td><td>90.07 (0.2)</td><td>95.83 (0.2)</td><td>84.03 (0.4)</td><td>92.37 (0.5)</td><td>69.66 (0.3)</td><td>82.74 (0.3)</td></tr><tr><td>Const-TGAT</td><td>88.28 (0.3)</td><td>94.12 (0.2)</td><td>83.60 (0.4)</td><td>91.93 (0.3)</td><td>65.87 (0.3)</td><td>77.03 (0.4)</td></tr><tr><td>TGAT</td><td>90.73 (0.2)</td><td>96.62 (0.3)</td><td>85.35 (0.2)</td><td>93.99 (0.3)</td><td>72.08 (0.3)</td><td>84.99 (0.2)</td></tr></table>
|
| 187 |
+
|
| 188 |
+
Transductive task examines embeddings of the nodes that have been observed in training, via the future link prediction task and the node classification. To avoid violating temporal constraints, we predict the links that strictly take place posterior to all observations in the training data.
|
| 189 |
+
|
| 190 |
+
Inductive task examines the inductive learning capability using the inferred representations of unseen nodes, by predicting the future links between unseen nodes and classify them based on their inferred embedding dynamically. We point out that it suffices to only consider the future sub-graph for unseen nodes since they are equivalent to new graphs under the non-temporal setting.
|
| 191 |
+
|
| 192 |
+
As for the evaluation metrics, in the link prediction tasks, we first sample an equal amount of negative node pairs to the positive links and then compute the average precision $( A P )$ and classification accuracy. In the downstream node classification tasks, due to the label imbalance in the datasets, we employ the area under the ROC curve (AUC).
|
| 193 |
+
|
| 194 |
+
# 4.3 BASELINES
|
| 195 |
+
|
| 196 |
+
Transductive task: for link prediction of observed nodes, we choose the compare our approach with the state-of-the-art graph embedding methods: GAE and VGAE (Kipf & Welling, 2016b). For complete comparisons, we also include the skip-gram-based node2vec (Grover & Leskovec, 2016) as well as the spectral-based DeepWalk model (Perozzi et al., 2014), using the same inner-product decoder as GAE for link prediction. The CDTNE model based on the temporal random walk has been reported with superior performance on transductive learning tasks (Nguyen et al., 2018), so we include CDTNE as the representative for temporal graph embedding approaches.
|
| 197 |
+
|
| 198 |
+
Inductive task: few approaches are capable of managing inductive learning on graphs even in the non-temporal setting. As a consequence, we choose GraphSAGE and GAT as baselines after adapting them to the temporal setting. In particular, we equip them with the same temporal sub-graph batching describe in Section 3.4 to maximize their usage on temporal information. Also, we implement the extended version for the baselines to include edge features in the same way as ours (in Section 3.3). We experiment on different aggregation functions for GraphSAGE, i.e. Graph
|
| 199 |
+
|
| 200 |
+
SAGE-mean, GraphSAGE-pool and GraphSAGE-LSTM. In accordance with the original work of Hamilton et al. (2017a), GraphSAGE-LSTM gives the best validation performance among the three approaches, which is reasonable under temporal setting since LSTM aggregation takes account of the sequential information. Therefore we report the results of GraphSAGE-LSTM.
|
| 201 |
+
|
| 202 |
+
In addition to the above baselines, we implement a version of TGAT with all temporal attention weights set to equal value (Const-TGAT). Finally, to show that the superiority of our approach owes to both the time encoding and the network architecture, we experiment with the enhanced GAT and GraphSAGE-mean by concatenating the proposed time encoding to the original features during temporal aggregations ( $G A T { + } T$ and $G r a p h S A G E { + } T$ ).
|
| 203 |
+
|
| 204 |
+
<table><tr><td>Dataset</td><td>Reddit</td><td>Wikipedia</td><td>Industrial</td></tr><tr><td>GAE VGAE</td><td>58.39 (0.5)</td><td>74.85 (0.6)</td><td>76.59 (0.3)</td></tr><tr><td></td><td>57.98 (0.6)</td><td>73.67 (0.8)</td><td>75.38 (0.4)</td></tr><tr><td>CTDNE</td><td>59.43 (0.6)</td><td>75.89 (0.5)</td><td>78.36 (0.5)</td></tr><tr><td>GAT</td><td>64.52 (0.5)</td><td>82.34 (0.8)</td><td>87.43 (0.4)</td></tr><tr><td>GAT+T</td><td>64.76 (0.6)</td><td>82.95 5(0.7)</td><td>88.24 (0.5)</td></tr><tr><td>GraphSAGE</td><td>61.24 (0.6)</td><td>82.42 (0.7)</td><td>88.28 (0.3)</td></tr><tr><td>GraphSAGE+T</td><td>62.31 (0.7)</td><td>82.87 (0.6)</td><td>89.81 (0.3)</td></tr><tr><td>Const-TGAT</td><td>60.97 (0.5)</td><td>75.18 (0.7)</td><td>82.59 (0.6)</td></tr><tr><td>TGAT</td><td>65.56 (0.7)</td><td>83.69 (0.7)</td><td>92.31 (0.3)</td></tr></table>
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 3: Results of node classification task in the ablation study.
|
| 208 |
+
|
| 209 |
+
Table 3: Dynamic node classification task results, where the reported metric is the AUC.
|
| 210 |
+
|
| 211 |
+
# 4.4 EXPERIMENT SETUP
|
| 212 |
+
|
| 213 |
+
We use the time-sensitive link prediction loss function for training the $l$ -layer TGAT network:
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
\ell = \sum _ { ( v _ { i } , v _ { j } , t _ { i j } ) \in \mathcal E } - \log \Big ( \sigma \big ( - \tilde { \mathbf { h } } _ { i } ^ { l } ( t _ { i j } ) ^ { \top } \tilde { \mathbf { h } } _ { j } ^ { l } ( t _ { i j } ) \big ) \Big ) - Q . \mathbb E _ { v _ { q } \sim P _ { n } ( v ) } \log \Big ( \sigma \big ( \tilde { \mathbf { h } } _ { i } ^ { l } ( t _ { i j } ) ^ { \top } \tilde { \mathbf { h } } _ { q } ^ { l } ( t _ { i j } ) \big ) \Big ) ,
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
where the summation is over the observed edges on $v _ { i }$ and $v _ { j }$ that interact at time $t _ { i j }$ , and $\sigma ( . )$ is the sigmoid function, $Q$ is the number of negative samples and $P _ { n } ( v )$ is the negative sampling distribution over the node space. As for tuning hyper-parameters, we fix the node embedding dimension and the time encoding dimension to be the original feature dimension for simplicity, and then select the number of TGAT layers from $\{ 1 , 2 , 3 \}$ , the number of attention heads from $\{ 1 , \dot { 2 } , 3 , 4 , 5 \}$ , according to the link prediction $A P$ score in the validation dataset. Although our method does not put restriction on the neighborhood size during aggregations, to speed up training, specially when using the multi-hop aggregations, we use neighborhood dropout (selected among $p = \{ 0 . 1 , 0 . 3 , 0 . 5 \} )$ with the uniform sampling. During training, we use 0.0001 as learning rate for Reddit and Wikipedia dataset and 0.001 for the industrial dataset, with Glorot initialization and the Adam SGD optimizer. We do not experiment on applying regularization since our approach is parameter-efficient and only requires $\Omega \big ( ( \dot { d } + d _ { T } ) d _ { h } + \dot { ( d _ { h } + d _ { 0 } ) d _ { f } } + d _ { f } d \big )$ parameters for each attention head, which is independent of the graph and neighborhood size. Using two TGAT layers and two attention heads with dropout rate as 0.1 give the best validation performance. For inference, we inductively compute the embeddings for both the unseen and observed nodes at each time point that the graph evolves, or when the node labels are updated. We then use these embeddings as features for the future link prediction and dynamic node classifications with multilayer perceptron.
|
| 220 |
+
|
| 221 |
+
We further conduct ablation study to demonstrate the effectiveness of the proposed functional time encoding approach. We experiment on abandoning time encoding or replacing it with the original positional encoding (both fixed and learnt). We also compare the uniform neighborhood dropout to sampling with inverse timespan (where the recent edges are more likely to be sampled), which is provided in supplement material along with other implementation details and setups for baselines.
|
| 222 |
+
|
| 223 |
+
# 4.5 RESULTS
|
| 224 |
+
|
| 225 |
+
The results in Table 1 and Table 2 demonstrates the state-of-the-art performances of our approach on both transductive and inductive learning tasks. In the inductive learning task, our TGAT network significantly improves upon the the upgraded GraphSAGE-LSTM and GAT in accuracy and average precision by at least $5 \%$ for both metrics, and in the transductive learning task TGAT consistently outperforms all baselines across datasets. While $G A T { + } T$ and GraphSAGE+T slightly outperform or tie with GAT and GraphSAGE-LSTM, they are nevertheless outperformed by our approach. On one hand, the results suggest that the time encoding have potential to extend non-temporal graph representation learning methods to temporal settings. On the other, we note that the time encoding still works the best with our network architecture which is designed for temporal graphs. Overall, the results demonstrate the superiority of our approach in learning representations on temporal graphs over prior models. We also see the benefits from assigning temporal attention weights to neighboring nodes, where GAT significantly outperforms the Const-TGAT in all three tasks. The dynamic node classification outcome (in Table 3) further suggests the usefulness of our time-aware node embeddings for downstream tasks as they surpass all the baselines. The ablation study results of Figure 3 successfully reveals the effectiveness of the proposed functional time encoding approach in capturing temporal signals as it outperforms the positional encoding counterparts.
|
| 226 |
+
|
| 227 |
+
# 4.6 ATTENTION ANALYSIS
|
| 228 |
+
|
| 229 |
+
To shed some insights into the temporal signals captured by the proposed TGAT, we analyze the pattern of the attention weights $\{ \bar { \alpha _ { i j } } ( t ) \}$ as functions of both time $t$ and node pairs $( i , j )$ in the inference stage. Firstly, we analyze how the attention weights change with respect to the timespans of previous interactions, by plotting the attention weights $\{ \breve { \alpha } _ { j q } ( t _ { i j } ) | \breve { q } \in \mathcal { N } ( v _ { j } ; \dot { t } _ { i j } ) \} \cup \{ \alpha _ { i k } ( t _ { i j } ) | k \in$ $\mathcal { N } ( v _ { i } ; t _ { i j } ) \big \}$ against the timespans $\{ t _ { i j } - t _ { j q } \} \cup \{ t _ { i j } - t _ { i k } \}$ when predicting the link for $( v _ { i } , v _ { j } , t _ { i j } ) \in \mathcal { E }$ (Figure 4a). This gives us an empirical estimation on the $\alpha ( \Delta t )$ , where a smaller $\Delta t$ means a more recent interaction. Secondly, we analyze how the topological structures affect the attention weights as time elapses. Specifically, we focus on the topological structure of the recurring neighbours, by finding out what attention weights the model put on the neighbouring nodes with different number of reoccurrences. Since the functional forms of all $\{ \alpha _ { i j } ( . ) \}$ are fixed after training, we are able to feed in different target time $t$ and then record their value on neighbouring nodes with different number of occurrences (Figure 4b). From Figure 4a we observe that TGAT captures the pattern of having less attention on more distant interactions in all three datasets. In Figure 4b, it is obvious that when predicting a more future interaction, TGAT will consider neighbouring nodes who have a higher number of occurrences of more importance. The patterns of the attention weights are meaningful, since the more recent and repeated actions often have larger influence on users’ future interests.
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
Figure 4: Attention weight analysis. We apply the Loess smoothing method for visualization.
|
| 233 |
+
|
| 234 |
+
# 5 CONCLUSION AND FUTURE WORK
|
| 235 |
+
|
| 236 |
+
We introduce a novel time-aware graph attention network for inductive representation learning on temporal graphs. We adapt the self-attention mechanism to handle the continuous time by proposing a theoretically-grounded functional time encoding. Theoretical and experimental analysis demonstrate the effectiveness of our approach for capturing temporal-feature signals in terms of both node and topological features on temporal graphs. Self-attention mechanism often provides useful model interpretations (Vaswani et al., 2017), which is an important direction of our future work. Developing tools to visualize the evolving graph dynamics and temporal representations efficiently is another important direction for both research and application. Also, the functional time encoding technique has huge potential for adapting other deep learning methods to the temporal graph domain.
|
| 237 |
+
|
| 238 |
+
# REFERENCES
|
| 239 |
+
|
| 240 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 241 |
+
|
| 242 |
+
Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.
|
| 243 |
+
|
| 244 |
+
Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on ¨ graphs with fast localized spectral filtering. In Advances in neural information processing systems, pp. 3844–3852, 2016.
|
| 245 |
+
|
| 246 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
|
| 247 |
+
|
| 248 |
+
Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019.
|
| 249 |
+
|
| 250 |
+
Palash Goyal, Nitin Kamra, Xinran He, and Yan Liu. Dyngem: Deep embedding method for dynamic graphs. arXiv preprint arXiv:1805.11273, 2018.
|
| 251 |
+
|
| 252 |
+
Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 855–864. ACM, 2016.
|
| 253 |
+
|
| 254 |
+
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pp. 1024–1034, 2017a.
|
| 255 |
+
|
| 256 |
+
William L Hamilton, Rex Ying, and Jure Leskovec. Representation learning on graphs: Methods and applications. arXiv preprint arXiv:1709.05584, 2017b.
|
| 257 |
+
|
| 258 |
+
Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015.
|
| 259 |
+
|
| 260 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 261 |
+
|
| 262 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016a.
|
| 263 |
+
|
| 264 |
+
Thomas N Kipf and Max Welling. Variational graph auto-encoders. arXiv preprint arXiv:1611.07308, 2016b.
|
| 265 |
+
|
| 266 |
+
Taisong Li, Jiawei Zhang, S Yu Philip, Yan Zhang, and Yonghong Yan. Deep dynamic network embedding for link prediction. IEEE Access, 6:29219–29230, 2018.
|
| 267 |
+
|
| 268 |
+
Lynn H Loomis. Introduction to abstract harmonic analysis. Courier Corporation, 2013.
|
| 269 |
+
|
| 270 |
+
Yao Ma, Ziyi Guo, Eric Zhao Zhaochun Ren, and Dawei Yin Jiliang Tang. Streaming graph neural networks. arXiv preprint arXiv:1810.10627, 2018.
|
| 271 |
+
|
| 272 |
+
Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5115– 5124, 2017.
|
| 273 |
+
|
| 274 |
+
Giang Hoang Nguyen, John Boaz Lee, Ryan A Rossi, Nesreen K Ahmed, Eunyee Koh, and Sungchul Kim. Continuous-time dynamic network embeddings. In Companion Proceedings of the The Web Conference 2018, pp. 969–976. International World Wide Web Conferences Steering Committee, 2018.
|
| 275 |
+
|
| 276 |
+
James W Pennebaker, Martha E Francis, and Roger J Booth. Linguistic inquiry and word count: Liwc 2001. Mahway: Lawrence Erlbaum Associates, 71(2001):2001, 2001.
|
| 277 |
+
|
| 278 |
+
Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 701–710. ACM, 2014.
|
| 279 |
+
|
| 280 |
+
Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pp. 1177–1184, 2008.
|
| 281 |
+
|
| 282 |
+
Mahmudur Rahman, Tanay Kumar Saha, Mohammad Al Hasan, Kevin S Xu, and Chandan K Reddy. Dylink2vec: Effective feature representation for link prediction in dynamic networks. arXiv preprint arXiv:1804.05755, 2018.
|
| 283 |
+
|
| 284 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015.
|
| 285 |
+
|
| 286 |
+
Martin Simonovsky and Nikos Komodakis. Dynamic edge-conditioned filters in convolutional neural networks on graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3693–3702, 2017.
|
| 287 |
+
|
| 288 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pp. 2440–2448, 2015.
|
| 289 |
+
|
| 290 |
+
Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei. Line: Large-scale information network embedding. In Proceedings of the 24th international conference on world wide web, pp. 1067–1077. International World Wide Web Conferences Steering Committee, 2015.
|
| 291 |
+
|
| 292 |
+
Rakshit Trivedi, Mehrdad Farajtabar, Prasenjeet Biswal, and Hongyuan Zha. Representation learning over dynamic graphs. arXiv preprint arXiv:1803.04051, 2018.
|
| 293 |
+
|
| 294 |
+
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.
|
| 295 |
+
|
| 296 |
+
Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua ´ Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017.
|
| 297 |
+
|
| 298 |
+
Daixin Wang, Peng Cui, and Wenwu Zhu. Structural deep network embedding. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 1225–1234. ACM, 2016.
|
| 299 |
+
|
| 300 |
+
Jizhe Wang, Pipei Huang, Huan Zhao, Zhibo Zhang, Binqiang Zhao, and Dik Lun Lee. Billion-scale commodity embedding for e-commerce recommendation in alibaba. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 839–848. ACM, 2018a.
|
| 301 |
+
|
| 302 |
+
Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. arXiv preprint arXiv:1801.07829, 2018b.
|
| 303 |
+
|
| 304 |
+
Da Xu, Chuanwei Ruan, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Self-attention with functional time representation learning. In Advances in Neural Information Processing Systems, pp. 15889–15899, 2019a.
|
| 305 |
+
|
| 306 |
+
Da Xu, Chuanwei Ruan, Kamiya Motwani, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Generative graph convolutional network for growing graphs. In ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 3167–3171. IEEE, 2019b.
|
| 307 |
+
|
| 308 |
+
Da Xu, Chuanwei Ruan, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Product knowledge graph embedding for e-commerce. In Proceedings of the 13th International Conference on Web Search and Data Mining, pp. 672–680, 2020.
|
| 309 |
+
|
| 310 |
+
Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 974– 983. ACM, 2018.
|
| 311 |
+
|
| 312 |
+
# A APPENDIX
|
| 313 |
+
|
| 314 |
+
# A.1 PROOF FOR CLAIM 1
|
| 315 |
+
|
| 316 |
+
Proof. The proof is also shown in our concurrent work $\mathrm { X u }$ et al. (2019a). We also provide it here for completeness. To prove the results in Claim 1, we alternatively show that under the same condition,
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\operatorname* { P r } \bigl ( \operatorname* { s u p } _ { t _ { 1 } , t _ { 2 } \in T } \bigl | \Phi _ { d } ^ { B } ( t _ { 1 } ) ^ { ' } \Phi _ { d } ^ { B } ( t _ { 2 } ) - K ( t _ { 1 } , t _ { 2 } ) \bigr | \geq \epsilon \bigr ) \leq 4 \sigma _ { p } \sqrt { \frac { t _ { \operatorname* { m a x } } } { \epsilon } } e x p \bigl ( \frac { - d \epsilon ^ { 2 } } { 3 2 } \bigr ) .
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
Define the score $S ( t _ { 1 } , t _ { 2 } ) ~ = ~ \Phi _ { d } ^ { B } ( t _ { 1 } ) ^ { ' } \Phi _ { d } ^ { B } ( t _ { 2 } )$ . The goal is to derive a uniform upper bound for $s ( t _ { 1 } , t _ { 2 } ) \ - \ \mathcal { K } ( t _ { 1 } , t _ { 2 } )$ . By assumption $S ( t _ { 1 } , t _ { 2 } )$ is an unbiased estimator for $\displaystyle \kappa ( t _ { 1 } , t _ { 2 } )$ , i.e. $E [ S ( t _ { 1 } , t _ { 2 } ) ] = \mathcal { K } ( t _ { 1 } , t _ { 2 } )$ . Due to the translation-invariant property of $S$ and $\kappa$ , we let $\Delta ( t ) \equiv$ $s ( t _ { 1 } , t _ { 2 } ) - \mathcal { K } ( t _ { 1 } , t _ { 2 } )$ , where $t \equiv t _ { 1 } - t _ { 2 }$ for all $t _ { 1 } , t _ { 2 } \in [ 0 , \bar { t } _ { \mathrm { m a x } } ]$ . Also we define $s ( t _ { 1 } - t _ { 2 } ) : =$ $S ( t _ { 1 } , t _ { 2 } )$ . Therefore $t \in [ - t _ { \operatorname* { m a x } } , t _ { \operatorname* { m a x } } ]$ , and we use $t \in \tilde { T }$ as the shorthand notation. The LHS in (1) now becomes $\mathrm { P r } \big ( \operatorname* { s u p } _ { t \in \tilde { T } } | \Delta ( t ) | \geq \epsilon \big )$ .
|
| 323 |
+
|
| 324 |
+
t i $\tilde { T } \subseteq \cup _ { i = 0 } ^ { N - 1 } T _ { i }$ wi of . $\begin{array} { r } { T _ { i } = [ - t _ { \mathrm { m a x } } + \frac { 2 i t _ { \mathrm { m a x } } } { N } , - t _ { \mathrm { m a x } } + \frac { 2 ( i + 1 ) t _ { \mathrm { m a x } } } { N } ] } \end{array}$ 2(i+1)tmax ] for i = 1, . . . , N . So $\cup _ { i = 0 } ^ { N - 1 } T _ { i }$ $\tilde { T }$ $\begin{array} { r } { t _ { i } = - t _ { \operatorname* { m a x } } + \frac { ( 2 i + 1 ) t _ { \operatorname* { m a x } } } { N } } \end{array}$ (2i+1)tmaxN , then for any t ∈ Ti, i = 1, . . . , N we have
|
| 325 |
+
|
| 326 |
+
$$
|
| 327 |
+
\begin{array} { r l } { | \Delta ( t ) | = | \Delta ( t ) - \Delta ( t _ { i } ) + \Delta ( t _ { i } ) | } & { } \\ { \leq | \Delta ( t ) - \Delta ( t _ { i } ) | + | \Delta ( t _ { i } ) | } & { } \\ { \leq L _ { \Delta } | t - t _ { i } | + | \Delta ( t _ { i } ) | } & { } \\ { \leq L _ { \Delta } \frac { 2 t _ { \operatorname* { m a x } } } { N } + | \Delta ( t _ { i } ) | , } \end{array}
|
| 328 |
+
$$
|
| 329 |
+
|
| 330 |
+
where $L _ { \Delta } = \operatorname* { m a x } _ { t \in \tilde { T } } \| \nabla \Delta ( t ) \|$ (since $\Delta$ is differentiable) with the maximum achieved at $t ^ { * }$ . So we may bound the two events separately.
|
| 331 |
+
|
| 332 |
+
For $| \Delta ( t _ { i } ) |$ we simply notice that trigeometric functions are bounded between $[ - 1 , 1 ]$ , and therefore $- 1 \leq \Phi _ { d } ^ { B } ( t _ { 1 } ) ^ { \prime } \Phi _ { d } ^ { B } ( t _ { 2 } ) \leq 1$ . The Hoeffding’s inequality for bounded random variables immediately gives us:
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\operatorname* { P r } \bigl ( | \Delta ( t _ { i } ) | > \frac { \epsilon } { 2 } \bigr ) \leq 2 e x p ( - \frac { d \epsilon ^ { 2 } } { 1 6 } ) .
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
So applying the Hoeffding-type union bound to the finite cover gives
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
\mathrm { P r } \big ( \cup _ { i = 0 } ^ { N - 1 } | \Delta ( t _ { i } ) | \geq \frac { \epsilon } { 2 } \big ) \leq 2 N \exp ( - \frac { d \epsilon ^ { 2 } } { 1 6 } )
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
For the other event we first apply Markov inequality and obtain:
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\operatorname* { P r } \bigl ( L _ { \Delta } \frac { 2 t _ { \mathrm { m a x } } } { N } \geq \frac { \epsilon } { 2 } \bigr ) = \operatorname* { P r } \bigl ( L _ { \Delta } \geq \frac { \epsilon N } { 4 t _ { \mathrm { m a x } } } \bigr ) \leq \frac { 4 t _ { \mathrm { m a x } } E [ L _ { \Delta } ^ { 2 } ] } { \epsilon N } .
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
Also, since $E [ s ( t _ { 1 } - t _ { 2 } ) ] = \psi ( t _ { 1 } - t _ { 2 } )$ , we have
|
| 351 |
+
|
| 352 |
+
$$
|
| 353 |
+
\begin{array} { r } { E [ L _ { \Delta } ^ { 2 } ] = E \| \nabla s ( t ^ { * } ) - \nabla \psi ( t ^ { * } ) \| ^ { 2 } = E \| \nabla s ( t ^ { * } ) \| ^ { 2 } - E \| \nabla \psi ( t ^ { * } ) \| ^ { 2 } \leq E \| \nabla s ( t ^ { * } ) \| ^ { 2 } = \sigma _ { p } ^ { 2 } , } \end{array}
|
| 354 |
+
$$
|
| 355 |
+
|
| 356 |
+
where $\sigma _ { p } ^ { 2 }$ is the second momentum with respect to $p ( \omega )$ .
|
| 357 |
+
|
| 358 |
+
Combining (11), (12) and (11) gives us:
|
| 359 |
+
|
| 360 |
+
$$
|
| 361 |
+
\operatorname* { P r } \bigl ( \operatorname* { s u p } _ { t \in \tilde { T } } | \Delta ( t ) | \geq \epsilon \bigr ) \leq 2 N \exp ( - \frac { d \epsilon ^ { 2 } } { 1 6 } ) + \frac { 4 t _ { \mathrm { m a x } } \sigma _ { p } ^ { 2 } } { \epsilon N } .
|
| 362 |
+
$$
|
| 363 |
+
|
| 364 |
+
It is straightforward to examine that the RHS of (14) is a convex function of $N$ and is minimized by $\begin{array} { r } { N ^ { * } = \sigma _ { p } \sqrt { \frac { 2 t _ { \mathrm { m a x } } } { \epsilon } } e x p ( \frac { d \epsilon ^ { 2 } } { 3 2 } ) } \end{array}$ . Plug $N ^ { * }$ back to (14) and we obtain (9). We then solve for $d$ according to (9) and obtain the results in Claim 1.
|
| 365 |
+
|
| 366 |
+
In this part, we provide detailed comparisons between the attention mechanism employed by our proposed TGAT and the GAT proposed by Velickovi ˇ c et al. (2017). Other than the obvious fact that ´ GAT does not handle temporal information, the main difference lies in the formulation of attention weights. While GAT depends on the attention mechanism proposed by Bahdanau et al. (2014), our architecture refers to the self-attention mechanism of Vaswani et al. (2017). Firstly, the attention mechanism used by GAT does not involve the notions of ’query’, ’key’ and ’value’ nor the dotproduct formulation introduced in (2). As a consequence, the attention weight between node $v _ { i }$ and its neighbor $v _ { j }$ is computed via
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\alpha _ { i j } = \frac { \mathrm { { e x p } \Big ( L e a k y R e L U \big ( \mathbf { a } ^ { \top } [ \mathbf { W } \mathbf { h } _ { i } | | \mathbf { W } \mathbf { h } _ { j } ] \big ) \Big ) } } { { \sum _ { k \in { \mathcal { N } ( v _ { i } ) } } \mathrm { { e x p } \Big ( L e a k y R e L U \big ( \mathbf { a } ^ { \top } [ \mathbf { W } \mathbf { h } _ { i } | | \mathbf { W } \mathbf { h } _ { k } ] \big ) \Big ) } } } ,
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
where $\mathbf { a }$ is a weight vector, $\mathbf { W }$ is a weight matrix, $\mathcal { N } ( v _ { i } )$ is the neighorhood set for node $v _ { i }$ and $\mathbf { h } _ { i }$ is the hidden representation of node $v _ { i }$ . It is then obvious that their computation of $\alpha _ { i j }$ is very different from our approach. In TGAT, after expanding the expressions in Section 3, the attention weight is computed by:
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
\alpha _ { i j } ( t ) = \frac { \exp \Big ( \big ( | \tilde { \mathbf { h } } _ { i } ( t _ { i } ) | | \Phi _ { d _ { T } } ( t - t _ { i } ) | \mathbf { W } _ { Q } \big ) ^ { \mathsf { T } } \big ( | \tilde { \mathbf { h } } _ { j } ( t _ { j } ) | | \Phi _ { d _ { T } } ( t - t _ { j } ) | \mathbf { W } _ { K } \big ) \Big ) } { \sum _ { k \in \mathcal { N } ( v _ { i } ; t ) } \exp \Big ( \big ( [ \tilde { \mathbf { h } } _ { i } ( t _ { i } ) | | \Phi _ { d _ { T } } ( t - t _ { i } ) ] \mathbf { W } _ { Q } \big ) ^ { \mathsf { T } } \big ( [ \tilde { \mathbf { h } } _ { k } ( t _ { k } ) | | \Phi _ { d _ { T } } ( t - t _ { k } ) ] \mathbf { W } _ { K } \big ) \Big ) } .
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
Intuitively speaking, the attention mechanism of $G A T$ relies on the parameter vector $\mathbf { a }$ and the LeakyReLU(.) to capture the hidden factor interactions between entities in the sequence, while we use the linear transformation followed by the dot-product to capture pair-wise interactions of the hidden factors between entities and the time embeddings. The dot-product formulation is important for our approach. From the theoretical perspective, the time encoding functional form is derived according to the notion of temporal kernel $\kappa$ and its inner-product decomposition (Section 3). As for the practical performances, we see from Table 1, 2 and 3 that even after we equip GAT with the same time encoding, the performance is still inferior to our TGAT.
|
| 379 |
+
|
| 380 |
+
# A.3 DETAILS ON DATASETS AND PREPROCESSING
|
| 381 |
+
|
| 382 |
+
Reddit dataset: this benchmark dataset contains users interacting with subreddits by posting under the subreddits. The timestamps tell us when the user makes the posts. The dataset uses the posts made in a one-month span, and selects the most active users and subreddits as nodes, giving a total of 11,000 nodes and around 700,000 temporal edges. The user posts have textual features that are transformed into a 172-dimensional vector representing under the linguistic inquiry and word count (LIWC) categories (Pennebaker et al., 2001). The dynamic binary labels indicate if a user is banned from posting under a subreddit. Since node features are not provided in the original dataset, we use the all-zero vector instead.
|
| 383 |
+
|
| 384 |
+
Wikipedia dataset: the dataset also collects one-month of interactions induced by users’ editing the Wikipedia pages. The the top edited pages and active users are considered, leading to ${ \sim } 9 { , } 3 0 0$ nodes and around 160,000 temporal edges. Similar to the Reddit dataset, we also have the ground-truth dynamic labels on whether a user is banned from editing a Wikipedia page. User edits consist of the textual features and are also converted into 172-dimensional LIWC feature vectors. Node features are also not provided, so we also use the all-zero vector as well.
|
| 385 |
+
|
| 386 |
+
Industrial dataset: we obtain the large-scale customer-product interaction graph from the online grocery shopping platform grocery.walmart.com. We select $\sim 7 0 { , } 0 0 0$ most popular products and 100,000 active customers as nodes and use the customer-product purchase interactions over a one-month period as temporal edges ${ \sim } 2$ million). Each purchase interaction is timestamped, which we use to construct the temporal graph. The customers are labelled with business tags, indicating if they are interested in dietary products according to their most recent purchase records. Each product node possesses contextual features containing their name, brand, categories and short description. The previous LIWC categories no longer apply since the product contextual features are not natural sentences. We use product embedding approach (Xu et al., 2020) to embed each product’s contextual
|
| 387 |
+
|
| 388 |
+
<table><tr><td></td><td>Reddit</td><td>Wikipedia</td><td>Industrial</td></tr><tr><td># Nodes</td><td>11,000</td><td>9,227</td><td>170,243</td></tr><tr><td># Edges</td><td>672,447</td><td>157,474</td><td>2,135,762</td></tr><tr><td>#Feature dimension</td><td>172</td><td>172</td><td>100</td></tr><tr><td># Feature type</td><td>LIWC category vector</td><td>LIWC category</td><td>document embeddings</td></tr><tr><td># Timespan</td><td>30 days</td><td>vector 30 days</td><td>30 days</td></tr><tr><td>% Training nodes</td><td>90%</td><td>90%</td><td>90%</td></tr><tr><td>% Unseen nodes</td><td>10%</td><td>10%</td><td>10%</td></tr><tr><td>% Training edges</td><td>~67%</td><td>~65%</td><td>~64%</td></tr><tr><td>% Future edges between observed nodes</td><td>~27%</td><td>~28%</td><td>~29%</td></tr><tr><td>% Future edges between unseen nodes</td><td>~6%</td><td>~7%</td><td>~7%</td></tr><tr><td># Nodes with dynamic labels</td><td>366</td><td>217</td><td>5,236</td></tr><tr><td>Label type</td><td>binary</td><td>binary</td><td>binary</td></tr><tr><td></td><td>banned from</td><td>banned from</td><td>interested in</td></tr><tr><td>Positive label meaning</td><td>posting</td><td>editting</td><td>dietary products</td></tr></table>
|
| 389 |
+
|
| 390 |
+
Table 4: Data statistics for the three datasets. Since we sample a proportion of unseen nodes, the percentage of the edge statistics reported here are approximations.
|
| 391 |
+
|
| 392 |
+
features into a 100-dimensional vector space as preprocessing. The user nodes and edges do not possess features.
|
| 393 |
+
|
| 394 |
+
We then split the temporal graphs chronologically into $7 0 \% - 1 5 \% - 1 5 \%$ for training, validation and testing according to the time epochs of edges, as illustrated in Figure 5 with the Reddit dataset. Since all three datasets have a relatively stationary edge count distribution over time, using the 70 and 85 percentile time points to split the dataset results in approximately $7 0 \% - 1 5 \% - 1 5 \%$ of total edges, as suggested by Figure 5.
|
| 395 |
+
|
| 396 |
+

|
| 397 |
+
Figure 5: The distribution of temporal edge count for the Reddit dataset, and the illustration on the train-validation-test splitting.
|
| 398 |
+
|
| 399 |
+
To ensure that an appropriate amount of future edges among the unseen nodes will show up during validation and testing, for each dataset, we randomly sample $10 \%$ of nodes, mask them during training and treat them as unseen nodes by only considering their interactions in validation and testing period. This manipulation is necessary since the new nodes that show up during validation and testing period may not have much interaction among themselves. The statistics for the three datasets are summarized in Table 4.
|
| 400 |
+
|
| 401 |
+
# Preprocessing.
|
| 402 |
+
|
| 403 |
+
For the Node2vec and DeepWalk baselines who only take static graphs as input, the graph is constructed using all edges in training data regardless of temporal information. For DeepWalk, we treat the recurrent edges as appearing only once, so the graph is unweighted. Although our approach handles both directed and undirected graphs, for the sake of training stability of the baselines, we treat the graphs as undirected. For Node2vec, we use the count of recurrent edges as their weights and construct the weighted graph. For all three datasets, the obtained graphs in both cases are undirected and do not have isolated nodes. Since we choose from active users and popular items, the graphs are all connected.
|
| 404 |
+
|
| 405 |
+
For the graph convolutional network baselines, i.e. GAE and VGAE, we construct the same undirected weighted graph as for Node2vec. Since GAE and VGAE do not take edge features as input, we use the posts/edits as user node features. For each user in Reddit and Wikipedia dataset, we take the average of their post/edit feature vectors as the node feature. For the industrial dataset where user features are not available, we use the all-zero feature vector instead.
|
| 406 |
+
|
| 407 |
+
As for the downstream dynamic node classification task, we use the same training, validation and testing dataset as above. Since we aim at predicting the dynamic node labels, for Reddit and Wikipedia dataset we predict if the user node is banned and for the industrial dataset we predict the customers’ business labels, at different time points. Due to the label imbalance, in each of the batch when training for the node label classifier, we conduct stratified sampling such that the label distributions are similar across batches.
|
| 408 |
+
|
| 409 |
+
# A.4 EXPERIMENT SETUP FOR BASELINES
|
| 410 |
+
|
| 411 |
+
For all baselines, we set the node embedding dimension to $d = 1 0 0$ to keep in accordance with our approach.
|
| 412 |
+
|
| 413 |
+
# Transductive baselines.
|
| 414 |
+
|
| 415 |
+
Since Node2vec and DeepWalk do not provide room for task-specific manipulation or hacking, we do not modify their default loss function and input format. For both approaches, we select the number of walks among $\{ 6 0 , 8 0 , 1 0 0 \}$ and the walk-length among $\{ 2 0 , 3 0 , 4 0 \}$ according to the validation $A P$ . Setting number of walks $scriptstyle = 8 0$ and walk-length $\scriptstyle 1 = 3 0$ give slightly better validation performance compared to others for both approaches. Notice that both Node2vec and DeepWalk use the sigmoid function with embedding inner-products as the decoder to predict neighborhood probabilities. So when predicting whether $v _ { i }$ and $v _ { j }$ will interact in the future, we use $\bar { \sigma ( - \mathbf { z } _ { i } ^ { \intercal } \mathbf { z } _ { j } ) }$ as the score, where $\mathbf { z } _ { i }$ and $\mathbf { z } _ { j }$ are the node embeddings. Notice that Node2vec has the extra hyper-parameter $p$ and $q$ which controls the likelihood of immediately revisiting a node in the walk and interpolation between breadth-first strategy and depth-first strategy. After selecting the optimal number of walks and walklength under $p = 1$ and $q = 1$ , we further tune the different values of $p$ in $\{ 0 . 2 , 0 . 4 , 0 . 6 , 0 . 8 , 1 . 0 \}$ while fixing $q = 1$ . According to validation, $p = 0 . 6$ and 0.8 give comparable optimal performance.
|
| 416 |
+
|
| 417 |
+
For the $G A E$ and VGAE baselines, we experiment on using one, two and three graph convolutional layers as the encoder (Kipf & Welling, 2016a) and use the ReLU(.) as the activation function. By referencing the official implementation, we also set the dimension of hidden layers to 200. Similar to previous findings, using two layers gives significant performances to using only one layer. Adding the third layer, on the other hand, shows almost identical results for both models. Therefore the results reported are based on two-layer GCN as the encoder. For GAE, we use the standard inner-product decoder as our approach and optimize over the reconstruction loss, and for VGAE, we restrict the Gaussian latent factor space (Kipf & Welling, 2016b). Since we have eliminated the temporal information when constructing the input, we find that the optimal hyper-parameters selected according to the tuning have similar patterns as in the previous non-temporal settings.
|
| 418 |
+
|
| 419 |
+
For the temporal network embedding model CTDNE, the walk length for the temporal random walk is also selected among $\left\{ 6 0 , 8 0 , 1 0 0 \right\}$ , where setting walk length to 80 gives slightly better validation outcome. The original paper considers several temporal edge selection (sampling) methods (uniform, linear and exponential) and finds uniform sampling with best performances (Nguyen et al., 2018). Since our setting is similar to theirs, we adopt the uniform sampling approach.
|
| 420 |
+
|
| 421 |
+
# Inductive baselines.
|
| 422 |
+
|
| 423 |
+
For the GraphSAGE and GAT baselines, as mentioned before, we train the models in an identical way as our approach with the temporal subgraph batching, despite several slight differences. Firstly, the aggregation layers in GraphSAGE usually considers a fixed neighborhood size via sampling, whereas our approach can take an arbitrary neighborhood as input. Therefore, we only consider the most recent $d _ { \mathrm { s a m p l e } }$ edges during each aggregation for all layers, and we find $d _ { \mathrm { s a m p l e } } = 2 0$ gives the best performance among $\{ 1 0 , 1 \bar { 5 } , 2 0 , 2 5 \}$ . Secondly, GAT implements a uniform neighborhood dropout. We also experiment with the inverse timespan sampling for neighborhood dropout, and find that it gives slightly better performances but at the cost of computational efficiency, especially for large graphs. We consider aggregating over one, two and three-hop neighborhood for both GAT and GraphSAGE. When working with three hops, we only experiment on GraphSAGE with the mean pooling aggregation. In general, using two hops gives comparable performance to using three hops. Notice that computations with three-hop are costly, since the number of edges during aggregation increase exponentially to the number of hops. Thus we stick to using two hops for GraphSAGE, $G A T$ and our approach. It is worth mentioning that when implementing GraphSAGE-LSTM, the input neighborhood sequences of LSTM are also ordered by their interaction time.
|
| 424 |
+
|
| 425 |
+
# Node classification with baselines.
|
| 426 |
+
|
| 427 |
+
The dynamic node classification with GraphSAGE and GAT can be conducted similarity to our approach, where we inductively compute the most up-to-date node embeddings and then input them as features to an MLP classifier. For the transductive baselines, it is not reasonable to predict the dynamic node labels with only the fixed node embeddings. Instead, we combine the node embedding with the other node embedding it is interacting with when the label changes, e.g. combine the user embedding with the Wikipedia page embedding that the user attempts on editing when the system bans the user. To combine the pair of node embeddings, we experimented on summation, concatenation and bi-linear transformation. Under summation and concatenation, the combined embeddings are then used as input to an MLP classifier, where the bi-linear transformation directly outputs scores for classification. The validation outcomes suggest that using concatenation with MLP yields the best performance.
|
| 428 |
+
|
| 429 |
+
# A.5 IMPLEMENTATION DETAILS
|
| 430 |
+
|
| 431 |
+
Training. We implement Node2vec using the official C code5 on a 16-core Linux server with 500 Gb memory. DeepWalk is implemented with the official python code6. We refer to the PyTorch geometric library for implementing the GAE and VGAE baselines (Fey & Lenssen, 2019). To accommodate the temporal setting and incorporate edges features, we develop off-the-shelf implementation for GraphSAGE and $G A T$ in PyTorch by referencing their original implementations7 8. We also implement our model using PyTorch. All the deep learning models are trained on a machine with one Tesla V100 GPU. We use the Glorot initialization and the Adam SGD optimizer for all models, and apply the early-stopping strategy during training where we terminate the training process if the validation $A P$ score does not improve for 10 epochs.
|
| 432 |
+
|
| 433 |
+
Downstream node classification. As we discussed before, we use the three-layer MLP as classifier and the (combined) node embeddings as input features from all the experimented approaches, for all three datasets. The MLP is trained with the Glorot initialization and the Adam SGD optimizer in PyTorch as well. The $\ell _ { 2 }$ regularization parameter $\lambda$ is selected in $\{ 0 . 0 0 1 , 0 . 0 1 , 0 . 0 5 , \bar { 0 . 1 } , 0 . 2 \}$ case-by-case during training. The early-stopping strategy is also employed.
|
| 434 |
+
|
| 435 |
+
# A.6 SENSITIVITY ANALYSIS AND EXTRA ABLATION STUDY
|
| 436 |
+
|
| 437 |
+
Firstly, we focus on the output node embedding dimension as well as the functional time encoding dimension in this sensitivity analysis. The reported results are averaged over five runs. We experiment on $d \in \{ 6 0 , 8 0 , 1 0 0 , \dot { 1 } 2 0 , 1 \dot { 4 } 0 \}$ and $d _ { T } \in \{ 6 0 , 8 0 , 1 0 0 , 1 2 0 , 1 4 \bar { 0 } \}$ , and the results are reported in Figure 7a and 7c. The remaining model setups reported in Section 4.4 are untouched when varying $d$ or $d _ { T }$ . We observe slightly better outcome when increasing either $d$ or $d _ { T }$ on the industrial dataset. The patterns on Reddit and Wikipedia dataset are almost identical.
|
| 438 |
+
|
| 439 |
+
Secondly, we compare between the two methods of learning functional encoding, i.e. using flowbased model or using the non-parametric method introduced in Section 3.1. We experiment on two
|
| 440 |
+
|
| 441 |
+

|
| 442 |
+
(a) Comparison between uniform and inverse timespan weighted sampling on the link prediction task
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
|
| 446 |
+
(b) Comparison between three different ways of learning the functional time encoding, on link prediction task.
|
| 447 |
+
|
| 448 |
+

|
| 449 |
+
Figure 6: Extra ablation study.
|
| 450 |
+
|
| 451 |
+
(a) Sensitivity analysis on node embeddings dimension.
|
| 452 |
+
|
| 453 |
+

|
| 454 |
+
(b) Sensitivity analysis on time embeddings dimension.
|
| 455 |
+
|
| 456 |
+

|
| 457 |
+
Figure 7: Sensitivity analysis on the Industrial dataset.
|
| 458 |
+
|
| 459 |
+
(c) Sensitivity analysis on number of attention heads and layers (hops) with $d = 1 0 0$ and $d _ { T } = 1 0 0$ .
|
| 460 |
+
|
| 461 |
+
flow-based state-of-the-art CDF learning method: normalizing flow (Rezende & Mohamed, 2015) and RealNVP (Dinh et al., 2016). We use the default model setups and hyper-parameters in their reference implementations9 10. We provide the results in Figure 6b. As we mentioned before, using flow-based models leads to highly comparable outcomes as the non-parametric approach, but they require longer training time since they implement sampling during each training batch. However, it is possible that carefully-tuned flow-based models can lead to nontrivial improvements, which we leave to the future work.
|
| 462 |
+
|
| 463 |
+
Finally, we provide sensitivity analysis on the number of attention heads and layers for TGAT. Recall that by stacking two layers in TGAT we are aggregating information from the two-hop neighbourhood. For both accuracy and $A P$ , using three-head attention and two-layers gives the best outcome. In general, the results are relatively stable to the number of heads, and stacking two layers leads to significant improvements compared with using only a single layer.
|
| 464 |
+
|
| 465 |
+
The ablation study for comparing between uniform neighborhood dropout and sampling with inverse timespan is given in Figure 6a. The two experiments are carried out under the same setting which we reported in Section 4.4. We see that using the inverse timespan sampling gives slightly worse performances. This is within expectation since uniform sampling has advantage in capturing the recurrent patterns, which can be important for predicting user actions. On the other hand, the results also suggest the effectiveness of the proposed time encoding for capturing such temporal patterns. Moreover, we point out that using the inverse timespan sampling slows down training, particularly for large graphs where a weighted sampling is conducted within a large number of nodes for each training batch construction. Nonetheless, inverse timespan sampling can help capturing the more recent interactions which may be more useful for certain tasks. Therefore, we suggest to choose the neighborhood dropout method according to the specific use cases.
|
md/train/rJgSk04tDH/rJgSk04tDH.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WHY DOES HIERARCHY (SOMETIMES) WORK SO WELL IN REINFORCEMENT LEARNING?
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Hierarchical reinforcement learning has demonstrated significant success at solving difficult reinforcement learning (RL) tasks. Previous works have motivated the use of hierarchy by appealing to a number of intuitive benefits, including learning over temporally extended transitions, exploring over temporally extended periods, and training and exploring in a more semantically meaningful action space, among others. However, in fully observed, Markovian settings, it is not immediately clear why hierarchical RL should provide benefits over standard “shallow” RL architectures. In this work, we isolate and evaluate the claimed benefits of hierarchical RL on a suite of tasks encompassing locomotion, navigation, and manipulation. Surprisingly, we find that most of the observed benefits of hierarchy can be attributed to improved exploration, as opposed to easier policy learning or imposed hierarchical structures. Given this insight, we present exploration techniques inspired by hierarchy that achieve performance competitive with hierarchical RL while at the same time being much simpler to use and implement.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Many real-world tasks may be decomposed into natural hierarchical structures. To navigate a large building, one first needs to learn how to walk and turn before combining these behaviors to achieve robust navigation; to wash dishes, one first needs to learn basic object grasping and handling before composing a sequence of these primitives to successfully clean a collection of plates. Accordingly, hierarchy is an important topic in the context of reinforcement learning (RL), in which an agent learns to solve tasks from trial-and-error experience, and the use of hierarchical reinforcement learning (HRL) has long held the promise to elevate the capabilities of RL agents to more complex tasks (Dayan & Hinton, 1993; Schmidhuber, 1993; Parr & Russell, 1998; Barto & Mahadevan, 2003).
|
| 12 |
+
|
| 13 |
+
Recent work has made much progress towards delivering on this promise (Levy et al., 2017; Frans et al., 2018; Vezhnevets et al., 2017; Nachum et al., 2019). For example, Nachum et al. (2018a;b; 2019) use HRL to solve both simulated and real-world quadrupedal manipulation tasks, whereas state-of-the-art non-hierarchical methods are shown to make negligible progress on the same tasks. Levy et al. (2017) demonstrate similar results on complex navigation tasks, showing that HRL can find good policies with $3 { - } 5 \mathrm { x }$ fewer environment interactions than non-hierarchical methods.
|
| 14 |
+
|
| 15 |
+
While the empirical success of HRL is clear, the underlying reasons for this success are more difficult to explain. Prior works have motivated the use of HRL with a number of intuitive arguments: high-level actions are proposed at a lower temporal frequency than the atomic actions of the environment, effectively shortening the length of episodes; high-level actions often correspond to more semantically meaningful behaviors than the atomic actions of the environment, so both exploration and learning in this high-level action space is easier; and so on. These claims are easy to understand intuitively, and some may even be theoretically motivated (e.g., shorter episodes are indeed easier to learn; see Strehl et al. (2009); Azar et al. (2017)). On the other hand, the gap between any theoretical setting and the empirical settings in which these hierarchical systems excel is wide. Furthermore, in Markovian systems, there is no theoretical representational benefit to imposing temporally extended, hierarchical structures, since non-hierarchical policies that make a decision at every step can be optimal (Puterman, 2014). Nevertheless, the empirical advantages of hierarchy are self-evident in a number of recent works, which raises the question, why is hierarchy beneficial in these settings? Which of the claimed benefits of hierarchy contribute to its empirical successes?
|
| 16 |
+
|
| 17 |
+
In this work, we answer these questions via empirical analysis on a suite of tasks encompassing locomotion, navigation, and manipulation. We devise a series of experiments to isolate and evaluate the claimed benefits of HRL. Surprisingly, we find that most of the empirical benefit of hierarchy in our considered settings can be attributed to improved exploration. Given this observation, we propose a number of exploration methods that are inspired by hierarchy but are much simpler to use and implement. These proposed exploration methods enable non-hierarchical RL agents to achieve performance competitive with state-of-the-art HRL. Although our analysis is empirical and thus our conclusions are limited to the tasks we consider, we believe that our findings are important to the field of HRL. Our findings reveal that only a subset of the claimed benefits of hierarchy are achievable by current state-of-the-art methods, even on tasks that were previously believed to be approachable only by HRL methods. Thus, more work must be done to devise hierarchical systems that achieve all of the claimed benefits. We also hope that our findings can provide useful insights for future research on exploration in RL. Our findings show that exploration research can be informed by successful techniques in HRL to realize more temporally extended and semantically meaningful exploration strategies.
|
| 18 |
+
|
| 19 |
+
# 2 RELATED WORK
|
| 20 |
+
|
| 21 |
+
Due to its intuitive and biological appeal (Badre & Frank, 2011; Botvinick, 2012), the field of HRL has been an active research topic in the machine learning community for many years. A number of different architectures for HRL have been proposed in the literature (Dayan & Hinton, 1993; Kaelbling, 1993; Parr & Russell, 1998; Sutton et al., 1999; Dietterich, 2000; Florensa et al., 2017; Heess et al., 2017). We consider two paradigms specifically – the options framework (Precup, 2000) and goal-conditioned hierarchies (Nachum et al., 2018b), due to their impressive success in recent work (Frans et al., 2018; Levy et al., 2017; Nachum et al., 2018a; 2019), though an examination of other architectures is an important direction for future research.
|
| 22 |
+
|
| 23 |
+
One traditional approach to better understanding and justifying the use of an algorithm is through theoretical analysis. In tabular environments, there exist bounds on the sample complexity of learning a near-optimal policy dependent on the number of actions and effective episode horizon (Brunskill & Li, 2014). This bound can be used to motivate HRL when the high-level action space is smaller than the atomic action space (smaller number of actions) or the higher-level policy operates at a temporal abstraction greater than one (shorter effective horizon). Previous work has also analyzed HRL (specifically, the options framework) in the more general setting of continuous states (Mann & Mannor, 2014). However, these theoretical statements rely on having access to near-optimal options, which are typically not available in practice. Moreover, while simple synthetic tasks can be constructed to demonstrate these theoretical benefits, it is unclear if any of these benefits actually play a role in empirical successes demonstrated in more complex environments. In contrast, our empirical analysis is specifically devised to isolate and evaluate the observed practical benefits of HRL.
|
| 24 |
+
|
| 25 |
+
Our approach to isolating and evaluating the benefits of hierarchy via empirical analysis is partly inspired by previous empirical analysis on the benefits of options (Jong et al., 2008). Following a previous flurry of research, empirical demonstrations, and claimed intuitive benefits of options in the early $2 0 0 0 ^ { \circ } \mathrm { s }$ , Jong et al. (2008) set out to systematically evaluate these techniques. Similar to our findings, exploration was identified as a key benefit, although realizing this benefit relied on the use of specially designed options and excessive prior knowledge of the task. Most of the remaining observed empirical benefits were found to be due to the use of experience replay (Lin, 1992), and the same performance could be achieved with experience replay alone on a non-hierarchical agent. Nowadays, experience replay is an ubiquitous component of RL algorithms. Moreover, the hierarchical paradigms of today are largely model-free and achieve more impressive practical results than the gridworld tasks evaluated by Jong et al. (2008). Therefore, we present our work as a recalibration of the field’s understanding with regards to current state-of-the-art hierarchical methods.
|
| 26 |
+
|
| 27 |
+
# 3 HIERARCHICAL REINFORCEMENT LEARNING
|
| 28 |
+
|
| 29 |
+
We briefly summarize the HRL methods and environments we evaluate on. We consider the typical two-layer hierarchical design, in which a higher-level policy solves a task by directing one or more lower-level policies. In the simplest case, the higher-level policy chooses a new high-level action every $c$ timesteps.1 In the options framework, the high-level action is a discrete choice, indicating which of $m$ lower-level policies (called options) to activate for the next $c$ steps. In goalconditioned hierarchies, there is a single goal-conditioned lower-level policy, and the high-level action is a continuous-valued goal state which the lower-level is directed to reach.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
Figure 1: We consider four difficult tasks, where the agent (magenta) is a simulated quadrupedal robot. In AntMaze, the agent must navigate to the end of a U-shaped corridor (target given by green arrow); in AntPush, the agent must navigate to the target by first pushing a block obstacle to the right; in AntBlock and AntBlockMaze, the agent must push a small red block to the target location; see Nachum et al. (2018b) for more details. Task success rates are plotted for three HRL algorithms – HIRO (Nachum et al., 2018a), HIRO with goal relabelling (inspired by Levy et al. (2017)), and Options (Frans et al., 2018) – and shallow (non-hierarchical) agents with and without the use of multi-step rewards ( $\stackrel { \cdot } { n }$ -step returns) over 10M training steps, averaged over 5 seeds. In this work, we isolate and evaluate the key properties of hierarchy which yield the stark difference in empirical performance between HRL and non-HRL methods.
|
| 33 |
+
|
| 34 |
+
Lower-level policy training operates differently in each of the HRL paradigms. For the options framework, we follow Bacon et al. (2017); Frans et al. (2018), training each lower-level policy to maximize environment reward. We train $m$ separate Q-value functions to minimize errors,
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\mathcal { E } ( s _ { t } , a _ { t } , R _ { t } , s _ { t + 1 } ) = \left( Q _ { \mathrm { l o } , m } ( s _ { t } , a _ { t } ) - R _ { t } - \gamma Q _ { \mathrm { l o } , m } ( s _ { t + 1 } , \pi _ { \mathrm { l o } , m } ( s _ { t + 1 } ) \right) ^ { 2 } ,
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
over single-step transitions, and the $m$ option policies are learned to maximize this $\mathrm { Q }$ -value $Q _ { \mathrm { l o } , m } \big ( s _ { t } , \pi _ { \mathrm { l o } , m } \big ( s _ { t } \big ) \big )$ . In contrast, for HIRO (Nachum et al., 2018a) and HAC (Levy et al., 2017), the lower-level policy and Q-function are goal-conditioned. That is, a Q-function is learned to minimize errors,
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\mathcal { E } ( s _ { t } , g _ { t } , a _ { t } , r _ { t } , s _ { t + 1 } , g _ { t + 1 } ) = \left( Q _ { \mathrm { l o } } ( s _ { t } , g _ { t } , a _ { t } ) - r _ { t } - \gamma Q _ { \mathrm { l o } } ( s _ { t + 1 } , g _ { t + 1 } , \pi _ { \mathrm { l o } } ( s _ { t + 1 } , g _ { t + 1 } ) ) ^ { 2 } , \right.
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
over single-step transitions, where $g _ { t }$ is the current goal (high-level action updated every $c$ steps) and $r _ { t }$ is an intrinsic reward measuring negative L2 distance to the goal. The lower-level policy is then trained to maximize the Q-value $\bar { Q } _ { \mathrm { l o } } \big ( \bar { s } _ { t } , g _ { t } , \pi _ { \mathrm { l o } } \big ( s _ { t } , g _ { t } \big ) \big )$ .
|
| 47 |
+
|
| 48 |
+
For higher-level training we follow Nachum et al. (2018a); Frans et al. (2018) and train based on temporally-extended $c$ -step transitions $( s _ { t } , g _ { t } , R _ { t : t + c - 1 } , s _ { t + c } )$ , where $g _ { t }$ is a high-level action (discrete identifier for options, goal for goal-conditioned hierarchies) and $\begin{array} { r } { R _ { t : t + c - 1 } = \sum _ { k = 0 } ^ { c - 1 } R _ { t + k } } \end{array}$ is the $c$ -step sum of environment rewards. That is, a $\mathrm { Q }$ -value function is learned to minimize errors,
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\begin{array} { r } { \mathcal { E } ( s _ { t } , g _ { t } , R _ { t : t + c - 1 } , s _ { t + c } ) = ( Q _ { \mathrm { h i } } ( s _ { t } , g _ { t } ) - R _ { t : t + c - 1 } - \gamma Q _ { \mathrm { h i } } ( s _ { t + c } , \pi _ { \mathrm { h i } } ( s _ { t + c } ) ) ) ^ { 2 } . } \end{array}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
In the options framework where high-level actions are discrete, the higher-level policy is simply $\pi _ { \mathrm { h i } } ( s ) : = \arg \operatorname* { m a x } _ { g } Q _ { \mathrm { h i } } ( s , g )$ . In goal-conditioned HRL where high-level actions are continuous, the higher-level policy is learned to maximize the Q-value $Q _ { \mathrm { h i } } ( s , \pi _ { \mathrm { h i } } ( s ) )$ .
|
| 55 |
+
|
| 56 |
+
Note that higher-level training in HRL is distinct from the use of multi-step rewards or $n$ -step returns (Hessel et al., 2018), which proposes to train a non-hierarchical agent with respect to transi
|
| 57 |
+
|
| 58 |
+
tions $( s _ { t } , a _ { t } , R _ { t : t + c _ { \mathrm { r e w } } - 1 } , s _ { t + c _ { \mathrm { r e w } } } )$ ; i.e., the $\mathrm { Q }$ -value of a non-HRL policy is learned to minimize,
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\begin{array} { r } { \mathcal { E } ( s _ { t } , a _ { t } , R _ { t : t + c - 1 } , s _ { t + c } ) = ( Q ( s _ { t } , a _ { t } ) - R _ { t : t + c _ { \mathrm { r e w } } - 1 } - \gamma Q ( s _ { t + c _ { \mathrm { r e w } } } , \pi ( s _ { t + c _ { \mathrm { r e w } } } ) ) ) ^ { 2 } , } \end{array}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
while the policy is learned to choose atomic actions to maximize $Q ( s , \pi ( s ) )$ . In contrast, in HRL both the rewards and the actions $g _ { t }$ used in the $\mathrm { Q }$ -value regression loss are temporally extended. However, as we will see in Section 5.2, the use of multi-step rewards alone can achieve almost all of the benefits associated with hierarchical training (controlling for exploration benefits).
|
| 65 |
+
|
| 66 |
+
For our empirical analysis, we consider four difficult tasks involving simulated robot locomotion, navigation, and object manipulation (see Figure 1). To alleviate issues of goal representation learning in goal-conditioned HRL, we fix the goals to be relative $x , y$ coordinates of the agent, which are a naturally good representation for our considered tasks. We note that this is only done to better control our empirical analysis, and that goal-conditioned HRL can achieve good performance on our considered tasks without this prior knowledge (Nachum et al., 2018b). We present the results of two goal-conditioned HRL methods: HIRO (Nachum et al., 2018a) and HIRO with goal relabelling (inspired by HAC; Levy et al. (2017)) and an options implementation based on Frans et al. (2018) in Figure 1. HRL methods can achieve strong performance on these tasks, while non-hierarchical methods struggle to make any progress at all. In this work, we strive to isolate and evaluate the key properties of HRL which lead to this stark difference.
|
| 67 |
+
|
| 68 |
+
# 4 HYPOTHESES OF THE BENEFITS OF HIERARCHY
|
| 69 |
+
|
| 70 |
+
We begin by listing out the claimed benefits of hierarchical learning. These hypotheses can be organized into several overlapping categories. The first set of hypotheses (H1 and H2 below) rely on the fact that HRL uses temporally extended actions; i.e., the high-level policy operates at a lower temporal frequency than the atomic actions of the environment. The second set (H3 and H4 below) rely on the fact that HRL uses semantically meaningful actions – high-level actions often correspond to more semantic behaviors than the natural low-level atomic actions exposed by the MDP. For example, in robotic navigation, the atomic actions may correspond to torques applied at the robot’s joints, while the high-level actions in goal-conditioned HRL correspond to locations to which the robot might navigate. In options, there are many paradigms which are explicitly designed to achieve better exploration (McGovern & Barto, 2001; Kulkarni et al., 2016; Machado et al., 2017a;b). In the more undirected form of options that we use, it is argued that semantic behaviors naturally arise from unsupervised specialization of behaviors (Frans et al., 2018). The four hypotheses may also be categorized as hierarchical training (H1 and H3) and hierarchical exploration (H2 and H4).
|
| 71 |
+
|
| 72 |
+
(H1) Temporally extended training. High-level actions correspond to multiple environment steps. To the high-level agent, episodes are effectively shorter. Thus, rewards are propagated faster and learning should improve.
|
| 73 |
+
|
| 74 |
+
(H2) Temporally extended exploration. Since high-level actions correspond to multiple environment steps, exploration in the high-level is mapped to environment exploration which is temporally correlated across steps. This way, an HRL agent explores the environment more efficiently. As a motivating example, the distribution associated with a random (Gaussian) walk is wider when the random noise is temporally correlated.
|
| 75 |
+
|
| 76 |
+
(H3) Semantic training. High-level actor and critic networks are trained with respect to semantically meaningful actions. These semantic actions are more correlated with future values, and thus easier to learn, compared to training with respect to the atomic actions of the environment. For example, in a robot navigation task it is easier to learn future values with respect to deltas in x-y coordinates rather than robot joint torques.
|
| 77 |
+
|
| 78 |
+
(H4) Semantic exploration. Exploration strategies (in the simplest case, random action noise) are applied to semantically meaningful actions, and are thus more meaningful than the same strategies would be if applied to the atomic actions of the environment. For example, in a robot navigation task it intuitively makes more sense to explore at the level of x-y coordinates rather than robot joint torques.
|
| 79 |
+
|
| 80 |
+
Due to space constraints, see the Appendix for an additional hypothesis based on modularity.
|
| 81 |
+
|
| 82 |
+
# 5 EXPERIMENTS
|
| 83 |
+
|
| 84 |
+
Our experiments are aimed at studying the hypotheses outlined in the previous section, analyzing which of the intuitive benefits of HRL are actually present in practice. We begin by evaluating the performance of HRL when varying the length of temporal abstraction used for training and exploration (Section 5.1, H1 and H2), finding that although this has some impact on results, it is not enough to account for the stark difference between HRL and non-hierarchical methods observed in Figure 1. We then look at the training hypotheses more closely (Section 5.2, H1 and H3). We find that, controlling for exploration, hierarchical training is only useful so far as it utilizes multi-step rewards, and furthermore the use of multi-step rewards is possible with a non-hierarchical agent. Given this surprising finding, we focus on the exploration question itself (Section 5.3, H2 and H4). We propose two exploration strategies, inspired by HRL, which enable non-hierarchical agents to achieve performance competitive with HRL.
|
| 85 |
+
|
| 86 |
+
# 5.1 EVALUATING THE BENEFITS OF TEMPORAL ABSTRACTION (H1 AND H2)
|
| 87 |
+
|
| 88 |
+
We begin by evaluating the merits of Hypotheses H1 and H2, both of which appeal to the temporally extended nature of high-level actions. In our considered hierarchies, temporal abstraction is a hyperparameter. Each high-level action operates for $c$ environment time steps. Accordingly, the choice of $c$ impacts two main components of learning:
|
| 89 |
+
|
| 90 |
+
• During training, the higher-level policy is trained with respect to temporally extended transitions of the form $( s _ { t } , g _ { t } , R _ { t : t + c - 1 } , s _ { t + c } )$ (see Section 3 for details). • During experience collection, a high-level action is sampled and updated every $c$ steps.
|
| 91 |
+
|
| 92 |
+
The first of these implementation details corresponds to H1 (temporally extended training) while the second corresponds to H2 (temporally extended exploration), and we can vary these two parameters independently to study the two hypotheses separately. Accordingly, we take HIRO, the best performing HRL method from Figure 1, and implement it so that these two instances of temporal abstraction are decoupled into separate choices $c _ { \mathrm { t r a i n } }$ for training horizon and $c _ { \mathrm { e x p l } }$ for experience collection horizon. We evaluate performance across different choices of these two hyperparameters.
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 2: We present the results for different HRL methods while changing the temporal abstraction used for training $( c _ { \mathrm { t r a i n } }$ , top) or the temporal abstraction used for experience collection $\cdot { c _ { \mathrm { e x p l } } }$ , bottom). Average success rates and standard errors are calculated for 5 randomly seeded runs, trained for 10M steps with early stopping. Recall that our HRL baselines use $c _ { \mathrm { t r a i n } } = c _ { \mathrm { e x p l } } = 1 0$ . When varying $c _ { \mathrm { t r a i n } }$ , we find that the choice of horizon matters only so far as $c _ { \mathrm { t r a i n } } > 1$ . For $c _ { \mathrm { e x p l } }$ , while there exists correlation between performance and temporal abstraction, using no temporal abstraction $c _ { \mathrm { e x p l } } = 1 _ { . }$ ) can still make non-negligible progress compared to the shallow policies in Figure 1.
|
| 96 |
+
|
| 97 |
+
The results are presented in Figure 2, showing performance for different values of $c _ { \mathrm { t r a i n } }$ (top) and $c _ { \mathrm { e x p l } }$ (bottom); recall that our baseline HRL method uses $c _ { \mathrm { t r a i n } } = c _ { \mathrm { e x p l } } = 1 0$ . The strongest effect of $c _ { \mathrm { t r a i n } }$ is observed in AntMaze and AntPush, where the difference between $c _ { \mathrm { t r a i n } } = 1$ and $c _ { \mathrm { t r a i n } } > 1$ is crucial to adequately solving these tasks. Otherwise, while there is some noticeable difference between specific choices of $c _ { \mathrm { t r a i n } }$ (as long as $c _ { \mathrm { t r a i n } } > 1$ ), there is no clear pattern suggesting that a larger value of $c _ { \mathrm { t r a i n } }$ is better.
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 3: We evaluate and compare the performance of training a non-hierarchical shadow agent trained on experience collected by a hierarchical agent, thus disentangling the potential benefits of HRL for exploration from the potential benefits of HRL for training. In all environments except AntMaze, the shadow agent can achieve performance competitive with HRL, given an appropriate multi-step reward horizon $_ { c _ { \mathrm { r e w } } } = 3$ performs best). Overall, this suggests that the effect of hierarchy on ease of training (as opposed to exploration) is modest, and can mostly be replicated by a non-hierarchical agent given good experience and the use of multi-step rewards.
|
| 101 |
+
|
| 102 |
+
For $c _ { \mathrm { e x p l } }$ , the effect seems slightly stronger. In AntMaze, there is no observed effect, while in AntPush, AntBlock, and AntBlockMaze there exists some correlation suggesting higher values of $c _ { \mathrm { e x p l } }$ do yield better performance. Even so, $c _ { \mathrm { e x p l } } = 1$ is often able to make non-negligible progress towards adequately solving the tasks, as compared to a non-hierarchical shallow policy (Figure 1).
|
| 103 |
+
|
| 104 |
+
Overall, these results provide intriguing insights into the impact of temporally abstracted training and exploration. While temporally extended training appears to help on these tasks, it is enough to have $c _ { \mathrm { t r a i n } } > 1$ . Temporally extended exploration appears to have a stronger effect, although it alone does not adequately explain the difference between an HRL agent that can solve the task and a non-hierarchical one that cannot make any progress. Where then does the benefit come from? In the next sections, we will delve deeper into the impact of hierarchy on training and exploration.
|
| 105 |
+
|
| 106 |
+
# 5.2 EVALUATING THE BENEFITS OF HIERARCHICAL TRAINING (H1 AND H3)
|
| 107 |
+
|
| 108 |
+
The previous section suggested that temporally extended training (H1) has at most a modest impact on the performance of HRL. In this section, we take a closer look at the benefits of hierarchy on training and study Hypothesis H3, which suggests that high-level actions used by HRL are easier for learning as compared to the atomic actions of the MDP. In goal-conditioned hierarchies for example, H3 claims that it is easier for RL to learn policy and value functions based on delta x-y commands (goals), than it is to learn policy and value functions based on atomic joint-torque actions exposed by the environment. In this section we aim to isolate this supposed benefit from other confounding factors, such as potential exploration benefits. Therefore, we devise an experiment to disentangle exploration from action representation, by training a standard non-hierarchical agent (a shadow agent) on experience collected by a hierarchical agent. If the benefits of HRL stem primarily from exploration, we would expect the shadow agent to do well; if representation of high-level actions matters for training, we would expected HRL to do better.
|
| 109 |
+
|
| 110 |
+
Accordingly, we augment our HRL implementation (specifically, HIRO) with an additional parallel shadow agent, represented by a standard single-level policy and value function. Each agent – the HRL agent and the non-hierarchical shadow agent – has its own replay buffer and collects its own experience from the environment. During training, we train the HRL agent as usual, while the shadow agent is trained on batches of experience gathered from both replay buffers ( $70 \%$ from the shadow agent’s experience and $30 \%$ from the HRL agent’s experience, chosen based on appropriate tuning). This way, any need for exploration is fulfilled by the experience gathered by the HRL agent. Will the non-hierarchical agent’s policy still be able to learn? Or does training with a higher-level that uses semantically meaningful high-level actions make learning easier?
|
| 111 |
+
|
| 112 |
+
We present the results of our experiments in Figure 3. While the potential impacts of Hypotheses H2 and H4 (exploration) are neutralized by our setup, the impact of Hypothesis H1 (which Section 5.1 showed has a modest impact) still remains. As an attempt to control for this factor, we also consider a setup where the non-hierarchical shadow agent receives multi-step rewards (see Section 3 for an overview of multi-step rewards). Different temporal extents for the multi-step rewards are indicated by $c _ { \mathrm { r e w } }$ in the figure legend.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 4: We compare the performance of HRL to Explore & Exploit (E&E) and Switching Ensemble (SE) – two non-hierarchical exploration methods that make use of HRL-inspired temporally extended modulation of behaviors (length of modulation given by $c _ { \mathrm { s w i t c h } } .$ ). We find that the nonhierarchical methods are able to match the performance of HRL on these tasks (with the only exceptions being Explore & Exploit on AntBlockMaze and Switching Ensemble on AntPush), suggesting that exploration is the key to success on these tasks. These results also make clear the importance of temporally extended exploration; using $c _ { \mathrm { s w i t c h } } > 1$ is almost always better than $c _ { \mathrm { s w i t c h } } = 1$ .
|
| 116 |
+
|
| 117 |
+
The results in Figure 3 show that learning from atomic actions, without higher-level action representations, is feasible, and can achieve similar performance as HRL. On AntMaze, we observe a slight drop in performance, but otherwise performance is competitive with HRL. The results across different multi-step reward horizons $c _ { \mathrm { r e w } }$ also provide further insight into the conclusions of Section 5.1. As suggested by the results of Section 5.1, temporally abstracted training does affect performance, especially for AntMaze and AntPush. Still, while temporally abstracted training is important, these results show that the same benefit can be achieved by simply using multi-step rewards (which are much simpler to implement than using temporally extended actions). To confirm that multi-step rewards are not the only component necessary for success, see Figure 1, in which a non-hierarchical shallow agent with multi-step rewards is unable to make non-negligible progress on these tasks.
|
| 118 |
+
|
| 119 |
+
Overall, we conclude that the high-level action representations used by HRL methods in our domains are not a core factor for the success of these methods, outside of their potential benefits for exploration. The only observed benefit of high-level action representations in training is due to the use of multi-step rewards, and this can be easily incorporated into non-hierarchical agent training.
|
| 120 |
+
|
| 121 |
+
# 5.3 EVALUATING THE BENEFITS OF HIERARCHICAL EXPLORATION
|
| 122 |
+
|
| 123 |
+
The findings of the previous section show that training a non-hierarchical agent on ‘good’ experience (from a hierarchical agent) performs about as well as the hierarchical agent itself. If representing the policy and value function in terms of temporally extended, abstract actions is not crucial to achieving good performance, the next most-likely explanation is that the ‘good’ experience itself is the key. That is, good exploration is the key component to the success of HRL. This is the claim proposed by Hypotheses H2 (temporally extended exploration) and H4 (semantic exploration). In this section, we attempt to extend the experiments presented in Section 5.1 to better understand the impact of good exploration on the performance of a non-hierarchical agent. We will show that it is possible to enable non-hierarchical agents to achieve results competitive with HRL by using two exploration methods inspired by HRL: Explore & Exploit and Switching Ensemble.
|
| 124 |
+
|
| 125 |
+
Explore & Exploit is inspired by the hypothesis that goal-reaching is a good exploration strategy independent of hierarchy (Baranes & Oudeyer, 2010). Thus, we propose training two non-hierarchical agents – one trained to maximize environment rewards (similar to the higher-level policy in HRL), and the other trained to reach goals (similar to the lower-level policy in goal-conditioned HRL). Unlike in HRL, each policy operates on the atomic actions of the environments, and the goal for the explore agent is sampled randomly according to an Ornstein-Uhlenbeck process2 (standard deviation 5 and damping 0.8) as opposed to a learned policy. During experience collection, we randomly switch between the explore and exploit agents every $c _ { \mathrm { s w i t c h } }$ timesteps. Specifically, every cswitch steps we randomly sample one of the two agents (with probability $0 . 2 , 0 . 8$ for the explore and exploit agents, respectively), and this chosen agent is used for sampling the subsequent $c _ { \mathrm { s w i t c h } }$ atomic actions. Both agents share the same replay buffer for training. In this way, we preserve the benefits of goal-directed exploration – temporally extended and based on goal-reaching in a semantically meaningful space – without explicit hierarchies of policies.
|
| 126 |
+
|
| 127 |
+
Our other proposed exploration method, Switching Ensemble, is inspired by the options framework, in which multiple lower-level policies interact to solve a task based on their shared experience. We propose a simple variant of this approach that removes the higher-level policy. We train multiple (specifically, five) non-hierarchical agents to maximize environment rewards. During experience collection, we choose one of these agents uniformly at random every $c _ { \mathrm { s w i t c h } }$ timesteps. This way, we again maintain the spirit of exploration used in HRL – temporally extended and based on multiple interacting agents – while avoiding the use of explicit hierarchies of policies. This approach is related to the use of randomized value functions for exploration (Osband et al., 2014; 2016; Plappert et al., 2017; Fortunato et al., 2017) and may have a Bayesian interpretation (Gal & Ghahramani, 2016), although our proposal is unique for having a mechanism $( c _ { \mathrm { s w i t c h } } )$ to control the temporally extended nature of the exploration. For both of these methods, we utilize multi-step environment rewards $c _ { \mathrm { r e w } } = 3$ ), which we found to work well in Section 5.2 (Figure 3).
|
| 128 |
+
|
| 129 |
+
Our findings are presented in Figure 4. We find that the proposed alternatives are able to achieve performance similar to HRL, with the only exceptions being Explore & Exploit on AntBlockMaze and Switching Ensemble on AntPush. Overall, these methods are able to bridge the gap in empirical performance between HRL and non-hierarchical methods from Figure 1, confirming the importance of good exploration on these tasks. Notably, these results show the benefit of temporally extended exploration even for non-hierarchical agents – using $c _ { \mathrm { s w i t c h } } > 1$ is often significantly better than using $c _ { \mathrm { s w i t c h } } = 1$ (switching the agent every step). Furthermore, the good performance of Explore & Exploit suggests that semantic exploration (goal-reaching) is beneficial, and likely plays an important role in the success of goal-conditioned HRL methods. The success of Switching Ensemble further shows that an explicit higher-level policy used to direct multiple agents is not necessary in these environments.
|
| 130 |
+
|
| 131 |
+
Overall, these results suggest that the success of HRL on these tasks is largely due to better exploration. That is, goal-conditioned and options-based hierarchies are better at exploring these environments as opposed to discovering high-level representations which make policy and value function training easier. Furthermore, these benefits can be achieved without explicit hierarchies of policies. Indeed, the results of Figure 4 show that non-hierarchical agents can achieve similar performance as state-of-the-art HRL, as long as they (1) use multi-step rewards in training and (2) use temporallyextended exploration (based on either goal-reaching or randomized value functions).
|
| 132 |
+
|
| 133 |
+
Beyond the core analysis in our experiments, we also studied the effects of modularity – using separate networks to represent higher and lower-level policies. Due to space constraints, these results are presented in the Appendix. These experiments confirm that the use of separate networks is beneficial for HRL. We further confirm that using separate networks for the Explore & Exploit and Switching Ensemble methods is crucial for their effectiveness.
|
| 134 |
+
|
| 135 |
+
# 6 DISCUSSION AND CONCLUSION
|
| 136 |
+
|
| 137 |
+
Looking back at the initial set of hypotheses from Section 4, we can draw a number of conclusions based on our empirical analysis. In terms of the benefits of training, it is clear that training with respect to semantically meaningful abstract actions (H3) has a negligible effect on the success of HRL (as seen from our shadow experiments; Figure 3). Moreover, temporally extended training (H1) is only important insofar as it enables the use of multi-step rewards, as opposed to training with respect to temporally extended actions (Figure 3). The main, and arguably most surprising, benefit of hierarchy is due to exploration. This is evidenced by the fact that temporally extended goal-reaching and agent-switching can enable non-hierarchical agents to solve tasks that otherwise can only be solved, in our experiments, by hierarchical agents (Figure 4). These results suggest that the empirical effectiveness of hierarchical agents simply reflects the improved exploration that these agents can attain.
|
| 138 |
+
|
| 139 |
+
Figure 5: A summary of our conclusions on the benefits of hierarchy.
|
| 140 |
+
|
| 141 |
+
<table><tr><td rowspan=1 colspan=1>Hypothesis</td><td rowspan=1 colspan=1>Experiments</td><td rowspan=1 colspan=1>Important?</td></tr><tr><td rowspan=1 colspan=1>(H1) Temporal training</td><td rowspan=1 colspan=1>Figures 2, 3</td><td rowspan=1 colspan=1>Yes, but only for the use ofmulti-step rewards (n-step returns).</td></tr><tr><td rowspan=1 colspan=1>(H2) Temporal exploration</td><td rowspan=1 colspan=1>Figures 2, 4</td><td rowspan=1 colspan=1>Yes,and this is important even fornon-hierarchical exploration.</td></tr><tr><td rowspan=1 colspan=1>(H3) Semantic training</td><td rowspan=1 colspan=1>Figure 3</td><td rowspan=1 colspan=1>No.</td></tr><tr><td rowspan=1 colspan=1>(H4) Semantic exploration</td><td rowspan=1 colspan=1>Figure 4</td><td rowspan=1 colspan=1>Yes,and this is important even fornon-hierarchical exploration.</td></tr></table>
|
| 142 |
+
|
| 143 |
+
These conclusions suggest several future directions. First, our results show that current state-of-theart HRL methods only achieve a subset of their claimed benefits. More research needs to be done to fully realize all of the benefits, especially with respect to semantic and temporally extended training. Second, our results suggest that hierarchy can be used as an inspiration for better exploration methods, and we encourage future work to investigate more variants of the non-hierarchical exploration strategies we proposed.
|
| 144 |
+
|
| 145 |
+
Still, our empirical analysis has limitations. Our results and conclusions are restricted to a limited set tasks and hierarchical designs. The use of other hierarchical designs may lead to different conclusions. Additionally, conclusions may be different for different task settings. For example, the use of hierarchy in multi-task settings may be beneficial for better transfer, a benefit that we did not evaluate. In addition, tasks with more complex environments and/or sparser rewards may benefit from other mechanisms for encouraging exploration (e.g., count-based exploration), which would be a complementary investigation to this study. An examination of different hierarchical structures and more varied settings is an important direction for future research.
|
| 146 |
+
|
| 147 |
+
# REFERENCES
|
| 148 |
+
|
| 149 |
+
Mohammad Gheshlaghi Azar, Ian Osband, and Remi Munos. Minimax regret bounds for reinforce- ´ ment learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 263–272. JMLR. org, 2017.
|
| 150 |
+
Pierre-Luc Bacon, Jean Harb, and Doina Precup. The option-critic architecture. In AAAI, pp. 1726– 1734, 2017.
|
| 151 |
+
David Badre and Michael J Frank. Mechanisms of hierarchical reinforcement learning in cortico– striatal circuits 2: Evidence from fmri. Cerebral cortex, 22(3):527–536, 2011.
|
| 152 |
+
Adrien Baranes and Pierre-Yves Oudeyer. Intrinsically motivated goal exploration for active motor learning in robots: A case study. In 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 1766–1773. IEEE, 2010.
|
| 153 |
+
Andrew G Barto and Sridhar Mahadevan. Recent advances in hierarchical reinforcement learning. Discrete Event Dynamic Systems, 13(4):341–379, 2003.
|
| 154 |
+
Matthew Michael Botvinick. Hierarchical reinforcement learning and decision making. Current opinion in neurobiology, 22(6):956–962, 2012.
|
| 155 |
+
Emma Brunskill and Lihong Li. Pac-inspired option discovery in lifelong reinforcement learning. In International conference on machine learning, pp. 316–324, 2014.
|
| 156 |
+
Peter Dayan and Geoffrey E Hinton. Feudal reinforcement learning. In Advances in neural information processing systems, pp. 271–278, 1993.
|
| 157 |
+
|
| 158 |
+
Thomas G Dietterich. Hierarchical reinforcement learning with the maxq value function decomposition. Journal of Artificial Intelligence Research, 13:227–303, 2000.
|
| 159 |
+
|
| 160 |
+
Carlos Florensa, Yan Duan, and Pieter Abbeel. Stochastic neural networks for hierarchical reinforcement learning. arXiv preprint arXiv:1704.03012, 2017.
|
| 161 |
+
|
| 162 |
+
Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, et al. Noisy networks for exploration. arXiv preprint arXiv:1706.10295, 2017.
|
| 163 |
+
|
| 164 |
+
Kevin Frans, Jonathan Ho, Xi Chen, Pieter Abbeel, and John Schulman. Meta learning shared hierarchies. International Conference on Learning Representations (ICLR), 2018.
|
| 165 |
+
|
| 166 |
+
Scott Fujimoto, Herke van Hoof, and Dave Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
|
| 167 |
+
|
| 168 |
+
Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059, 2016.
|
| 169 |
+
|
| 170 |
+
Nicolas Heess, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, Ali Eslami, Martin Riedmiller, et al. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017.
|
| 171 |
+
|
| 172 |
+
Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 173 |
+
|
| 174 |
+
Nicholas K Jong, Todd Hester, and Peter Stone. The utility of temporal abstraction in reinforcement learning. In Proceedings of the 7th international joint conference on Autonomous agents and multiagent systems-Volume 1, pp. 299–306. International Foundation for Autonomous Agents and Multiagent Systems, 2008.
|
| 175 |
+
|
| 176 |
+
Leslie Pack Kaelbling. Hierarchical learning in stochastic domains: Preliminary results. In Proceedings of the tenth international conference on machine learning, volume 951, pp. 167–173, 1993.
|
| 177 |
+
|
| 178 |
+
Tejas D Kulkarni, Karthik Narasimhan, Ardavan Saeedi, and Josh Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in neural information processing systems, pp. 3675–3683, 2016.
|
| 179 |
+
|
| 180 |
+
Andrew Levy, Robert Platt, and Kate Saenko. Hierarchical actor-critic. arXiv preprint arXiv:1712.00948, 2017.
|
| 181 |
+
|
| 182 |
+
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
|
| 183 |
+
|
| 184 |
+
Long-Ji Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8(3-4):293–321, 1992.
|
| 185 |
+
|
| 186 |
+
Marios C Machado, Marc G Bellemare, and Michael Bowling. A laplacian framework for option discovery in reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2295–2304. JMLR. org, 2017a.
|
| 187 |
+
|
| 188 |
+
Marlos C Machado, Clemens Rosenbaum, Xiaoxiao Guo, Miao Liu, Gerald Tesauro, and Murray Campbell. Eigenoption discovery through the deep successor representation. arXiv preprint arXiv:1710.11089, 2017b.
|
| 189 |
+
|
| 190 |
+
Timothy Mann and Shie Mannor. Scaling up approximate value iteration with options: Better policies with fewer iterations. In International conference on machine learning, pp. 127–135, 2014.
|
| 191 |
+
|
| 192 |
+
Amy McGovern and Andrew G Barto. Automatic discovery of subgoals in reinforcement learning using diverse density. 2001.
|
| 193 |
+
|
| 194 |
+
Ofir Nachum, Shane Gu, Honglak Lee, and Sergey Levine. Data-efficient hierarchical reinforcement learning. NeurIPS, 2018a.
|
| 195 |
+
Ofir Nachum, Shixiang Gu, Honglak Lee, and Sergey Levine. Near-optimal representation learning for hierarchical reinforcement learning. arXiv preprint arXiv:1810.01257, 2018b.
|
| 196 |
+
Ofir Nachum, Michael Ahn, Hugo Ponte, Shixiang Gu, and Vikash Kumar. Multi-agent manipulation via locomotion using hierarchical sim2real. arXiv preprint arXiv:1908.05224, 2019.
|
| 197 |
+
Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized value functions. arXiv preprint arXiv:1402.0635, 2014.
|
| 198 |
+
Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped dqn. In Advances in neural information processing systems, pp. 4026–4034, 2016.
|
| 199 |
+
Ronald Parr and Stuart J Russell. Reinforcement learning with hierarchies of machines. In Advances in neural information processing systems, pp. 1043–1049, 1998.
|
| 200 |
+
Matthias Plappert, Rein Houthooft, Prafulla Dhariwal, Szymon Sidor, Richard Y Chen, Xi Chen, Tamim Asfour, Pieter Abbeel, and Marcin Andrychowicz. Parameter space noise for exploration. arXiv preprint arXiv:1706.01905, 2017.
|
| 201 |
+
Doina Precup. Temporal abstraction in reinforcement learning. University of Massachusetts Amherst, 2000.
|
| 202 |
+
Martin L Puterman. Markov Decision Processes.: Discrete Stochastic Dynamic Programming. John Wiley & Sons, 2014.
|
| 203 |
+
Jurgen Schmidhuber. Planning simple trajectories using neural subgoal generators. In ¨ From Animals to Animats 2: Proceedings of the Second International Conference on Simulation of Adaptive Behavior, volume 2, pp. 196. MIT Press, 1993.
|
| 204 |
+
Alexander L Strehl, Lihong Li, and Michael L Littman. Reinforcement learning in finite mdps: Pac analysis. Journal of Machine Learning Research, 10(Nov):2413–2444, 2009.
|
| 205 |
+
Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 112(1-2):181– 211, 1999.
|
| 206 |
+
Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. arXiv preprint arXiv:1703.01161, 2017.
|
| 207 |
+
|
| 208 |
+
# A TRAINING DETAILS
|
| 209 |
+
|
| 210 |
+
We provide a more detailed visualization and description of HRL (Figure 6).
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 6: A diagram showing the structural form of an HRL agent. Every $c$ steps, a higher-level policy $\pi _ { \mathrm { h i } }$ chooses a high-level action $g _ { t }$ . In the options framework, this high-level action is an identifier, choosing which of $m$ options to activate. In goal-conditioned HRL, the high-level action is a goal-state. In either case, a lower-level policy $\pi _ { \mathrm { l o } }$ is used to produce a sequence of atomic actions $a _ { t }$ . After $c$ steps, control is returned to the higher-level policy.
|
| 214 |
+
|
| 215 |
+

|
| 216 |
+
B EVALUATING THE BENEFITS OF MODULARITY
|
| 217 |
+
Figure 7: We evaluate the importance of modularity – in this case, using separate networks for separate policies. We find that using separate networks is consistently better, suggesting that modularity is important for both HRL and HRL-like methods.
|
| 218 |
+
|
| 219 |
+
We evaluate the merits of using modularity in HRL systems. We have already shown in the main text that a non-HRL agent can achieve performance similar to HRL. However, all of these non-HRL agents utilize multiple policies, similar to how HRL agents have separate lower-level and higherlevel policies.
|
| 220 |
+
|
| 221 |
+
Thus, we evaluate how important this modularity is. We evaluate HIRO as well as the successful non-hierarchical methods from Section 5.3 with and without separate networks. Specifically, for HIRO we combine the separate networks for lower and higher-level policies into a single network with multiple heads. For Explore & Exploit and Five Exploit we combine the separate networks for each policy into a single network with multiple heads. The results are presented in Figure 7. We see that combined networks consistently lead to worse performance than structurally separate networks. HIRO and Explore & Exploit are especially sensitive to this change, suggesting that Hypothesis H5 is true for settings using goal-conditioned hierarchy or exploration. Overall, the use of separate networks for goal-reaching and task solving is beneficial to the performance of these methods in these settings.
|
| 222 |
+
|
| 223 |
+
# C EXPERIMENT DETAILS
|
| 224 |
+
|
| 225 |
+
Our implementations are based on the open-source implementation of HIRO (Nachum et al., 2018a), using default hyperparameters. HIRO uses TD3 for policy training (Fujimoto et al., 2018), and so we train all non-hierarchical agents using TD3, with the same network and training hyperparameters as used by HIRO, unless otherwise stated.
|
| 226 |
+
|
| 227 |
+
Since the choice of $c$ in goal-conditioned HRL can also impact low-level training, as the frequency of new goals in recorded experience can affect the quality of the learned low-level behavior. To neutralize this factor in our ablations, we modify transitions $\left( s _ { t } , g _ { t } , a _ { t } , r _ { t } , s _ { t + 1 } , g _ { t + 1 } \right)$ used for lowlevel training by replacing the next goal $g _ { t + 1 }$ with the current goal $g _ { t }$ ; in this way the lower-level policy is trained as if the high-level goal is never changed. This implementation modification has a negligible effect on HRL’s performance with otherwise default settings.
|
| 228 |
+
|
| 229 |
+
To implement HIRO with goal relabelling, we augment the HIRO implementation with hindsight experience replay used for the lower-level policy. To implement Option-Critic (Bacon et al., 2017) in this framework, we create $m = 5$ separate lower-level policies trained to maximize reward (using $n$ -step returns, where $n = 3$ ). We replace the higher-level continuous-action policy with a discrete double DQN-based agent, with $\epsilon$ -greedy exploration $\epsilon = 0 . 5$ ).
|
| 230 |
+
|
| 231 |
+
For our exploration alternatives (Explore & Exploit and Switching Ensemble), we utilize multi-step environment rewards with $c _ { \mathrm { r e w } } = 3$ , which we found to work well in Section 5.2 (see Figure 3). We also found it beneficial to train at a lower frequency: we collect 2 environment steps per each training (gradient descent) step. To keep the comparisons fair, we train these variants for 5M training steps (corresponding to 10M environment steps, equal to that used by HRL).
|
| 232 |
+
|
| 233 |
+
# D ADDITIONAL EXPERIMENTS
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Figure 8: We expand on the results from Figure 3, evaluating and comparing the performance of training a non-hierarchical shadow agent trained on experience collected by a hierarchical agent. Each row shows the results for a specific mixing ratio of experience between the shadow and HRL agents. We see that regardless of the mixing ratio, the conclusions are mostly consistent.
|
| 237 |
+
|
| 238 |
+
Figure 9: Results of running a two-sided t-test on our experimental results. The sign designates the direction of the t-test result; i.e., a negative sign for A vs. B indicates that the mean of the results for A is less than that of B.
|
| 239 |
+
|
| 240 |
+
<table><tr><td rowspan=1 colspan=1>Comparison</td><td rowspan=1 colspan=1>AntMaze</td><td rowspan=1 colspan=1>AntPush</td><td rowspan=1 colspan=1>AntBlock</td><td rowspan=1 colspan=1>AntBlockMaze</td></tr><tr><td rowspan=1 colspan=1>Figure 2, Ctrain = 1 vs. Ctrain = 10</td><td rowspan=1 colspan=1>(-)0.0054</td><td rowspan=1 colspan=1>(-)0.0093</td><td rowspan=1 colspan=1>(-)0.35</td><td rowspan=1 colspan=1>(+)0.78</td></tr><tr><td rowspan=1 colspan=1>Figure 2,Cexpl = 1 vs. Cexpl = 10</td><td rowspan=1 colspan=1>(-)0.78</td><td rowspan=1 colspan=1>(-)0.98</td><td rowspan=1 colspan=1>(-)0.017</td><td rowspan=1 colspan=1>(-)0.025</td></tr><tr><td rowspan=1 colspan=1>Figure 3, HRL vs. shadow with Crew = 3</td><td rowspan=1 colspan=1>(+)0.088</td><td rowspan=1 colspan=1>(-)0.73</td><td rowspan=1 colspan=1>(+)0.73</td><td rowspan=1 colspan=1>(-)0.60</td></tr><tr><td rowspan=1 colspan=1>Figure 3,shadow with Crew = 1 vs. Crew = 3</td><td rowspan=1 colspan=1>(-)0.014</td><td rowspan=1 colspan=1>(-)0.046</td><td rowspan=1 colspan=1>(-)0.022</td><td rowspan=1 colspan=1>(-)0.29</td></tr><tr><td rowspan=1 colspan=1>Figure 4, HRL vs. E&E with Cswitch = 3</td><td rowspan=1 colspan=1>(-)0.099</td><td rowspan=1 colspan=1>(-)0.99</td><td rowspan=1 colspan=1>(-)0.98</td><td rowspan=1 colspan=1>(+)0.50</td></tr><tr><td rowspan=1 colspan=1>Figure 4, HRL vs. SE with Cswitch = 3</td><td rowspan=1 colspan=1>(+)0.15</td><td rowspan=1 colspan=1>(+)0.17</td><td rowspan=1 colspan=1>(+)0.11</td><td rowspan=1 colspan=1>(+)0.21</td></tr><tr><td rowspan=1 colspan=1>Figure 4,E&E with Cswitch = 1 vs. Cswitch = 3</td><td rowspan=1 colspan=1>(-)0.0002</td><td rowspan=1 colspan=1>(-)0.023</td><td rowspan=1 colspan=1>(-)0.35</td><td rowspan=1 colspan=1>(+)0.29</td></tr><tr><td rowspan=1 colspan=1>Figure 4, SE with Cswitch = 1 vs. Cswitch = 3</td><td rowspan=1 colspan=1>(-)0.018</td><td rowspan=1 colspan=1>(-)0.014</td><td rowspan=1 colspan=1>(-)0.83</td><td rowspan=1 colspan=1>(-)0.33</td></tr></table>
|
md/train/rygkk305YQ/rygkk305YQ.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/rygrBhC5tQ/rygrBhC5tQ.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COMPOSING COMPLEX SKILLS BY LEARNING TRANSITION POLICIES
|
| 2 |
+
|
| 3 |
+
Youngwoon Lee∗, Shao-Hua $\mathbf { S u n ^ { * } }$ , Sriram Somasundaram, Edward S. Hu, Joseph J. Lim
|
| 4 |
+
University of Southern California
|
| 5 |
+
$\{ \mathrm { 1 e e 5 0 ~ \dot { 4 } }$ ,shaohuas,sriramso,hues,limjj}@usc.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Humans acquire complex skills by exploiting previously learned skills and making transitions between them. To empower machines with this ability, we propose a method that can learn transition policies which effectively connect primitive skills to perform sequential tasks without handcrafted rewards. To efficiently train our transition policies, we introduce proximity predictors which induce rewards gauging proximity to suitable initial states for the next skill. The proposed method is evaluated on a set of complex continuous control tasks in bipedal locomotion and robotic arm manipulation which traditional policy gradient methods struggle at. We demonstrate that transition policies enable us to effectively compose complex skills with existing primitive skills. The proposed induced rewards computed using the proximity predictor further improve training efficiency by providing more dense information than the sparse rewards from the environments. We make our environments, primitive skills, and code public for further research at https://youngwoon.github.io/transition.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
While humans are capable of learning complex tasks by reusing previously learned skills, composing and mastering complex skills are not as trivial as sequentially executing those acquired skills. Instead, it requires a smooth transition between skills since the final pose of one skill may not be appropriate to initiate the following one. For example, scoring in basketball with a quick shot after receiving a ball can be decomposed into catching and shooting. However, it is still difficult for beginners who have learned to catch passes and statically shoot. To master this skill, players must practice adjusting their footwork and body into a comfortable shooting pose after catching a pass.
|
| 14 |
+
|
| 15 |
+
Can machines similarly learn new and complex tasks by reusing acquired skills and learning transitions between them? Learning to perform composite and long-term tasks from scratch requires extensive exploration and sophisticated reward design, which can introduce undesired behaviors (Riedmiller et al., 2018). Thus, instead of employing intricate reward functions and learning from scratch, modular methods sequentially execute acquired skills with a rule-based meta-policy, enabling machines to solve complicated tasks (Pastor et al., 2009; Mulling et al., 2013; Andreas et al., 2017). ¨ These modular approaches assume that a task can be clearly decomposed into several subtasks which are smoothly connected to each other. In other words, an ending state of one subtask falls within the set of starting states, initiation set, of the next subtask (Sutton et al., 1999). However, this assumption does not hold in many continuous control problems where a given skill may be executed in starting states not considered during training or designing and thus, fail to achieve its goal.
|
| 16 |
+
|
| 17 |
+
To bridge the gap between skills, we propose a transition policy which learns to smoothly navigate from an ending state of a skill to suitable initial states of the following skill, as illustrated in Figure 1. However, learning a transition policy between skills without reward shaping is difficult as the only available learning signal is the sparse reward for the successful execution of the next skill. Sparse success/failure reward is challenging to learn from due to the temporal credit assignment problem (Sutton, 1984) and the lack of information from failing trajectories. To alleviate these problems, we propose a proximity predictor which outputs the proximity to the initiation set of the next skill and acts as a dense reward function for the transition policy.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Concept of a transition policy. Composing complex skills using primitive skills requires smooth transition between primitive skills since a following primitive skill might not be robust to ending states of the previous one. In this example, the ending states (red circles) of the primitive policy $p _ { \mathrm { j u m p } }$ are not good initial states to execute the following policy $p _ { \mathrm { w a l k } }$ . Therefore, executing $p _ { \mathrm { w a l k } }$ from these states will fail (red arrow). To smoothly connect the two primitive policies, we propose a transition policy which navigates an agent to suitable initial states for $p _ { \mathrm { w a l k } }$ (dashed arrow), leading to a successful execution of $p _ { \mathrm { w a l k } }$ (green arrow).
|
| 21 |
+
|
| 22 |
+
The main contributions of this paper include (1) the concept of learning transition policies to FINALsmoothly connect primitive skills; (2) a novel modular framework with transition policies that is able to compose complex skills by reusing existing skills; and (3) a joint training algorithm with the proximity predictor specifically designed for efficiently training transition policies. This framework is suited for learning complex skills that require sequential execution of acquired primitive skills, which are common for humans yet relatively unexplored in robot learning. Our experiments on simulated environments demonstrate that employing transition policies solves complex continuous control tasks which traditional policy gradient methods struggle at.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Learning continuous control of diverse behaviors in locomotion (Merel et al., 2017; Heess et al., 2017; Peng et al., 2017) and robotic manipulation (Ghosh et al., 2018) is an active research area in reinforcement learning (RL). While some complex tasks can be solved through extensive reward engineering $\mathrm { N g }$ et al., 1999), undesired behaviors often emerge (Riedmiller et al., 2018) when tasks require several different primitive skills. Moreover, training complex skills from scratch is not computationally practical.
|
| 27 |
+
|
| 28 |
+
Real-world tasks often require diverse behaviors and longer temporal dependencies. In hierarchical reinforcement learning, the option framework (Sutton et al., 1999) learns meta actions (options), a series of primitive actions over a period of time. Typically, a hierarchical reinforcement learning framework consists of two components: a high-level meta-controller and low-level controllers. A meta-controller determines the order of subtasks to achieve the final goal and chooses corresponding low-level controllers that generate a sequence of primitive actions. Unsupervised approaches to discover meta actions have been proposed (Schmidhuber, 1990; Daniel et al., 2016; Bacon et al., 2017; Vezhnevets et al., 2017; Dilokthanakul et al., 2017; Levy et al., 2017; Frans et al., 2018; Co-Reyes et al., 2018; Mao et al., 2018). However, to deal with more complex tasks, additional supervision signals (Andreas et al., 2017; Merel et al., 2017; Shu et al., 2018) or pre-defined lowlevel controllers (Kulkarni et al., 2016; Oh et al., 2017) are required.
|
| 29 |
+
|
| 30 |
+
To exploit pre-trained modules as low-level controllers, neural module networks (Andreas et al., 2016) have been proposed, which construct a new network dedicated to a given query using a collection of reusable modules. In the RL domain, a meta-controller is trained to follow instructions (Oh et al., 2017) and demonstrations (Xu et al., 2017), and support multi-level hierarchies (Gudimella et al., 2017). In the robotics domain, Pastor et al. (2009); Kober et al. (2010); Mulling et al. (2013) ¨ have proposed a modular approach that learns table tennis by selecting appropriate low-level controllers. On the other hand, Andreas et al. (2017); Frans et al. (2018) learn abstract skills while experiencing a distribution of tasks and then solve a new task with the learned primitive skills. However, these modular approaches result in undefined behavior when two skills are not smoothly connected. Our proposed framework aims to bridge this gap by training transition policies in a model-free manner to navigate the agent from unseen states for following skills to suitable initial states.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Figure 2: Our modular network augmented with transition policies. To perform a complex task, our model repeats the following steps: (1) The meta-policy chooses a primitive policy of index $c _ { \cdot }$ ; (2) The corresponding transition policy helps initiate the chosen primitive policy; (3) The primitive policy executes the skill; and (4) A success or failure signal for the primitive skill is produced.
|
| 34 |
+
|
| 35 |
+
Deep RL techniques for continuous control demand dense reward signals; otherwise, they suffer from long training time. Instead of manual reward shaping for denser reward, adversarial reinforcement learning (Ho & Ermon, 2016; Merel et al., 2017; Wang et al., 2017; Bahdanau et al., 2019) employs a discriminator which learns to judge the state or the policy, and the policy takes as rewards the output of the discriminator. While those methods assume ground truth trajectories or goal states are given, our method collects both success and failure trajectories online to train proximity predictors which provide rewards for transition policies.
|
| 36 |
+
|
| 37 |
+
# 3 APPROACH
|
| 38 |
+
|
| 39 |
+
In this paper, we address the problem of solving a complex task that requires sequential composition of primitive skills given only sparse and binary rewards (i.e. subtask completion reward). The sequential execution of primitive skills fails when two consecutive skills are not smoothly connected. We propose a modular framework with transition policies that learn to make transition between one policy to the subsequent policy, and therefore, can exploit the given primitive skills to compose complex skills. To accelerate training of transition policies, additional networks, proximity predictors, are jointly trained to provide proximity rewards as intermediate feedback to transition policies. In Section 3.2, we describe our framework in details. Next, in Section 3.3, we elaborate how transition policies are efficiently trained with induced proximity reward.
|
| 40 |
+
|
| 41 |
+
# 3.1 PRELIMINARIES
|
| 42 |
+
|
| 43 |
+
We formulate our problem as a Markov decision process defined by a tuple $\{ s , { \mathcal A } , { \mathcal T } , R , \rho , { \gamma } \}$ of states, actions, transition probability, reward, initial state distribution, and discount factor. An action distribution of an agent is represented as a policy $\pi _ { \boldsymbol { \theta } } ( a _ { t } | \boldsymbol { s } _ { t } )$ , where $s _ { t } \in S$ is a state, $a _ { t } \in \mathcal A$ is an action at time $t$ , and $\theta$ are the parameters of the policy. An initial state $s _ { 0 }$ is randomly sampled from $\rho$ , and then, an agent iteratively takes an action $a _ { t }$ sampled from a policy $\pi _ { \boldsymbol { \theta } } { \left( a _ { t } | \boldsymbol { s } _ { t } \right) }$ and receives a reward $r _ { t }$ until the episode ends. The performance of the agent is evaluated based on a discounted return $\begin{array} { r } { R = \sum _ { t = 0 } ^ { T - 1 } \hat { \gamma ^ { t } } r _ { t } } \end{array}$ , where $T$ is the episode horizon.
|
| 44 |
+
|
| 45 |
+
# 3.2 MODULAR FRAMEWORK WITH TRANSITION POLICIES
|
| 46 |
+
|
| 47 |
+
To learn a new task given primitive skills $\{ p _ { 1 } , p _ { 2 } , \dots , p _ { n } \}$ , we design a modular framework that consists of the following components: a meta-policy, primitive policies, and transition policies. The meta-policy chooses a primitive skill $p _ { c }$ to execute at the beginning and whenever the primitive skill is terminated. Prior to running $p _ { c }$ , the transition policy for $p _ { c }$ is executed to bring the current state to a plausible initial state for $p _ { c }$ , and therefore, $p _ { c }$ can be successfully performed. This procedure is repeated to compose complex skills as illustrated in Figure 2 and Algorithm 2.
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 3: Training of transition policies and proximity predictors. After executing a primitive policy, a previously performed transition trajectory is labeled and added to a replay buffer based on the execution success. A proximity predictor is trained on states sampled from the two buffers to output the proximity to the initiation set. The predicted proximity serves as a reward to encourage the transition policy to move toward good initial states for the corresponding primitive policy.
|
| 51 |
+
|
| 52 |
+
We denote the meta-policy as $\pi _ { m e t a } ( p _ { c } | s )$ , where $c \in [ 1 , n ]$ is a primitive policy index. The observation of the meta-policy contains the low-level information of primitives and task specifications indicating high-level goals (e.g. moving direction and target object position). For example, a walking primitive only takes joint information as observation while the meta-policy additionally takes target direction. In this paper, we use a rule-based meta-policy and focus on transitioning between consecutive primitive policies.
|
| 53 |
+
|
| 54 |
+
Once a primitive skill $p _ { c }$ is chosen to be executed, the agent generates an action $a _ { t } \sim \pi _ { p _ { c } } ( a | s _ { t } )$ based on the current state $s _ { t }$ . Note that we did not differentiate state spaces for primitive polices because of the simplicity of notations (e.g. the observation of the jumping primitive contains a distance to a curb while that of the walking primitive only has joint pose and velocities). Every primitive policy is required to generate termination signals $\tau _ { p _ { c } } \in \{ \mathrm { c o n t i n u e } , \mathrm { s u c c e s s } , \mathrm { f a i l } \}$ to indicate policy completion and whether it believes the execution is successful or not. While our method is agnostic to the form of primitive policies (e.g. rule-based, inverse kinematics), we consider the case of a pre-trained neural network in this paper.
|
| 55 |
+
|
| 56 |
+
For smooth transitions between primitive policies, we add a transition policy $\pi _ { \phi _ { c } } ( a | s )$ before executing primitive skill $p _ { c }$ , which guides an agent to $p _ { c }$ ’s initiation set, where $\phi _ { c }$ is the parameters of the transition policy for $p _ { c }$ . Note that the transition policy for $p _ { c }$ is shared across different preceding primitive policies since a successful transition is defined by the success of the following primitive skill $p _ { c }$ . For brevity of notation, we omit the primitive policy index $c$ in the following equations where unambiguous. The transition policy’s state and action space are the same as the primitive policy’s. The transition policy also learns a termination signal $\tau _ { \mathrm { t r a n s } }$ which indicates transition termination to successfully initiate $p _ { c }$ . Our framework contains one transition policy for each primitive skill, in total $n$ transition policies $\left\{ \pi _ { \phi _ { 1 } } , \pi _ { \phi _ { 2 } } , \ldots , \pi _ { \phi _ { n } } \right\}$ .
|
| 57 |
+
|
| 58 |
+
# 3.3 TRAINING TRANSITION POLICIES
|
| 59 |
+
|
| 60 |
+
In our framework, transition policies are trained to make the execution of the corresponding following primitive policies successful. During rollouts, transition trajectories are collected and each trajectory can be naively labeled by the success execution of its corresponding primitive policy. Then, transition policies are trained to maximize the average success of the respective primitive policy. In this scenario, by definition, the only available learning signal for the transition policies is the sparse and binary rewards for the completion of the next task.
|
| 61 |
+
|
| 62 |
+
To alleviate the sparsity of rewards and maximize the objective of moving to viable initial states for the next primitive, we propose a proximity predictor that learns and provides a dense reward, dubbed proximity reward, of how close transition states are to the initiation set of the corresponding primitive $p _ { c }$ as shown in Figure 3. We denote a proximity predictor as $P _ { \omega _ { c } }$ which is parameterized by $\omega _ { c }$ . We define the proximity of a state as the future discounted proximity, $\ v { v } = \delta ^ { s t e p }$ , where step is the number of steps required to reach an initiation set of the following primitive policy. The proximity of a state can also be a linearly discounted function such as $v = 1 - \delta \cdot s t e p$ . We refer the readers to the supplementary for comparison of two proximity functions.
|
| 63 |
+
|
| 64 |
+
The proximity predictor is trained to minimize a mean squared error of proximity prediction:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
L _ { P } ( \omega , \mathcal { B } ^ { S } , \mathcal { B } ^ { F } ) = \frac { 1 } { 2 } \mathbb { E } _ { ( s , v ) \sim \mathcal { B } ^ { S } } [ ( P _ { \omega } ( s ) - v ) ^ { 2 } ] + \frac { 1 } { 2 } \mathbb { E } _ { s \sim \mathcal { B } ^ { F } } [ P _ { \omega } ( s ) ^ { 2 } ] ,
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $B ^ { S }$ and $B ^ { F }$ are collections of states from success and failure transition trajectories, respectively. To estimate the proximity to an initiation set, $B ^ { S }$ contains not only the state that directly leads to the success of the following primitive policy, but also the intermediate states of the successful trajectories with its proximity. By minimizing this objective, given a state, the proximity predictor is learned to predict 1 if the state is in the initiation set, a value that is between 0 and 1 if the state leads the agent to end up with a desired initial states, and 0 when the state leads to a failure.
|
| 71 |
+
|
| 72 |
+
The goal of a transition policy is to get close to an initiation set which can be formulated as seeking a state $s$ predicted to be in the initiation set by the proximity predictor (i.e. $P _ { \omega } ( s )$ is close to 1). To achieve this goal, the transition policy learns to maximize proximity prediction at the ending state of the transition trajectory $P _ { \omega } ( s _ { T } )$ . In addition to providing reward at the end, we also use the increase of predicted proximity to the initiation set, $\mathsf { \bar { P } } _ { \omega } ( s _ { t + 1 } ) - P _ { \omega } ( s _ { t } )$ , at every timestep as a reward, dubbed proximity reward, to create a denser reward. The transition policy is trained to maximize the expected discounted return:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
R _ { \mathrm { t r a n s } } ( \phi ) = \mathbb { E } _ { ( s _ { 0 } , s _ { 1 } , \ldots , s _ { T } ) \sim \pi _ { \phi } } \Big [ \gamma ^ { T } P _ { \omega } ( s _ { T } ) + \sum _ { t = 0 } ^ { T - 1 } \gamma ^ { t } ( P _ { \omega } ( s _ { t + 1 } ) - P _ { \omega } ( s _ { t } ) ) \Big ] .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
However, in general skill learning scenarios, ground truth states ( $B ^ { S }$ and $B ^ { F }$ ) for training proximity predictors are not available. Hence, the training data for a proximity predictor is obtained online during training its corresponding transition policy. Specifically, we label the states in a transition trajectory as success or failure based on whether the following primitive is successfully executed or not, and add them into the corresponding buffers $B ^ { S }$ or $B ^ { F }$ , respectively. As stated in Algorithm 1, we train transition policies and proximity predictors by alternating between an Adam (Kingma & Ba, 2015) gradient step on $\omega$ to minimize Equation (1) with respect to $P _ { \omega }$ and a PPO (Schulman et al., 2017) step on $\phi$ to maximize Equation (2) with respect to $\pi _ { \phi }$ . We refer readers to the supplementary for further details on training.
|
| 79 |
+
|
| 80 |
+
In summary, we propose to compose complex skills with transition policies that enable smooth transition between previously acquired primitive policies. Specifically, we propose to reward transition policies based on how close the current state is to suitable initial states of the subsequent policy (i.e. initiation set). To provide the proximity of a state, we collect failing and successful trajectories on the fly and train a proximity predictor to predict the proximity.
|
| 81 |
+
|
| 82 |
+
Utilizing the learned proximity predictors and proximity rewards for training transition policies is beneficial in the following perspectives: (1) the dense rewards speed up transition policy training by differentiating failing states from states in a successful trajectory; and (2) the joint training mechanism prevents a transition policy from getting stuck in local optima. Whenever a transition policy gets into a local optimum (i.e. fails the following skill with a high proximity reward), the proximity predictor learns to lower the proximity for the failing transition as those states are added to its failure buffer, escaping the local optimum.
|
| 83 |
+
|
| 84 |
+
# 4 EXPERIMENTS
|
| 85 |
+
|
| 86 |
+
We conducted experiments on two classes of continuous control tasks: robotic manipulation and locomotion. To illustrate the potential of the proposed framework, modular framework with Transition Policies (TP), we designed a set of complex tasks that require agents to utilize diverse primitive skills which are not optimized for smooth composition. All of our environments are simulated in the MuJoCo physics engine (Todorov et al., 2012).
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 4: Tasks and success count curves of our model (blue), TRPO (purple), PPO (magenta), and transition policies (TP) trained on task reward (green) and sparse proximity reward (yellow). Our model achieves the best performance and convergence time. Note that TRPO and PPO are trained 5 times longer than ours with dense rewards since TRPO and PPO do not have primitive skills and learn from scratch. In the success count curves, different temporal scales are used for TRPO and PPO (bottom x-axis) and ours (top $\mathbf { X }$ -axis).
|
| 90 |
+
|
| 91 |
+
# 4.1 BASELINES
|
| 92 |
+
|
| 93 |
+
We evaluate our method to answer how transition policies benefit complex task learning and how joint training with proximity predictors boosts training of transition policies. To investigate the impact of the transition policy, we compared policies learned from dense rewards with our modular framework that only learns from sparse and binary rewards (i.e. subtask completion rewards). Moreover, we conducted ablation studies to dissect each component in the training method of transition polices. To answer these questions, we compare the following methods:
|
| 94 |
+
|
| 95 |
+
• Trust Region Policy Optimization with dense reward (TRPO) represents a state-of-the-art policy gradient method (Schulman et al., 2015), which we use for the standard RL comparison.
|
| 96 |
+
• Proximal Policy Optimization with dense reward (PPO) is another state-of-the-art policy gradient method (Schulman et al., 2017), which is more stable than TRPO with smaller batch sizes.
|
| 97 |
+
• Without transition policies (Without-TP) sequentially executes primitive policies without transition policies and has no learnable components.
|
| 98 |
+
• Transition policies trained on task rewards (TP-Task) represents a modular network augmented with transition policies learned from the sparse and binary reward (i.e. subtask completion reward), whereas our model learns from the dense proximity reward.
|
| 99 |
+
• Transition policies trained on sparse proximity rewards (TP-Sparse) is a variant of our model which has the proximity reward only at the end of the transition trajectory. In contrast, our model learns from dense proximity rewards generated every timestep.
|
| 100 |
+
|
| 101 |
+
Table 1: Success count for robotic manipulation, comparing our method against baselines with or without transition policies (TP). Our method achieves the best performance over both RL baselines and the ablated variants. Each entry in the table represents average success count and standard deviation over 50 runs with 3 random seeds.
|
| 102 |
+
|
| 103 |
+
<table><tr><td></td><td>Reward</td><td>Repetitive picking up</td><td>Repetitive catching</td><td>Serve</td></tr><tr><td>TRPO</td><td>dense</td><td>0.69± 0.46</td><td>4.54 ± 1.21</td><td>0.32 ± 0.47</td></tr><tr><td>PPO</td><td>dense</td><td>0.95 ± 0.53</td><td>4.26 ± 1.63</td><td>0.00± 0.00</td></tr><tr><td>Without TP</td><td>sparse</td><td>0.99±0.08</td><td>1.00 ± 0.00</td><td>0.11 ±0.32</td></tr><tr><td>TP-Task</td><td>sparse</td><td>0.99 ± 0.08</td><td>4.87 ± 0.58</td><td>0.05 ± 0.21</td></tr><tr><td>TP-Sparse</td><td>sparse</td><td>1.52 ± 1.12</td><td>4.88 ± 0.59</td><td>0.92 ± 0.27</td></tr><tr><td>TP-Dense (ours)</td><td>sparse</td><td>4.84 ± 0.63</td><td>4.97 ± 0.33</td><td>0.92 ± 0.27</td></tr></table>
|
| 104 |
+
|
| 105 |
+
• Transition policies trained on dense proximity rewards (TP-Dense, Ours) is our final model where transition policies learn from dense proximity rewards.
|
| 106 |
+
|
| 107 |
+
Initially, we tried comparing baseline methods with our method using only sparse and binary rewards. However, the baselines could not solve any of the tasks due to the complexity and sparse reward of the environments. To provide more competitive comparisons, we engineer dense rewards for baselines (TRPO and PPO) to boost their performance and give baselines 5 times longer training times. We show that transitions with sparse rewards can compete with and even outperform baselines learning from dense rewards. As the performance of TRPO and PPO varies significantly between runs, we train each task with 3 different random seeds and report mean and standard deviation in Figure 4.
|
| 108 |
+
|
| 109 |
+
# 4.2 ROBOTIC MANIPULATION
|
| 110 |
+
|
| 111 |
+
For robotic manipulation, we simulate a Kinova Jaco, a 9 DoF robotic arm with 3 fingers. The agent receives full state information, including the absolute location of external objects. The agent uses joint torque control to perform actions. The results are shown in Figure 4 and Table 1.
|
| 112 |
+
|
| 113 |
+
Pre-trained primitives. There are four pre-trained primitives available: Picking up, Catching, Tossing, and Hitting. Picking up requires the robotic arm to pick up a small block, which is randomly placed on the table. If the box is not picked up after a certain amount of time, the agent fails. Catching learns to catch a block that is thrown towards the arm with random initial position and velocity. The agent fails if it does not catch and stably hold the box for a certain amount of time. Tossing requires the robot to pick up a box, toss it vertically in the air, and land the box at a specified position. Hitting requires the robot to hit a box dropped overhead at a target ball.
|
| 114 |
+
|
| 115 |
+
Repetitive picking up. The Repetitive picking up task requires the agent to complete the Picking up task 5 times. After each successful pick, the box disappears and a new box will be placed randomly on the table again. Our model achieves the best performance and converges the fastest by learning from the proposed proximity reward. With our dense proximity reward at every transition step, we alleviate credit assignment when compared to providing a sparse proximity reward (TP-Sparse) or using a sparse task reward (TP-Task). Conversely, TRPO and PPO with dense rewards take significantly longer to learn and is unable to pick up the second box as the ending pose after the first picking up is too unstable to initialize the next picking up.
|
| 116 |
+
|
| 117 |
+
Repetitive catching. Similar to Repetitive picking up, the Repetitive catching task requires the agent to catch boxes consecutively up to 5 times. In this task, other than the modular network without a transition policy, all baselines are able to eventually learn while our model still learns the fastest. We believe this is because the Catching primitive policy has a larger initiation set and therefore, the sparse reward problem is less severe since random exploration is able to succeed with a higher chance.
|
| 118 |
+
|
| 119 |
+
Serve. Inspired by tennis, Serve requires the robot to toss the ball and hit it at a target. Even with an extensively engineered reward, TRPO and PPO baselines fail to learn because Hitting is not able to learn to cover all terminal states of Tossing (i.e. a set of initial states for Hitting is large which demands longer training time). In contrast, learning to recover from Tossing’s ending states to Hitting’s initiation set is easier for exploration ( $1 1 \%$ of Tossing’s ending states are covered by
|
| 120 |
+
|
| 121 |
+
Table 2: Success count for locomotion, comparing our method against baselines with or without transition policies (TP). Our method outperforms all baselines in Patrol and Obstacle course. In Hurdle, the reward function for TRPO was extensively engineered, which is not directly comparable to our method. Our method outperforms baselines learning from sparse reward, showing the effectiveness of the proposed proximity predictor. Each entry in the table represents average success count and standard deviation over 50 runs with 3 random seeds.
|
| 122 |
+
|
| 123 |
+
<table><tr><td></td><td>Reward</td><td>Patrol</td><td>Hurdle</td><td>Obstacle course</td></tr><tr><td>TRPO</td><td>dense</td><td>1.37 ± 0.52</td><td>4.13 ± 1.54</td><td>0.98 ±1.09</td></tr><tr><td>PPO</td><td>dense</td><td>1.53 ± 0.53</td><td>2.87 ± 1.92</td><td>0.85 ±1.07</td></tr><tr><td>Without TP</td><td>sparse</td><td>1.02 ± 0.14</td><td>0.49 ± 0.75</td><td>0.72 ± 0.72</td></tr><tr><td>TP-Task</td><td>sparse</td><td>1.69 ± 0.63</td><td>1.73 ± 1.28</td><td>1.08 ± 0.78</td></tr><tr><td>TP-Sparse</td><td>sparse</td><td>2.51 ± 1.26</td><td>1.47 ± 1.53</td><td>1.32 ± 0.99</td></tr><tr><td>TP-Dense (Ours)</td><td>sparse</td><td>3.33 ± 1.38</td><td>3.14 ± 1.69 *</td><td>1.90 ± 1.45</td></tr></table>
|
| 124 |
+
|
| 125 |
+
Hitting’s initiation set as can be seen in Table 1), which reduces the complexity of the task. Thus, our method and the sparse proximity reward baseline are both able to solve it. However, the ablated variant trained on task reward shows high success rates at the beginning of training and collapses after 100 iterations. The performance drops because the transition policy tries to solve failure cases by increasing the transition length and it reaches to a point that it hardly gets reward. This result shows that once the policy falls into local optima, it is not able to escape because the policy will never get a sparse task reward. On the other hand, our method is robust to local optima since the jointly learned dense proximity reward provides a learning signal to an agent even though it cannot get a task reward.
|
| 126 |
+
|
| 127 |
+
# 4.3 LOCOMOTION
|
| 128 |
+
|
| 129 |
+
For locomotion, we simulate a 9 DoF planar (2D) bipedal walker. The observation of the agent includes joint position, rotation, and velocity. When the agent needs to interact with objects in the environment, we provide additional input such as distance to the curb and ceiling in front of the agent. The agent uses joint torque control to perform actions. The results are shown in Figure 4 and Table 2.
|
| 130 |
+
|
| 131 |
+
Pre-trained primitives. Forward and Backward require the walker to walk forward and backward with a certain velocity, respectively. Balancing requires the walker to robustly stand still under the random external forces. Jumping requires the walker jump over a randomly located curb and land safely. Crawling requires the walker to crawl under a ceiling. In all the aforementioned scenarios, the walker fails when the height of the walker is lower than a threshold.
|
| 132 |
+
|
| 133 |
+
Patrol (Forward and backward). The Patrol task involves walking forward and backward toward goal points on either side and balancing in between to smoothly change its direction. As illustrated in Figure 4, our method consistently outperforms TRPO, PPO, and ablated baselines in stably walking forward and transitioning to walk backward. The agent trained with dense rewards is not able to consistently switch directions, whereas our model can utilize previously learned primitives including Balancing to stabilize a reversal in velocity.
|
| 134 |
+
|
| 135 |
+
Hurdle (Walking forward and jumping). The Hurdle task requires the agent to walk forward and jump across curbs, which requires a transition between walking and jumping as well as landing the jump to walking forward. As shown in Figure 4, our method outperforms the sparse reward baselines, showing the efficiency our proposed proximity reward. While TRPO with dense rewards can learn this task as well, it requires dense rewards consisting of eight different components to collectively enable TRPO to learn the task. It can be considered as learning both primitive skills and transition between skills from dense rewards. However, the main focus of this paper is to learn a complex task by reusing acquired skills, avoiding an extensive reward design.
|
| 136 |
+
|
| 137 |
+
Obstacle Course (Walking forward, jumping, and crawling). Obstacle Course is the most difficult among the locomotion tasks, where the walker must walk forward, jump across curbs, and crawl underneath ceilings. It requires three different behaviors and transitions between two very different primitive skills: crawling and jumping. Since the task requires significantly different behaviors that are hard to transition between, TRPO fails to learn the task and only tries to crawl toward the curb without attempting to jump. In contrast, our method learns to transition between all pairs of primitive skills and often succeeds in crossing multiple obstacles.
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
Figure 5: Average transition length and average proximity reward of transition trajectories over training on Manipulation (left) and Patrol (right).
|
| 141 |
+
|
| 142 |
+
# 4.4 ABLATION STUDY
|
| 143 |
+
|
| 144 |
+
We conducted additional experiments to understand the contribution of transition policies, proximFINAity predictors, and dense proximity rewards. The modular framework without transition policies (Without-TP) tends to fail the execution of the second skill since the second skill is not trained to cover ending states of the first skill. Especially, in continuous control making a primitive skill that can cover all possible states is very challenging. Transition policies trained from task completion reward (TP-Task) and sparse proximity reward (TP-Sparse) learn to connect consecutive primitives slower because sparse reward is hard to learn from due to the credit assignment problem. On the other hand, our model alleviates the credit assignment problem and learns quickly by giving predicted proximity reward for every transition state-action pair.
|
| 145 |
+
|
| 146 |
+
# .5 TRAINING OF TRANSITION AND PROXIMITY PREDICTOR
|
| 147 |
+
|
| 148 |
+
To investigate how transition polices learn to solve the tasks, we present the lengths of transition trajectories and the obtained proximity rewards during training in Figure 5. For manipulation, we show the results of Repetitive picking up and Repetitive catching. For locomotion, we show Patrol with three different transition policies.
|
| 149 |
+
|
| 150 |
+
The transition policy quickly learns to maximize the proximity reward regardless of the accuracy of the proximity predictor. All the transition policies increase the length while exploring in the beginning, especially for picking up (55 steps) and balance (45 steps). This is because a randomly initialized proximity predictor outputs high proximity for unseen states and a transition policy tries to get a high reward by visiting these states. However, as these failing initial states with high proximity are collected in the failure buffers, the proximity predictor lowers their proximity and the transition policy learns to avoid them. In other words, the transition policy will end up seeking successful states. As transition policies learn to transition to the following skills, the length decreases to get higher proximity rewards earlier.
|
| 151 |
+
|
| 152 |
+
# 4.6 VISUALIZING TRANSITION TRAJECTORY
|
| 153 |
+
|
| 154 |
+
Figure 6a shows two transition trajectories (from $s _ { 0 }$ to $t _ { 0 }$ and $s _ { 1 }$ to $t _ { 1 }$ ) and two-dimensional PCA embedding of the ending states (blue) and initiation states (red) of the Picking up primitive. A transition policy starts from states $s _ { 0 }$ and $s _ { 1 }$ where the previous Picking up primitive is terminated. As can be seen in Figure 6a, the proximity predictor outputs small values for $s _ { 0 }$ and $s _ { 1 }$ since they are far from the initiation set of Picking up primitive. Trajectories in the figure show that as the transition policy moves toward states with higher proximity, and finally ends up with states $t _ { 0 }$ and $t _ { 1 }$ which are in the initiation set of the primitive policy.
|
| 155 |
+
|
| 156 |
+
Figure 6b illustrates PCA embeddings of initiation sets of three primitive skills, Forward (green), Backward (orange), and Balancing (blue). A transition from Forward to Balancing has very long trajectory, but predicted proximity helps the transition policy to reach to an initiation state $t _ { 0 }$ . On the other hand, transitioning between Balancing and Backward only requires 7 steps.
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 6: Visualization of transition trajectories of (a) Repetitive picking up and (b) Patrol. TOP AND BOTTOM ROWS: contain rendered frames of transition trajectories. MIDDLE ROW: contains states extracted from each primitive skill execution projected onto PCA space. The dots connected with lines are extracted from the same transition trajectory, where the marker color indicates the proximity prediction $P ( s )$ . A higher $P ( s )$ value indicates proximity to states suitable for initializing the next primitive skill. LEFT: two picking up transition trajectories demonstrate that the transition policy learns to navigate from terminate states $s _ { 0 }$ and $s _ { 1 }$ to $t _ { 0 }$ and $t _ { 1 }$ . RIGHT: the forward to balance transition moves between the forward and balance state distributions and the balance to backward transition moves from the balancing states close to the backward states.
|
| 160 |
+
|
| 161 |
+
# 5 CONCLUSION
|
| 162 |
+
|
| 163 |
+
In this work, we propose a modular framework with transition policies to empower reinforcement learning agents to learn complex tasks with sparse reward by utilizing prior knowledge. Specifically, we formulate the problem as executing existing primitive skills while smoothly transitioning between primitive skills. To learn transition polices in a sparse reward setting, we propose a proximity predictor which generates dense reward signals and jointly train transition policies and proximity predictors. Our experimental results on robotic manipulation and locomotion tasks demonstrate the effectiveness of employing transition policies. The proposed framework solves complex tasks without reward shaping and outperforms baseline RL algorithms and other ablated baselines.
|
| 164 |
+
|
| 165 |
+
There are many future directions to investigate. Our method is designed to focus on acquiring transition policies that connect a given set of primitive policies under the predefined meta-policy. We believe that joint learning of a meta-policy and transition policies on a new task would make our framework more flexible. Moreover, we made an assumption that successful transition between two consecutive policies should be achievable by random exploration. To alleviate the exploration problem with sparse rewards, our transition policy training can incorporate exploration methods such as count-based exploration bonuses (Bellemare et al., 2016; Martin et al., 2017) and curiositydriven intrinsic reward (Pathak et al., 2017). We also assume our primitive policies return a signal that indicates whether the execution should be terminated or not, similar to Kulkarni et al. (2016); Oh et al. (2017); Le et al. (2018). Learning to assess the successful termination of primitive policies together with learning transition policies is a promising future direction.
|
| 166 |
+
|
| 167 |
+
# ACKNOWLEDGMENTS
|
| 168 |
+
|
| 169 |
+
This project was supported by the center for super intelligence, Kakao Brain, and SKT. The authors would like to thank Yuan-Hong Liao for helpful discussions during initial ideation.
|
| 170 |
+
|
| 171 |
+
# REFERENCES
|
| 172 |
+
|
| 173 |
+
Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2016.
|
| 174 |
+
|
| 175 |
+
Jacob Andreas, Dan Klein, and Sergey Levine. Modular multitask reinforcement learning with policy sketches. In International Conference on Machine Learning, 2017.
|
| 176 |
+
|
| 177 |
+
Pierre-Luc Bacon, Jean Harb, and Doina Precup. The option-critic architecture. In Association for the Advancement of Artificial Intelligence, 2017.
|
| 178 |
+
|
| 179 |
+
Dzmitry Bahdanau, Felix Hill, Jan Leike, Edward Hughes, Pushmeet Kohli, and Edward Grefenstette. Learning to understand goal specifications by modelling reward. In International Conference on Learning Representations, 2019.
|
| 180 |
+
|
| 181 |
+
Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In Advances in Neural Information Processing Systems, 2016.
|
| 182 |
+
|
| 183 |
+
John Co-Reyes, YuXuan Liu, Abhishek Gupta, Benjamin Eysenbach, Pieter Abbeel, and Sergey Levine. Self-consistent trajectory autoencoder: Hierarchical reinforcement learning with trajectory embeddings. In International Conference on Machine Learning, 2018.
|
| 184 |
+
|
| 185 |
+
Christian Daniel, Herke Van Hoof, Jan Peters, and Gerhard Neumann. Probabilistic inference for determining options in reinforcement learning. Machine Learning, 2016.
|
| 186 |
+
|
| 187 |
+
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.
|
| 188 |
+
|
| 189 |
+
Nat Dilokthanakul, Christos Kaplanis, Nick Pawlowski, and Murray Shanahan. Feature control as intrinsic motivation for hierarchical reinforcement learning. In IEEE Transactions on Neural Networks and Learning Systems, 2017.
|
| 190 |
+
|
| 191 |
+
Kevin Frans, Jonathan Ho, Xi Chen, Pieter Abbeel, and John Schulman. Meta learning shared hierarchies. In International Conference on Learning Representations, 2018.
|
| 192 |
+
|
| 193 |
+
Dibya Ghosh, Avi Singh, Aravind Rajeswaran, Vikash Kumar, and Sergey Levine. Divide and conquer reinforcement learning. In International Conference on Learning Representations, 2018.
|
| 194 |
+
|
| 195 |
+
Aditya Gudimella, Ross Story, Matineh Shaker, Ruofan Kong, Matthew Brown, Victor Shnayder, and Marcos Campos. Deep reinforcement learning for dexterous manipulation with concept networks. arXiv preprint arXiv: 1709.06977, 2017.
|
| 196 |
+
|
| 197 |
+
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. arXiv preprint arXiv: 1707.02286, 2017.
|
| 198 |
+
|
| 199 |
+
Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, 2016.
|
| 200 |
+
|
| 201 |
+
Diederick P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.
|
| 202 |
+
|
| 203 |
+
Jens Kober, Katharina Mulling, Oliver Kr ¨ omer, Christoph H Lampert, Bernhard Sch ¨ olkopf, and Jan ¨ Peters. Movement templates for learning of hitting and batting. In International Conference on Robotics and Automation, 2010.
|
| 204 |
+
|
| 205 |
+
Tejas D Kulkarni, Karthik Narasimhan, Ardavan Saeedi, and Josh Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in Neural Information Processing Systems, 2016.
|
| 206 |
+
|
| 207 |
+
Hoang Le, Nan Jiang, Alekh Agarwal, Miroslav Dudik, Yisong Yue, and Hal Daume, III. Hierar- ´ chical imitation and reinforcement learning. In International Conference on Machine Learning, 2018.
|
| 208 |
+
|
| 209 |
+
Andrew Levy, Robert Platt, and Kate Saenko. Hierarchical actor-critic. arXiv preprint arXiv:1712.00948, 2017.
|
| 210 |
+
|
| 211 |
+
Jiayuan Mao, Honghua Dong, and Joseph J. Lim. Universal agent for disentangling environments and tasks. In International Conference on Learning Representations, 2018.
|
| 212 |
+
|
| 213 |
+
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In IEEE International Conference on Computer Vision, 2017.
|
| 214 |
+
|
| 215 |
+
Jarryd Martin, S Suraj Narayanan, Tom Everitt, and Marcus Hutter. Count-based exploration in feature space for reinforcement learning. In Association for the Advancement of Artificial Intelligence, 2017.
|
| 216 |
+
|
| 217 |
+
Josh Merel, Yuval Tassa, Dhruva TB, Sriram Srinivasan, Jay Lemmon, Ziyu Wang, Greg Wayne, and Nicolas Heess. Learning human behaviors from motion capture by adversarial imitation. arXiv preprint arXiv: 1707.02201, 2017.
|
| 218 |
+
|
| 219 |
+
Katharina Mulling, Jens Kober, Oliver Kroemer, and Jan Peters. Learning to select and generalize ¨ striking movements in robot table tennis. International Journal of Robotics Research, 2013.
|
| 220 |
+
|
| 221 |
+
Andrew Y Ng, Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In International Conference on Machine Learning, 1999.
|
| 222 |
+
|
| 223 |
+
Junhyuk Oh, Satinder Singh, Honglak Lee, and Pushmeet Kohli. Zero-shot task generalization with multi-task deep reinforcement learning. In International Conference on Machine Learning, 2017.
|
| 224 |
+
|
| 225 |
+
Peter Pastor, Heiko Hoffmann, Tamim Asfour, and Stefan Schaal. Learning and generalization of motor skills by learning from demonstration. In International Conference on Robotics and Automation, 2009.
|
| 226 |
+
|
| 227 |
+
Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In International Conference on Machine Learning, 2017.
|
| 228 |
+
|
| 229 |
+
Xue Bin Peng, Glen Berseth, KangKang Yin, and Michiel Van De Panne. Deeploco: Dynamic locomotion skills using hierarchical deep reinforcement learning. ACM Transactions on Graphics, 2017.
|
| 230 |
+
|
| 231 |
+
Martin Riedmiller, Roland Hafner, Thomas Lampe, Michael Neunert, Jonas Degrave, Tom van de Wiele, Vlad Mnih, Nicolas Heess, and Jost Tobias Springenberg. Learning by playing solving sparse reward tasks from scratch. In International Conference on Machine Learning, 2018.
|
| 232 |
+
|
| 233 |
+
Jurgen Schmidhuber. Towards compositional learning with dynamic neural networks. 1990. ¨
|
| 234 |
+
|
| 235 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International Conference on Machine Learning, 2015.
|
| 236 |
+
|
| 237 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 238 |
+
|
| 239 |
+
Tianmin Shu, Caiming Xiong, and Richard Socher. Hierarchical and interpretable skill acquisition in multi-task reinforcement learning. In International Conference on Learning Representations, 2018.
|
| 240 |
+
|
| 241 |
+
Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 1999.
|
| 242 |
+
|
| 243 |
+
Richard Stuart Sutton. Temporal credit assignment in reinforcement learning. PhD thesis, University of Massachusetts, Amherst, 1984.
|
| 244 |
+
|
| 245 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems, 2012.
|
| 246 |
+
|
| 247 |
+
Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. In International Conference on Machine Learning, 2017.
|
| 248 |
+
|
| 249 |
+
Ziyu Wang, Josh S Merel, Scott E Reed, Nando de Freitas, Gregory Wayne, and Nicolas Heess. Robust imitation of diverse behaviors. In Advances in Neural Information Processing Systems, 2017.
|
| 250 |
+
|
| 251 |
+
Danfei Xu, Suraj Nair, Yuke Zhu, Julian Gao, Animesh Garg, Li Fei-Fei, and Silvio Savarese. Neural task programming: Learning to generalize across hierarchical tasks. In International Conference on Robotics and Automation, 2017.
|
| 252 |
+
|
| 253 |
+
# A ACQUIRING PRIMITIVE POLICIES
|
| 254 |
+
|
| 255 |
+
The modular framework proposed in this paper allows a primitive policy to be any of a pre-trained neural network, inverse kinematics module, or hard-coded policy. In this paper, we use neural networks trained with TRPO (Schulman et al., 2015) on dedicated environments as primitive policies (see Section C for the details of environments and reward functions). All policy networks we used consists of 2 layers of 32 hidden units with tanh nonlinearities and predicts the mean and standard deviation of a Gaussian distribution over an action space. We trained all primitive policies until the total return converged (up to 10,000 iterations).
|
| 256 |
+
|
| 257 |
+
Given a state, a primitive policy outputs an action as well as a termination signal indicating whether the execution is done and if the skill was successfully performed (see Section C for details on primitive skills and termination conditions).
|
| 258 |
+
|
| 259 |
+
# B TRAINING DETAILS
|
| 260 |
+
|
| 261 |
+
# B.1 IMPLEMENTATION DETAILS
|
| 262 |
+
|
| 263 |
+
For the TRPO and PPO implementation, we used OpenAI baselines (Dhariwal et al., 2017) with default hyperparameters including learning rate, KL penalty, and entropy coefficients unless specified below.
|
| 264 |
+
|
| 265 |
+
<table><tr><td>Hyperparameters</td><td>Transition policy</td><td>Proximity predictor</td><td>Primitive policy</td><td>TRPO</td><td>PPO</td></tr><tr><td>Learning rate</td><td>1e-4</td><td>1e-4</td><td>1e-3 (for critic)</td><td>1e-3 (for critic)</td><td>1e-4</td></tr><tr><td># Mini-batch</td><td>150</td><td>150</td><td>32</td><td>150</td><td>150</td></tr><tr><td>Mini-batch size</td><td>64</td><td>64</td><td>64</td><td>64</td><td>64</td></tr><tr><td>Learning rate decay</td><td>no</td><td>no</td><td>no</td><td>no</td><td>linear decay</td></tr></table>
|
| 266 |
+
|
| 267 |
+
Table 3: Hyperparameter values for transition policy, proximity predictor, and primitive policy as well as TRPO and PPO baselines.
|
| 268 |
+
|
| 269 |
+
For all networks, we use the Adam optimizer with mini-batch size of 64. We use 4 workers for rollout and parameter update. The size of rollout for each update is 10,000 steps. We limit the maximum length of a transition trajectory as 100.
|
| 270 |
+
|
| 271 |
+
# B.2 REPLAY BUFFERS
|
| 272 |
+
|
| 273 |
+
A success buffer $B ^ { S }$ contains states and their proximity to the corresponding initiation set in successful transitions. On the other hand, a failure buffer $B ^ { F }$ contains states in failure transitions. Both the two buffers are FIFO (i.e. new items are added on one end and once a buffer is full, a corresponding number of items are discarded from the opposite end). For all experiments, we use buffers, $| B ^ { S }$ and $B ^ { F }$ , with a capacity of one million states.
|
| 274 |
+
|
| 275 |
+
For efficient training of the proximity predictors, we collect successful trajectories of primitive skills which can be sampled during the training of primitive skills. We run 1,000 episodes for each primitive and put the first $10 \text{‰}$ in trajectories into the success buffer as an initiation set. While initiation sets can be discovered via random exploration, we found that this initialization of success buffers improves the efficiency of training by providing initial training data for the proximity predictors.
|
| 276 |
+
|
| 277 |
+
# B.3 PROXIMITY REWARD
|
| 278 |
+
|
| 279 |
+
Transition policies receive rewards based on the outputs of proximity predictors. Before computing the reward at every time step, we clip the output of the proximity predictor $P$ by $\mathrm { c l i p } ( P ( s ) , 0 , 1 { \bar { ) } }$ which indicates how close the state $s$ is to the initiation set of the following primitive (higher values correspond to closer states). We define the proximity of a state to an initiation set as an exponentially discounted function $\delta ^ { s t e p }$ , where step is the shortest number of timesteps required to get to a state in the initiation set. We use $\delta = 0 . 9 5$ for all experiments. To make the reward denser, for every timestep $t$ , we provide the increase in proximity, $P ( s _ { t + 1 } ) - P ( s _ { t } )$ , as a reward for transition policy.
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
Figure 7: Success count curves of our model with exponentially discounted proximity function and linearly discounted proximity function over training on Obstacle course (left) and Repetitive catching (right).
|
| 283 |
+
|
| 284 |
+
Using a linearly discounted proximity function, $1 - \delta \cdot s t e p$ , is also a valid choice. We compare the two proximity functions on a manipulation task (Repetitive catching) and a locomotion task (Obstacle course), as shown in Figure 7, where $\delta$ for exponential decay and linear decay are 0.95 and 0.01, respectively. The results demonstrate that our model is able to learn well with both proximity functions and they perform similarly.
|
| 285 |
+
|
| 286 |
+
Originally, we opted for the exponential proximity function with the intuition that the faster initial decay near the initiation set would help the policy discriminate successful states from failing states near the initiation set. Also, in our experiments, as we use 0.95 as a decaying factor, the proximity is still reasonably large (e.g., 0.35 for 20 time-steps and 0.07 for 50 time-steps). In this paper, we use the exponential proximity function for all experiments.
|
| 287 |
+
|
| 288 |
+
# B.4 PROXIMITY PREDICTOR
|
| 289 |
+
|
| 290 |
+
A proximity predictor takes a state as input which includes joint state information, joint acceleration, and any task specification, such as ceiling and curb information. A proximity predictor consists of 2 fully connected layers of 96 hidden units with ReLU nonlinearities and predicts the proximity to the initiation set based on the states sampled from the success and failure buffers. Each training iteration consists of 10 epochs over a batch size of 64 and use a learning rate of $1 0 ^ { - 4 }$ . The predictor optimizes the loss in Equation (1), similar to the LSGAN loss (Mao et al., 2017).
|
| 291 |
+
|
| 292 |
+
# B.5 TRANSITION POLICIES
|
| 293 |
+
|
| 294 |
+
An observation space of a transition policy consists of joint state information and joint acceleration. A transition policy consists of 2 fully connected layers of 32 hidden units with tanh nonlinearities and predicts the mean and standard deviation of a Gaussian distribution over an action space. A 2-way softmax layer is followed by the last fully connected layer to predict whether to terminate the current transition or not. We train all transition policies using PPO (Schulman et al., 2017) since PPO is robust on smaller batch sizes and the transition states collected for each update is much smaller than the size of a rollout. Each training iteration consists of 5 epochs over a batch.
|
| 295 |
+
|
| 296 |
+
# Algorithm 1 TRAIN
|
| 297 |
+
|
| 298 |
+
1: Input: Primitive polices $\{ \pi _ { p _ { 1 } } , . . . , \pi _ { p _ { n } } \}$ .
|
| 299 |
+
2: Initialize success buffers $\{ B _ { 1 } ^ { \mathrm { S } } , . . . , B _ { n } ^ { \mathrm { S } } \}$ with successful trajectories of primitive policies.
|
| 300 |
+
3: Initialize failure buffers $\{ B _ { 1 } ^ { \mathrm { F } } , . . . , B _ { n } ^ { \mathrm { F } } \}$ .
|
| 301 |
+
4: Randomly initialize parameters of transition policies $\big \{ \phi _ { 1 } , . . . , \phi _ { n } \big \}$ and proximity predictors $\{ \omega _ { 1 }$ ,
|
| 302 |
+
$\ldots , \omega _ { n } \}$ .
|
| 303 |
+
5: repeat
|
| 304 |
+
6: Initialize rollout buffers $\{ \mathcal { R } _ { 1 } , . . . , \mathcal { R } _ { n } \}$ .
|
| 305 |
+
7: Collect trajectories using ROLLOUT.
|
| 306 |
+
8: for $i = 1$ to $n$ do
|
| 307 |
+
9: Update $P _ { \omega _ { i } }$ to minimize Equation (1) using $B _ { i } ^ { \mathrm { S } }$ and $B _ { i } ^ { \mathrm { F } }$ .
|
| 308 |
+
10: Update $\pi _ { \phi _ { i } }$ to maximize Equation (2) using $\mathcal { R } _ { i }$ .
|
| 309 |
+
11: end for
|
| 310 |
+
12: until convergence
|
| 311 |
+
|
| 312 |
+
# Algorithm 2 ROLLOUT
|
| 313 |
+
|
| 314 |
+
1: Input: Meta policy $\pi _ { \mathrm { m e t a } }$ , primitive policies $\{ \pi _ { p _ { 1 } } , . . . , \pi _ { p _ { n } } \}$ , transition policies $\{ \pi _ { \phi _ { 1 } } , . . . , \pi _ { \phi _ { n } } \}$ ,
|
| 315 |
+
and proximity predictors $\{ P _ { \omega _ { 1 } } , . . . , P _ { \omega _ { n } } \}$ .
|
| 316 |
+
2: Initialize an episode and receive initial state $s _ { 0 }$ .
|
| 317 |
+
3: $t \gets 0$
|
| 318 |
+
4: while episode is not terminated do
|
| 319 |
+
5: $c \sim \bar { \pi } _ { \mathrm { m e t a } } ( s _ { t } )$
|
| 320 |
+
6: Initialize a rollout buffer $\boldsymbol { B }$ .
|
| 321 |
+
7: while episode is not terminated do
|
| 322 |
+
8: $a _ { t } , \tau _ { \mathrm { t r a n s } } \sim \pi _ { \phi _ { c } } ( s _ { t } )$
|
| 323 |
+
9: Terminate the transition policy if $\tau _ { \mathrm { t r a n s } } =$ terminate.
|
| 324 |
+
10: st+1, $\tau _ { \mathrm { e n v } } \gets \mathrm { E N V } ( s _ { t } , a _ { t } )$
|
| 325 |
+
11: $r _ { t } \gets P _ { \omega _ { c } } ( s _ { t + 1 } ) - P _ { \omega _ { c } } ( s _ { t } )$
|
| 326 |
+
12: Store $\left( s _ { t } , a _ { t } , r _ { t } , \tau _ { \mathrm { e n v } } , s _ { t + 1 } \right)$ in $\boldsymbol { B }$
|
| 327 |
+
13: $t \gets t + 1$
|
| 328 |
+
14: end while
|
| 329 |
+
15: while episode is not terminated do
|
| 330 |
+
16: $a _ { t } , \tau _ { p _ { c } } \sim \pi _ { p _ { c } } ( s _ { t } )$
|
| 331 |
+
17: Terminate the primitive policy if $\tau _ { p _ { c } } \neq$ continue.
|
| 332 |
+
18: $\mathbf { \Lambda } _ { t + 1 } ^ { s _ { t + 1 } , \tau _ { \mathrm { e n v } } } \gets \dot { \mathrm { E N V } } ( s _ { t } , a _ { t } )$
|
| 333 |
+
19:
|
| 334 |
+
20: end while
|
| 335 |
+
21: Compute the discounted proximity $v$ of each state $s$ in $\boldsymbol { B }$ .
|
| 336 |
+
22: Add pairs of (s, v) to BSc or BFc according to τpc .
|
| 337 |
+
23: Add $\boldsymbol { B }$ to the rollout buffer $\mathcal { R } _ { c }$ .
|
| 338 |
+
24: end while
|
| 339 |
+
|
| 340 |
+
# B.6 SCALABILITY
|
| 341 |
+
|
| 342 |
+
Each sub-policy requires its corresponding transition policy, proximity predictor, and two buffers. Hence, both the time and memory complexities of our method are linearly dependent on the number of sub-policies. The memory overhead is affordable since a transition policy (2 layers of 32 hidden units), a proximity predictor (2 layers of 96 hidden units), and replay buffers (1M states) are small.
|
| 343 |
+
|
| 344 |
+
# C ENVIRONMENT DESCRIPTIONS
|
| 345 |
+
|
| 346 |
+
For every task, we add a control penalty, $- 0 . 0 0 1 * \| a \| ^ { 2 }$ , to regularize the magnitude of actions where $a$ is a torque action performed by an agent. Note that all measures are in meters, and we omit the measures here for clarity of the presentation.
|
| 347 |
+
|
| 348 |
+
# C.1 ROBOTIC MANIPULATION
|
| 349 |
+
|
| 350 |
+
In object manipulation tasks, a 9-DOF Jaco robotic $\mathrm { a r m } ^ { 1 }$ is used as an agent and a cube with the side length $0 . 0 6 \mathrm { m }$ is used as a target object. We follow the tasks and environment settings proposed in Ghosh et al. (2018). The observation consists of the position of the base of the Jaco arm, joint angles, angular velocities as well as the position, rotation, velocity, and angular velocity of the cube. The action space is a torque control on 9 joints.
|
| 351 |
+
|
| 352 |
+
# C.1.1 REWARD DESIGN AND TERMINATION CONDITION
|
| 353 |
+
|
| 354 |
+
Picking up: In the Picking up task, the position of the box is randomly initialized within a square region of size $0 . 1 \textrm { m } \times 0 . 1 \textrm { m }$ with a center (0.5, 0.2). There is an initial guide reward to guide the arm to the box. There is also an over reward to guide the hand directly over the box. When the arm is not picking up the box, there is a pick reward to incentivize the arm to pick the box up. There is an additional hold reward that makes the arm hold the box in place after picking up. Finally, there is a success reward given after the arm has held the box for 50 frames. The success reward is scaled with number of timesteps to encourage the arm to succeed as quickly as possible.
|
| 355 |
+
|
| 356 |
+
$R ( s ) = \lambda _ { g u i d e }$ ·1Box not picked and Box on ground $+ \lambda _ { p i c k }$ ·1Box in hand and not picked $+ \lambda _ { h o l d }$ ·1Box picked and near hold point
|
| 357 |
+
|
| 358 |
+
$$
|
| 359 |
+
\lambda _ { g u i d e } = 2 , \lambda _ { p i c k } = 1 0 0 , \lambda _ { h o l d } = 0 . 1
|
| 360 |
+
$$
|
| 361 |
+
|
| 362 |
+
Catching: The position of the box is initialized at (0, 2.0, 1.5) and the directional force of size 110 is applied to throw the box toward the agent with randomness $( 0 . 1 \mathrm { m } \times 0 . 1 \mathrm { m } )$ ).
|
| 363 |
+
|
| 364 |
+
Tossing: The box is randomly initialized on the ground at (0.4, 0.3, 0.05) within a $0 . 0 0 5 \times 0 . 0 0 5$ square region. A guide reward is given to guide the arm to the top of the box. A pick reward is then given to lift the box up to a specified release height. A release reward is given if the box is no longer in the hand. A stable reward is given to minimize variation in the box’s x and y direction. An up reward is given while the ball is traveling upwards in air, up until the box hits a specified z height. Finally, a success reward $+ 1 0 0$ is given based on the landing position of the box and the specified landing position.
|
| 365 |
+
|
| 366 |
+
Hitting: The box is randomly initialized overhead the arm at (0.4, 0.3, 1.2) within a $0 . 0 0 5 \times 0 . 0 0 5$ m square region. The box falls and the arm is given a hit reward $+ 1 0$ for hitting the box. Once the box has been hit, a target reward is given based on how close the box is to the target.
|
| 367 |
+
|
| 368 |
+
Repetitive picking up: The Repetitive picking up task has two reward variants. The sparse version gives a reward $+ 1$ for every successful pick. The dense reward version gives a guide reward to the box after each successful pick following the reward for the Picking up task.
|
| 369 |
+
|
| 370 |
+
Repetitive catching: The Repetitive catching task gives a reward $+ 1$ for every successful catch.
|
| 371 |
+
For dense reward, it uses the same reward function with that of the Catching task.
|
| 372 |
+
|
| 373 |
+
Serve: The Serve task gives a toss reward $+ 1$ for a successful toss and a target reward $+ 1$ for successfully hitting the target. The dense reward setting provides the Tossing and Hitting reward according to box position.
|
| 374 |
+
|
| 375 |
+
# C.2 LOCOMOTION
|
| 376 |
+
|
| 377 |
+
A 9-DOF bipedal planar walker is used for simulating locomotion tasks. The observation consists of the position and velocity of the torso, joint angles, and angular velocities. The action space is torque control on the 6 joints.
|
| 378 |
+
|
| 379 |
+
# C.2.1 REWARD DESIGN
|
| 380 |
+
|
| 381 |
+
Different locomotion tasks share many components of reward design, such as velocity, stability, and posture. We use the same form of reward functions, but with different hyperparameters for each task. The basic form of the reward function is as following:
|
| 382 |
+
|
| 383 |
+
$$
|
| 384 |
+
\begin{array} { r l } & { R ( s ) = \lambda _ { v e l } \cdot \mathrm { a b s } ( v _ { x } - v _ { t a r g e t } ) + \lambda _ { a l i v e } - \lambda _ { h e i g h t } \cdot \mathrm { a b s } ( 1 . 1 - m i n ( 1 . 1 , \Delta h ) ) + } \\ & { ~ \lambda _ { a n g l e } \cdot \mathrm { c o s } ( a n g l e ) - \lambda _ { f o o t } ( v _ { r i g h t . f o o t } + v _ { l e f t . f o o t } ) , } \end{array}
|
| 385 |
+
$$
|
| 386 |
+
|
| 387 |
+
where $v _ { x }$ $, v _ { r i g h t . f o o t }$ , and $v _ { l e f t _ { - } f o o t }$ are forward velocity, right foot angular velocity, left foot angular velocity; and $\Delta h$ and angle are the distance between the foot and torso and the angle of the torso, respectively. The foot velocities help the agent to move its feet naturally. $\Delta h$ and angle are used to maintain height of the torso and encourage an upright pose.
|
| 388 |
+
|
| 389 |
+
Forward: The Forward task requires the walker agent to walk forward for 20 meters. To make the agent robust, we apply a random force with arbitrary magnitude and direction to a randomly selected joint every 10 timesteps.
|
| 390 |
+
|
| 391 |
+
$$
|
| 392 |
+
\lambda _ { v e l } = 2 , \lambda _ { a l i v e } = 1 , \lambda _ { h e i g h t } = 2 , \lambda _ { a n g l e } = 0 . 1 , \lambda _ { f o o t } = 0 . 0 1 , \mathrm { ~ a n d ~ } v _ { t a r g e t } = 3
|
| 393 |
+
$$
|
| 394 |
+
|
| 395 |
+
Backward: Similar to Forward, the Backward task requires the walker to walk backward for 20 meters under random forces.
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\lambda _ { v e l } = 2 , \lambda _ { a l i v e } = 1 , \lambda _ { h e i g h t } = 2 , \lambda _ { a n g l e } = 0 . 1 , \lambda _ { f o o t } = 0 . 0 1 , \mathrm { ~ a n d ~ } v _ { t a r g e t } = - 3
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
Balancing: In the Balancing task, the agent learns to balance under strong random forces for 1000 timesteps. Similar to other tasks, the random forces are applied to a random joint every 10 timesteps, but with magnitude 5 times larger.
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
\lambda _ { v e l } = 1 , \lambda _ { a l i v e } = 1 , \lambda _ { h e i g h t } = 0 . 5 , \lambda _ { a n g l e } = 0 . 1 , \lambda _ { f o o t } = 0 , \mathrm { ~ a n d ~ } v _ { t a r g e t } = 0
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Crawling: In the Crawling task, a ceiling of height 1.0 and length 16 is located in front of the agent, and the agent is required to crawl under the ceiling without touching it. If the agent touches the ceiling, we terminate the episode. The task can be completed when the agent passes a point 1.5 after the ceiling and the agent gets 100 additional reward.
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\lambda _ { v e l } = 2 , \lambda _ { a l i v e } = 1 , \lambda _ { h e i g h t } = 0 , \lambda _ { a n g l e } = 0 . 1 , \lambda _ { f o o t } = 0 . 0 1 , \mathrm { ~ a n d ~ } v _ { t a r g e t } = 3
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
Jumping: In the Jumping task, a curb of height 0.4 and length 0.2 is located in front of the walker agent. The observation contains a distance to the curb in addition to the 17-dimensional joint information, where the distance is clipped by 3. The $\mathbf { X }$ location of the curb is randomly chosen from [2.5, 5.5]. In addition to the reward function above, it also gets an additional 100 reward for passing the curb and $2 0 0 \cdot v _ { y }$ when the agent passes the front, middle, and end slices of the curb, where $v _ { y }$ is y-velocity. If the agent touches the curb, the agent gets -10 penalty and the episode is terminated.
|
| 414 |
+
|
| 415 |
+
Patrol: The Patrol task is repetitive running forward and backward between two goals at $x = - 2$ and $x = 2$ . Once the agent touches a goal, the target is changed to another goal and the sparse reward $+ 1$ is given. The dense reward alternates between the reward functions of Forward and Backward. The agent gets the reward of Forward when the agent is heading toward $x = 2$ and gets the reward of Backward, otherwise.
|
| 416 |
+
|
| 417 |
+
Hurdle: The Hurdle environment consists of 5 curbs positioned at $x = \{ 8 , 1 8 , 2 8 , 3 8 , 4 8 \}$ and requires repetitive walking and jumping behaviors. The position of each curb is randomized with a uniformly sampled value from $[ - 0 . 5 , 0 . 5 ]$ . The sparse reward $+ 1$ is given when the agent jumps over a curb (i.e. pass a point 1.5 after a curb).
|
| 418 |
+
|
| 419 |
+
The dense reward for Hurdle is same with Jumping and has 8 reward components to guide the agent to learn the desired behavior. By extensively designing dense rewards, it is possible to solve complex tasks. In comparison, our proposed method learns from sparse reward by re-using prior knowledge and doesn’t require reward shaping.
|
| 420 |
+
|
| 421 |
+
Obstacle Course: The Obstacle Course environment replaces two curbs in Hurdle with a ceiling of height 1.0 and length 3. The sparse reward $+ 1$ is given when the agent jumps over a curb or passes through a ceiling (i.e. pass a point 1.5 after a curb or a ceiling). The dense reward is alternating between Jumping before the curb and Crawling before the ceiling.
|
| 422 |
+
|
| 423 |
+
# C.2.2 TERMINATION SIGNAL
|
| 424 |
+
|
| 425 |
+
Locomotion tasks except Crawling fail if $h < 0 . 8$ and Crawling fails if $h \ : < \ : 0 . 3$ . Forward and Backward tasks are considered as success when the walker reaches to the target or 5 in front of obstacles. Balancing task is considered successful when the agent does not fail for 50 timesteps. The agent succeeds on Jumping and Crawling if the agent passes the obstacles by a distance of 1.5.
|
md/train/ryxO3gBtPB/ryxO3gBtPB.md
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DATASET DISTILLATION
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Model distillation aims to distill the knowledge of a complex model into a simpler one. In this paper, we consider an alternative formulation called dataset distillation: we keep the model fixed and instead attempt to distill the knowledge from a large training dataset into a small one. The idea is to synthesize a small number of data points that do not need to come from the correct data distribution, but will, when given to the learning algorithm as training data, approximate the model trained on the original data. For example, we show that it is possible to compress 60, 000 MNIST training images into just 10 synthetic distilled images (one per class) and achieve close to the original performance, given a fixed network initialization. We evaluate our method in various initialization settings. Experiments on multiple datasets, MNIST, CIFAR10, PASCAL-VOC, and CUB-200, demonstrate the advantage of our approach compared to alternative methods. Finally, we include a real-world application of dataset distillation to the continual learning setting: we show that storing distilled images as episodic memory of previous tasks can alleviate forgetting more effectively than real images.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Hinton et al. (2015) proposed network distillation as a way to transfer the knowledge from an ensemble of many separately-trained networks into a single, typically compact network, performing a type of model compression. In this paper, we are considering a related but orthogonal task: rather than distilling the model, we propose to distill the dataset. Unlike network distillation, we keep the model fixed but encapsulate the knowledge of the entire training dataset, which typically contains thousands to millions of images, into a small number of synthetic training images. We show that we can go as low as one synthetic image per category, training the same model to reach surprisingly good performance on these synthetic images. For example, in Figure 1a, we compress 60, 000 training images of MNIST digit dataset into only 10 synthetic images (one per category), given a fixed network initialization. Training the standard LENET (LeCun et al., 1998) on these 10 images yields test-time MNIST recognition performance of $9 4 \%$ , compared to $9 9 \%$ for the original dataset. For networks with unknown random weights, 100 synthetic images train to $8 9 \%$ . We name our method Dataset Distillation and these images distilled images.
|
| 12 |
+
|
| 13 |
+
But why is dataset distillation interesting? First, there is the purely scientific question of how much data is encoded in a given training set and how compressible it is? Second, we wish to know whether it is possible to “load up" a given network with an entire dataset-worth of knowledge by a handful of images. This is in contrast to traditional training that often requires tens of thousands of data samples. Finally, on the practical side, dataset distillation enables applications that require compressing data with its task. We demonstrate that under the continual learning setting, storing distilled images as memory of past task and data can alleviate catastrophic forgetting (McCloskey and Cohen, 1989).
|
| 14 |
+
|
| 15 |
+
A key question is whether it is even possible to compress a dataset into a small set of synthetic data samples. For example, is it possible to train an image classification model on synthetic images that are not on the manifold of natural images? Conventional wisdom would suggest that the answer is no, as the synthetic training data may not follow the same distribution of the real test data. Yet, in this work, we show that this is indeed possible.
|
| 16 |
+
|
| 17 |
+
We present an optimization algorithm for synthesizing a small number of synthetic data samples not only capturing much of the original training data but also tailored explicitly for fast model training with only a few data point. To achieve our goal, we first derive the network weights as a differentiable function of our synthetic training data. Given this connection, instead of optimizing the network weights for a particular training objective, we optimize the pixel values of our distilled images. However, this formulation requires access to the initial weights of the network. To relax this assumption, we develop a method for generating distilled images for randomly initialized networks. To further boost performance, we propose an iterative version, where the same distilled images are reused over multiple gradient descent steps so that the knowledge can be fully transferred into the model. Finally, we study a simple linear model, deriving a lower bound on the size of distilled data required to achieve the same performance as training on the full dataset.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: We distill the knowledge of tens of thousands of images into a few synthetic training images called distilled images. On MNIST, 100 distilled images can train a standard LENET with a random initialization to $8 9 \%$ test accuracy, compared to $9 9 \%$ when fully trained. On CIFAR10, 100 distilled images can train a network with a random initialization to $4 1 \%$ test accuracy, compared to $8 0 \%$ when fully trained. In Section 3.6, we show that these distilled images can efficiently store knowledge of previous tasks for continual learning.
|
| 21 |
+
|
| 22 |
+
We demonstrate that a handful of distilled images can be used to train a model with a fixed initialization to achieve surprisingly high performance. For networks pre-trained on other tasks, our method can find distilled images for fast model fine-tuning. We test our method on several initialization settings: fixed initialization, random initialization, fixed pre-trained weights, and random pre-trained weights. Extensive experiments on four publicly available datasets, MNIST, CIFAR10, PASCAL-VOC, and CUB-200, show that our approach often outperforms existing methods. Finally, we demonstrate that for continual learning methods that store limited-size past data samples as episodic memory (Lopez-Paz and Ranzato, 2017; Kirkpatrick et al., 2017), storing our distilled data instead is much more effective. Our distilled images contain richer information about the past data and tasks, and we show experimental evidence on standard continual learning benchmarks. Our code, data, and models will be available upon publication.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Knowledge distillation. The main inspiration for this paper is network distillation (Hinton et al., 2015), a widely used technique in ensemble learning (Radosavovic et al., 2018) and model compression (Ba and Caruana, 2014; Romero et al., 2015; Howard et al., 2017). While network distillation aims to distill the knowledge of multiple networks into a single model, our goal is to compress the knowledge of an entire dataset into a few synthetic data. Our method is also related to the theoretical concept of teaching dimension, which specifies the minimal size of data needed to teach a target model to a learner (Shinohara and Miyano, 1991; Goldman and Kearns, 1995). However, methods (Zhu, 2013; 2015) inspired by this concept require the existence of target models, which our method does not.
|
| 27 |
+
|
| 28 |
+
Dataset pruning, core-set construction, and instance selection. Another way to distill knowledge is to summarize the entire dataset by a small subset, either by only using the “valuable” data for model training (Angelova et al., 2005; Felzenszwalb et al., 2010; Lapedriza et al., 2013) or by only labeling the “valuable” data via active learning (Cohn et al., 1996; Tong and Koller, 2001). Similarly, core-set construction (Tsang et al., 2005; Har-Peled and Kushal, 2007; Bachem et al., 2017; Sener and Savarese, 2018) and instance selection (Olvera-López et al., 2010) methods aim to select a subset of the entire training data, such that models trained on the subset will perform as well as the model trained on the full dataset. For example, solutions to many classical linear learning algorithms, e.g., Perceptron (Rosenblatt, 1957) and SVMs (Hearst et al., 1998), are weighted sums of subsets of training examples, which can be viewed as core-sets. However, algorithms constructing these subsets require many more training examples per category than we do, in part because their “valuable” images have to be real, whereas our distilled images are exempt from this constraint.
|
| 29 |
+
|
| 30 |
+
Gradient-based hyperparameter optimization. Our work bears similarity with gradient-based hyperparameter optimization techniques, which compute the gradient of hyperparameter w.r.t. the final validation loss by reversing the entire training procedure (Bengio, 2000; Domke, 2012; Maclaurin et al., 2015; Pedregosa, 2016). We also backpropagate errors through optimization steps. However, we use only training set data and focus more heavily on learning synthetic training data rather than tuning hyperparameters. To our knowledge, this direction has only been slightly touched on previously (Maclaurin et al., 2015). We explore it in greater depth and demonstrate the idea of dataset distillation in various settings. More crucially, our distilled images work well across random initialization weights, not possible by prior work.
|
| 31 |
+
|
| 32 |
+
Understanding datasets. Researchers have presented various approaches for understanding and visualizing learned models (Zeiler and Fergus, 2014; Zhou et al., 2015; Mahendran and Vedaldi, 2015; Bau et al., 2017; Koh and Liang, 2017). Unlike these approaches, we are interested in understanding the intrinsic properties of the training data rather than a specific trained model. Analyzing training datasets has, in the past, been mainly focused on the investigation of bias in datasets (Ponce et al., 2006; Torralba and Efros, 2011). For example, Torralba and Efros (2011) proposed to quantify the “value” of dataset samples using cross-dataset generalization. Our method offers a different perspective for understanding datasets by distilling full datasets into a few synthetic samples.
|
| 33 |
+
|
| 34 |
+
# 3 FORMULATION
|
| 35 |
+
|
| 36 |
+
Given a model and a dataset, we aim to obtain a new, much-reduced synthetic dataset which performs almost as well as the original dataset. We first present our main optimization algorithm for training a network with a fixed initialization with one gradient descent (GD) step (Section 3.1). In Section 3.2, we derive the resolution to a more challenging case, where initial weights are random rather than fixed. In Section 3.3, we further study a linear network case to help readers understand both the properties and limitations of our method. We also discuss the distribution of initial weights with which our method can work well. In Section 3.4, we extend our approach to reuse the same distilled images over 2, 000 gradient descent steps and largely improve the performance. Finally, Section 3.5 discusses dataset distillation for different initialization distributions. Finally, in Section 3.6, we show that our distilled images can be used as effective episodic memory for continual learning tasks.
|
| 37 |
+
|
| 38 |
+
Consider a training dataset $\mathbf { x } = \{ x _ { i } \} _ { i = 1 } ^ { N }$ , we parameterize our neural network as $\theta$ and denote $\ell ( x _ { i } , \theta )$ as the loss function that represents the loss of this network on a data point $x _ { i }$ . Our task is to find the minimizer of the empirical error over entire training data:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\theta ^ { * } = \underset { \theta } { \arg \operatorname* { m i n } } \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \ell ( x _ { i } , \theta ) \triangleq \underset { \theta } { \arg \operatorname* { m i n } } \ell ( \mathbf { x } , \theta ) ,
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
where for notation simplicity we overload the $\ell ( \cdot )$ notation so that $\ell ( \mathbf { x } , \theta )$ represents the average error of $\theta$ over the entire dataset. We make the mild assumption that $\ell$ is twice-differentiable, which holds true for the majority of modern machine learning models and tasks.
|
| 45 |
+
|
| 46 |
+
# 3.1 OPTIMIZING DISTILLED DATA
|
| 47 |
+
|
| 48 |
+
Standard training usually applies minibatch stochastic gradient descent or its variants. At each step $t$ , a minibatch of training data $\mathbf { x } _ { t } = \{ x _ { t , j } \} _ { j = 1 } ^ { n }$ is sampled to update the current parameters as
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\theta _ { t + 1 } = \theta _ { t } - \eta \nabla _ { \theta _ { t } } \ell ( \mathbf { x } _ { t } , \theta _ { t } ) ,
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where is the learning rate. Such a training process often takes tens of thousands or even millions of update steps to converge. Instead, we learn a tiny set of synthetic distilled training data $\tilde { \mathbf { x } } = \{ \tilde { x } _ { i } \} _ { i = 1 } ^ { M }$ with and a corresponding learning rate $\tilde { \eta }$ so that a single GD step such as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\theta _ { 1 } = \theta _ { 0 } - \tilde { \eta } \nabla _ { \theta _ { 0 } } \ell ( \tilde { \mathbf { x } } , \theta _ { 0 } )
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
# Algorithm 1 Dataset Distillation
|
| 61 |
+
|
| 62 |
+
Input: $p ( \theta _ { 0 } )$ : distribution of initial weights; $M$ : the number of distilled data
|
| 63 |
+
Input: $\alpha$ : step size; $n$ : batch size; $T$ : the number of optimization iterations; $\tilde { \eta } _ { 0 }$ : initial value for $\tilde { \eta }$
|
| 64 |
+
1: Initialize $\hat { \tilde { \mathbf { x } } } = \{ \tilde { x } _ { i } \} _ { i = 1 } ^ { M }$ either from $\mathcal { N } ( 0 , I )$ or from real training images. Initialize $\tilde { \eta } \tilde { \eta } _ { 0 }$
|
| 65 |
+
2: for each training step $t = 1$ to $T$ do
|
| 66 |
+
3: Get a minibatch of real training data $\mathbf { x } _ { t } = \{ x _ { t , j } \} _ { j = 1 } ^ { n }$
|
| 67 |
+
4: Sample a batch of initial weights $\theta _ { 0 } ^ { ( j ) } \sim p ( \theta _ { 0 } )$
|
| 68 |
+
5: for each sampled $\theta _ { 0 } ^ { ( j ) }$ do
|
| 69 |
+
6: Compute updated parameter with GD: $\theta _ { 1 } ^ { ( j ) } = \theta _ { 0 } ^ { ( j ) } - \tilde { \eta } \nabla _ { \theta _ { 0 } ^ { ( j ) } } \ell ( \tilde { \mathbf { x } } , \theta _ { 0 } ^ { ( j ) } )$
|
| 70 |
+
7: Evaluate the objective function on real training data: $\mathscr { L } ^ { ( j ) } = \ell ( \mathbf { x } _ { t } , \boldsymbol { \theta } _ { 1 } ^ { ( j ) } )$
|
| 71 |
+
8: end for
|
| 72 |
+
9: Update $\begin{array} { r } { \tilde { \mathbf { x } } \tilde { \mathbf { x } } - \alpha \nabla _ { \tilde { \mathbf { x } } } \sum _ { j } \mathcal { L } ^ { ( j ) } , \mathrm { a n d } \tilde { \eta } \tilde { \eta } - \alpha \nabla _ { \tilde { \eta } } \sum _ { j } \mathcal { L } ^ { ( j ) } } \end{array}$
|
| 73 |
+
|
| 74 |
+
10: end for Output: distilled data $\tilde { \bf x }$ and optimized learning rate $\tilde { \eta }$
|
| 75 |
+
|
| 76 |
+
using these learned synthetic data $\tilde { \bf x }$ can greatly boost the performance on the real test set. Given an initial $\theta _ { 0 }$ , we obtain these synthetic data $\tilde { \mathbf { x } }$ and learning rate $\tilde { \eta }$ by minimizing the objective below $\mathcal { L }$
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { r l } & { \tilde { \mathbf { x } } ^ { * } , \tilde { \eta } ^ { * } = \underset { \tilde { \mathbf { x } } , \tilde { \eta } } { \arg \operatorname* { m i n } } \mathcal { L } ( \tilde { \mathbf { x } } , \tilde { \eta } ; \theta _ { 0 } ) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where we derive the new weights $\theta _ { 1 }$ as a function of distilled data $\tilde { \bf x }$ and learning rate $\tilde { \eta }$ using Equation 2 and then evaluate the new weights over all the real training data $\mathbf { x }$ . The loss $\mathcal { L } ( \tilde { \mathbf { x } } , \tilde { \eta } ; \theta _ { 0 } )$ is differentiable w.r.t. $\tilde { \bf x }$ and $\tilde { \eta }$ , and can thus be optimized using standard gradient-based methods. In many classification tasks, the data $\mathbf { x }$ may contain discrete parts, e.g., class labels in data-label pairs. For such cases, we fix the discrete parts rather than learn them.
|
| 83 |
+
|
| 84 |
+
# 3.2 DISTILLATION FOR RANDOM INITIALIZATIONS
|
| 85 |
+
|
| 86 |
+
Unfortunately, the above distilled data is optimized for a given initialization, and does not generalize well to other initializations, as it encodes the information of both the training dataset $\mathbf { x }$ and a particular network initialization $\theta _ { 0 }$ . To address this issue, we turn to calculate a small number of distilled data that can work for networks with random initializations from a specific distribution. We formulate the optimization problem as follows:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\tilde { \mathbf { x } } ^ { * } , \tilde { \eta } ^ { * } = \underset { \tilde { \mathbf { x } } , \tilde { \eta } } { \arg \operatorname* { m i n } } \mathbb { E } _ { \theta _ { 0 } \sim p ( \theta _ { 0 } ) } \mathcal { L } ( \tilde { \mathbf { x } } , \tilde { \eta } ; \theta _ { 0 } ) ,
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where the network initialization $\theta _ { 0 }$ is randomly sampled from a distribution $p ( \theta _ { 0 } )$ . During our optimization, the distilled data are optimized to work well for randomly initialized networks. In practice, we observe that the final distilled data generalize well to unseen initializations. In addition, these distilled images often look quite informative, encoding the discriminative features of each category (e.g., in Figure 2). Algorithm 1 illustrates our main method.
|
| 93 |
+
|
| 94 |
+
As the optimization (Equation 4) is highly non-linear and complex, the initialization of $\tilde { \bf x }$ plays a critical role in the final performance. We experiment with different initialization strategies and observe that using random real images as initialization often produces better distilled images compared to random initialization, e.g., $\mathcal { N } ( 0 , I )$ .
|
| 95 |
+
|
| 96 |
+
For a compact set distilled data to be properly learned, it turns out having only one GD step is far from sufficient. Next, we derive a lower bound on the size of distilled data needed for a simple model with arbitrary initial $\theta _ { 0 }$ in one GD step, and discuss its implications on our algorithm.
|
| 97 |
+
|
| 98 |
+
# 3.3 ANALYSIS OF A SIMPLE LINEAR CASE
|
| 99 |
+
|
| 100 |
+
This section studies our formulation in a simple linear regression problem with quadratic loss. We derive a lower bound of the size of distilled data needed to achieve the same performance as training on the full dataset for arbitrary initialization with one GD step. Consider a dataset $\mathbf { x }$ containing $N$ data-target pairs $\{ ( d _ { i } , t _ { i } ) \} _ { i = 1 } ^ { N }$ , where $d _ { i } \in \mathbb { R } ^ { D }$ and $t _ { i } \in \mathbb { R }$ , which we represent as two matrices: an $N \times D$ data matrix $\mathbf { d }$ and an $N \times 1$ target matrix $\mathbf { t }$ . Given the mean squared error metric and a $D \times 1$ weight matrix $\theta$ , we have
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\ell ( { \mathbf x } , \theta ) = \ell ( ( { \mathbf d } , { \mathbf t } ) , \theta ) = \frac { 1 } { 2 N } \| { \mathbf d } \theta - { \mathbf t } \| ^ { 2 } .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
We aim to learn $M$ synthetic data-target pairs $\tilde { \mathbf { x } } = ( \tilde { \mathbf { d } } , \tilde { \mathbf { t } } )$ , where $\tilde { \mathbf { d } }$ is an $M \times D$ matrix, $\tilde { \mathbf { t } }$ an $M \times 1$ matrix $M \ll N ,$ ), and $\tilde { \eta }$ the learning rate, to minimize $\ell ( \mathbf { x } , \theta _ { 0 } - \tilde { \eta } \nabla _ { \theta _ { 0 } } \ell ( \tilde { \mathbf { x } } , \theta _ { 0 } ) )$ . The updated weight matrix after one GD step with these distilled data is
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array} { r l } & { \theta _ { 1 } = \theta _ { 0 } - \tilde { \eta } \nabla _ { \theta _ { 0 } } \ell ( \tilde { \mathbf { x } } , \theta _ { 0 } ) } \\ & { \quad = \theta _ { 0 } - \frac { \tilde { \eta } } { M } \tilde { \mathbf { d } } ^ { T } ( \tilde { \mathbf { d } } \theta _ { 0 } - \tilde { \mathbf { t } } ) } \\ & { \quad = ( \mathbf { I } - \frac { \tilde { \eta } } { M } \tilde { \mathbf { d } } ^ { T } \tilde { \mathbf { d } } ) \theta _ { 0 } + \frac { \tilde { \eta } } { M } \tilde { \mathbf { d } } ^ { T } \tilde { \mathbf { t } } . } \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
For the quadratic loss, there always exists distilled data $\tilde { \mathbf { x } }$ that can achieve the same performance as training on the full dataset $\mathbf { x }$ (i.e., attaining the global minimum) for any initialization $\theta _ { 0 }$ . For example, given any global minimum solution $\theta ^ { * }$ , we can choose $\tilde { \mathbf { d } } = N \cdot \mathbf { I }$ and $\tilde { \mathbf { t } } = N \cdot \boldsymbol { \theta } ^ { * }$ . But how small can the size of the distilled data be? For such models, the global minimum is attained at any $\theta ^ { * }$ satisfying $\mathbf { d } ^ { T } \mathbf { d } \theta ^ { * } = \mathbf { d } ^ { T } \mathbf { t }$ . Substituting Equation 6 in the condition above, we have
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathbf { d } ^ { T } \mathbf { d } ( \mathbf { I } - \frac { \tilde { \eta } } { M } \tilde { \mathbf { d } } ^ { T } \tilde { \mathbf { d } } ) \theta _ { 0 } + \frac { \tilde { \eta } } { M } \mathbf { d } ^ { T } \mathbf { d } \tilde { \mathbf { d } } ^ { T } \tilde { \mathbf { t } } = \mathbf { d } ^ { T } \mathbf { t } .
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
Here we make the mild assumption that the feature columns of the data matrix $\mathbf { d }$ are independent (i.e., ${ \bf d } ^ { T } { \bf d }$ has full rank). For a $\bar { \bf x } = ( \tilde { \bf d } , \tilde { \bf t } )$ to satisfy the above equation for any $\theta _ { 0 }$ , we must have
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathbf { I } - \frac { \widetilde { \eta } } { M } \widetilde { \mathbf { d } } ^ { T } \widetilde { \mathbf { d } } = \mathbf { 0 } ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
which implies that $\tilde { \mathbf { d } } ^ { T } \tilde { \mathbf { d } }$ has full rank and $M \geq D$
|
| 125 |
+
|
| 126 |
+
Discussion. The analysis above only considers a simple case but suggests that any small number of distilled data fail to generalize to arbitrary initial $\theta _ { 0 }$ . This is intuitively expected as the optimization target $\ell ( \mathbf { x } , \theta _ { 1 } ) = \ell ( \bar { \mathbf { x } } , \theta _ { 0 } - \tilde { \eta } \nabla _ { \theta _ { 0 } } \ell ( \tilde { \mathbf { x } } , \theta _ { 0 } ) )$ depends on the local behavior of $\ell ( { \mathbf { x } } , \cdot )$ around $\theta _ { 0 }$ (e.g., gradient magnitude), which can be drastically different across various initializations $\theta _ { 0 }$ . The lower bound $M \geq D$ is a quite restricting one, considering that real datasets often have thousands to even hundreds of thousands of dimensions (e.g., images). This analysis motivates us to avoid the limitation of using one GD step by extending to multiple steps in the next section.
|
| 127 |
+
|
| 128 |
+
# 3.4 MULTIPLE GRADIENT DESCENT STEPS
|
| 129 |
+
|
| 130 |
+
We extend Algorithm 1 to more than one gradient descent steps by changing Line 6 to multiple sequential GD steps on the same batch of distilled data, i.e., each step $i$ performs
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\theta _ { i + 1 } = \theta _ { i } - \tilde { \eta } _ { i } \nabla _ { \theta _ { i } } \ell ( \tilde { \mathbf { x } } , \theta _ { i } ) ,
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
and changing Line 9 to backpropagate through all steps. We do not share the same learning rates across steps as later steps often require lower learning rates.
|
| 137 |
+
|
| 138 |
+
Naively computing gradients is memory and computationally intensive. Therefore, we exploit a recent technique called back-gradient optimization, which allows for significantly faster gradient calculation in reverse-mode differentiation (Domke, 2012; Maclaurin et al., 2015). Specifically, back-gradient optimization formulates the necessary second-order terms into efficient Hessian-vector products (Pearlmutter, 1994), which can be easily calculated with modern automatic differentiation systems such as PyTorch (Paszke et al., 2017).
|
| 139 |
+
|
| 140 |
+
# 3.5 DISTRIBUTION OF INITIAL WEIGHTS
|
| 141 |
+
|
| 142 |
+
There is freedom in choosing the distribution of initial weights $p ( \theta _ { 0 } )$ . In this work, we explore the following four practical choices in the experiments:
|
| 143 |
+
|
| 144 |
+
(a) MNIST. These distilled images can train unknown random initializations to $8 8 . 5 1 \% \pm 1 . 1 1 \%$ test accuracy in 2000 GD steps.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
(b) CIFAR10. These distilled images can train unknown random initializations to $4 1 . 2 3 \% \pm 0 . 8 8 \%$ test accuracy in $5 0 \mathrm { G D }$ steps.
|
| 148 |
+
|
| 149 |
+
Figure 2: Distilled images trained for random initialization a batch of 100 distilled images (ten per class). Only 30 of 100 distilled images are shown here. Please see the appendix for the full result.
|
| 150 |
+
|
| 151 |
+
• Random initialization: Distribution over random initial weights, e.g., He Initialization (He et al., 2015) and Xavier Initialization (Glorot and Bengio, 2010) for neural networks. • Fixed initialization: A particular fixed network initialized by the method above. • Random pre-trained weights: Distribution over models pre-trained on other tasks or datasets, e.g., ALEXNET (Krizhevsky et al., 2012) networks trained on ImageNet (Deng et al., 2009). • Fixed pre-trained weights: A particular fixed network pre-trained on other tasks and datasets.
|
| 152 |
+
|
| 153 |
+
Distillation with pre-trained weights. Such learned distilled data essentially fine-tune weights pre-trained on one dataset to perform well for a new dataset, thus bridging the gap between the two domains. Domain mismatch and dataset bias represent a challenging problem in machine learning (Torralba and Efros, 2011; Daume III, 2007; Saenko et al., 2010). In this work, we characterize the domain mismatch via distilled data. In Section 4.1.2, we show that a small number of distilled images are sufficient to quickly adapt convolutional neural network (CNN) models to new datasets and tasks.
|
| 154 |
+
|
| 155 |
+
# 3.6 APPLICATION TO CONTINUAL LEARNING
|
| 156 |
+
|
| 157 |
+
To guard against domain shift, several continual learning methods store a subset of training samples in a small memory buffer, and restrict future updates to maintain reasonable performance on these stored samples (Rebuffi et al., 2017; Kirkpatrick et al., 2017; Lopez-Paz and Ranzato, 2017; Nguyen et al., 2018). As our distilled images contain rich information about the past training data and task, they could naturally serve as a compressed memory of the past.
|
| 158 |
+
|
| 159 |
+
To test this, we modify a recent continual learning method called Gradient Episodic Memory (GEM) (Lopez-Paz and Ranzato, 2017). GEM enforces inequality constraints such that the new model, after being trained on the new data and task, should perform at least as well as the old model on the previously stored data and tasks. Here, we store our distilled data for each task instead of randomly drawn training samples as used in GEM. We use the distilled data to construct inequality constraints, and solve the optimization using quadratic programming, same as in GEM. As shown in Section 4.2, our method compares favorably against several baselines that rely on real images.
|
| 160 |
+
|
| 161 |
+
# 4 EXPERIMENTS
|
| 162 |
+
|
| 163 |
+
In this section, we report experiments of regular image classifications on MNIST (LeCun, 1998) and CIFAR10 (Krizhevsky and Hinton, 2009), adaptation from ImageNet (Deng et al., 2009) to PASCAL-VOC (Everingham et al., 2010) and CUB-200 (Wah et al., 2011), and continual learning on permuted MNIST and CIFAR100.
|
| 164 |
+
|
| 165 |
+
Baselines. For each experiment, in addition to baselines specific to the setting, we generally compare our method against baselines trained with data derived or selected from real training images:
|
| 166 |
+
|
| 167 |
+
• Random real images: We randomly sample the same number of real images per category.
|
| 168 |
+
• Optimized real images: We sample different sets of random real images as above, and choose the top $2 0 \%$ best performing sets.
|
| 169 |
+
• $k$ -means $^ { + + }$ : We apply $k$ -means $^ { + + }$ (Arthur and Vassilvitskii, 2007) clustering to each category, and extract the cluster centroids.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
|
| 173 |
+
Figure 3: Distillation performance with varying numbers of GD steps and a fixed number of distilled images.
|
| 174 |
+
|
| 175 |
+
<table><tr><td rowspan=3 colspan=1></td><td rowspan=1 colspan=2>Ours</td><td rowspan=1 colspan=6>Baselines</td></tr><tr><td rowspan=2 colspan=1>Fixed init.</td><td rowspan=2 colspan=1>Random init.</td><td rowspan=1 colspan=4>Used as training data in CNN</td><td rowspan=1 colspan=2>Used in KNN classification</td></tr><tr><td rowspan=1 colspan=1>Random real</td><td rowspan=1 colspan=1>Optimized real</td><td rowspan=1 colspan=1>k-means++</td><td rowspan=1 colspan=1>Average real</td><td rowspan=1 colspan=1>Random real</td><td rowspan=1 colspan=1>k-means++</td></tr><tr><td rowspan=1 colspan=1>MNIST</td><td rowspan=1 colspan=1>94.4</td><td rowspan=1 colspan=1>88.5± 1.1</td><td rowspan=1 colspan=1>82.8± 1.8</td><td rowspan=1 colspan=1>83.8± 2.1</td><td rowspan=1 colspan=1>86.7± 1.4</td><td rowspan=1 colspan=1>77.7 ± 2.7</td><td rowspan=1 colspan=1>71.5 ± 2.1</td><td rowspan=1 colspan=1>92.4±0.2</td></tr><tr><td rowspan=1 colspan=1>CIFAR10</td><td rowspan=1 colspan=1>45.2</td><td rowspan=1 colspan=1>41.2±0.9</td><td rowspan=1 colspan=1>24.8 ± 1.5</td><td rowspan=1 colspan=1>24.9 ± 1.4</td><td rowspan=1 colspan=1>26.7± 1.8</td><td rowspan=1 colspan=1>22.8±0.8</td><td rowspan=1 colspan=1>18.8± 1.3</td><td rowspan=1 colspan=1>29.4± 0.4</td></tr></table>
|
| 176 |
+
|
| 177 |
+
Table 1: Comparison between our method and various baselines. All methods use ten images per category (100 in total), except for the average real images baseline, which reuses the same images in different GD steps. For MNIST, our method uses $2 0 0 0 \mathrm { G D }$ steps, and baselines use the best among #steps $\in \{ 1 , 1 0 0 , 5 0 0 , 1 0 0 0 , 2 0 0 0 \}$ . For CIFAR10, our method uses $5 0 \mathrm { G D }$ steps, and baselines use the best among #steps $\in \{ 1 , 5 , 1 0 , 2 0 , 5 0 0 \}$ . In addition, we include a K-nearest neighbors (KNN) baseline, and report best results among all combinations of distance metric $\in \{ l _ { 1 } , l _ { 2 } \}$ and one or three neighbors.
|
| 178 |
+
|
| 179 |
+
• Average real images: We compute the average image for each category.
|
| 180 |
+
|
| 181 |
+
Please see the appendix for more details about training and baselines, and additional results.
|
| 182 |
+
|
| 183 |
+
# 4.1 DATASET DISTILLATION
|
| 184 |
+
|
| 185 |
+
We first present experimental results on training classifiers either from scratch or adapting from pre-trained weights. For MNIST, the distilled images are trained with LENET (LeCun et al., 1998), which achieves about $9 9 \%$ test accuracy if conventionally trained. For CIFAR10, we use a network architecture (Krizhevsky, 2012) that achieves around $8 0 \%$ test accuracy if conventionally trained. For ImageNet adaptations, we use an ALEXNET (Krizhevsky et al., 2012). We use 2000 GD steps for MNIST and $5 0 \mathrm { G D }$ steps for CIFAR10. For random initializations and random pre-trained weights, we report means and standard deviations over 200 held-out models, unless otherwise stated.
|
| 186 |
+
|
| 187 |
+
For baselines, we perform each evaluation on 200 held-out models using all possible combinations of learning rate $\in \{$ distilled learning rates $\tilde { \eta } ^ { * }$ , 1e-3, 3e-3, 1e-2, 3e-2, 1e-1, 3e-1} and several choices of numbers of training GD steps (see table captions for details), and report results with the best performing combination.
|
| 188 |
+
|
| 189 |
+
# 4.1.1 DISTILLATION WITH WEIGHTS SAMPLED FRO NETWORK INITIALIZATION
|
| 190 |
+
|
| 191 |
+
Fixed initialization. With access to initial network weights, distilled images can directly train a fixed network to reach high performance. Experiment results show that just 10 distilled images (one per class) can boost the performance of a LENET with an initial accuracy $8 . 2 5 \%$ to a final accuracy of $9 3 . 8 2 \%$ on MNIST in $2 0 0 0 \mathrm { G D }$ steps. Using 100 distilled images (ten per class) can raise the final accuracy can be raised to $9 4 . 4 1 \%$ , as shown in the first column of Table 1. Similarly, 100 distilled images can train a network with an initial accuracy $1 0 . 7 5 \%$ to test accuracy of $4 5 . 1 5 \%$ on CIFAR10 in $5 0 \mathrm { G D }$ steps.
|
| 192 |
+
|
| 193 |
+
Random initialization. Figure 2 distilled images trained with randomly sampled initializations using Xavier Initialization (Glorot and Bengio, 2010). While the resulting average test accuracy from these images are not as high as those for fixed initialization, these distilled images crucially do not require a specific initial point, and thus could potentially generalize to a much wider range of starting points. In Section 4.2 below, we present preliminary results of achieving nontrivial gains from applying such distilled images to classifier networks during a continual learning training process.
|
| 194 |
+
|
| 195 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Oursw/fixedpre-trained</td><td rowspan=1 colspan=1>Oursw/randompre-trained</td><td rowspan=1 colspan=1>Random real</td><td rowspan=1 colspan=1>Optimized real</td><td rowspan=1 colspan=1>k-means++</td><td rowspan=1 colspan=1>Average real</td><td rowspan=1 colspan=1>Few-shotadaptationMotiian et al. (2017)</td><td rowspan=1 colspan=1>No adaptation</td><td rowspan=1 colspan=1>Train on fulltarget dataset</td></tr><tr><td rowspan=1 colspan=1>M→u</td><td rowspan=1 colspan=1>97.9</td><td rowspan=1 colspan=1>95.4±1.8</td><td rowspan=1 colspan=1>94.9 ±0.8</td><td rowspan=1 colspan=1>95.2± 0.7</td><td rowspan=1 colspan=1>94.8±0.7</td><td rowspan=1 colspan=1>93.9±0.8</td><td rowspan=1 colspan=1>96.7±0.5</td><td rowspan=1 colspan=1>90.4±3.0</td><td rowspan=1 colspan=1>97.3±0.3</td></tr><tr><td rowspan=1 colspan=1>U→M</td><td rowspan=1 colspan=1>93.2</td><td rowspan=1 colspan=1>92.7 ±1.4</td><td rowspan=1 colspan=1>87.1 ± 2.9</td><td rowspan=1 colspan=1>87.6 ± 2.1</td><td rowspan=1 colspan=1>88.0± 2.2</td><td rowspan=1 colspan=1>78.4 ± 5.0</td><td rowspan=1 colspan=1>89.2 ± 2.4</td><td rowspan=1 colspan=1>67.5±3.9</td><td rowspan=1 colspan=1>98.6± 0.5</td></tr><tr><td rowspan=1 colspan=1>S→M</td><td rowspan=1 colspan=1>96.2</td><td rowspan=1 colspan=1>85.2± 4.7</td><td rowspan=1 colspan=1>84.6 ± 2.1</td><td rowspan=1 colspan=1>85.2 ± 1.2</td><td rowspan=1 colspan=1>86.5± 1.2</td><td rowspan=1 colspan=1>74.9 ± 2.6</td><td rowspan=1 colspan=1>74.0 ± 1.5</td><td rowspan=1 colspan=1>51.6 ± 2.8</td><td rowspan=1 colspan=1>98.6±0.5</td></tr></table>
|
| 196 |
+
|
| 197 |
+
Table 2: Adapting models among MNIST $( \mathcal { M } )$ , USPS $( \mathcal { U } )$ , and SVHN $( S )$ using 100 distilled images. Our method outperforms few-shot domain adaptation (Motiian et al., 2017) and other baselines in most settings. Due to computation limitations, the 100 distilled images are split into 10 minibatches applied in 10 sequential GD steps, and the entire set of 100 distilled images is iterated through 3 times $\mathrm { 3 0 G D }$ steps in total). For baselines, we train the model using the same number of images with $\{ 1 , 3 , 5 \}$ times and report the best result.
|
| 198 |
+
|
| 199 |
+
Table 3: Adapting an ALEXNET pre-trained on ImageNet to PASCAL-VOC and CUB-200. We use one distilled image per category, repeatedly applied via three GD steps. Our method significantly outperforms the baselines. For baselines, we train the model with $\{ 1 , 3 , 5 \}$ GD steps and report the best. Results are over 10 runs.
|
| 200 |
+
|
| 201 |
+
<table><tr><td rowspan=1 colspan=1>Target dataset</td><td rowspan=1 colspan=1>Ours</td><td rowspan=1 colspan=1>Random real</td><td rowspan=1 colspan=1>Optimized real</td><td rowspan=1 colspan=1>Average real</td><td rowspan=1 colspan=1>Fine-tune on fulltarget dataset</td></tr><tr><td rowspan=1 colspan=1>PASCAL-VOC</td><td rowspan=1 colspan=1>70.75</td><td rowspan=1 colspan=1>19.41 ± 3.73</td><td rowspan=1 colspan=1>23.82± 3.66</td><td rowspan=1 colspan=1>9.94</td><td rowspan=1 colspan=1>75.57±0.18</td></tr><tr><td rowspan=1 colspan=1>CUB-200</td><td rowspan=1 colspan=1>38.76</td><td rowspan=1 colspan=1>7.11 ± 0.66</td><td rowspan=1 colspan=1>7.23± 0.78</td><td rowspan=1 colspan=1>2.88</td><td rowspan=1 colspan=1>41.21 ± 0.51</td></tr></table>
|
| 202 |
+
|
| 203 |
+
Multiple gradient descent steps. Section 3.3 has shown theoretical limitations of using only one step in a simple linear case. In Figure 3, we empirically verify for deep networks that using multiple steps drastically outperforms the single step method, given the same number of distilled images. Table 1 summarizes the results of our method and all baselines. Our method with both fixed and random initializations outperforms all the baselines on CIFAR10 and most of the baselines on MNIST.
|
| 204 |
+
|
| 205 |
+
# 4.1.2 DISTILLATION WITH PRE-TRAINED INITIAL WEIGHTS
|
| 206 |
+
|
| 207 |
+
Next, we show the extended setting of our algorithm discussed in Section 3.5, where the weights are not randomly initialized but pre-trained on a particular dataset. In this section, for random initial weights, we train the distilled images on 2000 pre-trained models and evaluate them on 200 unseen models.
|
| 208 |
+
|
| 209 |
+
Fixed and random pre-trained weights on digits. As shown in Section 3.5, we can optimize distilled images to quickly fine-tune pre-trained models on a new dataset. Table 2 shows that our method is more effective than various baselines on adaptation between three digits datasets: MNIST, USPS (Hull, 1994), and SVHN (Netzer et al., 2011). We also compare our method against a stateof-the-art few-shot domain adaptation method (Motiian et al., 2017). Although our method uses the entire training set to compute the distilled images, both methods use the same number of images to distill the knowledge of target dataset. Prior work (Motiian et al., 2017) is outperformed by our method with fixed pre-trained weights on all the tasks, and by our method with random pre-trained weights on two of the three tasks. This result shows that our distilled images effectively compress the information of target datasets.
|
| 210 |
+
|
| 211 |
+
Fixed pre-trained ALEXNET to PASCAL-VOC and CUB-200. In Table 3, we adapt a widely used ALEXNET model pre-trained on ImageNet to image classification on PASCAL-VOC and CUB-200 datasets. Given only one distilled image per category, our method outperforms various baselines significantly. Our method is on par with fine-tuning on the full datasets with thousands of images.
|
| 212 |
+
|
| 213 |
+
# 4.2 APPLICATION TO CONTINUAL LEARNING
|
| 214 |
+
|
| 215 |
+
We modify Gradient Episodic Memory (GEM) (Lopez-Paz and Ranzato, 2017) to store distilled data for each task rather than real training images. Experiments in Lopez-Paz and Ranzato (2017) use large memory buffers, up to $2 5 \%$ of the training set. Instead, we focus on a more realistic scenario where the buffer is rather small $( \leq 1 \%$ of the training set). Following the experiment settings and architecture choices from Lopez-Paz and Ranzato (2017), we consider two continual learning tasks:
|
| 216 |
+
|
| 217 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Permuted MNIST</td><td rowspan=1 colspan=1>CIFAR100</td></tr><tr><td rowspan=3 colspan=1>Memory size per task = 10</td><td rowspan=1 colspan=1>iCaRL (Rebuffi et al., 2017)</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>42.4</td></tr><tr><td rowspan=1 colspan=1>GEM (Lopez-Paz and Ranzato,2017)</td><td rowspan=1 colspan=1>67.4</td><td rowspan=1 colspan=1>43.8</td></tr><tr><td rowspan=1 colspan=1>GEM + Ours</td><td rowspan=1 colspan=1>75.6</td><td rowspan=1 colspan=1>52.8</td></tr><tr><td rowspan=2 colspan=1>Memory size per task = 40</td><td rowspan=1 colspan=1>iCaRL</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>45.8</td></tr><tr><td rowspan=1 colspan=1>GEM</td><td rowspan=1 colspan=1>75.3</td><td rowspan=1 colspan=1>51.6</td></tr><tr><td rowspan=2 colspan=1>Memory size per task = 50</td><td rowspan=1 colspan=1>iCaRL</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>46.9</td></tr><tr><td rowspan=1 colspan=1>GEM</td><td rowspan=1 colspan=1>75.8</td><td rowspan=1 colspan=1>52.4</td></tr><tr><td rowspan=1 colspan=1>No memory buffer</td><td rowspan=1 colspan=1>EWC (Kirkpatrick et al., 2017)</td><td rowspan=1 colspan=1>63.5</td><td rowspan=1 colspan=1>45.6</td></tr></table>
|
| 218 |
+
|
| 219 |
+
Table 4: Continual learning results. Distilled images are trained with random Xavier Initialization distribution.
|
| 220 |
+
For permuted MNIST, they are trained with 2000 GD steps. For CIFAR100, they are trained for 200 GD steps.
|
| 221 |
+
|
| 222 |
+
• Permuted MNIST: 20 classification tasks each formed by using a different permutation to arrange pixels from MNIST images. Each task contains 1, 000 training images. The classifier used has 2 hidden layers each with 100 neurons.
|
| 223 |
+
|
| 224 |
+
• CIFAR100: 20 classification tasks formed by splitting the 100 classes into 20 equal subsets of 5 classes. Each task contains 2, 500 training images. The classifier used is RESNET18 (He et al., 2016).
|
| 225 |
+
|
| 226 |
+
Table 4 shows that using distilled data drastically improves final overall accuracy on all tasks, and reduces buffer size by up to $5 \times$ compared to the original GEM that uses real images. We only report the basic iCaRL (Rebuffi et al., 2017) setting on CIFAR100 because it requires similar input distributions across all tasks, and it is unclear how to properly inject distilled images into its specialized examplar selection procedure.
|
| 227 |
+
|
| 228 |
+
The appendix details the hyper-parameters tested for each continual learning algorithm.
|
| 229 |
+
|
| 230 |
+
# 5 DISCUSSION AND LIMITATIONS
|
| 231 |
+
|
| 232 |
+
In this paper, we have presented dataset distillation for compressing the knowledge of entire training data into a few synthetic training images. We demonstrate how to train a network to reach surprisingly good performance with only a small number of distilled images. Finally, the distilled images can efficiently store the memory of previous tasks in the continual learning setting.
|
| 233 |
+
|
| 234 |
+
Many challenges remain for knowledge distillation of data. Although our method generalizes well to random initializations, it is still limited to a particular network architecture. Since loss surfaces for different architectures might be drastically different, a more flexible method of applying the distilled data may overcome this difficulty. Another limitation is the increasing computation and memory requirements for finding the distilled data as the number of images and steps increases. To compress large-scale datasets such as ImageNet, we may need first-order gradient approximations to make the optimization computationally feasible.
|
| 235 |
+
|
| 236 |
+
Nonetheless, we are encouraged by the findings in this paper on the possibilities of training large models with a few distilled data, leading to potential applications such as accelerating network evaluation in neural architecture search (Zoph and Le, 2017). We believe that the ideas developed in this work might give new insights into the quantity and type of data that deep networks are able to process, and hopefully inspire others to think along this direction.
|
| 237 |
+
|
| 238 |
+
# REFERENCES
|
| 239 |
+
|
| 240 |
+
A. Angelova, Y. Abu-Mostafam, and P. Perona. Pruning training sets for learning of object categories. In CVPR, 2005.
|
| 241 |
+
D. Arthur and S. Vassilvitskii. k-mean $^ { + + }$ : The advantages of careful seeding. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 2007.
|
| 242 |
+
J. Ba and R. Caruana. Do deep nets really need to be deep? In NIPS, 2014.
|
| 243 |
+
O. Bachem, M. Lucic, and A. Krause. Practical coreset constructions for machine learning. arXiv preprint arXiv:1703.06476, 2017.
|
| 244 |
+
D. Bau, B. Zhou, A. Khosla, A. Oliva, and A. Torralba. Network dissection: Quantifying interpretability of deep visual representations. In CVPR, 2017.
|
| 245 |
+
Y. Bengio. Gradient-based optimization of hyperparameters. Neural computation, 12(8):1889–1900, 2000.
|
| 246 |
+
D. A. Cohn, Z. Ghahramani, and M. I. Jordan. Active learning with statistical models. Journal of artificial intelligence research, 4:129–145, 1996.
|
| 247 |
+
H. Daume III. Frustratingly easy domain adaptation. In ACL, 2007.
|
| 248 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
|
| 249 |
+
J. Domke. Generic methods for optimization-based modeling. In Artificial Intelligence and Statistics, pages 318–326, 2012.
|
| 250 |
+
M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 88(2):303–338, 2010.
|
| 251 |
+
P. F. Felzenszwalb, R. B. Girshick, D. McAllester, and D. Ramanan. Object detection with discriminatively trained part-based models. PAMI, 32(9):1627–1645, 2010.
|
| 252 |
+
X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In International conference on artificial intelligence and statistics, 2010.
|
| 253 |
+
S. A. Goldman and M. J. Kearns. On the complexity of teaching. Journal of Computer and System Sciences, 50 (1):20–31, 1995.
|
| 254 |
+
S. Har-Peled and A. Kushal. Smaller coresets for k-median and k-means clustering. Discrete & Computational Geometry, 37(1):3–19, 2007.
|
| 255 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015.
|
| 256 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
|
| 257 |
+
M. A. Hearst, S. T. Dumais, E. Osuna, J. Platt, and B. Scholkopf. Support vector machines. IEEE Intelligent Systems and their applications, 13(4):18–28, 1998.
|
| 258 |
+
G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning and Representation Learning Workshop, 2015.
|
| 259 |
+
A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. In CVPR, 2017.
|
| 260 |
+
J. J. Hull. A database for handwritten text recognition research. PAMI, 16(5):550–554, 1994.
|
| 261 |
+
S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICLR, 2015.
|
| 262 |
+
D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 263 |
+
J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins, A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. PNAS, 114(13): 3521–3526, 2017.
|
| 264 |
+
P. W. Koh and P. Liang. Understanding black-box predictions via influence functions. In ICML, 2017.
|
| 265 |
+
A. Krizhevsky. cuda-convnet: High-performance $\mathrm { c } { + } { + } I$ /cuda implementation of convolutional neural networks. https://github.com/akrizhevsky/cuda-convnet2, 2012.
|
| 266 |
+
A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 267 |
+
A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012.
|
| 268 |
+
A. Lapedriza, H. Pirsiavash, Z. Bylinskii, and A. Torralba. Are all training examples equally valuable? arXiv preprint arXiv:1311.6510, 2013.
|
| 269 |
+
Y. LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
|
| 270 |
+
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 271 |
+
D. Lopez-Paz and M. Ranzato. Gradient episodic memory for continual learning. In NIPS, 2017.
|
| 272 |
+
D. Maclaurin, D. Duvenaud, and R. Adams. Gradient-based hyperparameter optimization through reversible learning. In ICML, 2015.
|
| 273 |
+
A. Mahendran and A. Vedaldi. Understanding deep image representations by inverting them. In CVPR, 2015.
|
| 274 |
+
M. McCloskey and N. J. Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pages 109–165. 1989.
|
| 275 |
+
S. Motiian, Q. Jones, S. Iranmanesh, and G. Doretto. Few-shot adversarial domain adaptation. In NIPS, 2017.
|
| 276 |
+
Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop, 2011.
|
| 277 |
+
C. V. Nguyen, Y. Li, T. D. Bui, and R. E. Turner. Variational continual learning. In ICLR, 2018.
|
| 278 |
+
J. A. Olvera-López, J. A. Carrasco-Ochoa, J. F. Martínez-Trinidad, and J. Kittler. A review of instance selection methods. Artificial Intelligence Review, 34(2):133–143, 2010.
|
| 279 |
+
A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in pytorch. In ICLR Workshop, 2017.
|
| 280 |
+
B. A. Pearlmutter. Fast exact multiplication by the hessian. Neural computation, 6(1):147–160, 1994.
|
| 281 |
+
F. Pedregosa. Hyperparameter optimization with approximate gradient. In ICML, 2016.
|
| 282 |
+
J. Ponce, T. L. Berg, M. Everingham, D. A. Forsyth, M. Hebert, S. Lazebnik, M. Marszalek, C. Schmid, B. C. Russell, A. Torralba, et al. Dataset issues in object recognition. In Toward category-level object recognition. 2006.
|
| 283 |
+
I. Radosavovic, P. Dollár, R. Girshick, G. Gkioxari, and K. He. Data distillation: Towards omni-supervised learning. In CVPR, 2018.
|
| 284 |
+
S.-A. Rebuffi, A. Kolesnikov, G. Sperl, and C. H. Lampert. icarl: Incremental classifier and representation learning. In CVPR, 2017.
|
| 285 |
+
A. Romero, N. Ballas, S. E. Kahou, A. Chassang, C. Gatta, and Y. Bengio. Fitnets: Hints for thin deep nets. In ICLR, 2015.
|
| 286 |
+
F. Rosenblatt. The perceptron, a perceiving and recognizing automaton Project Para. Cornell Aeronautical Laboratory, 1957.
|
| 287 |
+
K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In ECCV, 2010.
|
| 288 |
+
O. Sener and S. Savarese. Active learning for convolutional neural networks: A core-set approach. In ICLR, 2018.
|
| 289 |
+
A. Shinohara and S. Miyano. Teachability in computational learning. New Generation Computing, 8(4):337–347, 1991.
|
| 290 |
+
S. Tong and D. Koller. Support vector machine active learning with applications to text classification. JMLR, 2 (Nov):45–66, 2001.
|
| 291 |
+
A. Torralba and A. A. Efros. Unbiased look at dataset bias. In CVPR. IEEE, 2011.
|
| 292 |
+
I. W. Tsang, J. T. Kwok, and P.-M. Cheung. Core vector machines: Fast svm training on very large data sets. JMLR, 6(Apr):363–392, 2005.
|
| 293 |
+
C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011.
|
| 294 |
+
Y. Wu and K. He. Group normalization. In ECCV, 2018.
|
| 295 |
+
M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014.
|
| 296 |
+
B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Object detectors emerge in deep scene cnns. In ICLR, 2015.
|
| 297 |
+
X. Zhu. Machine teaching for bayesian learners in the exponential family. In NIPS, 2013.
|
| 298 |
+
X. Zhu. Machine teaching: An inverse problem to machine learning and an approach toward optimal education. In AAAI, 2015.
|
| 299 |
+
B. Zoph and Q. V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017.
|
| 300 |
+
|
| 301 |
+
# S-1 EXPERIMENT DETAILS
|
| 302 |
+
|
| 303 |
+
In our experiments, we disable dropout layers in the networks due to the randomness and computational cost they introduce in distillation. Moreover, we initialize the distilled learning rates with a constant between 0.001 and 0.02 depending on the task, and use the Adam solver (Kingma and Ba, 2015) with a learning rate of 0.001. For random initialization and random pre-trained weights, we sample 4 to 16 initial weights in each optimization step. We run all the experiments on NVIDIA 1080 Ti, 2080 Ti, Titan $\mathrm { X p }$ , and V100 GPUs. We use one GPU for fixed initial weights and up to four GPUs for random initial weights. Each training typically takes 1 to 6 hours.
|
| 304 |
+
|
| 305 |
+
Below we describe the details of our baselines using real training images.
|
| 306 |
+
|
| 307 |
+
• Random real images: We randomly sample the same number of real images per category. We evaluate the performance over 10 randomly sampled sets. Optimized real images: We sample 50 sets of real images using the procedure above, pick 10 sets that achieve the best performance on 20 held-out models and 1024 randomly chosen training images, and evaluate the performance of these 10 sets.
|
| 308 |
+
• $k$ -means++: For each category, we use $k$ -means $^ { + + }$ (Arthur and Vassilvitskii, 2007) clustering to extract the same number of cluster centroids as the number of distilled images in our method. We evaluate the method over 10 runs.
|
| 309 |
+
• Average real images: We compute the average image of all the images in each category, which is repeated to match the same total number of images. We evaluate the model only once because average images are deterministic.
|
| 310 |
+
|
| 311 |
+
To enforce our optimized learning rate to be positive, we apply softplus to a scalar trained parameter. For continual learning experiment on CIFAR10 dataset, to compare with GEM (Lopez-Paz and Ranzato, 2017), we replace the Batch normalization (Wu and He, 2018) with Group normalization (Ioffe and Szegedy, 2015) in RESNET18 (He et al., 2016), as it is difficult to run back-gradient optimization through batch norm running statistics. For a fair comparison, we use the same architecture for our method and other baselines.
|
| 312 |
+
|
| 313 |
+
For dataset distillation experiments with pre-trained initial weights, distilled images are initialized with $\mathcal { N } ( 0 , 1 )$ at the beginning of training. For other experiments, distilled images are initialized with random real samples, unless otherwise stated.
|
| 314 |
+
|
| 315 |
+
# S-1.1 CONTINUAL LEARNING EXPERIMENT DETAILS
|
| 316 |
+
|
| 317 |
+
For the compared continual learning methods, we report the best report from the following combinations of hyper-parameters:
|
| 318 |
+
|
| 319 |
+
• GEM: – $\gamma \in \{ 0 , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 \} .$ – learning rate $= 0 . 1$ .
|
| 320 |
+
|
| 321 |
+
• iCARL: – regularization $\in \{ 0 . 0 0 1 , 0 . 0 0 3 , 0 . 0 1 , 0 . 0 3 , 0 . 1 , 0 . 3 , 1 . 0 \} .$ – learning rate $= 0 . 1$ .
|
| 322 |
+
|
| 323 |
+
# S-2 ADDITIONAL EXPERIMENTS RESULTS
|
| 324 |
+
|
| 325 |
+
• Figures 4 and 5 show distilled images trained for random initializations on MNIST and CIFAR10.
|
| 326 |
+
• Figures 6, 7, and 8 show distilled images trained for adapting random pre-trained models on digits datasets including MNIST, USPS, and SVHN.
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
Figure 4: Dataset distillation for random initializations on MNIST. This batch of 100 distilled images are repeatedly applied in $2 0 0 0 \mathrm { G D }$ steps.. These images train average test accuracy to $8 8 . 5 1 \% \pm 1 . 1 1 \%$ .
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 5: Dataset distillation for random initializations on CIFAR10. This batch of 100 distilled images are repeatedly applied in $5 0 \mathrm { G D }$ steps. These images train average test accuracy to $4 1 . 2 3 \% \pm 0 . 8 8 \%$ .
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 6: Dataset distillation for adapting random pretrained models from USPS to MNIST. 100 distilled images are split into $1 0 \mathrm { G D }$ steps, shown as 10 rows here. Top row is the earliest GD step, and bottom row is the last. The 10 steps are iterated over three times to finish adaptation, leading to a total of $3 0 \mathrm { G D }$ steps. These images train average test accuracy on 200 held out models from $6 7 . 5 4 \% \pm 3 . 9 1 \%$ to $9 2 . 7 4 \% \pm 1 . 3 8 \%$ .
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 7: Dataset distillation for adapting random pretrained models from MNIST to USPS. 100 distilled images are split into $1 0 \mathrm { G D }$ steps, shown as 10 rows here. Top row is the earliest GD step, and bottom row is the last. The 10 steps are iterated over three times to finish adaptation, leading to a total of $3 0 \mathrm { G D }$ steps. These images train average test accuracy on 200 held out models from $9 0 . 4 3 \% \pm 2 . 9 7 \%$ to $9 5 . 3 8 \% \pm 1 . 8 1 \%$ .
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 8: Dataset distillation for adapting random pretrained models from SVHN to MNIST. 100 distilled images are split into $1 0 \mathrm { G D }$ steps, shown as 10 rows here. Top row is the earliest GD step, and bottom row is the last. The 10 steps are iterated over three times to finish adaptation, leading to a total of $3 0 \mathrm { G D }$ steps. These images train average test accuracy on 200 held out models from $5 1 . 6 4 \% \pm 2 . 7 7 \%$ to $8 5 . 2 1 \% \pm 4 . 7 3 \%$ .
|
md/train/zfO1MwBFu-/zfO1MwBFu-.md
ADDED
|
@@ -0,0 +1,476 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFORMATION THEORETIC REGULARIZATION FOR LEARNING GLOBAL FEATURES BY SEQUENTIAL VAE
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Sequential variational autoencoders (VAEs) with global latent variable $z$ have been studied for the purpose of disentangling the global features of data, which is useful in many downstream tasks. To assist the sequential VAEs further in obtaining meaningful $z$ , an auxiliary loss that maximizes the mutual information (MI) between the observation and $z$ is often employed. However, by analyzing the sequential VAEs from the information theoretic perspective, we can claim that simply maximizing the MI encourages the latent variables to have redundant information and prevents the disentanglement of global and local features. Based on this analysis, we derive a novel regularization method that makes $z$ informative while encouraging the disentanglement. Specifically, the proposed method removes redundant information by minimizing the MI between $z$ and the local features by using adversarial training. In the experiments, we trained state-space and autoregressive model variants using speech and image datasets. The results indicate that the proposed method improves the performance of the downstream classification and data generation tasks, thereby supporting our information theoretic perspective in the learning of global representations.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Uncovering the global factors of variation from high-dimensional data is a significant and relevant problem in representation learning (Bengio et al., 2013). For example, a global representation of images that presents only the identity of the objects and is invariant to the detailed texture would assist in downstream semi-supervised classification (Ma et al., 2019). In addition, the representation is known to be useful in the controlled generation of data. Obtaining the representation allows us to manipulate the voice of the speaker in speeches (Yingzhen & Mandt, 2018), or generate images that share similar global structures (e.g. the structure of objects) but varying details (Razavi et al., 2019).
|
| 12 |
+
|
| 13 |
+
Sequential variational autoencoders (VAEs) with a global latent variable $z$ have played an important role in the unsupervised learning of the global features. Specifically, we consider the sequential VAEs with a structured data generating process in which an observation $x$ at time $t$ (denoted as $\boldsymbol { x } _ { t }$ ) is generated from a global feature $z$ and local feature $s _ { t }$ . Then, the $z$ of such sequential VAEs can acquire only global information invariant to $t$ . For example, Yingzhen & Mandt (2018) demonstrated that a disentangled sequential autoencoder (DSAE), which combines state-space models (SSMs) with a global latent variable $z$ , can uncover the speaker information from speeches. Furthermore, Chen et al. (2017); Gulrajani et al. (2017) proposed a VAE with a PixelCNN decoder (denoted as PixelCNN-VAE), which combines autoregressive models (ARMs) and $z$ . In both methods, the hidden state of the sequential model (either SSMs or ARMs) is designed to capture local information, while an additional latent variable $z$ captures global information.
|
| 14 |
+
|
| 15 |
+
Unfortunately, the design of the aforementioned structured data generating process alone is insufficient to uncover the global features in practice. A typical issue is that latent variable $z$ is ignored by a decoder (SSMs or ARMs) and becomes uninformative. This phenomenon occurs as follows: with expressive decoders, such as SSMs or ARMs, the additional latent variable $z$ cannot assist in improving the evidence lower bound (ELBO), which is the objective function of VAEs; therefore, the decoders will not use $z$ (Chen et al., 2017; Alemi et al., 2018). The phenomenon in which the latent variables are ignored is referred to as posterior collapse (PC). To alleviate this issue, several studies have proposed regularizing the mutual information (MI) between $x$ and $z$ to be large, e.g., using $\beta$ -VAE (Alemi et al., 2018). A higher MI $I ( x ; z )$ indicates that $z$ has significant information regarding $x$ ; this regularization prevents $z$ from becoming uninformative.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Comparison of (a) MI-maximizing regularization and (b) the proposed method, using a Venn diagram of information theoretic measures of $x , z ,$ , and $s$ .
|
| 19 |
+
|
| 20 |
+
In this paper, we further analyze the MI-maximization and claim that merely maximizing $I ( x ; z )$ is insufficient to uncover the global factors of variation. Figure 1-(a) summarizes the issue of the MI-maximization. As illustrated in the Venn diagram, the MI can be decomposed into $I ( x ; z ) =$ $I ( x ; z | s ) + I ( x ; z ; s )$ . Maximizing the first term $I ( x ; z | s )$ is beneficial, as it measures the informativeness of $z$ about $x$ given a local feature $s$ . However, maximizing the second term $I ( x ; z ; s )$ might cause a negative effect, because it would also increase $I ( z ; s )$ . In other words, maximizing $I ( x ; z )$ would encourage latent variables to have redundant information. For example, when $I ( x ; z )$ becomes so large that $z$ retains all (local and global) information of $x$ , the downstream classification performance would be degrated. Also, when local variables still contain global information due to large $I ( z ; s )$ , it becomes difficult to control speaker information in speeches using a DSAE. See Appendix A for empirical evidence that the MI-maximization increases $I ( z ; s )$ , as discussed above.
|
| 21 |
+
|
| 22 |
+
Based on the analysis, we propose a new information theoretic regularization method for disentangling the global factors. Specifically, our method minimizes $I ( z ; s )$ , in addition to maximizing $I ( x ; z )$ similar to prior work (Figure 1-(b)). As $I ( z ; s )$ measures the dependence between $z$ and $s$ , our method encourages $z$ and $s$ to have different information, i.e., the disentanglement of global and local factors. We call our method CMI-maximizing regularization, as it is the lower bound of the conditional mutual information (CMI) $I ( x ; z | s )$ . Furthermore, we introduce an adversarial training technique for estimating the CMI. A simple way to estimate it would be considering $I ( x ; z )$ and $I ( z ; s )$ independently, but it might result in compounding approximation errors. Instead, we use the formularization of $\beta$ -VAE and adversarial training (Ganin et al., 2016), which reduce the number of terms to be approximated. Specifically, we approximate the upper bound of $I ( z ; s )$ using a density ratio trick (DRT) (Nguyen et al., 2008), where an adversarial classifier models the density ratio. Once we estimate the bound, $I ( z ; s )$ can be minimized via backpropagation through the classifier.
|
| 23 |
+
|
| 24 |
+
In our experiments, we used DSAE and PixelCNN-VAE as illustrative examples of the SSM and ARM variants. In addition to evaluate the quality of global latent variable as in previous studies, we also evaluated the ability of controlled generation using a novel evaluation method inspired by Ravuri & Vinyals (2019). In the experiments, the CMI-maximizing regularization consistently outperformed the MI-maximizing one on image and speech datasets. These results support (i) our information theoretic view of learning global features: the sequential VAEs can suffer from obtaining redundant features when merely maximizing the MI. Also, the results support that (ii) regularizing $I ( x ; z )$ and $I ( z ; s )$ is complementary: learning global features can be facilitated by not only making $z$ informative, but also the control for which aspect of $x$ information (global or local) goes into $z$ .
|
| 25 |
+
|
| 26 |
+
Our contribution can be summarized as follows: (i) through our analysis, we reveal the potential negative side-effect of MI-maximizing regularization, which has been standard in learning global representation with sequential VAEs. Then, the analysis encourages the sequential VAE community to seek for new regularization approach. (ii) In order to learn good global representation, we proposed regularizing $I ( x ; z )$ and $I ( z ; s )$ at the same time. $I ( x ; z )$ and $I ( x ; z )$ are robustly shown to work complementary by our experiments using two models and two domains (speech and image datasets). This finding would help improve various sequential VAEs proposed before.
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
Figure 2: Graphical models for (a) DSAE and (b) PixelCNN-VAE.
|
| 30 |
+
|
| 31 |
+
# 2 PRELIMINARY
|
| 32 |
+
|
| 33 |
+
# 2.1 SEQUENTIAL VAES FOR LEARNING GLOBAL REPRESENTATIONS
|
| 34 |
+
|
| 35 |
+
Here we first explain the standard VAE; then, we give overviews of the DSAE and PixelCNN-VAE. Both models are shown to be interpreted as having two types of the latent variables, global $z$ and local $s _ { t }$ ; although it is not explicitly stated for PixelCNN-VAE. Here, $s _ { t }$ is designed to influence particular timesteps or dimensions of $x$ (e.g., a single-frame in a speech or a small area of pixels in an image). On the other hand, $z$ influences all the timesteps of $x$ , although $z$ of DSAE and PixelCNN-VAE are imposed on different architectural constraints (discussed in Appendix C).
|
| 36 |
+
|
| 37 |
+
Variational autoencoder (VAE) Let $\begin{array} { r } { p ( x ) : = \int p ( z ) p ( x | z ) d z } \end{array}$ be a latent variable model, whose decoder $p ( x | z )$ is parameterized by a deep neural network (DNN). Using an encoder distribution $q ( z | x )$ , which is also parameterized by a DNN, the VAEs maximize ELBO:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { E L B O } } : = \mathbb { E } _ { p _ { d } ( x ) } \big [ \mathbb { E } _ { q ( z | x ) } [ \log p ( x | z ) ] - D _ { \mathrm { K L } } ( q ( z | x ) | | p ( z ) ) \big ] . } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
Here, $p _ { d } ( x )$ denotes the data distribution. ELBO contains two terms: the reconstruction error and the Kullback-Leibler (KL) divergence between encoder $q ( z | x )$ and the prior $p ( z )$ .
|
| 44 |
+
|
| 45 |
+
Disentangled sequential autoencoder DSAE (Yingzhen & Mandt, 2018) is an extension of the SSMs for modeling the global and local features of sequential data as separate latent variables. Using the disentangled variables, DSAE can control the outputs (e.g., perform voice conversion). DSAE has a global latent variable $z$ and a local latent variable $s _ { t }$ , and generates an observation $x _ { t }$ at time $t$ from $z$ and $s _ { t }$ . The ELBO can be expressed as follows:
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\begin{array} { r l r } { { \mathcal { L } _ { \mathrm { S S M } } : = - \mathrm { R e c o n - K L } ( z ) - \mathrm { K L } ( s ) , } } \\ & { } & \\ & { } & { \quad \mathrm { w h e r e ~ } \mathrm { R e c o n } = - \mathbb { E } _ { q ( x , z , s ) } [ \underset { t = 1 } { \overset { T } { \sum } } \log p ( x _ { t } | s _ { t } , z ) ] , \mathrm { K L } ( z ) = \mathbb { E } _ { q ( x , z , s ) } [ D _ { \mathrm { K L } } ( q ( z | x _ { \leq T } ) | | p ( z ) ) ] , } \\ & { } & \\ & { } & { \quad \mathrm { K L } ( s ) = \mathbb { E } _ { q ( x , z , s ) } [ \underset { t = 1 } { \overset { T } { \sum } } D _ { \mathrm { K L } } ( q ( s _ { t } | x _ { \leq T } , z , s _ { t - 1 } ) | | p ( s _ { t } | s _ { t - 1 } ) ) ] . } \end{array}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
Here, $p ( s _ { t } | s _ { t - 1 } )$ is a prior, $q { \big ( } z | x _ { \leq T } )$ and $q \big ( s _ { t } | x _ { \le T } , z , s _ { t - 1 } \big )$ are encoders, $p ( \boldsymbol { x } _ { t } | \boldsymbol { s } _ { t } , z )$ is a decoder, and $q ( x , z , s ) : = p _ { d } ( x ) q ( z | x ) q ( s | x , z )$ . Furthermore, $x _ { < t }$ denotes all the elements of the sequences up to $t$ , and $x$ denote $x : = x _ { \leq T }$ . Figure 2-(a) illustrates the data generating process.
|
| 52 |
+
|
| 53 |
+
VAE with PixelCNN decoder PixelCNN-VAE is designed to take advantage of both PixelCNN and VAEs. VAEs are known to fail in terms of capturing the local features of images, such as textures and sharp edges. Conversely, PixelCNN is good at capturing the local features, but often fails to generate globally coherent images and has no latent variables. Then, successfully trained PixelCNN-VAEs would generate high-fidelity data and induce latent variable $z$ , which maintains only the global information by discarding the local information (Gulrajani et al., 2017).
|
| 54 |
+
|
| 55 |
+
PixelCNN-VAE can be interpreted as a structured VAE in which $x _ { t }$ is generated from the global latent variable $z$ and local variable $s _ { t }$ as follows. First, the autoregressive decoder is expressed as $p ( x _ { \le T } | z ) \ = \ \Pi _ { t = 1 } ^ { T } p ( x _ { t } | z , x _ { < t } )$ . This means that for every timestep $t .$ , $x _ { t }$ is sampled from $p ( x _ { t } | \boldsymbol { z } , \boldsymbol { x } _ { < t } )$ using previous observations $x _ { < t }$ and the latent variable $z$ . Secondly, we assume that the decoder can be decomposed as $p ( x _ { t } | \boldsymbol { z } , \boldsymbol { x } _ { < t } ) = p ( x _ { t } | \boldsymbol { z } , f ( \boldsymbol { x } _ { < t } ) )$ using a neural network $f$ (PixelCNN). Finally, we introduce a random variable $s _ { t }$ and its distribution ${ \overline { { q } } } ( s _ { t } | x _ { < t } ) = p ( s _ { t } | x _ { < t } ) : =$ $\delta ( s _ { t } - f ( x _ { < t } ) )$ , where $\delta$ denotes the Dirac’s delta, and $q ( s _ { t } | x _ { < t } ) \ = \ p ( s _ { t } | x _ { < t } )$ is employed to simplify the notation. With this notation, the decoder can be decomposed as $p ( x _ { t } | \boldsymbol { z } , \boldsymbol { x } _ { < t } ) \ =$ $p ( x _ { t } | \boldsymbol { z } , f ( \boldsymbol { x } _ { < t } ) ) \ = \ p ( x _ { t } | \boldsymbol { z } , s _ { t } ) p ( s _ { t } | \boldsymbol { x } _ { < t } )$ (details on the practical decomposition using PixelCNN have been provided in Appendix B). Thus, $x _ { t }$ can be regarded to be generated from $z$ and $s _ { t }$ , which is sampled from $p ( s _ { t } | x _ { < t } )$ (see, Figure 2-(b)). Furthermore, the ELBO is given as follows:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
{ \mathcal { L } } _ { \mathrm { A R M } } = - \ \mathrm { R e c o n } - \mathrm { K L } ( z ) .
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
# 2.2 MUTUAL INFORMATION-MAXIMIZING REGULARIZATION FOR SEQUENTIAL VAES
|
| 62 |
+
|
| 63 |
+
Despite the intentional data generating process of the sequential VAEs, the global latent variable $z$ often becomes uninformative. To alleviate this issue, MI-maximizing regularization methods are often employed to encourage $z$ to have $x$ information. Note that, here we consider the MI defined by the encoder (which corresponds to the representational MI in Alemi et al. (2018)):
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
I ( x ; z ) = \mathbb { E } _ { p _ { d } ( x ) q ( z | x ) } \big [ \log \frac { p _ { d } ( x ) q ( z | x ) } { p _ { d } ( x ) q ( z ) } \big ] ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
A representative example of the MI-maximizing regularization is $\beta$ -VAE, which was shown to work well in Alemi et al. (2018) and used as a baseline in He et al. (2019) (other methods are presented in Section 4). Because the ELBO (Eq. 1) contains a positive lower bound and a negative upper bound of $I ( x ; z )$ , the MI can be controlled by balancing the two terms using a weighting parameter $\beta$ . The concrete $\beta$ -VAE objectives for DSAE and PixelCNN-VAE are:
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\begin{array} { r l } & { \mathcal { V } _ { \mathrm { S S M } } : = - \mathrm { R e c o n } - \beta \mathrm { K L } ( z ) - \mathrm { K L } ( s ) , } \\ & { \mathcal { V } _ { \mathrm { A R M } } : = - \mathrm { R e c o n } - \beta \mathrm { K L } ( z ) . } \end{array}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
Alemi et al. (2018) use $\beta < 1$ to regularize $I ( x ; z )$ to be large, although $\beta$ -VAE was originally invented to encourage the independence of each dimension of $z$ with $\beta > 1$ by Higgins et al. (2017).
|
| 76 |
+
|
| 77 |
+
# 3 PROPOSED METHOD
|
| 78 |
+
|
| 79 |
+
# 3.1 DECOMPOSITION OF MUTUAL INFORMATION
|
| 80 |
+
|
| 81 |
+
Sequential VAEs with a global latent variable $z$ can in principle uncover global representation of data by exploiting its structured data generating process. Previous studies for the sequential VAEs have further regularized mutual information $I ( x ; z )$ to be large in order to alleviate posterior collapse (PC) (further discussed in Section 4). Unfortunately, the MI maximization is insufficient to uncover the global factor of variations, because it cannot control the type of information going into $z$ . More specifically, as indicated in Section 1, the MI is decomposed as follows:
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
I ( x ; z ) = I ( x ; z ; s ) + I ( x ; z | s ) = I ( z ; s ) - I ( z ; s | x ) + I ( x ; z | s ) .
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Simply maximizing $I ( x ; z )$ can increase $I ( z ; s )$ in the right-hand side, which is observed in our preliminary experiment in Appendix A. When $I ( z ; s )$ becomes large, $z$ is likely to have redundant local information, or conversely $s$ becomes to have global information. Which phenomenon occurs could depend on the network architecture, as discussed in Appendix C. In both cases, the performance of downstream tasks, e.g., classification from $z$ to the labels, or controlling the global characteristics of the decoder output using $z$ , is likely to be degraded. Furthermore, as well as the MI $I ( x ; z )$ , this MI $I ( z ; s )$ is defined by the encoder distribution $q ( z , s )$ (Appendix E). Then, although the graphical model of DSAE is designed such that $z$ and $s$ are independent, $I ( z ; s )$ is not necessarily zero, i.e., $p ( z , s ) = p ( z ) p ( s )$ does not necessarily mean $q ( z , s ) \stackrel { - } { = } q ( z ) q ( s )$ .
|
| 88 |
+
|
| 89 |
+
# 3.2 CONDITIONAL MUTUAL INFORMATION-MAXIMIZING REGULARIZATION
|
| 90 |
+
|
| 91 |
+
Considering the limitations of MI regularization, we need a method that can encourage both (i) the increasing of $I ( x ; z )$ to prevent $z$ from becoming uninformative, and (ii) the decreasing of $I ( z ; s )$ to prevent $z$ and $s$ from having information that is irrelevant to the global and local structure, respectively. Therefore, we propose maximizing the following objective as a regularization approach:
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
I ( x ; z ) - \alpha I ( z ; s ) .
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
As $I ( z ; s )$ measures the mutual dependence between $s$ and $z$ , minimizing $I ( z ; s )$ encourages $z$ and $s$ not to have redundant information. Then, the induced global variable $z$ would have more $x$ information, while $z$ and $s$ maintains only the global and local information, respectively. The $\alpha$ is a weighting parameter for balancing the two terms. In practice, we found that $\alpha = 1$ works reasonably; therefore, we used $\alpha = 1$ for the reminder of the study.
|
| 98 |
+
|
| 99 |
+
Furthermore, it is noteworthy that our method is closely related to CMI estimation. Specifically, when assuming $\alpha \geq 1$ ,
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
I ( x ; z | s ) = I ( x ; z ) - I ( z ; s ) + I ( z ; s | x ) \geq I ( x ; z ) - \alpha I ( z ; s ) = : I _ { \mathrm { C M I } ^ { \prime } } .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
It indicates that $I _ { \mathrm { C M I ^ { \prime } } } = I ( x ; z ) - \alpha I ( z ; s )$ is equal to the lower bound of CMI (further discussed in Appendix D). CMI is known to be useful in selecting the features that are both individually informative and two-by-two weakly dependant (Fleuret, 2004). Therefore, maximizing $I ( x ; z | s )$ as regularization would make the features $z$ and $s$ informative but disentangled.
|
| 106 |
+
|
| 107 |
+
Then, we present one of the tractable instances to estimate ${ \cal I } _ { \mathrm { C M I ^ { \prime } } }$ . A simple way to estimate ${ \cal I } _ { \mathrm { C M I ^ { \prime } } }$ may be to consider $I ( x ; z )$ and $I ( z ; s )$ independently; however, it must approximate both, $I ( x ; z )$ and $I ( z ; s )$ , which may complicate optimization. Fortunately, when we assume $\alpha = 1$ , we can reduce the number of terms to be approximated to only one, utilizing the $\beta$ -VAE formularization. First, we express ${ \cal I } _ { \mathrm { C M I ^ { \prime } } }$ as follows (the derivation is given in Appendix F):
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
I _ { \mathrm { C M I ^ { \prime } } } = I ( x ; z ) - I ( z ; s ) = \mathbb { E } _ { p _ { d } ( x ) } \big [ D _ { \mathrm { K L } } ( q ( z | x ) | | p ( z ) ) \big ] - D _ { \mathrm { K L } } ( q ( z , s ) | | p ( z ) q ( s ) ) .
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
The first term is the same as $\operatorname { K L } ( z )$ in Eqs. 5 and 6, and is used for the $\beta$ -VAE formularization. The second term is the upper bound of $I ( z ; s )$ because $D _ { \mathrm { K L } } ( q ( \boldsymbol { z } , \boldsymbol { s } ) | | p ( \boldsymbol { z } ) q ( \boldsymbol { s } ) ) = I ( \boldsymbol { z } ; \boldsymbol { s } ) +$ $D _ { \mathrm { K L } } ( q ( \boldsymbol { z } ) | | p ( \boldsymbol { z } ) )$ .
|
| 114 |
+
|
| 115 |
+
Because the second term is difficult to calculate analytically, we estimate it using the DRT (Nguyen et al., 2008; Sugiyama et al., 2012), as performed in standard generative adversarial networks (Mohamed & Lakshminarayanan, 2017). By introducing the labels $y = 1$ for samples from $q ( z , s )$ and $y = 0$ for those from $p ( z ) q ( s )$ , we re-express these distributions in conditional form, i.e., $q ( z , s ) : = p ( z , s | y = 1 )$ and $p ( \bar { z } ) \dot { q } ( s ) : = p ( \bar { z } , \bar { s } | y = 0 )$ . The density ratio betwwen $q ( z , s )$ and $p ( z ) q ( s )$ can be computed using these conditional distributions as follows:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\frac { q ( z , s ) } { p ( z ) q ( s ) } = \frac { p ( z , s | y = 1 ) } { p ( z , s | y = 0 ) } = \frac { p ( y = 1 | z , s ) } { p ( y = 0 | z , s ) } ,
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
where we used Bayes’ rule and assumed that the marginal class probabilities are equal, i.e. $p ( y =$ $0 ) = p ( y = 1 )$ . Here, $p ( y | z , s )$ can be approximated with a discriminator $D ( z , s )$ , which outputs $D = 1$ when $z , s \sim _ { i . i . d }$ . $q ( z , s )$ , and $D = 0$ when $z , s \sim _ { i . i . d }$ . $q ( s ) p ( z )$ . Then, Eq. 10 can be approximated as follows:
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
I _ { \mathrm { C M I ^ { \prime } } } \approx \mathbb { E } _ { p _ { d } ( x ) } [ D _ { \mathrm { K L } } ( q ( { \boldsymbol { z } } | { \boldsymbol { x } } ) | | { \boldsymbol { p } } ( { \boldsymbol { z } } ) ) ] - \mathbb { E } _ { q ( { \boldsymbol { z } } , s ) } \big [ \log \frac { D ( { \boldsymbol { z } } , s ) } { 1 - D ( { \boldsymbol { z } } , s ) } \big ] = : I _ { \mathrm { C M I - D R T } } .
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
We parameterize $D ( z , s )$ with a DNN and train it alternately with the VAE objectives. Specifically, we train $D$ to maximize the following objective with Monte Carlo estimates:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\begin{array} { r } { \mathbb { E } _ { q ( z , s ) } [ \log D ( z , s ) ] + \mathbb { E } _ { p ( z ) q ( s ) } [ \log \bigl ( 1 - D ( z , s ) \bigr ) ] . } \end{array}
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
Now, we can introduce the concrete objectives of the DSAEs and PixelCNN-VAEs with a CMI regularization term. Adding $I _ { \mathrm { C M I - D R T } }$ as a regularization term to Eqs. 2 and 3 with a weighting parameter $\gamma$ , we obtain the objective functions of our proposed method that need to be maximized:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\begin{array} { r l } & { \mathcal { I } _ { \mathrm { S S M } } : = \mathcal { L } _ { \mathrm { S S M } } + \gamma I _ { \mathrm { C M I - D R T } } = - \mathrm { R e c o n - K L } ( s ) - ( 1 - \gamma ) \mathrm { K L } ( z ) - \gamma I ^ { \prime } ( z ; s ) , } \\ & { \mathcal { I } _ { \mathrm { A R M } } : = \mathcal { L } _ { \mathrm { A R M } } + \gamma I _ { \mathrm { C M I - D R T } } = - \mathrm { R e c o n - } ( 1 - \gamma ) \mathrm { K L } ( z ) - \gamma I ^ { \prime } ( z ; s ) , } \\ & { \quad \quad \quad \mathrm { w h e r e } I ^ { \prime } ( z ; s ) = \mathbb { E } _ { q ( z , s ) } [ \log \displaystyle \frac { D ( z , s ) } { 1 - D ( z , s ) } ] . } \end{array}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
Considering $( 1 - \gamma ) \mathrm { K L } ( z )$ is equivalent to the weighting technique in $\beta$ -VAE (note that $1 - \gamma = \beta$ , and see Eqs. 5 and 6), the proposed method consists of the $\beta$ -VAE objective and $- I ^ { \prime } ( z ; s )$ . As noted in Section 2.2, $\beta$ -VAE is effective for alleviating PC. However, because $\beta$ -VAE alone is insufficient for decreasing the redundancy of $z$ and $s$ , minimizing $I ^ { \prime } ( z , s )$ is employed.
|
| 140 |
+
|
| 141 |
+
Finally, we discuss alternative choices to estimate the second term of Eq. 10. While we chose to approximate the term with a discriminator, it can also be approximated with other distance such as maximum mean discripancy (MMD), or it can be minimized via Stein variational gradient (see, Zhao et al. (2019)). However, a weakness of these methods is that they are difficult to apply efficiently in high dimensions. Unfortunately, because the second term treats the random variable $[ z , s _ { 1 } , . . . , s _ { T } ]$ , the dimension size becomes high when $T$ is large. On the other hand, adversarial training requires only one assumption, i.e., $D$ perfectly approximates the true density ratio. In practice, while this assumption does not always hold true (Moyer et al., 2018; Iwasawa et al., 2020), it is also empirically known that original objectives (in our case, minimizing $D _ { \mathrm { K L } } ( q ( \boldsymbol { z } , \boldsymbol { s } ) | | p ( \boldsymbol { z } ) q ( \boldsymbol { s } ) ) )$ can be reasonably achieved (Ganin et al., 2016). In addition, various studies (e.g., Miyato et al. (2018); Iwasawa et al. (2020)) have proposed techniques to improve the robustness of adversarial training, and it has been shown to scale to high dimensions when carefully designed (Brock et al., 2019).
|
| 142 |
+
|
| 143 |
+
# 4 RELATED WORKS
|
| 144 |
+
|
| 145 |
+
This study is closely related to the literature on disentangled representation. Locatello et al. (2019) claimed that pure unsupervised disentangling (Chen et al., 2016; Higgins et al., 2017; Kim & Mnih, 2018) is fundamentally impossible, whereas using rich supervision (Kulkarni et al., 2015) can be costly. Thus, the use of inductive bias or weak supervision (Shu et al., 2020) has been encouraged. The assumption that data are generated from global and local factors is a representative example of the inductive bias. Such data generating process can be probabilistically expressed by the sequential VAEs with a global latent variable. Then, the sequential VAEs have been studied for disentangling styles and topics of texts (Bowman et al., 2016), object identities from the detailed textures of images (Chen et al., 2017), content and motion of movies (Hsieh et al., 2018), and the speaker and linguistic information of speeches (Hsu et al., 2017; Yingzhen & Mandt, 2018). Although this paper focused on DSAE and PixelCNN-VAE as examples, our method could be also combined with them.
|
| 146 |
+
|
| 147 |
+
Unfortunately, the design of the structured data generating processes alone is often insufficient to learn the global features. To address this issue, Bowman et al. (2016); Chen et al. (2017) initially proposed to weaken the decoder because PC often occurs when using highly expressive decoders. Subsequently, various methods have been proposed to control the MI $I ( x ; z )$ with a regularization term, which does not require problem-specific architectural constraints of Bowman et al. (2016); Chen et al. (2017). Concrete examples of MI-maximizing regularization methods are as follows: InfoVAE: (Zhao et al., 2019) estimates $I ( x ; z )$ using the MMD or adversarial training. $\beta$ -VAE: Alemi et al. (2018) proposed targeting a specific rate (the KL term value) via $\beta$ -VAE , and observed that the objective with $\beta < 1$ produces solutions to alleviate PC. $\beta$ -VAE is a simpler than InfoVAE since it does not require an approximation of $I ( x ; z )$ . Auxiliary loss: (Lucas & Verbeek, 2018) uses the auxiliary tasks of predicting $x$ from $z$ , which approximates the minimization of conditional entropy $H ( x | z )$ . The minimization of $H ( x | z )$ is equivalent to maximizing $I ( x ; z )$ because the data entropy $H ( x )$ is constant. Discriminative objective: (Hsu et al., 2017) predicts a sequence index from $z$ , which also approximates $H ( x | z )$ minimization in the finite sample case.
|
| 148 |
+
|
| 149 |
+
Various studies have attemted to separate relevant from irrelevant information via informationtheoretic regularization. Namely, the studies in the literature regarding domain-invariant representation proposed to learn the invariant representation using adversarial training (Ganin et al., 2016; Xie et al., 2017; Liu et al., 2018), variational information bottleneck frameworks (Moyer et al., 2018), or Hilbert-Schmidt independence criterion (Jaiswal et al., 2019). Our regularization term of minimizing $I ( z ; s )$ is inspired and similar to these studies; however, it differs in considering PC at the same time (i.e., maximizing $I ( x ; z ) )$ . Also, the separation could be achieved by the design of network architectures, as was performed in VQ-VAE2 (Razavi et al., 2019). Our proposal is the regularization term and orthogonal to such architecture choices.
|
| 150 |
+
|
| 151 |
+
Also, our analysis is similar to that of Moyer et al. (2018), but differs in two ways. Firstly, while the phenomenon that ”large $I ( x ; z )$ results in large $I ( z ; s ) ^ { \prime }$ was discussed by them, the whole mechanism that ”MI-maximizing regularization for alleviating PC has a negative side-effect to increase $I ( z ; s ) ^ { , }$ ” has been overlooked in the sequential VAE community. Secondly, by explicitly considering the relationship between the two latent variables $z$ and $s$ , our analysis is able to highlight a new problem. For example, Moyer et al. (2018) consider the relationship between the latent variable $z$ and the observed nuisance factor $s$ . Then, their focus is only on removing the redundant information from $z$ . On the other hand, our analysis highlights the need to consider removing the redundant information from $s$ at the same time as removing the redundant information from $z$ . Although the former has been overlooked, it is an important issue in applications such as voice conversion.
|
| 152 |
+
|
| 153 |
+
Some studies have also proposed methods for alleviating PC, which are complementary to MI maximization. Lucas et al. (2019) argued that the variance of the decoder influences the stability of local stationary points corresponding to PC. He et al. (2019) proposed a method that remedies ill-trainingdynamics. Our study differs in aiming at obtaining informative and disentangled representation with sequential VAEs, although they could, in principle, be combined with our method.
|
| 154 |
+
|
| 155 |
+
From technical perspective, our work is also related to a feature selection technique based on CMI (Fleuret, 2004). CMI is known to be useful in selecting the features that are both individually informative and two-by-two weakly dependant. Then, the CMI-based technique is different from the MI-based one in considering the independence of the features. Moreover, it is different from previous studies for disentangled representation learning, e.g., Higgins et al. (2017); Kim & Mnih (2018); Liu et al. (2018) control only the independence of latent factors. Also, Mukherjee et al. (2019) first proposed the estimation of CMI using DNNs; however, our method is different in utilizing the encoder distribution of VAEs to improve the estimation (Zhao et al., 2019; Poole et al., 2019).
|
| 156 |
+
|
| 157 |
+
# 5 EXPERIMENTS
|
| 158 |
+
|
| 159 |
+
# 5.1 SETTINGS
|
| 160 |
+
|
| 161 |
+
We performed experiments to confirm the effect of regularizing both $I ( x ; z )$ and $I ( z ; s )$ for learning good representation, using DSAE and PixelCNN-VAE as representative examples of the sequential VAEs. We used the speech corpus TIMIT (Garofolo et al., 1992) for the DSAE, and evaluated representation quality using a speaker verification task, as was performed in previous studies (Hsu et al., 2017; Yingzhen & Mandt, 2018). For PixelCNN-VAE, we trained the VAE with a 13-layer PixelCNN decoder on the statically binarized MNIST and Fashion-MNIST (Xiao et al., 2017) datasets. Using the trained models, we performed linear classification from $z$ to class labels to evaluated representation quality, as was performed in (Razavi et al., 2019), and then evaluated the ability of controlled generation. $z$ , which has a dimensional size of 32, was concatenated with the feature map outputted from the fifth layer of the PixelCNN (which corresponds to $s$ , see Appendix B), and was passed to the sixth layer. Further details are given in Appendix G.
|
| 162 |
+
|
| 163 |
+
As the proposed method, we employed the objective functions $\mathcal { I } _ { \mathrm { S S M } }$ and $\mathcal { I } _ { \mathrm { A R M } }$ in Eqs. 13 and 14 (denoted as CMI-VAE). We implemented a discriminator $D$ as a CNN that receives $s$ and $z$ as inputs (Appendix I), and trained it alternately with the VAEs. As baseline methods, we employed $\beta$ -VAE (see, Section 2.2). The objectives of $\beta$ -VAE are given in Eqs. 5 and 6, and are equal to CMI-VAE, except for not having the $I ^ { \prime } ( z ; s )$ term. Moreover, we employed the regularization method proposed in Makhzani & Frey (2017); Zhao et al. (2019), which directly estimates and maximizes $I ( x ; z )$ with adversarial training (denoted as MI-VAE). In the method, $I ( x ; z )$ is added to ELBO (Eqs. 2 and 3) as a regularization term, along with a weighting term $\gamma$ (details can be found in Appendix H). The performances of the models were verified by changing the value of $\gamma$ .
|
| 164 |
+
|
| 165 |
+
# 5.2 SPEAKER VERIFICATION WITH DISENTANGLED SEQUENTIAL AUTOENCODERS
|
| 166 |
+
|
| 167 |
+
For a quantitative assessment of the global representation of DSAE, we evaluate whether $z$ can uncover the speaker individualities, which are the global features of speech. Specifically, we extract $z$ and $s _ { \leq T }$ from the test utterances using the mean of the encoders of the learned DSAE. Subsequently, we performed speaker verification by measuring the cosine similarity of the variables and evaluated the equal error rate (EER). Here, EER is measured for both $z$ and $s$ (denoted as $\operatorname { E E R } ( z )$ and EER(s), respectively), and $s _ { \leq T }$ is averaged over each utterance prior to its measurement. A lower $\operatorname { E E R } ( z )$ is preferable because it indicates that the model has an improved global representation, containing sufficient information of the speakers in a linear-separable form. Furthermore, a higher EER(s) is preferable because it indicates that $s$ does not have the redundant speaker information. In addition, we report $\operatorname { K L } ( z )$ (see, Eq. 2), which approximates the amount of information in $z$ .
|
| 168 |
+
|
| 169 |
+
Table 1 presents the values of $\operatorname { K L } ( z )$ and EER for the vanilla DSAE, $\beta$ -VAE, and CMI-VAE. Note that our results for vanilla DSAE differ from those reported in Yingzhen & Mandt (2018) $( \mathrm { D S A E ^ { * } }$ in the table), which may be due to differences in the unreported training settings. The table presents that (1) a lower $\gamma$ (such as 0) provides a lower EER(s), which indicates that $s$ have global information instead of $z$ owing to PC, without regularizing $I ( x ; z )$ . Furthermore, (2) given a fixed $\gamma$ , CMI-VAE consistently achieved a lower $\operatorname { E E R } ( z )$ and a higher EER(s) while having the same level of $\operatorname { K L } ( z )$ compared to $\beta$ -VAE. This indicates that regularizing $I ( z ; s )$ is complementary to MI-maximization ( $\beta$ -VAE), yielding a better $z$ and $s$ that have sufficient global or local information but are well compressed. Note that $\gamma \geq 0 . 8$ yields a higher $\operatorname { E E R } ( z )$ than $\gamma = 0 . 4$ , which may be due to the fact that the independence of each dimension of $z$ is worsened by increasing $\gamma$ , as indicated in Higgins et al. (2017), and the induced non-linear relation cannot be measured by the cosine similarity. In fact, $\gamma \geq 0 . 8$ presented a better performance in the voice conversion experiment in Appendix J, indicating that $z$ with $\gamma \geq 0 . 8$ has more global information, although the $\operatorname { E E R } ( z )$ is lower. Also, note that the $\operatorname { E E R } ( Z )$ reported in Hsu et al. (2017) is lower than the results for CMI-CAE here. However, we believe that our claim, ”regularizing $I ( x ; z )$ and $I ( z ; s )$ is complementary”, is defended even if we could not achieve state-of-the-art results.
|
| 170 |
+
|
| 171 |
+
Table $1 \colon \ \mathrm { K L }$ term and EER values of DSAE trained using TIMIT. Each model was trained with a weight $\gamma$ . The $\uparrow$ and $\downarrow$ indicate that the purpose was to obtain a high and low score, respectively.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Model</td><td>Y</td><td>KL(z)</td><td>EER(z)↓</td><td>EER(s) ↑</td></tr><tr><td>DSAE*</td><td>0.00</td><td>-</td><td>4.82</td><td>18.89</td></tr><tr><td>DSAE(our implementation)</td><td></td><td>18.00</td><td>11.01</td><td>18.64</td></tr><tr><td>+ β-VAE</td><td>0.40 (β=0.6)</td><td>53.28</td><td>3.88</td><td>29.45</td></tr><tr><td>+ CMI-VAE</td><td></td><td>54.13</td><td>3.43</td><td>30.96</td></tr><tr><td>+ β-VAE</td><td>0.80 (β=0.2)</td><td>145.88</td><td>4.33</td><td>38.84</td></tr><tr><td>+ CMI-VAE</td><td></td><td>145.09</td><td>3.99</td><td>41.30</td></tr><tr><td>+ β-VAE</td><td>0.90(β=1e-) 1)</td><td>202.52</td><td>4.55</td><td>39.42</td></tr><tr><td>+ CMI-VAE</td><td></td><td>199.89</td><td>4.39</td><td>41.25</td></tr><tr><td>+ β-VAE</td><td>0.99 (β= 1e-2)</td><td>364.71</td><td>6.33</td><td>38.63</td></tr><tr><td>+ CMI-VAE</td><td></td><td>361.03</td><td>5.06</td><td>40.08</td></tr></table>
|
| 174 |
+
|
| 175 |
+
# 5.3 VAES WITH PIXELCNN DECODER
|
| 176 |
+
|
| 177 |
+
Unsupervised learning for image classification For a quantitative assessment of the representation $z$ of PixelCNN-VAEs, we performed a logistic regression from $z$ to the class labels $y$ on MNIST and Fashion-MNIST. Specifically, first, we extracted $z$ from 1000 training samples using the mean of $q ( z | x )$ , where each of the 10 classes had 100 samples, and trained the classifier with a total of 1000 samples. Then, we evaluated the acccuracy of the logistic regression (AoLR) on the test data. A high AoLR indicates that $z$ succeeds in capturing the label information in a linear-separable form.
|
| 178 |
+
|
| 179 |
+
Figures 3(a) and 3(b) present AoLR for $\beta$ -VAE, MI-VAE, and CMI-VAE, along with the ELBO and $\operatorname { K L } ( z )$ . In the figures, an upper left curve indicates that the method balance better compression (low $\operatorname { K L } ( z ) )$ and high downstream task performance. As shown in the figures, given a fixed $\gamma$ , the AoLRs for CMI-VAE are consistently better than those for $\beta$ -VAE and MI-VAE, although all the methods have the same level of $\operatorname { K L } ( z )$ . This indicates that CMI-VAE can extract more global information when compressing data to the same size as $\beta$ -VAE does. Note that a small $\gamma$ (such as $\gamma = 0$ ) and very large $\gamma$ degrade the AoLRs, which may be attributed to the same reason as explained in Section 5.2. Furthermore, the AoLRs of MI-VAE are lower than those of $\beta$ -VAE, which may be due to the adversarial training in MI-VAE causing optimization difficulities, as stated in Alemi et al. (2018).
|
| 180 |
+
|
| 181 |
+
Controlled generation Most previous works (Yingzhen & Mandt, 2018; He et al., 2019) have primarily focused on evaluating the quality of global representation. However, a better representation does not necessarily improve the performance of the controlled generation, as Nie et al. (2020) claimed. Then, to evaluate the ability of the controlled generation, we propose a modified version of the classification accuracy score (CAS) (Ravuri & Vinyals, 2019), called mCAS. CAS trains a classifier which predicts class labels only from the samples generated from conditional generative models, and then evaluates the classification accuracy on real images, thus measuring the sample quality and diversity of the model. CAS is not directly applicable to non-conditional models such as PixelCNN-VAEs. Instead, mCAS measures the ability of the model to produce high quality, diverse, but globally coherent (i.e., belonging to the same class) images for a given $z$ .
|
| 182 |
+
|
| 183 |
+

|
| 184 |
+
Figure 3: Comparison of CMI-VAE with $\beta$ -VAE and MI-VAE. Each maker for $\beta$ -VAE is annotated with the value of $\gamma$ . In the figures, an upper left curve is desirable because it shows the method balance better compression (low $\operatorname { K L } ( z ) )$ and high downstream task performance (AoLR and mCAS, see explanations in Section 5.3). Also, detailed results can be found in Appendix K.2.
|
| 185 |
+
|
| 186 |
+
In mCAS, we first prepared 100 real images $\{ x _ { i } \} _ { i = 1 } ^ { 1 0 0 }$ , along with their class labels $\{ y _ { i } \} _ { i = 1 } ^ { 1 0 0 }$ , where each of the 10 classes had 10 samples. Then, using the trained VAEs, we encoded each $x _ { i }$ into $z _ { i }$ , and decoded $z _ { i }$ to obtain 10 images $\{ \hat { x } _ { i , j } \} _ { j = 1 } ^ { 1 0 }$ for every $z _ { i }$ , thereby resulting in 1000 generated images (sample images $\hat { x }$ can be found in Appendix K.3). Finally, we trained the logistic classifier with the pairs $\{ ( \hat { x } _ { i , j } , y _ { i } ) | i \in \{ 1 , . . . , 1 0 0 \} , j \in \{ 1 , . . . , 1 0 \} \}$ and evaluated the performance on real test images. Intuitively, when the decoder ignores $z$ , the generated samples might belong to a class different from the original ones, which produces label errors. Moreover, when $z$ has excessive information regarding $x$ and the VAE resembles an identity mapping, the diversity of the generated samples decreases (recall that 10 samples are generated for every $z _ { i }$ ), which induces overfitting of the classifier. Therefore, to achieve a high mCAS, $z$ should capture only the global (label) information.
|
| 187 |
+
|
| 188 |
+
Figure 3(c) and 3(d) compares the mCAS along with $\operatorname { K L } ( z )$ on MNIST and Fashion-MNIST. In addition, the black horizontal line indicates the classification accuracy when the classifier is trained on 100 real samples $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { 1 0 0 }$ , and evaluated on real test images, which will be referred to as the baseline score. The following can be observed from the figures: (1) The mCAS of the three methods outperformed the baseline score, despite using only 100 labeled samples, as well as in the baseline score, indicating that properly regularized PixelCNN-VAEs could be used for data augmentation. (2) As expected, a significantly low $\operatorname { K L } ( z )$ gives a low mCAS because the decoder of the VAE does not utilize $z$ . Moreover, a significantly high $\operatorname { K L } ( z )$ also tends to degrade mCAS, because the decoder might resemble a one-to-one mapping from $z$ to $x$ and therefore, degrade the diversity. This phoenomenon can also be observed in the sample images in appendix K.3: there seems to be little diversity in samples drawn from $\beta$ -VAE and CMI-VAE with $\gamma = 0 . 6$ . (3) The curves for CMI-VAE are consistently left to those for $\beta$ -VAE, indicating that regularizing $I ( z ; s )$ is also complementary to regularizing $I ( x ; z )$ at the controlled generation.
|
| 189 |
+
|
| 190 |
+
# 6 DISCUSSIONS AND FUTURE WORKS
|
| 191 |
+
|
| 192 |
+
Based on the experimental results, it was confirmed that regularizing $I ( z ; s )$ is complementary to regularizing $I ( x ; z )$ , and leads to an improvement in the learning of global latent variables. Here, we chose to extend $\beta$ -VAE to construct the proposed objective function because we believe $\beta$ -VAE is the simplest MI-maximization method that requires fewer hyperparameters, widely used in (sequential) VAE community (e.g., He et al. (2019); Alemi et al. (2018)). However, other MI estimation methods, such as discriminative objective and MMD-based InfoVAE, can be extended to CMI regularization by the addition of the $I ( z ; s )$ minimization term (see, Section 3.2). Incorporating such MI maximization methods into the estimation of CMI, or stabilizing adversarial training with some technique (Miyato et al., 2018) might improve the performance, and this remains an issue to be addressed in a future work. Also, it would be interesting to approximate $I ( x ; z )$ and $I ( z ; s )$ separately, and tune the strength of them independently. Future studies may also apply the proposed method to encourage the learning of the representation that captures the global factors of the environment such as maps, to support reinforcement learning, as suggested in Gregor et al. (2019).
|
| 193 |
+
|
| 194 |
+
# REFERENCES
|
| 195 |
+
|
| 196 |
+
Alexander Alemi, Ben Poole, Ian Fischer, Joshua Dillon, Rif A Saurous, and Kevin Murphy. Fixing a broken elbo. In International Conference on Machine Learning, pp. 159–168, 2018.
|
| 197 |
+
|
| 198 |
+
Y Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35:1798–1828, 08 2013. doi: 10.1109/TPAMI.2013.50.
|
| 199 |
+
|
| 200 |
+
Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. In Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, pp. 10–21, 2016.
|
| 201 |
+
|
| 202 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In International Conference on Learning Representations, 2019.
|
| 203 |
+
|
| 204 |
+
Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems 29, pp. 2172–2180. Curran Associates, Inc., 2016.
|
| 205 |
+
|
| 206 |
+
Xi Chen, Diederik P. Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational Lossy Autoencoder. In Proc. 5th International Conference on Learning Representations, 2017.
|
| 207 |
+
|
| 208 |
+
Franc¸ois Fleuret. Fast binary feature selection with conditional mutual information. J. Mach. Learn. Res., 5:15311555, December 2004. ISSN 1532-4435.
|
| 209 |
+
|
| 210 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. J. Mach. Learn. Res., 2016.
|
| 211 |
+
|
| 212 |
+
J. Garofolo, Lori Lamel, W. Fisher, Jonathan Fiscus, D. Pallett, N. Dahlgren, and V. Zue. Timit acoustic-phonetic continuous speech corpus. Linguistic Data Consortium, 11 1992.
|
| 213 |
+
|
| 214 |
+
Karol Gregor, Danilo Jimenez Rezende, Frederic Besse, Yan Wu, Hamza Merzic, and Aaron van den ¨ Oord. Shaping belief states with generative environment models for RL. In Advances in Neural Information Processing Systems 32, pp. 13475–13487, 2019.
|
| 215 |
+
|
| 216 |
+
Ishaan Gulrajani, Kundan Kumar, Faruk Ahmed, Adrien Ali Taiga, Francesco Visin, David Vazquez, and Aaron Courville. Pixelvae: A latent variable model for natural images. In 5th International Conference on Learning Representations, 2017.
|
| 217 |
+
|
| 218 |
+
Junxian He, Daniel Spokoyny, Graham Neubig, and Taylor Berg-Kirkpatrick. Lagging inference networks and posterior collapse in variational autoencoders. In International Conference on Learning Representations, 2019.
|
| 219 |
+
|
| 220 |
+
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations, 2017.
|
| 221 |
+
|
| 222 |
+
Jun-Ting Hsieh, Bingbin Liu, De-An Huang, Li F Fei-Fei, and Juan Carlos Niebles. Learning to decompose and disentangle representations for video prediction. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 517–526. Curran Associates, Inc., 2018.
|
| 223 |
+
|
| 224 |
+
Wei-Ning Hsu, Yu Zhang, and James Glass. Unsupervised learning of disentangled and interpretable representations from sequential data. In Advances in Neural Information Processing Systems 30, pp. 1878–1889. 2017.
|
| 225 |
+
|
| 226 |
+
Yusuke Iwasawa, Kei Akuzawa, and Yutaka Matsuo. Stabilizing adversarial invariance induction from divergence minimization perspective. In Christian Bessiere (ed.), Proceedings of the TwentyNinth International Joint Conference on Artificial Intelligence, IJCAI-20, pp. 1955–1962. International Joint Conferences on Artificial Intelligence Organization, 7 2020. Main track.
|
| 227 |
+
|
| 228 |
+
Ayush Jaiswal, Rob Brekelmans, Daniel Moyer, Greg Ver Steeg, Wael AbdAlmageed, and Premkumar Natarajan. Discovery and separation of features for invariant representation learning. CoRR, abs/1912.00646, 2019. URL http://arxiv.org/abs/1912.00646.
|
| 229 |
+
|
| 230 |
+
Hyunjik Kim and Andriy Mnih. Disentangling by factorising. In Proceedings of the 35th International Conference on Machine Learning (ICML), 2018.
|
| 231 |
+
|
| 232 |
+
Tejas D Kulkarni, William F. Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett (eds.), Advances in Neural Information Processing Systems 28, pp. 2539–2547. Curran Associates, Inc., 2015.
|
| 233 |
+
|
| 234 |
+
Alexander H. Liu, Yen-Cheng Liu, Yu-Ying Yeh, and Yu-Chiang Frank Wang. A unified feature disentangler for multi-domain image translation and manipulation. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 2590–2599. Curran Associates, Inc., 2018.
|
| 235 |
+
|
| 236 |
+
Francesco Locatello, Stefan Bauer, Mario Lucic, Gunnar Raetsch, Sylvain Gelly, Bernhard Scholkopf, and Olivier Bachem. Challenging common assumptions in the unsupervised learning ¨ of disentangled representations. In Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 4114–4124, 2019.
|
| 237 |
+
|
| 238 |
+
James Lucas, George Tucker, Roger B Grosse, and Mohammad Norouzi. Don’t blame the elbo! a linear vae perspective on posterior collapse. In Advances in Neural Information Processing Systems 32, pp. 9403–9413. 2019.
|
| 239 |
+
|
| 240 |
+
Thomas Lucas and Jakob Verbeek. Auxiliary guided autoregressive variational autoencoders. In Machine Learning and Knowledge Discovery in Databases - European Conference, ECML PKDD, pp. 443–458, 2018.
|
| 241 |
+
|
| 242 |
+
Xuezhe Ma, Chunting Zhou, and Eduard Hovy. MAE: Mutual posterior-divergence regularization for variational autoencoders. In International Conference on Learning Representations, 2019.
|
| 243 |
+
|
| 244 |
+
Alireza Makhzani and Brendan J Frey. Pixelgan autoencoders. In Advances in Neural Information Processing Systems 30, pp. 1975–1985. 2017.
|
| 245 |
+
|
| 246 |
+
Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ B1QRgziT-.
|
| 247 |
+
|
| 248 |
+
Shakir Mohamed and Balaji Lakshminarayanan. Learning in implicit generative models. CoRR, abs/1610.03483, 2017. URL https://arxiv.org/abs/1610.03483.
|
| 249 |
+
|
| 250 |
+
Daniel Moyer, Shuyang Gao, Rob Brekelmans, Aram Galstyan, and Greg Ver Steeg. Invariant representations without adversarial training. In Advances in Neural Information Processing Systems, volume 31, pp. 9084–9093, 2018.
|
| 251 |
+
|
| 252 |
+
Sudipto Mukherjee, Himanshu Asnani, and S. Kannan. Ccmi $:$ Classifier based conditional mutual information estimation. In International Conference on Uncertainity in Artificial Intelligence, 2019.
|
| 253 |
+
|
| 254 |
+
XuanLong Nguyen, Martin J Wainwright, and Michael I. Jordan. Estimating divergence functionals and the likelihood ratio by penalized convex risk minimization. In Advances in Neural Information Processing Systems 20, pp. 1089–1096. 2008.
|
| 255 |
+
|
| 256 |
+
Weili Nie, Tero Karras, Animesh Garg, Shoubhik Debhath, Anjul Patney, Ankit B. Patel, and Anima Anandkumar. Semi-supervised stylegan for disentanglement learning. CoRR, abs/2003.03461, 2020. URL https://arxiv.org/abs/2003.03461.
|
| 257 |
+
|
| 258 |
+
Ben Poole, Sherjil Ozair, Aaron Van Den Oord, Alex Alemi, and George Tucker. On variational bounds of mutual information. In Proceedings of the 36th International Conference on Machine Learning, pp. 5171–5180, 2019.
|
| 259 |
+
|
| 260 |
+
Suman Ravuri and Oriol Vinyals. Classification accuracy score for conditional generative models. In Advances in Neural Information Processing Systems 32, pp. 12268–12279. 2019.
|
| 261 |
+
|
| 262 |
+
Ali Razavi, Aaron van den Oord, Ben Poole, and Oriol Vinyals. Preventing posterior collapse with delta-VAEs. In International Conference on Learning Representations, 2019.
|
| 263 |
+
|
| 264 |
+
Rui Shu, Yining Chen, Abhishek Kumar, Stefano Ermon, and Ben Poole. Weakly supervised disentanglement with guarantees. In International Conference on Learning Representations, 2020.
|
| 265 |
+
|
| 266 |
+
Masashi Sugiyama, Taiji Suzuki, and Takafumi Kanamori. Density-ratio matching under the bregman divergence: a unified framework of density-ratio estimation. Annals of the Institute of Statistical Mathematics, 64(5):1009–1044, 2012.
|
| 267 |
+
|
| 268 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.07747, 2017. URL http://arxiv.org/ abs/1708.07747.
|
| 269 |
+
|
| 270 |
+
Qizhe Xie, Zihang Dai, Yulun Du, Eduard Hovy, and Graham Neubig. Controllable invariance through adversarial feature learning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 585–596. Curran Associates, Inc., 2017.
|
| 271 |
+
|
| 272 |
+
Li Yingzhen and Stephan Mandt. Disentangled sequential autoencoder. In Proceedings of the 35th International Conference on Machine Learning, pp. 5670–5679, 2018.
|
| 273 |
+
|
| 274 |
+
Shengjia Zhao, Jiaming Song, and Stefano Ermon. Infovae: Balancing learning and inference in variational autoencoders. In The Thirty-Third AAAI Conference on Artificial Intelligence, pp. 5885–5892, 2019.
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
Figure 4: $\hat { I } ( z ; s )$ values of DSAE trained with $\beta$ -VAE objective.
|
| 278 |
+
|
| 279 |
+
APPENDIX
|
| 280 |
+
|
| 281 |
+
# A EMPIRICAL EVIDENCE OF LIMITATION OF MI-MAXIMIZING REGULARIZATION
|
| 282 |
+
|
| 283 |
+
In this section, we evaluate the $I ( z ; s )$ values of DSAE, and the MI-maximizing regularization is shown to result in increasing it, contrary to the intention of learning the disentangled global features. Note that the $I ( z ; s )$ of DSAE ideally equals to zero because its graphical model is designed such that $z$ and $s$ are independent. However, $I ( z ; s )$ is not necessarily zero because the representational MI is considered (see, also, Section 3.1). Because $I ( z ; s )$ is intractable, we used the value of $\hat { I } ( z ; s )$ estimated with DRT was used in a similar manner to Section 3.2. Namely, we used the following equation:
|
| 284 |
+
|
| 285 |
+
$$
|
| 286 |
+
{ \frac { q ( z , s ) } { q ( z ) q ( s ) } } = : { \frac { p ( z , s | y = 1 ) } { p ( z , s | y = 0 ) } } = { \frac { p ( y = 1 | z , s ) } { p ( y = 0 | z , s ) } } , { \mathrm { ~ w h e r e ~ } } p ( y = 0 ) = p ( y = 1 ) = { \frac { 1 } { 2 } } .
|
| 287 |
+
$$
|
| 288 |
+
|
| 289 |
+
$p ( y | z , s )$ can be approximated with a discriminator $D ( z , s )$ that outputs $D = 1$ when $z , s \sim _ { i . i . d }$ $q ( z , s )$ , and $D = 0$ when $z , s \sim _ { i . i . d . } q ( s ) q ( z )$ . Then, $I ( z ; s )$ can be approximated as follows:
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
I ( z ; s ) \approx \mathbb { E } _ { p _ { d } ( x ) q ( z , s | x ) } \left[ \log \frac { D ( z , s ) } { 1 - D ( z , s ) } \right] = : \hat { I } ( z ; s ) .
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
$D ( z , s )$ is parameterized with a DNN, and trained alternately with the VAEs’ objectives. The other training settings are the same as those in Section 5.2, and can be found in Appendix G.
|
| 296 |
+
|
| 297 |
+
Figure 4 presents $\hat { I } ( z ; s )$ values of DSAE trained with the $\beta$ -VAE objective (Eqs. 5 and 6), where $\operatorname { K L } ( z )$ is reweighted with parameter $\beta = 1 - \gamma$ . The figure indicates that if $\beta \geq 0 . 2$ , a smaller $\beta$ results in a larger $\hat { I } ( z ; s )$ . This indicates that when we simply regularize $I ( x ; z )$ to be large using $\beta$ -VAE objective, $z$ and $s$ become to have redundant information. In contrast, when we do not regularize $I ( x ; z )$ (i.e., $\beta = 1$ ), $\hat { I } ( z ; s )$ becomes small; however, $z$ also becomes uninformative regarding $x$ .
|
| 298 |
+
|
| 299 |
+
One may notice that even if $\beta$ is smaller than 0.2, $\hat { I } ( z ; s )$ will not increase. This is probably due to the following reason. Firstly, in DSAE, it is difficult for the $z$ to have redundant local information due to the architectural constraint (Appendix C). Then, the $\hat { I } ( z ; s )$ might become larger when $s$ , not $z$ , has redundant information. That is, regardless of the value of $\beta$ , $s$ may retain a certain degree of global information due to PC (which is supported by the experiments in Section 5.2). Therefore, when $z$ has global information as $\beta$ decreases, $I ( z ; s )$ increases. However, once $z$ has enough global information, there is no room for $I ( z ; s )$ to increase beyond a certain point.
|
| 300 |
+
|
| 301 |
+
# B PRACTICAL DECOMPOSITION OF AUTOREGRESSIVE DATA GENERATINGPROCESS
|
| 302 |
+
|
| 303 |
+
Here we show the practical decomposition of the autoregressive data generating process $\Pi _ { t = 1 } ^ { T } p ( x _ { t } | \boldsymbol { z } , \boldsymbol { x } _ { < t } ) = \dot { \Pi _ { t = 1 } ^ { T } } p ( x _ { t } | \boldsymbol { z } , \boldsymbol { s } _ { t } ) q ( \dot { s } _ { t } | \boldsymbol { x } _ { < t } )$ for PixelCNN. We consider the 13-layer PixelCNN used in He et al. (2019), which has five $( 7 \times 7 )$ -kernel-size layers, followed by, four $( 5 \mathrm { ~ x ~ } 5 )$ layers, and then four $( 3 \mathrm { ~ x ~ } 3 )$ layers. Each layer has 64 feature maps with dimensions $2 8 \times 2 8$ dimensions. The latent variable $z$ is extracted by an encoder, linearly transformed into (28, 28, 4) feature maps, and then concatenated to the each layer of the PixelCNN feature maps after the sixth layer. We denote the output of the $i$ -th $( i \in \{ 1 , . . . , 1 3 \} )$ ) layer as $h _ { i , t }$ , where $t$ denotes the timestep ( $\mathbf { \dot { x } }$ and y coordinates, and $t \in \{ 1 , . . . , 2 8 \times 2 \dot { 8 } = 7 8 4 \}$ ). Then, we can put $s _ { t } : = h _ { 6 , < t }$ and the decomposition $\Pi _ { t = 1 } ^ { T } p ( x _ { t } | \boldsymbol { z } , \boldsymbol { x } _ { < t } ) = \Pi _ { t = 1 } ^ { T } p ( x _ { t } | \boldsymbol { z } , \boldsymbol { s } _ { t } ) q ( \boldsymbol { s } _ { t } | \boldsymbol { x } _ { < t } )$ holds because only $h _ { 6 , < t }$ (not $h _ { 6 , \geq t , }$ ) are used to generate $x _ { t }$ with causal convolution.
|
| 304 |
+
|
| 305 |
+
One might wonder whether the activations of the PixelCNN, which is the deterministic function of $x$ , can be treated as random variables. However, because we regularize $s$ only via minimizing $I ( z ; s )$ (Section 3.2), $s$ can be determined to be treated as random variables. specifically, $I ( z ; s )$ is defined by the joint distribution $\begin{array} { r } { q ( z ; s ) = \int p _ { d } ( x ) q ( z | x ) q ( s | x , z ) d x } \end{array}$ (see definition in Appendix E), where $q ( s | x , z ) = q ( s | x ) = \Pi _ { t = 1 } ^ { T } \delta ( s _ { t } - f ( x _ { < t } ) )$ would be integrated over a random variable $x$ . Therefore, $z$ and $s$ have no deterministic relation and $s$ can be meaningfully referred to as local latent variables. Furthermore, it is common to treat the activations of hidden layers as random variables and to consider their MI (or conditional entropy) in the literature on domain-invariant representation learning (Xie et al., 2017).
|
| 306 |
+
|
| 307 |
+
Note that, the definition of $s$ is an important factor for the “control” of what will be learned in $z$ ; however, anything is acceptable as long as $s _ { t }$ has sufficiently large receptive fields. For example, Chen et al. (2017) proposed improving global representation $z$ by using smaller receptive fields for $q ( s _ { t } | \boldsymbol x _ { < t } )$ and constraining $s _ { t }$ to more local information. Although this architectural constraint can make $z$ informative, it requires weakening the expressiveness of PixelCNN and can degrade ELBO (Chen et al., 2017). By contrast, our method can be applied regardless of the size of the receptive fields because it prevents $s$ from having global information with an information theoretic regularization term. Therefore, the architectural change of Chen et al. (2017) was not employed and large receptive fields were used to balance sufficient ELBO and representation quality.
|
| 308 |
+
|
| 309 |
+
# C DSAE AND PIXELCNN-VAE HAVE DIFFERENT ARCHITECTURAL CONSTRAINTS ON GLOBAL LATENT VARIABLES
|
| 310 |
+
|
| 311 |
+
$z$ of DSAE and PixelCNN-VAE are imposed on different architectural constraints. In DSAE, the $z$ is constrained to have no local information. On the other hand, the $z$ of PixelCNN-VAEs has no such architectural constraints, although it is designed to capture global features via the structured data generating process. Here, we distinguish the structured data generating process from the architectural constraints: the former is the constraint based on the probabilistic graphical model, while the latter is the constraint based on the neural network structures. Specifically, the $z$ of DSAE is concatenated with $s _ { t }$ and feeded into the fully connected neural network decoder for all timestep $t \in \{ 1 , . . . , T \}$ , so the $z$ may have the same effects on each timestep $t$ . On the other hand, the $z$ of PixelCNN-VAE is linearly transformed into (28, 28, 4) feature maps, and then concatenated to the each layer of PixelCNN feature maps (see, Appendix B). Since the linear transformation creates the feature maps that depend on timesteps (x and y coordinates), it becomes easy for the $z$ to have different effects on each timestep $t$ . Note that, such linear transformation is commonly employed in previous studies of PixelCNN-VAEs (e.g., He et al. (2019)) in order to improve expressiveness of the decoder.
|
| 312 |
+
|
| 313 |
+
Due to these architectural differences, different phenomena can be observed in DSAE and PixelCNN-VAE when using MI-maximizing regularization. First, both the models have in common that $I ( z ; s )$ would become larger when using the MI regularization (see, Section 3.1). However, in DSAE, it is likely that $s$ has redundant global features, not that $z$ has redundant local features, because it is difficult for the $z$ to have local information due to the architectural constraint. On the other hand, in PixelCNN-VAE, $z$ can have redundant local features. Then, these architectural differences would cause different problems in the controlled generation using DSAEs and PixelCNN-VAEs. DSAE can hopefully change speaker individualities while preserving the linguistic contents (i.e., perform voice conversion), by swapping the $z$ of two utterances and reconstructing them. However, if $s$ still contains speaker information due to the redundancy, the decoder can extract speaker information from either $s$ or $z$ and there is no guarantee that $z$ will be used (see, also, Appendix J). For PixelCNN-VAE, previous studies (Alemi et al., 2018; Razavi et al., 2019) have shown that by stochastically sampling $x$ from PixelCNN-VAE with a given $z$ , one can obtain images with different local patterns but similar global characteristics (e.g. color background, scale, and structure of objects). However, when $z$ has all (local and global) information, the diversity of the generated images would decrease, because the decoder resembles one-to-one mapping from $z$ to $x$ (see, also, Section 5.3).
|
| 314 |
+
|
| 315 |
+
# D THE LOWER BOUND OF $I ( x ; z | s )$
|
| 316 |
+
|
| 317 |
+
Here we derive Eq. 9 and discuss the approximation error between $I ( x ; z | s )$ and ${ \cal I } _ { \mathrm { C M I ^ { \prime } } }$ . Firstly, we can take the lower bound:
|
| 318 |
+
|
| 319 |
+
$$
|
| 320 |
+
I ( x ; z | s ) = I ( x ; z ) - I ( z ; s ) + I ( z ; s | x ) \geq I ( x ; z ) - I ( z ; s ) ,
|
| 321 |
+
$$
|
| 322 |
+
|
| 323 |
+
since the MI $I ( z ; s | x )$ is positive. Then, the lower bound $I ( x ; z ) - I ( z ; s )$ has approximation error $I ( z ; s | x )$ . Note that the error can be small under a particular condition. Namely, the error can be decomposed as:
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
I ( z ; s | x ) = H ( z | x ) - H ( z | x , s ) .
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
Here, both $H ( z | x )$ and $H ( z | x , s )$ is thought to be small when $x$ is high-dimensional data such as images, movies, and audios, because observing such $x$ would enable us to predict $z$ accurately. Also, empirically, it has been shown that the performance of inference model did not drop much even if the encoders of DSAE are decomposed into $q ( z , s | x ) = q ( z | x ) q ( s | x )$ (Yingzhen $\&$ Mandt, 2018), which indicates the error is small.
|
| 330 |
+
|
| 331 |
+
In addition, as long as $\alpha \geq 1$ , the following condition holds:
|
| 332 |
+
|
| 333 |
+
$$
|
| 334 |
+
I ( x ; z ) - I ( z ; s ) \geq I ( x ; z ) - \alpha I ( z ; s ) ,
|
| 335 |
+
$$
|
| 336 |
+
|
| 337 |
+
because the MI $I ( z ; s )$ is positive. This approximation error becomes the smallest when $\alpha = 1$
|
| 338 |
+
|
| 339 |
+
# E DEFINITION OF $I ( z ; s )$
|
| 340 |
+
|
| 341 |
+
This paper considers the MI $I ( z ; s )$ defined by the encoder (which corresponds to representational MI in Alemi et al. (2018)). Namely,
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
I ( z ; s ) = \mathbb { E } _ { q ( z , s ) } [ \log \frac { q ( z ) q ( s | z ) } { q ( z ) q ( s ) } ] ,
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
where the joint distribution is $\begin{array} { r } { q ( z ; s ) : = \int p _ { d } ( x ) q ( z | x ) q ( s | x , z ) d x } \end{array}$ .
|
| 348 |
+
|
| 349 |
+
# F DERIVING EQ. 10
|
| 350 |
+
|
| 351 |
+
Here we present the deriviation of Eq. 10:
|
| 352 |
+
|
| 353 |
+
$$
|
| 354 |
+
\begin{array} { r l } { I ( x ; z ) - I ( z ; s ) = \mathbb { E } _ { q ( x , z ) } [ \log \displaystyle \frac { q ( z | x ) } { q ( z ) } ] - \mathbb { E } _ { q ( z , s ) } [ \log \displaystyle \frac { q ( z | s ) } { q ( z ) } ] } & { } \\ { = \mathbb { E } _ { q ( x , z , s ) } [ \log \displaystyle \frac { q ( z | x ) q ( z ) p ( z ) } { q ( z | s ) q ( z ) p ( z ) } ] } & { } \\ { = \mathbb { E } _ { q ( x , z ) } [ \log \displaystyle \frac { q ( z | x ) } { p ( z ) } ] - \mathbb { E } _ { q ( z , s ) } [ \log \displaystyle \frac { q ( z , s ) } { p ( z ) q ( s ) } ] } & { } \\ { = \mathbb { E } _ { p _ { d } ( x ) } \big [ D _ { \mathrm { K L } } ( q ( z | x ) | | p ( z ) ) \big ] - D _ { \mathrm { K L } } ( q ( z , s ) | | p ( z ) q ( s ) ) . } \end{array}
|
| 355 |
+
$$
|
| 356 |
+
|
| 357 |
+
# G DETAILS OF EXPERIMENTAL SETTINGS
|
| 358 |
+
|
| 359 |
+
# G.1 DISENTANGLED SEQUENTIAL AUTOENCODER
|
| 360 |
+
|
| 361 |
+
Data preprocessing We use the TIMIT data (Garofolo et al., 1992), which contains broadband 16kHz recordings of phonetically-balanced read speech. A total of 6300 utterances (5.4 hours) are presented with 10 sentences from each of the 630 speakers $70 \%$ male and $30 \%$ female). Garofolo et al. (1992) have originally split the data into train/test subset, and we further split the train subset into $90 \%$ of train and $10 \%$ of validation subset. We followed Hsu et al. (2017); Yingzhen & Mandt (2018) for data preprocessing: the raw speech waveforms are first split into sub-sequences of $2 0 0 \mathrm { m s }$ , and then preprocessed with sparse fast Fourier transform to obtain a 201 dimensional log-magnitude spectrum, with the window size $2 5 \mathrm { m s }$ and shift size $1 0 \mathrm { m s }$ . This results in $T = 2 0$ for the observation $x _ { 1 : T }$ .
|
| 362 |
+
|
| 363 |
+
Optimization we follow Yingzhen & Mandt (2018) for model architecture, data preprocessing, and evaluation procedures. The dimensionality of $s _ { t }$ and $z$ were fixed at 64; we set $T = 2 0$ for the observation $x _ { \le T }$ . We used Adam optimizer with learning rate 2e-4 for the VAE and 2e-3 for the discriminator, and trained the models for 6000 epochs to get good convergence on the training set. The VAE architecture followed full model in Yingzhen & Mandt (2018), and the discriminator architecture is described in Appendix I. The discriminator is updated twice while the VAE is updated once. The results are averaged over three random seed trials.
|
| 364 |
+
|
| 365 |
+
# G.2 PIXELCNN-VAE
|
| 366 |
+
|
| 367 |
+
Data preprocessing We use the statically binarized version of MNIST and Fashion-MNIST datasets: each pixel value $\in [ 0 , 1 ]$ is binarized with the threshold 0.5. The datasets are originally split into train/test subsets, and we further split the train subsets into $80 \%$ of train and $20 \%$ of validation subsets.
|
| 368 |
+
|
| 369 |
+
Optimization Regarding the optimization of VAEs, we used the Adam optimizer with a learning rate of 0.0001, trained for 300 epochs. We reported the values for the test data when the objective function for the validation data was maximized. Regarding the discriminators, we used the Adam optimizer with learning rate 0.001. The discriminator architecture is described in Appendix I, and is updated twice while the VAE is updated once. As for the PixelCNN architecture, see Appendix B.
|
| 370 |
+
|
| 371 |
+
# H DETAILS OF MI-VAE IN OUR EXPERIMENTS
|
| 372 |
+
|
| 373 |
+
We employ $I ( x ; z )$ maximization method proposed by Makhzani & Frey (2017); Zhao et al. (2019) as a baseline method in our experiment. Briefly, we add $I ( x ; z )$ to the standard VAE objectives as a regularization term with weighting term $\gamma$ .
|
| 374 |
+
|
| 375 |
+
To estimate $I ( x ; z )$ , Makhzani & Frey (2017) utilize the follwing relation based on the density ratio trick:
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
{ \frac { q ( z ) } { p ( z ) } } = : { \frac { p ( z | y = 1 ) } { p ( z | y = 0 ) } } = { \frac { p ( y = 1 | z ) } { p ( y = 0 | z ) } } ,
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
where $\begin{array} { r } { p ( y = 0 ) = \frac { 1 } { 2 } } \end{array}$ and $\begin{array} { r } { p ( y = 1 ) = \frac { 1 } { 2 } } \end{array}$ . Then, although conditional probability $p ( y | z )$ cannot be obtained, it can be approximated with a discriminator $D ( z )$ , which outputs $D = 1$ when $z \sim _ { i . i . d }$ . $q ( z )$ and $D = 0$ when $z \sim _ { i . i . d . } p ( z )$ . Then, $I ( x ; z )$ can be approximated as follows:
|
| 382 |
+
|
| 383 |
+
$$
|
| 384 |
+
\begin{array} { l l } { I ( x ; z ) = \mathbb { E } _ { p _ { d } ( x ) } [ D _ { K L } [ q ( z | x ) | | p ( z ) ] - D _ { K L } ( q ( z ) | | p ( z ) ) ] } \\ { \approx \mathbb { E } [ D _ { K L } [ q ( z | x ) | | p ( z ) ] - \log \displaystyle \frac { D ( z ) } { 1 - D ( z ) } ] } \\ { \hfill } \end{array}
|
| 385 |
+
$$
|
| 386 |
+
|
| 387 |
+
$D ( z )$ is parameterized with some DNN, and trained alternately with VAEs’ objectives. Namely, $D$ is trained to maximize the following objective with Monte Carlo sampling:
|
| 388 |
+
|
| 389 |
+
$$
|
| 390 |
+
\begin{array} { r } { \mathbb { E } _ { q ( \boldsymbol { z } ) } [ \log D ( \boldsymbol { z } ) ] + \mathbb { E } _ { p ( \boldsymbol { z } ) } [ \log \left( 1 - D ( \boldsymbol { z } ) \right) ] . } \end{array}
|
| 391 |
+
$$
|
| 392 |
+
|
| 393 |
+
Finally, we introduce the concrete objective of PixelCNN-VAE with the regularization term $I _ { M I }$ . Adding $I _ { \mathrm { M I - D R T } }$ to the objective of PixelCNN-VAE, we obtain the objective functions of MI-VAE:
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
\mathcal { W } _ { \mathrm { A R M } } : = \mathcal { L } _ { \mathrm { A R M } } + \gamma I _ { \mathrm { M I - D R T } } = - \mathrm { R e c o n } - ( 1 - \gamma ) \mathrm { K L } ( z ) - \gamma \mathbb { E } [ \log \frac { D ( z ) } { 1 - D ( z ) } ] .
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
In short, the objective only differs from our CMI maximization method in that the discriminator is added on the purpose of minimizing $D _ { K L } ( q ( z ) | | p ( z ) )$ , while our method minimizes $D _ { K L } ( q ( \boldsymbol { z } , \boldsymbol { s } ) | | p ( \boldsymbol { z } ) q ( \boldsymbol { s } ) )$ and encourages disentanglement of $z$ and $s$ .
|
| 400 |
+
|
| 401 |
+
# I DISCRIMINATOR SETTINGS
|
| 402 |
+
|
| 403 |
+
We have used discriminators for CMI-VAE and MI-VAE (whose details can be found in Appendix H). For the discriminator of CMI-VAE, we first applied convolutional encoder and took mean pooling, obtaining the embedding of $s _ { 1 : T }$ . Then, in PixelCNN-VAE, we took innner product of the embedding and $z$ and treated it as logit of the discriminator. On the other hand, in DSAE, we took cosine similarity of the embedding and $z$ , multiplied the similarity by a learnable scale parameter, and treated it as logit of the discriminator. The encoder architectures for PixelCNN-VAE and DSAE are summarized as follows, with the format Conv (depth, kernel size, stride, padding):
|
| 404 |
+
|
| 405 |
+
# PixelCNN-VAE
|
| 406 |
+
|
| 407 |
+
• Input (28, 28, 1)
|
| 408 |
+
• Conv2D (256, 4, 2, 1)
|
| 409 |
+
• BatchNorm
|
| 410 |
+
• ReLU
|
| 411 |
+
• Conv2D (256, 4, 2, 1)
|
| 412 |
+
• BatchNorm
|
| 413 |
+
• ReLU
|
| 414 |
+
• Conv2D ( $z$ -dim, 4, 2, 1)
|
| 415 |
+
|
| 416 |
+
# DSAE
|
| 417 |
+
|
| 418 |
+
• Input (20, 201)
|
| 419 |
+
• Conv1D (256, 4, 2, 1)
|
| 420 |
+
• BatchNorm
|
| 421 |
+
• ReLU
|
| 422 |
+
• Conv1D (256, 4, 2, 1)
|
| 423 |
+
• BatchNorm
|
| 424 |
+
• ReLU
|
| 425 |
+
• Conv1D $z$ -dim, 4, 2, 1)
|
| 426 |
+
|
| 427 |
+
The discriminator architecture for MI-VAE is summarized as follows, with the format Linear (input size, output size):
|
| 428 |
+
|
| 429 |
+
• Input $z$ -dim)
|
| 430 |
+
• Linear $z$ -dim, 400)
|
| 431 |
+
• ReLU
|
| 432 |
+
• Linear (400, 1)
|
| 433 |
+
• Softmax
|
| 434 |
+
|
| 435 |
+
# J VOICE CONVERSION EXPERIMENTS USING DISENTANGLED SEQUENTIALAUTOENCODER
|
| 436 |
+
|
| 437 |
+
For a quantitative assessment of controlled generation by DSAE, we performed voice conversion and evaluated the models with a score similar to mCAS (see, Section 5.3), which we call VC-mCAS. First, we prepared 500 real speeches (spectrograms with $T = 2 0$ ) $\{ x _ { i } \} _ { i = 1 } ^ { 5 0 0 }$ , along with their gender labels (male or female) $\{ y _ { i } \} _ { i = 1 } ^ { 5 0 0 }$ , where each of the 2 classes had 250 samples. Then, we randomly created 250 pairs $\{ ( x _ { i } , x _ { j } ) | y _ { i } \neq y _ { j } \}$ , i.e., each pair consists of one male and one female speech. Using the trained DSAE, we encoded each $x$ into $z$ and $s$ , created the pairs $\{ ( z _ { i } , s _ { i } , z _ { j } , s _ { j } ) | y _ { i } \bar { \neq } y _ { j } \}$ , and decoded $z _ { i }$ and $s _ { j }$ $( z _ { j }$ and $s _ { i }$ ) to obtain $\hat { x } _ { i , j }$ $( \hat { x } _ { j , i } )$ , which ideally has the speaker characteristics of $x _ { i }$ and the linguistic contents of $x _ { j }$ . Thus, we obtain 500 generated samples, where each $\hat { x } _ { i , j }$ was labeled with $y _ { i }$ assuming that the characteristics that tend to depend on gender (such as pitch) were successfully converted. Finally, we trained a logistic classifier with the 500 pairs $\{ ( \stackrel { - } { x } _ { i , j } , y _ { i } ) \}$ and evaluated the performance on real test speeches. Note that, because the raw $\hat { x } _ { i , j }$ has an excessively high dimension $( 2 0 ( T ) \times 2 0 1$ (features)) for the logistic classifier, $\hat { x }$ was averaged over the timeaxis prior to its measurement. Intuitively, when the decoder ignores $z$ , the generated samples might belong to a class different from the original ones, which produces label errors. Therefore, to achieve a high VC-mCAS, $z$ should capture global information but $s$ should not. Aos, the generated samples should be realistic to reduce the domain gap between train (generated) and test (real) data.
|
| 438 |
+
|
| 439 |
+
Table 2: VC-mCAS for $\beta$ -VAE and CMI-VAE.
|
| 440 |
+
|
| 441 |
+
<table><tr><td>Model</td><td>Y</td><td>VC-mCAS(mean)</td><td>VC-mCAS(max)</td></tr><tr><td>DSAE + β-VAE</td><td>0.4000</td><td>83.73</td><td>85.8</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.4000</td><td>84.33</td><td>86.6</td></tr><tr><td>DSAE + β-VAE</td><td>0.8000</td><td>87.27</td><td>87.6</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.8000</td><td>87.47</td><td>88.0</td></tr><tr><td>DSAE + β-VAE</td><td>0.9000</td><td>87.20</td><td>87.6</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.9000</td><td>87.00</td><td>87.6</td></tr><tr><td>DSAE + β-VAE</td><td>0.9900</td><td>87.33</td><td>87.6</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.9900</td><td>87.60</td><td>88.6</td></tr><tr><td>DSAE+β-VAE</td><td>0.9990</td><td>87.27</td><td>87.4</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.9990</td><td>87.60</td><td>88.0</td></tr><tr><td>DSAE + β-VAE</td><td>0.9999</td><td>86.87</td><td>87.2</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.9999</td><td>87.73</td><td>88.0</td></tr></table>
|
| 442 |
+
|
| 443 |
+
Table 2 presents the values of VC-mCAS for the objectives of $\beta$ -VAE and CMI-VAE. Note that we report the mean and best scores within three random seed trials for each $\gamma$ . The table illustrates that given a fixed $\gamma$ , CMI-VAE nearly consistently achieved a higher VC-mCAS compared to $\beta$ -VAE, indicating that regularizing $I ^ { \prime } ( z ; s )$ is complementary to $\beta$ -VAE. Furthermore, although $\gamma = 0 . 8$ yields a higher $\operatorname { E E R } ( z )$ than those with $\gamma = 0 . 4$ in Table 1, it yields a higher VC-mCAS. Therefore, in addition to measuring EER, as was done in previous studies (Hsu et al., 2017; Yingzhen & Mandt, 2018), we claim that it is necessary to consider the performance of the controlled generation for evaluating the usefulness of the global representation.
|
| 444 |
+
|
| 445 |
+
# K DETAILED EXPERIMENTAL RESULTS
|
| 446 |
+
|
| 447 |
+
# K.1 DETAILED EXPERIMENTAL RESULTS FOR DSAE
|
| 448 |
+
|
| 449 |
+
Table 3 presents the ELBO, KL, Recon, EER, and $\hat { I } ( z ; s )$ values of DSAE on TIMIT corpus. Regarding the estimation of $\hat { I } ( z ; s )$ , please refer to Appendix A. Also, note that $\operatorname { K L } ( z )$ approximates $I ( x ; z )$ because it upper bounds $I ( x ; z )$ , and has been used for the metric to assess whether a decoder ignores $z$ or not (Bowman et al., 2016; Alemi et al., 2018; He et al., 2019). Here, the ELBO, Recon, and $\mathrm { K L } ( S )$ values are not divided by $T = 2 0$ . Also, the Recon values can be nevative because the variance of our decoder are learnable parameters.
|
| 450 |
+
|
| 451 |
+
As shown in the table, (i) given a fixed $\gamma$ , the two methods ( $\beta$ -VAE and CMI-VAE) have the same level of $\operatorname { K L } ( z )$ ; therefore, both the methods can be used to alleviate PC. (ii) On the other hand, given a fixed $\gamma$ , CMI-VAE achieved the lower $\hat { I } ( z ; s )$ values in most cases, suggesting that it facilitates the learning of good global representation. (iii) Finally, we have confirmed that even for large $\gamma$ , there is still reasonable reconstruction performance for the both methods.
|
| 452 |
+
|
| 453 |
+
Table 3: The ELBO, KL, Recon, EER, and $\hat { I } ( z ; s )$ values of DSAE on TIMIT corpus. Each model was trained with a weighting parameter $\gamma$ . ”se” denotes standard error.
|
| 454 |
+
|
| 455 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">~</td><td rowspan="2">ELBO mean</td><td rowspan="2">se</td><td rowspan="2">KL(z) mean</td><td rowspan="2"></td><td rowspan="2">KL(s) mean</td><td rowspan="2">se</td><td rowspan="2">Recon</td><td rowspan="2">mean</td><td rowspan="2">se mean</td><td rowspan="2">EER(z) se</td><td rowspan="2">EER(s)</td><td rowspan="2">se</td><td rowspan="2">1(z;8) mean</td><td rowspan="2">se</td></tr><tr><td>mean</td></tr><tr><td>DSAE</td><td>0.00</td><td>6299.08</td><td>14.06</td><td>18.00</td><td>0.09</td><td>495.92</td><td>4.45</td><td>-6813.00</td><td>13.37</td><td>11.01</td><td>0.52</td><td>18.64</td><td>1.04</td><td>1.61</td><td>0.04</td></tr><tr><td>DSAE + β-VAE</td><td>0.40</td><td>6289.48</td><td>11.72</td><td>53.28</td><td>0.97</td><td>483.40</td><td>5.73</td><td>-6826.16</td><td>15.46</td><td>3.88</td><td>0.15</td><td>29.45</td><td>0.29</td><td>2.60</td><td>0.01</td></tr><tr><td>DSAE+ CMI-VAE</td><td>0.40</td><td>6288.64</td><td>4.82</td><td>54.13</td><td>2.51</td><td>468.06</td><td>14.03</td><td>-6810.83</td><td>16.04</td><td>3.43</td><td>0.26</td><td>30.96</td><td>0.81</td><td>2.44</td><td>0.03</td></tr><tr><td>DSAE + β-VAE</td><td>0.80</td><td>6228.58</td><td>4.81</td><td>145.88</td><td>0.45</td><td>430.73</td><td>7.19</td><td>-6805.20</td><td>10.76</td><td>4.33</td><td>0.26</td><td>38.84</td><td>0.47</td><td>2.84</td><td>0.05</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.80</td><td>6222.22</td><td>4.60</td><td>145.09</td><td>0.17</td><td>430.59</td><td>5.60</td><td>-6797.90</td><td>1.53</td><td>3.99</td><td>0.29</td><td>41.30</td><td>0.66</td><td>2.83</td><td>0.04</td></tr><tr><td>DSAE+β-VAE</td><td>0.90</td><td>6172.96</td><td>3.83</td><td>202.52</td><td>1.34</td><td>432.20</td><td>3.88</td><td>-6807.67</td><td>2.13</td><td>4.55</td><td>0.15</td><td>39.42</td><td>1.06</td><td>2.89</td><td>0.01</td></tr><tr><td>DSAE+CMI-VAE</td><td>0.90</td><td>6192.05</td><td>6.58</td><td>199.89</td><td>1.10</td><td>429.53</td><td>7.84</td><td>-6821.46</td><td>14.59</td><td>4.39</td><td>0.23</td><td>41.25</td><td>2.10</td><td>2.70</td><td>0.03</td></tr><tr><td>DSAE+ β-VAE</td><td>0.99</td><td>6019.10</td><td>11.52</td><td>364.71</td><td>2.08</td><td>433.59</td><td>9.40</td><td>-6817.40</td><td>19.39</td><td>6.33</td><td>0.34</td><td>38.63</td><td>1.18</td><td>3.27</td><td>0.15</td></tr><tr><td>DSAE + CMI-VAE</td><td>0.99</td><td>6031.71</td><td>5.78</td><td>361.03</td><td>1.85</td><td>434.55</td><td>8.67</td><td>-6827.29</td><td>12.56</td><td>5.06</td><td>0.23</td><td>40.08</td><td>1.09</td><td>2.85</td><td>0.07</td></tr></table>
|
| 456 |
+
|
| 457 |
+
# K.2 DETAILED EXPERIMENTAL RESULTS FOR PIXELCNN-VAE
|
| 458 |
+
|
| 459 |
+
Tables 4 and 5 present the ELBO, $\operatorname { K L } ( z )$ , Recon, $\hat { I } ( z ; s )$ , mCAS, and AoLR values of PixelCNNVAEs on MNIST and Fashion-MNIST. Moreover, these tables present mCAS(SVM) and AoSVM, which are the same with $\mathrm { m C A S }$ and AoLR except for using a support vector machine (SVM) with RBF kernel, i.e., a more powerful non-linear classifier, instead of the logistic classifier. Regarding the estimation of $\hat { I } ( z ; s )$ , please refer to Appendix A. Also, note that $\operatorname { K L } ( z )$ approximates $I ( x ; z )$ because it upper bounds $I ( x ; z )$ , and has been used for the metric to assess whether a decoder ignores $z$ or not (Bowman et al., 2016; Alemi et al., 2018; He et al., 2019). Here, the ELBO and Recon values are not divided by $T = 2 8 \times 2 8$ .
|
| 460 |
+
|
| 461 |
+
As shown in the tables, (i) given a fixed $\gamma$ , the three methods ( $\beta$ -VAE, MI-VAE, and CMI-VAE) have the same level of $\operatorname { K L } ( z )$ ; therefore, all the methods can be used to alleviate PC. (ii) On the other hand, given a fixed $\gamma$ , CMI-VAE achieved the lower $\hat { I } ( z ; s )$ values in most cases, suggesting that it facilitates the learning of good global representation. (iii) Finally, even if we used a non-linear classifier SVM to calculate mCAS(SVM) and AoSVM, CMI-VAE achieved competitive or higher performance than the baselines in most cases. Note that, the exception is that given a $\gamma > 0 . 4$ , there were not much differences in mCAS(SVM) for Fashion-MNIST within the three methods. One possible reason is that using the non-linear classifier increases the number of factors to be considered, such as overfitting, and makes fair comparisons difficult. Also, we note that using a very large $\gamma$ for PixelCNN-VAEs might not be a good idea. It is because when $\gamma$ becomes too large, the decoder of PixelCNN tends to resemble an identity mapping from $z$ to its output, regardless of the regularization method (e.g., see, generated samples for $\gamma = 0 . 6$ in Appendix K.3). To improve performance while avoiding this phenomenon, it could be useful to using a weighting parameter $\alpha > 1$ in Eq. 8 (e.g., using $\gamma = 0 . 3$ and $\alpha > 1$ ), and this remains an issue to be addressed in a future work as noted in Section 6.
|
| 462 |
+
|
| 463 |
+
# K.3 SAMPLE IMAGES FOR PIXELCNN-VAE
|
| 464 |
+
|
| 465 |
+
Figures 5 present the generated images with PixelCNN-VAEs.
|
| 466 |
+
|
| 467 |
+
Table 4: The ELBO, $\operatorname { K L } ( z )$ , Recon, mCAS, AoLR, mCAS(SVM), and AoSVM values of PixelCNNVAEs on MNIST. Each model was trained with a weighting parameter $\gamma$ .
|
| 468 |
+
|
| 469 |
+
<table><tr><td colspan="2"></td><td rowspan="2">ELBO</td><td rowspan="2">KL(z)</td><td rowspan="2">Recon</td><td rowspan="2">mCAS</td><td rowspan="2">AoLR</td><td rowspan="2">mCAS(SVM)</td><td rowspan="2">AoSVM</td><td rowspan="2">i(z;s)</td></tr><tr><td>Y</td><td>Model</td></tr><tr><td>0.0</td><td>β-VAE</td><td>56.21</td><td>3.60</td><td>52.61</td><td>0.3966</td><td>0.6094</td><td>0.5722</td><td>0.6447</td><td>1.81</td></tr><tr><td>0.1</td><td>β-VAE</td><td>56.28</td><td>5.33</td><td>50.95</td><td>0.5917</td><td>0.8161</td><td>0.7172</td><td>0.8458</td><td>2.11</td></tr><tr><td rowspan="3"></td><td>CMI-VAE</td><td>56.24</td><td>4.80</td><td>51.43</td><td>0.5421</td><td>0.7243</td><td>0.6499</td><td>0.7809</td><td>1.97</td></tr><tr><td>MI-VAE</td><td>56.23</td><td>5.16</td><td>51.07</td><td>0.5325</td><td>0.7602</td><td>0.6651</td><td>0.8080</td><td>2.05</td></tr><tr><td>β-VAE</td><td>56.68</td><td>9.21</td><td>47.47</td><td>0.6924</td><td>0.8479</td><td>0.7750</td><td>0.8980</td><td>2.45</td></tr><tr><td rowspan="3">0.2</td><td>CMI-VAE</td><td>56.68</td><td>9.32</td><td>47.36</td><td>0.7229</td><td>0.8692</td><td>0.7934</td><td>0.9026</td><td>2.29</td></tr><tr><td>MI-VAE</td><td>56.50</td><td>8.90</td><td>47.60</td><td>0.6734</td><td>0.8208</td><td>0.7606</td><td>0.8762</td><td>2.38</td></tr><tr><td>β-VAE</td><td>58.33</td><td>18.04</td><td>40.29</td><td>0.7448</td><td>0.8354</td><td>0.8109</td><td>0.9027</td><td>2.85</td></tr><tr><td rowspan="3">0.3</td><td>CMI-VAE</td><td>58.03</td><td>17.52</td><td>40.51</td><td>0.7716</td><td>0.8630</td><td>0.8136</td><td>0.9182</td><td>1.80</td></tr><tr><td>MI-VAE</td><td>57.81</td><td>16.37</td><td>41.44</td><td>0.7399</td><td>0.8238</td><td>0.8014</td><td>0.8938</td><td>2.85</td></tr><tr><td>β-VAE</td><td>61.22</td><td>29.00</td><td>32.21</td><td>0.7476</td><td>0.8204</td><td>0.8063</td><td>0.8962</td><td>3.28</td></tr><tr><td rowspan="3"></td><td>CMI-VAE</td><td>61.27</td><td>29.56</td><td>31.71</td><td>0.7664</td><td>0.8401</td><td>0.8122</td><td>0.9114</td><td>2.21</td></tr><tr><td>MI-VAE</td><td>60.52</td><td>27.10</td><td>33.43</td><td>0.7461</td><td>0.7903</td><td>0.7985</td><td>0.8742</td><td>3.11</td></tr><tr><td>β-VAE</td><td>64.55</td><td>37.79</td><td>26.76</td><td>0.7555</td><td>0.8279</td><td>0.8060</td><td>0.9010</td><td>3.16</td></tr><tr><td rowspan="3"></td><td>CMI-VAE</td><td>64.69</td><td>38.40</td><td>26.28</td><td>0.7575</td><td>0.8405</td><td>0.8075</td><td>0.9088</td><td>1.79</td></tr><tr><td>MI-VAE</td><td>63.57</td><td>35.62</td><td>27.95</td><td>0.7454</td><td>0.7719</td><td>0.7963</td><td>0.8582</td><td>3.18</td></tr><tr><td>β-VAE</td><td>68.74</td><td>46.29</td><td>22.45</td><td>0.7642</td><td>0.8306</td><td>0.8120</td><td>0.9056</td><td>3.27</td></tr><tr><td rowspan="3"></td><td>CMI-VAE</td><td>69.00</td><td>47.11</td><td>21.90</td><td>0.7618</td><td>0.8486</td><td>0.8079</td><td>0.9190</td><td>2.57</td></tr><tr><td>MI-VAE</td><td>67.72</td><td>44.16</td><td>23.57</td><td>0.7484</td><td>0.7722</td><td>0.7949</td><td>0.8572</td><td>3.19</td></tr><tr><td>β-VAE</td><td>74.47</td><td>56.04</td><td>18.43</td><td>0.7531</td><td>0.8454</td><td>0.7984</td><td>0.9148</td><td>3.27</td></tr><tr><td rowspan="3">0.7</td><td>CMI-VAE</td><td>74.71</td><td>56.28</td><td>18.43</td><td>0.7553</td><td>0.8486</td><td>0.8019</td><td>0.9179</td><td>1.81</td></tr><tr><td>MI-VAE</td><td>72.92</td><td>52.88</td><td>20.05</td><td>0.7496</td><td>0.7753</td><td>0.7912</td><td>0.8601</td><td>3.19</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 470 |
+
|
| 471 |
+
Table 5: The ELBO, $\operatorname { K L } ( z )$ , Recon, mCAS, AoLR, mCAS(SVM), and AoSVM values of PixelCNNVAEs on Fashion-MNIST Each model was trained with a weighting parameter $\gamma$ .
|
| 472 |
+
|
| 473 |
+
<table><tr><td></td><td></td><td>ELBO</td><td>KL(z)</td><td>Recon</td><td>mCAS</td><td>AoLR</td><td>mCAS(SVM)</td><td>AoSVM</td><td>i(z;s)</td></tr><tr><td>Y</td><td>Model</td><td></td><td></td><td></td><td>0.4820</td><td></td><td></td><td></td><td></td></tr><tr><td>0.0</td><td>β-VAE β-VAE</td><td>88.60 88.86</td><td>4.02 6.71</td><td>84.58 82.16</td><td>0.5716</td><td>0.6906 0.7172</td><td>0.6342 0.6556</td><td>0.7552 0.7790</td><td>2.00 2.40</td></tr><tr><td rowspan="3">0.1</td><td>CMI-VAE</td><td>88.90</td><td>6.47</td><td>82.43</td><td>0.5837</td><td>0.7201</td><td>0.6618</td><td>0.7757</td><td>2.53</td></tr><tr><td>MI-VAE</td><td>88.84</td><td>6.72</td><td>82.12</td><td>0.5645</td><td>0.7166</td><td>0.6592</td><td>0.7742</td><td>2.37</td></tr><tr><td>β-VAE</td><td>89.94</td><td>10.95</td><td>78.99</td><td>0.6174</td><td>0.7092</td><td>0.6792</td><td>0.7708</td><td>2.78</td></tr><tr><td>0.2</td><td>CMI-VAE</td><td>90.25</td><td>11.49</td><td>78.76</td><td>0.6463</td><td>0.7258</td><td>0.6885</td><td>0.7779</td><td>2.46</td></tr><tr><td rowspan="3">0.3</td><td>MI-VAE</td><td>89.78</td><td>10.55</td><td>79.23</td><td>0.6132</td><td>0.6991</td><td>0.6760</td><td>0.7655</td><td>2.69</td></tr><tr><td>β-VAE</td><td>91.45</td><td>16.11</td><td>75.34</td><td>0.6427</td><td>0.7030</td><td>0.6811</td><td>0.7665</td><td>2.94</td></tr><tr><td>CMI-VAE</td><td>91.55</td><td>16.39</td><td>75.16</td><td>0.6578</td><td>0.7238</td><td>0.6873</td><td>0.7713</td><td>2.03</td></tr><tr><td></td><td>MI-VAE</td><td>91.14</td><td>15.09</td><td>76.06</td><td>0.6241</td><td>0.6817</td><td>0.6897</td><td>0.7507</td><td>2.92</td></tr><tr><td rowspan="3">0.4</td><td>β-VAE</td><td>93.98</td><td>24.33</td><td>69.65</td><td>0.6536</td><td>0.7062</td><td>0.6858</td><td>0.7636</td><td>3.24</td></tr><tr><td>CMI-VAE</td><td>93.81</td><td>23.35</td><td>70.46</td><td>0.6662</td><td>0.7145</td><td>0.6868</td><td>0.7701</td><td>2.11</td></tr><tr><td>MI-VAE</td><td>93.36</td><td>22.38</td><td>70.98</td><td>0.6366</td><td>0.6787</td><td>0.6886</td><td>0.7278</td><td>3.21</td></tr><tr><td rowspan="3">0.5</td><td>β-VAE</td><td>97.36</td><td>33.02</td><td>64.34</td><td>0.6547</td><td>0.6919</td><td>0.6845</td><td>0.7521</td><td>3.36</td></tr><tr><td>CMI-VAE</td><td>97.14</td><td>32.14</td><td>65.00</td><td>0.6651</td><td>0.7193</td><td>0.6867</td><td>0.7688</td><td>2.29</td></tr><tr><td>MI-VAE</td><td>96.47</td><td>31.19</td><td>65.27</td><td>0.6343</td><td>0.6506</td><td>0.6823</td><td>0.7056</td><td>3.31</td></tr><tr><td rowspan="3">0.6</td><td>β-VAE</td><td>101.76</td><td>42.40</td><td>59.36</td><td>0.6633</td><td>0.6899</td><td>0.6853</td><td>0.7524</td><td>3.39</td></tr><tr><td>CMI-VAE</td><td>101.83</td><td>41.97</td><td>59.86</td><td>0.6685</td><td>0.7112</td><td>0.6904</td><td>0.7659</td><td>2.43</td></tr><tr><td>MI-VAE</td><td>100.66</td><td>39.96</td><td>60.70</td><td>0.6535</td><td>0.6420</td><td>0.6854</td><td>0.6961</td><td>3.33</td></tr><tr><td>0.7</td><td>β-VAE</td><td>107.77</td><td>52.57</td><td>55.20</td><td>0.6680</td><td>0.6983</td><td>0.6900</td><td>0.7545</td><td>3.41</td></tr><tr><td rowspan="3"></td><td>CMI-VAE</td><td>107.49</td><td>51.97</td><td>55.52</td><td>0.6729</td><td>0.7103</td><td>0.6910</td><td>0.7681</td><td>2.00</td></tr><tr><td>MI-VAE</td><td>106.05</td><td>49.14</td><td>56.91</td><td>0.6578</td><td>0.6278</td><td>0.6838</td><td>0.6791</td><td>3.34</td></tr><tr><td>β-VAE</td><td>117.00</td><td>65.76</td><td>51.25</td><td>0.6649</td><td>0.7044</td><td>0.6855</td><td>0.7665</td><td>3.37</td></tr><tr><td rowspan="3">0.8</td><td>CMI-VAE</td><td>116.21</td><td>64.68</td><td>51.53</td><td>0.6634</td><td>0.7098</td><td>0.6851</td><td>0.7705</td><td>2.35</td></tr><tr><td>MI-VAE</td><td>113.98</td><td>60.19</td><td>53.79</td><td>0.6599</td><td>0.6108</td><td>0.6890</td><td>0.6709</td><td>3.31</td></tr><tr><td>β-VAE</td><td>132.62</td><td>85.13</td><td>47.49</td><td>0.6695</td><td>0.7097</td><td>0.6844</td><td>0.7787</td><td>3.47</td></tr><tr><td rowspan="3">0.9</td><td>CMI-VAE</td><td>131.01</td><td>82.97</td><td>48.04</td><td>0.6703</td><td>0.7169</td><td>0.6860</td><td>0.7780</td><td>2.74</td></tr><tr><td>MI-VAE</td><td>128.34</td><td>77.72</td><td>50.61</td><td>0.6565</td><td>0.6209</td><td>0.6880</td><td>0.6882</td><td>3.31</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 474 |
+
|
| 475 |
+

|
| 476 |
+
e 5: Real images (the first column) and generated images by PixelCNN-VAEs (the other 1 columns). The images in each row are stochastically sampled from the decoder $p ( x | z )$ using the same $z$ , which is extracted from $x$ in the first column. The figures present that the diversity of the images in $\gamma = 0 . 3$ is better than that in $\gamma = 0 . 6$ , which may be because PixelCNN-VAE would resemble an identity mapping with a large $\gamma$ . In contrast, $\gamma = 0 . 3$ apparently produces more label errors than $\gamma = 0 . 6$ because the decoder ignores $z$ with a small $\gamma$ (see, e.g., the rows for 3 and 4). Furthermore, when comparing (a) (CMI-VAE with $\gamma = 0 . 3 $ ) and (b) ( $\beta$ -VAE with $\gamma = 0 . 3$ ), apparently, (a) produces less label errors (see, e.g., the rows for 2 and 3). This result is consistent with the mCAS scores in Figure 3 (Section 5.3), which indicates that CMI-VAE achieved better diversity and less label errors than $\beta$ -VAE.
|